summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-08-06 23:31:18 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2016-08-22 19:38:25 +0000
commitdabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2 (patch)
treeabea74259c8b66cb30037401e2718add4b32cb44 /sd
parentAdd spacing between listbox and spin box in gradient tab (diff)
downloadcore-dabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2.tar.gz
core-dabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2.zip
GSoC: tdf#101249 Toolbar Mode switching
+ added registry entry for storing current toolbar mode for each application + registry entries to store toolbar mode configuration, remember additional visible toolbars activated by user + changing toolbar mode hides and shows suitable toolbars + added menu controller for toolbar mode + notebookbar implementation entries are disabled when notebookbar mode is not active + each mode can open/collapse the sidebar Change-Id: I2b03f87c6dce53190d12102892d9ad30fbfd3bf6 Reviewed-on: https://gerrit.libreoffice.org/27991 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/docshell/docshel3.cxx10
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
-rw-r--r--sd/uiconfig/simpress/menubar/menubar.xml2
3 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 056d59b44ff0..5aa32ba9f24e 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -326,14 +326,10 @@ void DrawDocShell::Execute( SfxRequest& rReq )
{
SfxBindings& rBindings( mpViewShell->GetFrame()->GetBindings() );
- if ( !pFile || ( pFile && !sfx2::SfxNotebookBar::IsActive() ) )
- sfx2::SfxNotebookBar::ExecMethod( rBindings );
- else if ( pFile && pFile->GetValue().isEmpty() )
- {
+ if ( sfx2::SfxNotebookBar::IsActive() )
+ sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : "" );
+ else
sfx2::SfxNotebookBar::CloseMethod( rBindings );
- if ( sfx2::SfxNotebookBar::IsActive() )
- sfx2::SfxNotebookBar::ExecMethod( rBindings );
- }
}
}
break;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index fc54b20373bc..2cd6107d1b26 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -274,7 +274,9 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
case SID_NOTEBOOKBAR:
{
- sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/");
+ bool bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(),
+ "modules/simpress/ui/");
+ rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
break;
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 15394f6948cb..20c52ccf0494 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -107,7 +107,9 @@
<menu:menuitem menu:id=".uno:NotesMasterPage" menu:style="radio"/>
<menu:menuitem menu:id=".uno:HandoutMode" menu:style="radio"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ToolbarMode"/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:Notebookbar"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
<menu:menuitem menu:id=".uno:ShowRuler"/>
<menu:menuitem menu:id=".uno:LeftPaneImpress"/>