From fff3c9d6e56ae380437333f9c15ff63742904f25 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 23 Aug 2015 20:46:53 +0100 Subject: don't mirror 0, RECT_EMPTY, 0, RECT_EMPTY rectangle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leave it untouched to make gtk3 rtl spin buttons possible where the additional mirrorValue contains the region of the spinbuttons to render within this rectangle Change-Id: I2648d98ed36373c95947cc4d78e2e54797f01155 Reviewed-on: https://gerrit.libreoffice.org/17940 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/gdi/salgdilayout.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 2771c9d61c53..df124a9d8336 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -703,7 +703,9 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) { Rectangle rgn( rControlRegion ); - mirror( rgn, pOutDev ); + Rectangle aNull; + if (rgn != aNull) + mirror(rgn, pOutDev); std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); -- cgit