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 /sd | |
parent | fba2d764d88582951f00af8184d481a6647a8564 (diff) |
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/app/sdmod2.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 6 |
4 files changed, 12 insertions, 14 deletions
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); |