diff options
author | Adrien Ollier <adr.ollier@hotmail.fr> | 2019-05-06 18:59:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-10 10:56:52 +0200 |
commit | 01813e6e86709c929f5e545ba206224f0bb25e5f (patch) | |
tree | 033526157e3fed194e3803c94bfe238a96acc541 | |
parent | 1eb8859813ff43b3753dcbab9e3e0bdfe7d72edb (diff) |
tdf#74702 partial cleanup of OutDevType
VirtualDevice and children are virtual, others not.
Change-Id: I9ef7f4d13b26e554b000b2b51216fbdbc6892b08
Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr>
Reviewed-on: https://gerrit.libreoffice.org/71875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/vcl/outdev.hxx | 5 | ||||
-rw-r--r-- | include/vcl/virdev.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 5 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 5 |
4 files changed, 13 insertions, 4 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 8f8c009fa291..fc52c7890b48 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -520,10 +520,7 @@ public: } OutDevType GetOutDevType() const { return meOutDevType; } - bool IsVirtual() const - { - return (meOutDevType == OUTDEV_VIRDEV) || (meOutDevType == OUTDEV_PDF); - } + virtual bool IsVirtual() const; /** Query an OutputDevice to see whether it supports a specific operation diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 7e9ba25dfca1..2ae778eb73ba 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -170,6 +170,8 @@ public: virtual sal_uInt16 GetBitCount() const override; + bool IsVirtual() const override; + private: SAL_DLLPRIVATE void ImplSetReferenceDevice( RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ); diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 4463ad1ac8b9..ed6123ce2055 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -443,6 +443,11 @@ void VirtualDevice::SetReferenceDevice( sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ) ImplSetReferenceDevice( RefDevMode::Custom, i_nDPIX, i_nDPIY ); } +bool VirtualDevice::IsVirtual() const +{ + return true; +} + void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ) { mnDPIX = i_nDPIX; diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 65db4d0a51ef..ef512a80d6e4 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -189,6 +189,11 @@ void OutputDevice::dispose() VclReferenceBase::dispose(); } +bool OutputDevice::IsVirtual() const +{ + return false; +} + SalGraphics* OutputDevice::GetGraphics() { DBG_TESTSOLARMUTEX(); |