From 5c573a2f7473bae7bb965ca36557cd1b0bf7b9c9 Mon Sep 17 00:00:00 2001 From: Kshitij Pathania Date: Mon, 12 Feb 2018 03:27:50 +0530 Subject: tdf#115131 made a common submenu for toolbars and notebookbars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added the submenu in base, maths and draw Change-Id: I94850c09c08fd3848eabe2597679634f30fbc735 Reviewed-on: https://gerrit.libreoffice.org/49575 Tested-by: Jenkins Reviewed-by: andreas_kainz Reviewed-by: Szymon Kłos --- sfx2/source/appl/appserv.cxx | 6 ++++++ sfx2/source/notebookbar/SfxNotebookBar.cxx | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index d73bc3a61da9..4bdb5ed30c7e 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -165,6 +165,12 @@ namespace case vcl::EnumContext::Application::Draw: return OUString( "Draw" ); break; + case vcl::EnumContext::Application::Formula: + return OUString( "Formula" ); + break; + case vcl::EnumContext::Application::Base: + return OUString( "Base" ); + break; default: return OUString(); break; diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 450c3c19b915..a341bf3e8858 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -82,13 +82,13 @@ static void lcl_setNotebookbarFileName( vcl::EnumContext::Application eApp, cons switch ( eApp ) { case vcl::EnumContext::Application::Writer: - officecfg::Office::UI::Notebookbar::ActiveWriter::set( sFileName, aBatch ); + officecfg::Office::UI::ToolbarMode::ActiveWriter::set( sFileName, aBatch ); break; case vcl::EnumContext::Application::Calc: - officecfg::Office::UI::Notebookbar::ActiveCalc::set( sFileName, aBatch ); + officecfg::Office::UI::ToolbarMode::ActiveCalc::set( sFileName, aBatch ); break; case vcl::EnumContext::Application::Impress: - officecfg::Office::UI::Notebookbar::ActiveImpress::set( sFileName, aBatch ); + officecfg::Office::UI::ToolbarMode::ActiveImpress::set( sFileName, aBatch ); break; default: break; @@ -101,13 +101,13 @@ static OUString lcl_getNotebookbarFileName( vcl::EnumContext::Application eApp ) switch ( eApp ) { case vcl::EnumContext::Application::Writer: - return officecfg::Office::UI::Notebookbar::ActiveWriter::get(); + return officecfg::Office::UI::ToolbarMode::ActiveWriter::get(); break; case vcl::EnumContext::Application::Calc: - return officecfg::Office::UI::Notebookbar::ActiveCalc::get(); + return officecfg::Office::UI::ToolbarMode::ActiveCalc::get(); break; case vcl::EnumContext::Application::Impress: - return officecfg::Office::UI::Notebookbar::ActiveImpress::get(); + return officecfg::Office::UI::ToolbarMode::ActiveImpress::get(); break; default: break; @@ -118,7 +118,7 @@ static OUString lcl_getNotebookbarFileName( vcl::EnumContext::Application eApp ) static utl::OConfigurationTreeRoot lcl_getCurrentImplConfigRoot() { return utl::OConfigurationTreeRoot(::comphelper::getProcessComponentContext(), - "org.openoffice.Office.UI.Notebookbar/", + "org.openoffice.Office.UI.ToolbarMode/", true); } @@ -133,7 +133,7 @@ static const utl::OConfigurationNode lcl_getCurrentImplConfigNode(const Referenc vcl::EnumContext::Application eApp = vcl::EnumContext::GetApplicationEnum( xModuleManager->identify( xFrame ) ); OUString aActive = lcl_getNotebookbarFileName( eApp ); - const utl::OConfigurationNode aImplsNode = rNotebookbarNode.openNode("Applications/" + lcl_getAppName( eApp) + "/Implementations"); + const utl::OConfigurationNode aImplsNode = rNotebookbarNode.openNode("Applications/" + lcl_getAppName( eApp) + "/Modes"); const Sequence aModeNodeNames( aImplsNode.getNodeNames() ); const sal_Int32 nCount( aModeNodeNames.getLength() ); @@ -143,7 +143,7 @@ static const utl::OConfigurationNode lcl_getCurrentImplConfigNode(const Referenc if ( !aImplNode.isValid() ) continue; - OUString aCommandArg = comphelper::getString( aImplNode.getNodeValue( "File" ) ); + OUString aCommandArg = comphelper::getString( aImplNode.getNodeValue( "CommandArg" ) ); if ( aCommandArg == aActive ) { -- cgit