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 <momonas...@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 <c...@libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonas...@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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to