diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-31 16:15:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-01 11:05:21 +0200 |
commit | a53e6e2b3cc92e46961260137208eacec474093f (patch) | |
tree | a47369a1bb4b76af34bbd94e194a681606ce5085 /include/vcl/virdev.hxx | |
parent | 3a897f7cbf44f44f2baa750f85d9aecbbbd2b6f9 (diff) |
convert RefDevMode to scoped enum
and fix the bForceZeroExtleadBug TODO
Change-Id: Iac9295c6ce31112d69a870e3a229823eb1e9a4f2
Diffstat (limited to 'include/vcl/virdev.hxx')
-rw-r--r-- | include/vcl/virdev.hxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 084ed9b97a1e..3ec857345df7 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -33,6 +33,14 @@ class VCL_DLLPUBLIC VirtualDevice : public OutputDevice friend class Application; friend class ::OutputDevice; friend class Printer; +public: + // reference device modes for different compatibility levels + enum class RefDevMode { NONE = 0, + Dpi600 = 1, // 600 dpi + MSO1 = 3, + PDF1 = 4, + Custom = 5 + }; private: SalVirtualDevice* mpVirDev; @@ -42,7 +50,8 @@ private: bool mbScreenComp; DeviceFormat meFormat; DeviceFormat meAlphaFormat; - sal_uInt8 meRefDevMode; + RefDevMode meRefDevMode; + bool mbForceZeroExtleadBug; SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ); SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, @@ -59,10 +68,7 @@ private: */ SAL_DLLPRIVATE void ImplFillOpaqueRectangle( const Rectangle& rRect ); - // TODO: add extra member for refdev backward compatibility options - #define REFDEV_FORCE_ZERO_EXTLEAD 0x80 - SAL_DLLPRIVATE bool ForceZeroExtleadBug() const - { return ((meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD) != 0); } + SAL_DLLPRIVATE bool ForceZeroExtleadBug() const { return mbForceZeroExtleadBug; } protected: virtual bool AcquireGraphics() const override; @@ -131,14 +137,6 @@ public: bool SetOutputSize( const Size& rNewSize ) { return SetOutputSizePixel( LogicToPixel( rNewSize ) ); } - // reference device modes for different compatibility levels - enum RefDevMode { REFDEV_NONE = 0, - REFDEV_MODE06 = 1, // 600 dpi - REFDEV_MODE_MSO1 = 3, - REFDEV_MODE_PDF1 = 4, - REFDEV_CUSTOM = 5 - }; - void SetReferenceDevice( RefDevMode ); void Compat_ZeroExtleadBug(); // enable workaround for #i60495# |