summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 09:36:29 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:36:59 +0200
commit799a7878fd5b3a5a01b59d0a4139a2b0908ccc43 (patch)
tree0354bc5656be965467e7e082ca5316168fc74c2d /include/sfx2
parentfba2d764d88582951f00af8184d481a6647a8564 (diff)
convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/viewsh.hxx23
1 files changed, 16 insertions, 7 deletions
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;