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

Chris Sherlock chris.sherlock79 at gmail.com
Tue Mar 25 06:29:14 PDT 2014


 include/vcl/virdev.hxx    |    2 +-
 vcl/source/gdi/virdev.cxx |   12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit d4071188b8572441fd9c2b592e44a5ebfd1f1430
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Wed Mar 26 00:10:58 2014 +1100

    Fix to commit 03568b2e2405fc44435b95720f3680ab1daea836
    
    During a rebase I accidentally removed the VirtualDevice::EnableRTL().
    Also taking the opportunity to make the function virtual in window.hxx.
    
    Change-Id: Ic239d8dc131dfcc6b049c30d2fad4d2d12059059
    Reviewed-on: https://gerrit.libreoffice.org/8745
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index e5e5c54..f413e48 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -113,7 +113,7 @@ public:
 
     virtual             ~VirtualDevice();
 
-    void                EnableRTL( bool bEnable = true );
+    virtual void        EnableRTL( bool bEnable = true );
 
     bool                SetOutputSizePixel( const Size& rNewSize, bool bErase = true );
     bool                SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 6fc68d2..8dcc804 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -422,6 +422,18 @@ bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, c
     return false;
 }
 
+void VirtualDevice::EnableRTL( bool bEnable )
+{
+    // virdevs default to not mirroring, they will only be set to mirroring
+    // under rare circumstances in the UI, eg the valueset control
+    // because each virdev has its own SalGraphics we can safely switch the SalGraphics here
+    // ...hopefully
+    if( ImplGetGraphics() )
+        mpGraphics->SetLayout( bEnable ? SAL_LAYOUT_BIDI_RTL : 0 );
+
+    OutputDevice::EnableRTL(bEnable);
+}
+
 bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase )
 {
     return ImplSetOutputSizePixel( rNewSize, bErase, basebmp::RawMemorySharedArray() );


More information about the Libreoffice-commits mailing list