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 /sfx2/source/doc | |
parent | fba2d764d88582951f00af8184d481a6647a8564 (diff) |
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.hxx | 6 |
2 files changed, 15 insertions, 8 deletions
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 |