summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorIssa Alkurtass <ialkurtass@kacst.edu.sa>2013-02-10 09:32:39 +0300
committerTor Lillqvist <tml@iki.fi>2013-02-11 11:37:16 +0000
commit2fd93f19cf6c1ce808214c659f5a4c4b10c0c441 (patch)
tree702f777a47cbc4d5b97ee9ae19750e25e78b7568 /framework
parent4895dd454ccf3d403b2ed7aa4b19f726c28e6032 (diff)
fdo#39370 - Fixed RTL/LTR and alignment buttons location on RTL interface
Reversed the location of the RTL and LTR buttons as well as the align right and align left buttons on the RTL interface. It now matches the LTR interface. Done from toolboxdocumenthandler instead of modifying 20+ xml files. Change-Id: I6b3715e134bb45a7500b87a9e926d7940690a9af Reviewed-on: https://gerrit.libreoffice.org/2077 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index b57d158a0900..7826ac2e40f0 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -423,6 +423,23 @@ throw( SAXException, RuntimeException )
aToolbarItemProp[5].Name = m_aIsVisible;
aToolbarItemProp[6].Name = m_aTooltip;
+ //fix for fdo#39370
+ /// check whether RTL interface or not
+ if(Application::GetSettings().GetLayoutRTL()){
+ if (aCommandURL.compareTo(".uno:ParaLeftToRight") == 0)
+ aCommandURL = ".uno:ParaRightToLeft";
+ else if (aCommandURL.compareTo(".uno:ParaRightToLeft") == 0)
+ aCommandURL = ".uno:ParaLeftToRight";
+ else if (aCommandURL.compareTo(".uno:LeftPara") == 0)
+ aCommandURL = ".uno:RightPara";
+ else if (aCommandURL.compareTo(".uno:RightPara") == 0)
+ aCommandURL = ".uno:LeftPara";
+ else if (aCommandURL.compareTo(".uno:AlignLeft") == 0)
+ aCommandURL = ".uno:AlignRight";
+ else if (aCommandURL.compareTo(".uno:AlignRight") == 0)
+ aCommandURL = ".uno:AlignLeft";
+ }
+
aToolbarItemProp[0].Value <<= aCommandURL;
aToolbarItemProp[1].Value <<= aHelpURL;
aToolbarItemProp[2].Value <<= aLabel;