[Libreoffice-commits] core.git: include/vcl vcl/source

Adrien Ollier (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 10 08:57:30 UTC 2019


 include/vcl/outdev.hxx       |    5 +----
 include/vcl/virdev.hxx       |    2 ++
 vcl/source/gdi/virdev.cxx    |    5 +++++
 vcl/source/outdev/outdev.cxx |    5 +++++
 4 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 01813e6e86709c929f5e545ba206224f0bb25e5f
Author:     Adrien Ollier <adr.ollier at hotmail.fr>
AuthorDate: Mon May 6 18:59:13 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jun 10 10:56:52 2019 +0200

    tdf#74702 partial cleanup of OutDevType
    
    VirtualDevice and children are virtual, others not.
    
    Change-Id: I9ef7f4d13b26e554b000b2b51216fbdbc6892b08
    Signed-off-by: Adrien Ollier <adr.ollier at hotmail.fr>
    Reviewed-on: https://gerrit.libreoffice.org/71875
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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();


More information about the Libreoffice-commits mailing list