printerpullpages: #i106507# remove layout page for math
This commit is contained in:
parent
7a172afb40
commit
969bf03a94
4 changed files with 29 additions and 10 deletions
|
@ -460,6 +460,10 @@ public:
|
|||
const com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName ) const;
|
||||
// get a sequence of properties
|
||||
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getValues( const com::sun::star::uno::Sequence< rtl::OUString >& ) const;
|
||||
/* get a bool property
|
||||
in case the property is unknown or not convertible to bool, i_bFallback is returned
|
||||
*/
|
||||
sal_Bool getBoolProperty( const rtl::OUString& i_rPropertyName, sal_Bool i_bFallback ) const;
|
||||
|
||||
/* set a property value - can also be used to add another UI property
|
||||
*/
|
||||
|
|
|
@ -256,6 +256,8 @@ namespace vcl
|
|||
Size maDetailsCollapsedSize;
|
||||
Size maDetailsExpandedSize;
|
||||
|
||||
sal_Bool mbShowLayoutPage;
|
||||
|
||||
Size getJobPageSize();
|
||||
void updateNup();
|
||||
void updateNupFromPages();
|
||||
|
|
|
@ -1413,22 +1413,25 @@ void PrinterController::pushPropertiesToPrinter()
|
|||
|
||||
bool PrinterController::isShowDialogs() const
|
||||
{
|
||||
sal_Bool bApi = sal_False;
|
||||
const com::sun::star::beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsApi" ) ) );
|
||||
if( pVal )
|
||||
pVal->Value >>= bApi;
|
||||
sal_Bool bApi = getBoolProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsApi" ) ), sal_False );
|
||||
return ! bApi && ! Application::IsHeadlessModeEnabled();
|
||||
}
|
||||
|
||||
bool PrinterController::isDirectPrint() const
|
||||
{
|
||||
sal_Bool bDirect = sal_False;
|
||||
const com::sun::star::beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ) );
|
||||
if( pVal )
|
||||
pVal->Value >>= bDirect;
|
||||
sal_Bool bDirect = getBoolProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ), sal_False );
|
||||
return bDirect == sal_True;
|
||||
}
|
||||
|
||||
sal_Bool PrinterController::getBoolProperty( const rtl::OUString& i_rProperty, sal_Bool i_bFallback ) const
|
||||
{
|
||||
sal_Bool bRet = i_bFallback;
|
||||
const com::sun::star::beans::PropertyValue* pVal = getValue( i_rProperty );
|
||||
if( pVal )
|
||||
pVal->Value >>= bRet;
|
||||
return bRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* PrinterOptionsHelper
|
||||
**/
|
||||
|
|
|
@ -725,6 +725,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
|
|||
, mnCachedPages( 0 )
|
||||
, maPrintToFileText( String( VclResId( SV_PRINT_TOFILE_TXT ) ) )
|
||||
, maDefPrtText( String( VclResId( SV_PRINT_DEFPRT_TXT ) ) )
|
||||
, mbShowLayoutPage( sal_True )
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
|
@ -888,8 +889,11 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
|
|||
maTabCtrl.SMHID1( "TabPages" );
|
||||
|
||||
// append further tab pages
|
||||
maTabCtrl.InsertPage( SV_PRINT_TAB_NUP, maNUpPage.GetText() );
|
||||
maTabCtrl.SetTabPage( SV_PRINT_TAB_NUP, &maNUpPage );
|
||||
if( mbShowLayoutPage )
|
||||
{
|
||||
maTabCtrl.InsertPage( SV_PRINT_TAB_NUP, maNUpPage.GetText() );
|
||||
maTabCtrl.SetTabPage( SV_PRINT_TAB_NUP, &maNUpPage );
|
||||
}
|
||||
maTabCtrl.InsertPage( SV_PRINT_TAB_OPT, maOptionsPage.GetText() );
|
||||
maTabCtrl.SetTabPage( SV_PRINT_TAB_OPT, &maOptionsPage );
|
||||
}
|
||||
|
@ -1141,6 +1145,12 @@ void PrintDialog::setupOptionalUI()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if( rEntry.Name.equalsAscii( "HintNoLayoutPage" ) )
|
||||
{
|
||||
sal_Bool bNoLayoutPage = sal_False;
|
||||
rEntry.Value >>= bNoLayoutPage;
|
||||
mbShowLayoutPage = ! bNoLayoutPage;
|
||||
}
|
||||
}
|
||||
|
||||
// bUseDependencyRow should only be true if a dependency exists
|
||||
|
|
Loading…
Reference in a new issue