diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-24 09:36:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 09:36:59 +0200 |
commit | 799a7878fd5b3a5a01b59d0a4139a2b0908ccc43 (patch) | |
tree | 0354bc5656be965467e7e082ca5316168fc74c2d | |
parent | fba2d764d88582951f00af8184d481a6647a8564 (diff) |
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
28 files changed, 114 insertions, 101 deletions
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index a05794c10090..e69c2234e2cb 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -86,9 +86,8 @@ SfxPrinter* Shell::GetPrinter( bool bCreate ) return 0; } -sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags , bool ) { - (void)nDiffFlags; DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell()); DBG_ASSERT( pDocShell, "DocShell ?!" ); pDocShell->SetPrinter( pNewPrinter ); diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 8ded0fcda3bd..1ed8f9f950a1 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -178,7 +178,7 @@ public: // virtual sal_uInt16 Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 ); virtual SfxPrinter* GetPrinter( bool bCreate ) SAL_OVERRIDE; - virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; + virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual OUString GetSelectionText( bool bCompleteWords ) SAL_OVERRIDE; virtual bool HasSelection( bool bText ) const SAL_OVERRIDE; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 31c4ee59aad8..a8b005d3cf6e 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1201,9 +1201,9 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) // miscellaneous - Tabulator pRet->Put(SfxBoolItem(SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning())); - sal_uInt16 nFlag = aMisc.IsPaperSizeWarning() ? SFX_PRINTER_CHG_SIZE : 0; - nFlag |= aMisc.IsPaperOrientationWarning() ? SFX_PRINTER_CHG_ORIENTATION : 0; - pRet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlag )); + SfxPrinterChangeFlags nFlag = aMisc.IsPaperSizeWarning() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE; + nFlag |= aMisc.IsPaperOrientationWarning() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE; + pRet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlag) )); } break; @@ -1346,8 +1346,8 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet if(SfxItemState::SET == rSet.GetItemState(SID_PRINTER_CHANGESTODOC, false, &pItem)) { const SfxFlagItem* pFlag = static_cast<const SfxFlagItem*>(pItem); - aMisc.SetPaperSizeWarning(0 != (pFlag->GetValue() & SFX_PRINTER_CHG_SIZE )); - aMisc.SetPaperOrientationWarning(0 != (pFlag->GetValue() & SFX_PRINTER_CHG_ORIENTATION )); + aMisc.SetPaperSizeWarning(bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_SIZE )); + aMisc.SetPaperOrientationWarning(bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_ORIENTATION )); } // evaluate help options diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 7f5980e568cf..08d3682e8986 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -36,6 +36,7 @@ #include <tools/gen.hxx> #include <tools/errcode.hxx> #include <vcl/jobset.hxx> +#include <o3tl/typed_flags_set.hxx> class SfxBaseController; class Size; @@ -62,13 +63,21 @@ class NotifyEvent; class SfxInPlaceClient; namespace vcl { class PrinterController; } -#define SFX_PRINTER_PRINTER 1 // without JOB SETUP => Temporary -#define SFX_PRINTER_JOBSETUP 2 -#define SFX_PRINTER_OPTIONS 4 -#define SFX_PRINTER_CHG_ORIENTATION 8 -#define SFX_PRINTER_CHG_SIZE 16 -#define SFX_PRINTER_ALL 31 +enum class SfxPrinterChangeFlags +{ + NONE = 0, + PRINTER = 1, // without JOB SETUP => Temporary + JOBSETUP = 2, + OPTIONS = 4, + CHG_ORIENTATION = 8, + CHG_SIZE = 16 +}; +namespace o3tl +{ + template<> struct typed_flags<SfxPrinterChangeFlags> : is_typed_flags<SfxPrinterChangeFlags, 31> {}; +} +#define SFX_PRINTER_ALL (SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP | SfxPrinterChangeFlags::OPTIONS | SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE) #define SFX_PRINTERROR_BUSY 1 @@ -217,7 +226,7 @@ public: // Printing Interface virtual SfxPrinter* GetPrinter( bool bCreate = false ); - virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); + virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); virtual bool HasPrintOptionsPage() const; virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ); JobSetup GetJobSetup() const; diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 0a0e03d7d296..74756f598f79 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -130,12 +130,12 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist) NULL ); ::utl::MiscCfg aMisc; - sal_uInt16 nFlags = 0; + SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE; if ( aMisc.IsPaperOrientationWarning() ) - nFlags |= SFX_PRINTER_CHG_ORIENTATION; + nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION; if ( aMisc.IsPaperSizeWarning() ) - nFlags |= SFX_PRINTER_CHG_SIZE; - pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) ); + nFlags |= SfxPrinterChangeFlags::CHG_SIZE; + pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) ); pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); pPrinter = new SfxPrinter( pSet ); @@ -177,12 +177,12 @@ void ScDocument::SetPrintOptions() ::utl::MiscCfg aMisc; SfxItemSet aOptSet( pPrinter->GetOptions() ); - sal_uInt16 nFlags = 0; + SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE; if ( aMisc.IsPaperOrientationWarning() ) - nFlags |= SFX_PRINTER_CHG_ORIENTATION; + nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION; if ( aMisc.IsPaperSizeWarning() ) - nFlags |= SFX_PRINTER_CHG_SIZE; - aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) ); + nFlags |= SfxPrinterChangeFlags::CHG_SIZE; + aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlags) ) ); aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); pPrinter->SetOptions( aOptSet ); diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 950664ac7f18..568556acbf82 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -450,13 +450,13 @@ OutputDevice* ScDocShell::GetRefDevice() return aDocument.GetRefDevice(); } -sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags ) +sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags ) { SfxPrinter *pOld = aDocument.GetPrinter( false ); if ( pOld && pOld->IsPrinting() ) return SFX_PRINTERROR_BUSY; - if (nDiffFlags & SFX_PRINTER_PRINTER) + if (nDiffFlags & SfxPrinterChangeFlags::PRINTER) { if ( aDocument.GetPrinter() != pNewPrinter ) { @@ -491,7 +491,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag } } } - else if (nDiffFlags & SFX_PRINTER_JOBSETUP) + else if (nDiffFlags & SfxPrinterChangeFlags::JOBSETUP) { SfxPrinter* pOldPrinter = aDocument.GetPrinter(); if (pOldPrinter) @@ -506,12 +506,12 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag } } - if (nDiffFlags & SFX_PRINTER_OPTIONS) + if (nDiffFlags & SfxPrinterChangeFlags::OPTIONS) { aDocument.SetPrintOptions(); //! aus neuem Printer ??? } - if (nDiffFlags & (SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE)) + if (nDiffFlags & (SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE)) { OUString aStyle = aDocument.GetPageStyle( GetCurTab() ); ScStyleSheetPool* pStPl = aDocument.GetStyleSheetPool(); @@ -520,7 +520,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag { SfxItemSet& rSet = pStyleSheet->GetItemSet(); - if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION) + if (nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION) { const SvxPageItem& rOldItem = static_cast<const SvxPageItem&>(rSet.Get(ATTR_PAGE)); bool bWasLand = rOldItem.IsLandscape(); @@ -538,7 +538,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag rSet.Put( aNewSItem ); } } - if (nDiffFlags & SFX_PRINTER_CHG_SIZE) + if (nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE) { SvxSizeItem aPaperSizeItem( ATTR_PAGE_SIZE, SvxPaperInfo::GetPaperSize(pNewPrinter) ); rSet.Put( aPaperSizeItem ); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 423e13e7337e..990ecce1790e 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -234,7 +234,7 @@ public: void SetDocFunc( ScDocFunc *pDF ) { pDocFunc = pDF; } SfxPrinter* GetPrinter( bool bCreateIfNotExist = true ); - sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL ); + sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ); void UpdateFontList(); diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index 7c578765db53..d8bec53db738 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -107,7 +107,7 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; - virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; + virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 7f1fd8498706..81e800450180 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -345,7 +345,7 @@ public: // Drucken: virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, - sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) SAL_OVERRIDE; + SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 6cd3204f2ad5..68ca1df7bcbe 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -193,7 +193,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( { SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName ); if (pNewPrinter->IsKnown()) - pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER ); + pDocShell->SetPrinter( pNewPrinter, SfxPrinterChangeFlags::PRINTER ); else delete pNewPrinter; } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index e79dd92921bb..29398d4fdc13 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -521,7 +521,7 @@ SfxPrinter* ScPreviewShell::GetPrinter( bool bCreate ) return pDocShell->GetPrinter(bCreate); } -sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool ) { return pDocShell->SetPrinter( pNewPrinter, nDiffFlags ); } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index a943245a69c4..7076f815ae70 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1053,7 +1053,7 @@ SfxPrinter* ScTabViewShell::GetPrinter( bool bCreate ) return GetViewData().GetDocShell()->GetPrinter(bCreate); } -sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool ) { return GetViewData().GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags ); } diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 9ca9b60eccd5..b6f924d026c0 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -635,11 +635,10 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // set PrintOptionsSet SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT, pOptions ); SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC ); - sal_uInt16 nFlags = 0; - - nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) | - (aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0); - aFlagItem.SetValue( nFlags ); + SfxPrinterChangeFlags nFlags = + (aPrintItem.GetOptionsPrint().IsWarningSize() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE) | + (aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE); + aFlagItem.SetValue( static_cast<int>(nFlags) ); aPrintSet.Put( aPrintItem ); aPrintSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 4ad0774d3ffd..b6663dbddb63 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -100,11 +100,10 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate) SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT, SD_MOD()->GetSdOptions(mpDoc->GetDocumentType())); SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC ); - sal_uInt16 nFlags = 0; - - nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) | - (aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0); - aFlagItem.SetValue( nFlags ); + SfxPrinterChangeFlags nFlags = + (aPrintItem.GetOptionsPrint().IsWarningSize() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE) | + (aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE); + aFlagItem.SetValue( static_cast<int>(nFlags) ); pSet->Put( aPrintItem ); pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) ); diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 12bef3f1232a..e1a180757c2c 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -139,7 +139,7 @@ public: /// Forwarded to the print manager. virtual sal_uInt16 SetPrinter ( SfxPrinter* pNewPrinter, - sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false) SAL_OVERRIDE; + SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false) SAL_OVERRIDE; /// Forward methods to main sub shell. virtual void WriteUserDataSequence ( diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 92832d266ada..1f175917e4da 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -513,15 +513,15 @@ SfxPrinter* ViewShellBase::GetPrinter (bool bCreate) sal_uInt16 ViewShellBase::SetPrinter ( SfxPrinter* pNewPrinter, - sal_uInt16 nDiffFlags, + SfxPrinterChangeFlags nDiffFlags, bool bIsAPI) { OSL_ASSERT(mpImpl.get()!=NULL); GetDocShell()->SetPrinter(pNewPrinter); - if ( (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION || - nDiffFlags & SFX_PRINTER_CHG_SIZE) && pNewPrinter ) + if ( (nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION || + nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE) && pNewPrinter ) { MapMode aMap = pNewPrinter->GetMapMode(); aMap.SetMapUnit(MAP_100TH_MM); diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index 27f2e62981f5..c7db58f3b118 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -312,7 +312,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro // XPrintable -void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >& rPrinter,SfxPrinter*& pPrinter,sal_uInt16& nChangeFlags,SfxViewShell*& pViewSh) +void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >& rPrinter, + SfxPrinter*& pPrinter, + SfxPrinterChangeFlags& nChangeFlags, + SfxViewShell*& pViewSh) { // Get old Printer @@ -327,7 +330,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > return; // new Printer-Name available? - nChangeFlags = 0; + nChangeFlags = SfxPrinterChangeFlags::NONE; sal_Int32 lDummy = 0; for ( int n = 0; n < rPrinter.getLength(); ++n ) { @@ -344,7 +347,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > if ( aPrinterName != pPrinter->GetName() ) { pPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aPrinterName ); - nChangeFlags = SFX_PRINTER_PRINTER; + nChangeFlags = SfxPrinterChangeFlags::PRINTER; } break; } @@ -373,7 +376,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > if ( (Orientation) eOrient != pPrinter->GetOrientation() ) { pPrinter->SetOrientation( (Orientation) eOrient ); - nChangeFlags |= SFX_PRINTER_CHG_ORIENTATION; + nChangeFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION; } } @@ -390,7 +393,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > if ( convertToPaper(nPaperFormat) != pPrinter->GetPaper() ) { pPrinter->SetPaper( convertToPaper(nPaperFormat) ); - nChangeFlags |= SFX_PRINTER_CHG_SIZE; + nChangeFlags |= SfxPrinterChangeFlags::CHG_SIZE; } } @@ -437,7 +440,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > if( aSetPaperSize != pPrinter->GetPaperSizePixel() ) { pPrinter->SetPaperSizeUser( pPrinter->PixelToLogic( aSetPaperSize ) ); - nChangeFlags |= SFX_PRINTER_CHG_SIZE; + nChangeFlags |= SfxPrinterChangeFlags::CHG_SIZE; } } @@ -455,7 +458,7 @@ void SAL_CALL SfxPrintHelper::setPrinter(const uno::Sequence< beans::PropertyVal SfxViewShell* pViewSh = NULL; SfxPrinter* pPrinter = NULL; - sal_uInt16 nChangeFlags = 0; + SfxPrinterChangeFlags nChangeFlags = SfxPrinterChangeFlags::NONE; impl_setPrinter(rPrinter,pPrinter,nChangeFlags,pViewSh); // set new printer if ( pViewSh && pPrinter ) diff --git a/sfx2/source/doc/printhelper.hxx b/sfx2/source/doc/printhelper.hxx index 09f15f808bcf..ef4e31d2bd03 100644 --- a/sfx2/source/doc/printhelper.hxx +++ b/sfx2/source/doc/printhelper.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <sfx2/dllapi.h> +#include <sfx2/viewsh.hxx> #include <sal/types.h> #include <com/sun/star/view/XPrintable.hpp> @@ -60,7 +61,10 @@ private: osl::Mutex m_aMutex; IMPL_PrintListener_DataContainer* m_pData ; - void impl_setPrinter(const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rPrinter,SfxPrinter*& pPrinter,sal_uInt16& nChangeFlags,SfxViewShell*& pViewSh); + void impl_setPrinter(const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rPrinter, + SfxPrinter*& pPrinter, + SfxPrinterChangeFlags& nChangeFlags, + SfxViewShell*& pViewSh); } ; #endif diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 21045325bc5f..34716d67aabe 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -386,7 +386,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt { SfxPrinter* pNewPrt = new SfxPrinter( pDocPrt->GetOptions().Clone(), getPrinter()->GetName() ); pNewPrt->SetJobSetup( getPrinter()->GetJobSetup() ); - mpViewShell->SetPrinter( pNewPrt, SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP ); + mpViewShell->SetPrinter( pNewPrt, SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ); } } } @@ -478,8 +478,8 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC); const SfxFlagItem *pFlagItem = 0; pDocPrinter->GetOptions().GetItemState( nWhich, false, reinterpret_cast<const SfxPoolItem**>(&pFlagItem) ); - bool bOriToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION); - bool bSizeToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE); + bool bOriToDoc = pFlagItem && (static_cast<SfxPrinterChangeFlags>(pFlagItem->GetValue()) & SfxPrinterChangeFlags::CHG_ORIENTATION); + bool bSizeToDoc = pFlagItem && (static_cast<SfxPrinterChangeFlags>(pFlagItem->GetValue()) & SfxPrinterChangeFlags::CHG_SIZE); // Determine the previous format and size Orientation eOldOri = pDocPrinter->GetOrientation(); @@ -499,25 +499,25 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) // Message and Flags for page format, summaries changes OUString aMsg; - sal_uInt16 nNewOpt=0; + SfxPrinterChangeFlags nNewOpt = SfxPrinterChangeFlags::NONE; if( bOriChg && bPgSzChg ) { aMsg = SfxResId(STR_PRINT_NEWORISIZE).toString(); - nNewOpt = SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE; + nNewOpt = SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE; } else if (bOriChg ) { aMsg = SfxResId(STR_PRINT_NEWORI).toString(); - nNewOpt = SFX_PRINTER_CHG_ORIENTATION; + nNewOpt = SfxPrinterChangeFlags::CHG_ORIENTATION; } else if (bPgSzChg) { aMsg = SfxResId(STR_PRINT_NEWSIZE).toString(); - nNewOpt = SFX_PRINTER_CHG_SIZE; + nNewOpt = SfxPrinterChangeFlags::CHG_SIZE; } // Summaries in this variable what has been changed. - sal_uInt16 nChangedFlags = 0; + SfxPrinterChangeFlags nChangedFlags = SfxPrinterChangeFlags::NONE; // Ask if possible, if page format should be taken over from printer. if ( ( bOriChg || bPgSzChg ) && @@ -535,7 +535,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) // or the other way around? if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) ) { - nChangedFlags |= SFX_PRINTER_PRINTER|SFX_PRINTER_JOBSETUP; + nChangedFlags |= SfxPrinterChangeFlags::PRINTER|SfxPrinterChangeFlags::JOBSETUP; pDocPrinter = pNewPrinter; } else @@ -545,7 +545,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) { // Option have changed pDocPrinter->SetOptions( pNewPrinter->GetOptions() ); - nChangedFlags |= SFX_PRINTER_OPTIONS; + nChangedFlags |= SfxPrinterChangeFlags::OPTIONS; } // Compare JobSetups @@ -553,7 +553,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) JobSetup aOldJobSetup = pDocPrinter->GetJobSetup(); if ( aNewJobSetup != aOldJobSetup ) { - nChangedFlags |= SFX_PRINTER_JOBSETUP; + nChangedFlags |= SfxPrinterChangeFlags::JOBSETUP; } // Keep old changed Printer. @@ -561,7 +561,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) delete pNewPrinter; } - if ( 0 != nChangedFlags ) + if ( SfxPrinterChangeFlags::NONE != nChangedFlags ) // SetPrinter will delete the old printer if it changes SetPrinter( pDocPrinter, nChangedFlags ); return pDocPrinter; @@ -781,7 +781,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // just set a recorded printer name if ( pPrinter ) - SetPrinter( pPrinter, SFX_PRINTER_PRINTER ); + SetPrinter( pPrinter, SfxPrinterChangeFlags::PRINTER ); return; } @@ -843,7 +843,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) else { pPrinter->SetOptions( *pExecutor->GetOptions() ); - SetPrinter( pPrinter, SFX_PRINTER_OPTIONS ); + SetPrinter( pPrinter, SfxPrinterChangeFlags::OPTIONS ); } } @@ -887,7 +887,7 @@ SfxPrinter* SfxViewShell::GetPrinter( bool /*bCreate*/ ) return 0; } -sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, sal_uInt16 /*nDiffFlags*/, bool ) +sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChangeFlags /*nDiffFlags*/, bool ) { return 0; } diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 9a59199eda55..85bfbdb52194 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -262,7 +262,7 @@ protected: virtual SfxPrinter *GetPrinter(bool bCreate = false) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter, - sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false) SAL_OVERRIDE; + SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false) SAL_OVERRIDE; void Insert( SfxMedium& rMedium ); void InsertFrom(SfxMedium &rMedium); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 31bc611a1948..5635f3c4e77d 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1327,16 +1327,16 @@ SfxPrinter* SmViewShell::GetPrinter(bool bCreate) return 0; } -sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool ) { SfxPrinter *pOld = GetDoc()->GetPrinter(); if ( pOld && pOld->IsPrinting() ) return SFX_PRINTERROR_BUSY; - if ((nDiffFlags & SFX_PRINTER_PRINTER) == SFX_PRINTER_PRINTER) + if ((nDiffFlags & SfxPrinterChangeFlags::PRINTER) == SfxPrinterChangeFlags::PRINTER) GetDoc()->SetPrinter( pNewPrinter ); - if ((nDiffFlags & SFX_PRINTER_OPTIONS) == SFX_PRINTER_OPTIONS) + if ((nDiffFlags & SfxPrinterChangeFlags::OPTIONS) == SfxPrinterChangeFlags::OPTIONS) { SmModule *pp = SM_MOD(); pp->GetConfig()->ItemSetToConfig(pNewPrinter->GetOptions()); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index df8550dc27fa..47ede5c4a0c8 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -165,7 +165,7 @@ void SwDocShell::ToggleBrowserMode(bool bSet, SwView* _pView ) { pTempView->GetViewFrame()->GetBindings().Invalidate(FN_SHADOWCURSOR); if( !GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) ) - pTempView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP ); + pTempView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ); GetDoc()->CheckDefaultPageFmt(); SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, false); while (pTmpFrm) diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index d486f1764ba5..b33a4518b625 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -190,7 +190,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true ); SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; - SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; + SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; SAL_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx index 8ec289d5fcdb..ab37058fb371 100644 --- a/sw/source/uibase/inc/srcview.hxx +++ b/sw/source/uibase/inc/srcview.hxx @@ -78,7 +78,7 @@ public: void Load(SwDocShell* pDocShell); - virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; + virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly ); diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index b921216375bc..8cd1d5cf01ca 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -404,7 +404,7 @@ public: virtual ErrCode DoVerb( long nVerb ) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, - sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false) SAL_OVERRIDE; + SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL, bool bIsAPI=false) SAL_OVERRIDE; ShellModes GetShellMode(); com::sun::star::view::XSelectionSupplier* GetUNOObject(); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index b713b2ae477c..83cc23ffc4d3 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1635,7 +1635,7 @@ SfxPrinter* SwPagePreview::GetPrinter( bool bCreate ) return pViewWin->GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate ); } -sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags nDiffFlags, bool ) { SwViewShell &rSh = *GetViewShell(); SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false ); @@ -1643,17 +1643,17 @@ sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, return SFX_PRINTERROR_BUSY; SwEditShell &rESh = static_cast<SwEditShell&>(rSh); //Buh... - if( ( SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP ) & nDiffFlags ) + if( ( SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ) & nDiffFlags ) { rSh.getIDocumentDeviceAccess()->setPrinter( pNew, true, true ); - if( nDiffFlags & SFX_PRINTER_PRINTER ) + if( nDiffFlags & SfxPrinterChangeFlags::PRINTER ) rESh.SetModified(); } - if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS ) + if ( ( nDiffFlags & SfxPrinterChangeFlags::OPTIONS ) == SfxPrinterChangeFlags::OPTIONS ) ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, false ); - const bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION; - const bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE; + const bool bChgOri = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION); + const bool bChgSize = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE); if ( bChgOri || bChgSize ) { rESh.StartAllAction(); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index fc0a8dea0ab6..558210728968 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -661,20 +661,20 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, return nFound; } -sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool ) { SwDocShell* pDocSh = GetDocShell(); - if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags ) + if ( (SfxPrinterChangeFlags::JOBSETUP | SfxPrinterChangeFlags::PRINTER) & nDiffFlags ) { pDocSh->GetDoc()->getIDocumentDeviceAccess().setPrinter( pNew, true, true ); - if ( nDiffFlags & SFX_PRINTER_PRINTER ) + if ( nDiffFlags & SfxPrinterChangeFlags::PRINTER ) pDocSh->SetModified(); } - if ( nDiffFlags & SFX_PRINTER_OPTIONS ) + if ( nDiffFlags & SfxPrinterChangeFlags::OPTIONS ) ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, true ); - const bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION; - const bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE; + const bool bChgOri = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION); + const bool bChgSize = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE); if ( bChgOri || bChgSize ) { pDocSh->SetModified(); diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f2112af54455..a9e63c363856 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -104,25 +104,25 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb ) } } -sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool ) +sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool ) { SwWrtShell &rSh = GetWrtShell(); SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false ); if ( pOld && pOld->IsPrinting() ) return SFX_PRINTERROR_BUSY; - if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags ) + if ( (SfxPrinterChangeFlags::JOBSETUP | SfxPrinterChangeFlags::PRINTER) & nDiffFlags ) { rSh.getIDocumentDeviceAccess()->setPrinter( pNew, true, true ); - if ( nDiffFlags & SFX_PRINTER_PRINTER ) + if ( nDiffFlags & SfxPrinterChangeFlags::PRINTER ) rSh.SetModified(); } bool bWeb = this->ISA(SwWebView); - if ( nDiffFlags & SFX_PRINTER_OPTIONS ) + if ( nDiffFlags & SfxPrinterChangeFlags::OPTIONS ) ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb ); - const bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION; - const bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE; + const bool bChgOri = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION); + const bool bChgSize = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE); if ( bChgOri || bChgSize ) { rSh.StartAllAction(); @@ -295,8 +295,8 @@ void SetAppPrintOptions( SwViewShell* pSh, bool bWeb ) aMisc.IsNotFoundWarning() )); aSet.Put(aAddPrinterItem); aSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, - (aMisc.IsPaperSizeWarning() ? SFX_PRINTER_CHG_SIZE : 0) | - (aMisc.IsPaperOrientationWarning() ? SFX_PRINTER_CHG_ORIENTATION : 0 ))); + static_cast<int>(aMisc.IsPaperSizeWarning() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE) | + static_cast<int>(aMisc.IsPaperOrientationWarning() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE ))); pIDDA->getPrinter( true )->SetOptions( aSet ); } |