framework/source/uielement/toolbarmanager.cxx |    8 --------
 1 file changed, 8 deletions(-)

New commits:
commit f1f52b6e5086124c75b57f6f6ff1f1f0353e40af
Author:     Maxim Monastirsky <momonas...@gmail.com>
AuthorDate: Sun Jul 17 17:07:29 2022 +0300
Commit:     Maxim Monastirsky <momonas...@gmail.com>
CommitDate: Mon Jul 18 00:39:51 2022 +0200

    Remove the broken SupportsVisible hack
    
    pController is always empty since commit
    ac1aefd5174258d9bcb41465ce566ed1a0819f3d
    ("Extend ToolBarManager to build weld::Toolbar").
    But even before that it did nothing, as it was set
    only for controllers created by the sfx2 legacy
    factory, but neither .uno:SwitchXFormsDesignMode nor
    .uno:ViewDataSourceBrowser had such controllers (It
    did however work in the past for some other commands
    before commit fb60217569b0fb5bc949c58b054da71992fe2582
    ("tdf#83320 Hide vertical text commands early"). Also,
    searching the codebase for SfxVisibilityItem reveals
    more commands that set visibility, and I'm not sure
    if hardcoding all of them here is a good approach in
    general.
    
    Change-Id: Id8c22e729d2402837de0598fa8ca4d41160804c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137150
    Tested-by: Jenkins
    Reviewed-by: Maxim Monastirsky <momonas...@gmail.com>

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 587cd8b61ad8..34a63156bc2a 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1054,8 +1054,6 @@ void ToolBarManager::CreateControllers()
         bool                     bCreate( true );
         Reference< XStatusListener > xController;
 
-        rtl::Reference<svt::ToolboxController> pController;
-
         OUString aCommandURL( m_pImpl->GetItemCommand( nId ) );
         // Command can be just an alias to another command.
         auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, 
m_aModuleIdentifier);
@@ -1196,12 +1194,6 @@ void ToolBarManager::CreateControllers()
                 };
 
                 xInit->initialize( aArgs );
-
-                if (pController)
-                {
-                    if (aCommandURL == ".uno:SwitchXFormsDesignMode" || 
aCommandURL == ".uno:ViewDataSourceBrowser")
-                        pController->setFastPropertyValue_NoBroadcast(1, 
Any(true));
-                }
             }
 
             // Request an item window from the toolbar controller and set it 
at the VCL toolbar

Reply via email to