summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-06-16 09:44:39 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-16 20:24:06 +0200
commitf95b5d12c59e612ee4643b385389fc791e31f76d (patch)
tree00b0a6053758c3a47d1325d7b55b7b23cd12fe3a /sfx2
parent422c26ef82e6391071b5c3c03d64d0e5d37c920e (diff)
tdf#155720 remove old skip notebookbar init workaround
This was introduced due to not working Paste Special dialog in LOK case. Now everything seems to be ok. Single initialization should make loading process faster. Change-Id: Ic464908ef044cc446626fff0fb9b4f57e061aea3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153143 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx32
1 files changed, 0 insertions, 32 deletions
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index ec1f5bf33c0d..e8ea6c684794 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -290,26 +290,6 @@ bool SfxNotebookBar::IsActive(bool bConsiderSingleToolbar)
return false;
}
-void SfxNotebookBar::ResetActiveToolbarModeToDefault(vcl::EnumContext::Application eApp)
-{
- const OUString appName( lcl_getAppName( eApp ) );
-
- if ( appName.isEmpty() )
- return;
-
- const OUString aPath = "org.openoffice.Office.UI.ToolbarMode/Applications/" + appName;
-
- utl::OConfigurationTreeRoot aAppNode(
- ::comphelper::getProcessComponentContext(),
- aPath,
- true);
- if ( !aAppNode.isValid() )
- return;
-
- aAppNode.setNodeValue( "Active", Any( OUString( "Default" ) ) );
- aAppNode.commit();
-}
-
void SfxNotebookBar::ExecMethod(SfxBindings& rBindings, const OUString& rUIName)
{
// Save active UI file name
@@ -375,18 +355,6 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
{
const SfxViewShell* pViewShell = SfxViewShell::Current();
- // Notebookbar was loaded too early what caused:
- // * in LOK: Paste Special feature was incorrectly initialized
- // Skip first request so Notebookbar will be initialized after document was loaded
- static std::map<const void*, bool> bSkippedFirstInit;
- if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer
- && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end())
- {
- bSkippedFirstInit[pViewShell] = true;
- ResetActiveToolbarModeToDefault(eApp);
- return false;
- }
-
RemoveListeners(pSysWindow);
OUString aBuf = rUIFile + sFile;