summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/dlgctrl.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-04-03 15:57:06 +0000
committerKurt Zenker <kz@openoffice.org>2008-04-03 15:57:06 +0000
commit85f6665aac33a96bb6bb9a7b3f5305c8397248f3 (patch)
treed37d6071ec101e216f87ca68a952856c4ba5f5be /svx/source/dialog/dlgctrl.cxx
parentINTEGRATION: CWS vcl87 (1.11.38); FILE MERGED (diff)
downloadcore-85f6665aac33a96bb6bb9a7b3f5305c8397248f3.tar.gz
core-85f6665aac33a96bb6bb9a7b3f5305c8397248f3.zip
INTEGRATION: CWS vcl87 (1.33.326); FILE MERGED
2008/03/03 14:43:48 pl 1.33.326.1: #i76307# take RTL UI into account
Diffstat (limited to 'svx/source/dialog/dlgctrl.cxx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 2ccef8e5dfdc..2287da0e31b4 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dlgctrl.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: rt $ $Date: 2007-07-06 07:33:32 $
+ * last change: $Author: kz $ $Date: 2008-04-03 16:57:06 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1396,7 +1396,23 @@ void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
aGradient.SetEndIntensity( rXGrad.GetEndIntens() );
aGradient.SetSteps( 255 );
- pDevice->DrawGradient( aRect, aGradient );
+ // #i76307# always paint the preview in LTR, because this is what the document does
+ Window* pWin = dynamic_cast<Window*>(pDevice);
+ if( pWin && pWin->IsRTLEnabled() && Application::GetSettings().GetLayoutRTL())
+ {
+ long nWidth = pDevice->GetOutputSize().Width();
+
+ pWin->EnableRTL( FALSE );
+
+ Rectangle aMirrorRect( Point( nWidth - aRect.Left() - aRect.GetWidth(), aRect.Top() ),
+ aRect.GetSize() );
+
+ pDevice->DrawGradient( aMirrorRect, aGradient );
+
+ pWin->EnableRTL( TRUE );
+ }
+ else
+ pDevice->DrawGradient( aRect, aGradient );
pDevice->SetLineColor( COL_BLACK );
pDevice->SetFillColor();