framework/inc/strings.hrc | 1 framework/source/uielement/toolbarmanager.cxx | 3 framework/source/uielement/toolbarsmenucontroller.cxx | 3 include/sfx2/sfxsids.hrc | 1 include/svtools/restartdialog.hxx | 3 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 11 --- officecfg/registry/schema/org/openoffice/Office/UI/GlobalSettings.xcs | 2 sfx2/sdi/appslots.sdi | 5 - sfx2/sdi/sfx.sdi | 16 ----- sfx2/source/appl/appserv.cxx | 31 ---------- svtools/source/dialogs/restartdialog.cxx | 3 svtools/uiconfig/ui/restartdialog.ui | 21 ------ 12 files changed, 6 insertions(+), 94 deletions(-)
New commits: commit 3d79b30b7f4b0bec5f7395f30d8217cda90ae7c7 Author: Heiko Tietze <[email protected]> AuthorDate: Wed Jan 7 17:06:40 2026 +0100 Commit: Heiko Tietze <[email protected]> CommitDate: Fri Feb 13 15:30:22 2026 +0100 Revert "Resolves tdf#131817 - Option to globally switch toolbar locking on/off" This reverts commit 086fa727cabf46eacfec1a0fd4f6dfe916aa2f04. Reason for revert: Breaks possibility to lock a toolbar (is forgotten after restart) This solution will be succeeded by 1b1577eef6a30f2643d373c450576d5244ab6af1 Change-Id: Ida73a80ecfa2a833caf1db7d625ff90dbf259c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196780 Tested-by: Jenkins Reviewed-by: Heiko Tietze <[email protected]> diff --git a/framework/inc/strings.hrc b/framework/inc/strings.hrc index 3fcfa7286002..99949fcfeabd 100644 --- a/framework/inc/strings.hrc +++ b/framework/inc/strings.hrc @@ -44,7 +44,6 @@ #define STR_FULL_DISC_RETRY_BUTTON NC_("STR_FULL_DISC_RETRY_BUTTON", "Retry" ) #define STR_FULL_DISC_MSG NC_("STR_FULL_DISC_MSG", "%PRODUCTNAME could not save important internal information due to insufficient free disk space at the following location: %PATH You will not be able to continue working with %PRODUCTNAME without allocating more free disk space at that location. Press the 'Retry' button after you have allocated more free disk space to retry saving the data. " ) #define STR_RESTORE_TOOLBARS NC_("STR_RESTORE_TOOLBARS", "~Reset" ) -#define STR_LOCK_TOOLBARS NC_("STR_LOCK_TOOLBARS", "~Lock Toolbars" ) #define STR_CORRUPT_UICFG_SHARE NC_("STR_CORRUPT_UICFG_SHARE", "An error occurred while loading the user interface configuration data. The application will be terminated now. Please try to reinstall the application." ) #define STR_CORRUPT_UICFG_USER NC_("STR_CORRUPT_UICFG_USER", "An error occurred while loading the user interface configuration data. The application will be terminated now. Please try to remove your user profile for the application." ) #define STR_CORRUPT_UICFG_GENERAL NC_("STR_CORRUPT_UICFG_GENERAL", "An error occurred while loading the user interface configuration data. The application will be terminated now. Please try to remove your user profile for the application first or try to reinstall the application." ) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 1075a49929c2..be60ae37bebb 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1892,7 +1892,10 @@ void ToolBarManager::AddCustomizeMenuItems(ToolBox const * pToolBar) pMenu->EnableItem(MENUITEM_TOOLBAR_DOCKALLTOOLBAR, false); Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY ); if( xDockable.is() ) + { pMenu->CheckItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, xDockable->isLocked()); + pMenu->EnableItem(MENUITEM_TOOLBAR_UNDOCKTOOLBAR, !xDockable->isLocked()); + } } else pMenu->EnableItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, false); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 5f67fde2ec5e..7542f0e6494d 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -67,7 +67,6 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui; constexpr OUString CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility"_ustr; -constexpr OUStringLiteral CMD_LOCKTOOLBARS = u".uno:ToolbarLock"; constexpr OUString STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string="_ustr; const char STATIC_INTERNAL_CMD_PART[] = ".cmd:"; @@ -438,8 +437,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co OUString aLabelStr(FwkResId(STR_RESTORE_TOOLBARS)); addCommand( m_xPopupMenu, CMD_RESTOREVISIBILITY, aLabelStr ); - aLabelStr = FwkResId(STR_LOCK_TOOLBARS); - addCommand( m_xPopupMenu, CMD_LOCKTOOLBARS, aLabelStr ); } // XEventListener diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index ae3e328474d9..49349a9103e2 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -293,7 +293,6 @@ class SvxZoomItem; #define SID_ADDITIONS_DIALOG (SID_SFX_START + 1740) #define FN_PARAM_ADDITIONS_TAG TypedWhichId<SfxStringItem>(SID_SFX_START + 1741) #define SID_UI_PICKER (SID_SFX_START + 1742) -#define SID_TOOLBAR_LOCK TypedWhichId<SfxBoolItem>(SID_SFX_START + 1743) #define SID_WIDGET_TEST_DIALOG (SID_SFX_START + 1744) #define FN_CHANGE_THEME (SID_SFX_START + 1745) #define FN_PARAM_NEW_THEME TypedWhichId<SfxStringItem>(SID_SFX_START + 1746) diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx index 564bd6c44d36..c56b23e25723 100644 --- a/include/svtools/restartdialog.hxx +++ b/include/svtools/restartdialog.hxx @@ -59,9 +59,6 @@ enum RestartReason { // For the Calculation settings changes to take effect, // %PRODUCTNAME must be restarted: RESTART_REASON_CALCULATION, - // To apply changes, %PRODUCTNAME, - // %PRODUCTNAME must be restarted: - RESTART_REASON_UI_CHANGE, // No particular reason: RESTART_REASON_NONE }; diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 74f60060e2c6..2a5fb829fdbc 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -7119,17 +7119,6 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 <value>1</value> </prop> </node> - <node oor:name=".uno:ToolbarLock" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Lock Toolbars</value> - </prop> - <prop oor:name="TooltipLabel" oor:type="xs:string"> - <value xml:lang="en-US">Lock or unlock all toolbars</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> <node oor:name=".uno:ClickChangeRotation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Rotation Mode after Clicking Object</value> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/GlobalSettings.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/GlobalSettings.xcs index 610b691c6bc6..1cfa98041643 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/GlobalSettings.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/GlobalSettings.xcs @@ -35,7 +35,6 @@ TRUE = All toolbars should be locked by default. FALSE = All toolbars should never be locked by default. --> - <value>true</value> </prop> <prop oor:name="Docked" oor:type="xs:boolean"> <info> @@ -58,7 +57,6 @@ <info> <desc>Determines if the global states set should be used or not."</desc> </info> - <value>true</value> </prop> <node-ref oor:name="States" oor:node-type="GlobalWindowState"> <info> diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 1c02d7bcf7aa..d818f035c975 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -245,11 +245,6 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] - SID_TOOLBAR_LOCK - [ - ExecMethod = MiscExec_Impl ; - StateMethod = MiscState_Impl ; - ] SID_EXTENSION_MANAGER [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 76af1e208b3c..2c055e922a05 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -6000,22 +6000,6 @@ SfxVoidItem AdditionsDialog SID_ADDITIONS_DIALOG GroupId = SfxGroupId::Application; ] -SfxBoolItem ToolbarLock SID_TOOLBAR_LOCK -[ - AutoUpdate = TRUE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = TRUE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = SfxGroupId::Application; -] - SfxVoidItem WidgetTestDialog SID_WIDGET_TEST_DIALOG () [ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 8da340c47eed..fff0d0b06136 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -73,7 +73,6 @@ #include <sal/log.hxx> #include <osl/file.hxx> #include <vcl/EnumContext.hxx> -#include <vcl/toolbox.hxx> #include <vcl/themecolors.hxx> #include <unotools/moduleoptions.hxx> @@ -1312,31 +1311,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) aDialog.run(); break; } - case SID_TOOLBAR_LOCK: - { - if (SfxViewFrame* pViewFrame = SfxViewFrame::Current()) - { - Reference<XFrame> xCurrentFrame; - const uno::Reference<uno::XComponentContext>& xContext - = ::comphelper::getProcessComponentContext(); - xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface(); - const Reference<frame::XModuleManager> xModuleManager - = frame::ModuleManager::create(xContext); - const utl::OConfigurationTreeRoot aAppNode( - xContext, u"org.openoffice.Office.UI.GlobalSettings/Toolbars/States"_ustr, true); - if (aAppNode.isValid()) - { - bool isLocked = comphelper::getBOOL(aAppNode.getNodeValue(u"Locked"_ustr)); - aAppNode.setNodeValue(u"Locked"_ustr, Any(!isLocked)); - aAppNode.commit(); - //TODO: apply immediately w/o restart needed - SolarMutexGuard aGuard; - svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, - svtools::RESTART_REASON_UI_CHANGE); - } - } - break; - } default: break; } @@ -1550,11 +1524,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) rSet.DisableItem(nWhich); } break; - case SID_TOOLBAR_LOCK: - { - rSet.Put( SfxBoolItem( SID_TOOLBAR_LOCK, ToolBox::AlwaysLocked() )); - } - break; default: break; } diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx index 8ff0b2406264..556d39daf8cc 100644 --- a/svtools/source/dialogs/restartdialog.cxx +++ b/svtools/source/dialogs/restartdialog.cxx @@ -69,9 +69,6 @@ public: case svtools::RESTART_REASON_CALCULATION: reason_ = m_xBuilder->weld_widget(u"reason_calculation"_ustr); break; - case svtools::RESTART_REASON_UI_CHANGE: - reason_ = m_xBuilder->weld_widget(u"reason_uichange"_ustr); - break; default: assert(false); // this cannot happen } diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui index 58c5b3a27273..21186fa610bc 100644 --- a/svtools/uiconfig/ui/restartdialog.ui +++ b/svtools/uiconfig/ui/restartdialog.ui @@ -215,21 +215,6 @@ <property name="position">9</property> </packing> </child> - <child> - <object class="GtkLabel" id="reason_uichange"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="label" translatable="yes" context="restartdialog|reason_extension_install">To apply changes, %PRODUCTNAME must be restarted.</property> - <property name="wrap">True</property> - <property name="max-width-chars">50</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">10</property> - </packing> - </child> <child> <object class="GtkLabel" id="reason_calculation"> <property name="can-focus">False</property> @@ -242,7 +227,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">11</property> + <property name="position">10</property> </packing> </child> <child> @@ -256,7 +241,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">13</property> + <property name="position">11</property> </packing> </child> <child> @@ -271,7 +256,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">14</property> + <property name="position">12</property> </packing> </child> </object>
