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

Maxim Monastirsky momonasmon at gmail.com
Sun Sep 24 22:04:54 UTC 2017


 framework/source/uielement/toolbarmanager.cxx |    6 +-----
 include/svx/verttexttbxctrl.hxx               |    3 +++
 svx/source/tbxctrls/verttexttbxctrl.cxx       |    6 ++++++
 3 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit fb60217569b0fb5bc949c58b054da71992fe2582
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Sep 24 19:27:26 2017 +0300

    tdf#83320 Hide vertical text commands early
    
    Instead of listing all commands in one big "if", just do
    it unconditionally in the shared controller.
    
    Change-Id: Ie415c4551a77ca8e1e29e73c0dabaff1dd13cbcb
    Reviewed-on: https://gerrit.libreoffice.org/42715
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index c5cf1738fdb2..a4525a204264 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -839,11 +839,7 @@ void ToolBarManager::CreateControllers()
 
                 if (pController)
                 {
-                    if(aCommandURL == ".uno:SwitchXFormsDesignMode" ||
-                       aCommandURL == ".uno:ViewDataSourceBrowser" ||
-                       aCommandURL == ".uno:ParaLeftToRight" ||
-                       aCommandURL == ".uno:ParaRightToLeft"
-                       )
+                    if (aCommandURL == ".uno:SwitchXFormsDesignMode" || aCommandURL == ".uno:ViewDataSourceBrowser")
                         pController->setFastPropertyValue_NoBroadcast(1, makeAny(true));
                 }
             }
diff --git a/include/svx/verttexttbxctrl.hxx b/include/svx/verttexttbxctrl.hxx
index 06a4aafa26df..920427c6746a 100644
--- a/include/svx/verttexttbxctrl.hxx
+++ b/include/svx/verttexttbxctrl.hxx
@@ -31,6 +31,9 @@ public:
     SvxVertCTLTextTbxCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
     virtual ~SvxVertCTLTextTbxCtrl() override;
 
+    // XInitialization
+    virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
+
     virtual void                StateChanged( sal_uInt16 nSID, SfxItemState eState,
                                               const SfxPoolItem* pState ) override;
 };
diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx
index ed7184fca627..727fde8ebd45 100644
--- a/svx/source/tbxctrls/verttexttbxctrl.cxx
+++ b/svx/source/tbxctrls/verttexttbxctrl.cxx
@@ -52,6 +52,12 @@ SvxVertCTLTextTbxCtrl::~SvxVertCTLTextTbxCtrl( )
 {
 }
 
+void SvxVertCTLTextTbxCtrl::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
+{
+    SfxToolBoxControl::initialize(rArguments);
+    setFastPropertyValue_NoBroadcast(1, css::uno::makeAny(true));
+}
+
 void SvxVertCTLTextTbxCtrl::StateChanged(
     sal_uInt16 nSID,
     SfxItemState eState,


More information about the Libreoffice-commits mailing list