summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-02-16 13:39:47 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-02-16 13:39:47 +0000
commit6502ed62052758138c49db49d91c40d76101135c (patch)
tree09c586521a91362f30a44ef9ce3b41cde6ffeb20
parent589b35f095d72a9f72542e193e6cb2831efff12b (diff)
CWS-TOOLING: integrate CWS dr66_OOO310
2009-01-22 15:51:40 +0100 dr r266730 : #i98028# moved to CWS dr66 2009-01-22 15:50:28 +0100 dr r266729 : #i98028# moved to CWS dr66 2009-01-20 16:25:49 +0100 dr r266595 : #i98282# resolve palette colors while loading chart gradients (convert back to unx lineends...) 2009-01-20 16:23:19 +0100 dr r266594 : #i98282# resolve palette colors while loading chart gradients 2009-01-19 15:43:57 +0100 dr r266507 : #i97900# move fix to CWS dr66 2009-01-19 15:40:28 +0100 dr r266506 : #i97900# move fix to CWS dr66 2009-01-19 15:20:14 +0100 dr r266505 : #i98141# correctly update note position while switching LTR/RTL mode of sheet 2009-01-06 10:28:02 +0100 dr r265899 : CWS-TOOLING: rebase CWS dr66 to trunk@265758 (milestone: DEV300:m38) 2008-11-13 13:59:02 +0100 dr r263644 : #i10000# merge problems 2008-11-13 13:25:15 +0100 dr r263639 : #i10000# merge problems 2008-11-13 13:22:58 +0100 dr r263638 : #i10000# merge problems 2008-11-13 13:22:25 +0100 dr r263637 : #i10000# merge problems 2008-11-12 13:40:46 +0100 dr r263595 : #i10000# merge problem 2008-11-12 11:34:51 +0100 dr r263583 : CWS-TOOLING: rebase CWS dr66 to trunk@263288 (milestone: DEV300:m35) 2008-11-11 16:58:11 +0100 dr r263568 : CWS-TOOLING: rebase CWS dr66 to trunk@262087 (milestone: DEV300:m33) 2008-10-27 14:38:34 +0100 dr r262675 : migrate CWS dr66 to SVN
-rw-r--r--svtools/inc/tabbar.hxx16
-rw-r--r--svtools/source/control/tabbar.cxx30
2 files changed, 34 insertions, 12 deletions
diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/tabbar.hxx
index 9c08cc0cd7..47da231372 100644
--- a/svtools/inc/tabbar.hxx
+++ b/svtools/inc/tabbar.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -478,10 +478,22 @@ public:
BOOL IsEditModeCanceled() const { return mbEditCanceled; }
USHORT GetEditPageId() const { return mnEditId; }
- /** Mirrors the entire control. It will draw RTL in LTR GUI, and vice versa. */
+ /** Mirrors the entire control including position of buttons and splitter.
+ Mirroring is done relative to the current direction of the GUI.
+ @param bMirrored TRUE = the control will draw itself RTL in LTR GUI,
+ and vice versa; FALSE = the control behaves according to the
+ current direction of the GUI. */
void SetMirrored( BOOL bMirrored = TRUE );
+ /** Returns TRUE, if the control is set to mirrored mode (see SetMirrored()). */
BOOL IsMirrored() const { return mbMirrored; }
+ /** Sets the control to LTR or RTL mode regardless of the GUI direction.
+ @param bRTL FALSE = the control will draw from left to right;
+ TRUE = the control will draw from right to left. */
+ void SetEffectiveRTL( BOOL bRTL );
+ /** Returns TRUE, if the control draws from right to left (see SetEffectiveRTL()). */
+ BOOL IsEffectiveRTL() const;
+
BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion );
USHORT ShowDropPos( const Point& rPos );
void HideDropPos();
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2f15ee7d0c..6f3db61756 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -35,21 +35,11 @@
#include <tools/time.hxx>
#include <tools/debug.hxx>
#include <tools/poly.hxx>
-#ifndef _VCL_APP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VCL_HELP_HXX
#include <vcl/help.hxx>
-#endif
-#ifndef _VCL_DECOVIEW_HXX
#include <vcl/decoview.hxx>
-#endif
-#ifndef _VCL_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _VCL_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
#include "svtaccessiblefactory.hxx"
// =======================================================================
@@ -1418,6 +1408,16 @@ void TabBar::StateChanged( StateChangedType nType )
ImplInitSettings( FALSE, TRUE );
Invalidate();
}
+ else if ( nType == STATE_CHANGE_MIRRORING )
+ {
+ // reacts on calls of EnableRTL, have to mirror all child controls
+ if( mpFirstBtn ) mpFirstBtn->EnableRTL( IsRTLEnabled() );
+ if( mpPrevBtn ) mpPrevBtn->EnableRTL( IsRTLEnabled() );
+ if( mpNextBtn ) mpNextBtn->EnableRTL( IsRTLEnabled() );
+ if( mpLastBtn ) mpLastBtn->EnableRTL( IsRTLEnabled() );
+ if( mpImpl->mpSizer ) mpImpl->mpSizer->EnableRTL( IsRTLEnabled() );
+ if( mpEdit ) mpEdit->EnableRTL( IsRTLEnabled() );
+ }
}
// -----------------------------------------------------------------------
@@ -2169,6 +2169,16 @@ void TabBar::SetMirrored( BOOL bMirrored )
}
}
+void TabBar::SetEffectiveRTL( BOOL bRTL )
+{
+ SetMirrored( bRTL != Application::GetSettings().GetLayoutRTL() );
+}
+
+BOOL TabBar::IsEffectiveRTL() const
+{
+ return IsMirrored() != Application::GetSettings().GetLayoutRTL();
+}
+
// -----------------------------------------------------------------------
void TabBar::SetMaxPageWidth( long nMaxWidth )