summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-08-22 22:37:56 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-08-24 06:26:17 -0500
commitb4558b508141af16d335f45a0f12bdd34521e944 (patch)
treef8479fe8131a0d1677100e2cc16c244e860189cb /sw/source/uibase
parenta75e0f8e4e5f0baa5805d01c5f8edc7b40fceb0f (diff)
fdo#73151 Make better use of the sidebar
The general idea is to encourage use of the sidebar instead of floating windows (for Navigator, Styles&Formatting and Gallery) Changes: * Show the sidebar by default in Writer & Impress * Remove the Gallery floating window (Gallery now always opens in the sidebar) * Remove all Gallery, Navigator and Styles&Formatting links from the default toolbar in Writer (since they have an icon in the sidebar and the sidebar is shown by default now) * When selecting "More" from the Styles dropdown, the Stylelist opens in the sidebar instead of the floating window This has all been discussed extensively here: https://bugs.freedesktop.org/show_bug.cgi?id=73151 Change-Id: I3a0461d1472711da7121801000af294b432fccb1 Reviewed-on: https://gerrit.libreoffice.org/11077 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/swmodule.cxx2
-rw-r--r--sw/source/uibase/uiview/view0.cxx1
-rw-r--r--sw/source/uibase/uiview/view2.cxx10
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx1
4 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index acc4d051739d..ed8f68e326f7 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -394,8 +394,6 @@ void SwDLL::RegisterControls()
SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod);
SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod);
- GalleryChildWindow::RegisterChildWindow(false, pMod);
-
::avmedia::MediaToolBoxControl::RegisterControl(SID_AVMEDIA_TOOLBOX, pMod);
::avmedia::MediaPlayer::RegisterChildWindow(false, pMod);
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 4864bde7840c..15d7c9b573e7 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -104,7 +104,6 @@ void SwView::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(FN_REDLINE_ACCEPT);
GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG);
GetStaticInterface()->RegisterChildWindow(FN_WORDCOUNT_DIALOG);
- GetStaticInterface()->RegisterChildWindow(GalleryChildWindow::GetChildWindowId());
#if HAVE_FEATURE_AVMEDIA
GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
#endif
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 5b5c97f464cf..3d745c61307c 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -140,6 +140,7 @@
#include <unotextrange.hxx>
#include <docstat.hxx>
#include <wordcountdialog.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
#include <vcl/GraphicNativeTransform.hxx>
#include <vcl/GraphicNativeMetadata.hxx>
@@ -1076,7 +1077,12 @@ void SwView::Execute(SfxRequest &rReq)
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
- GetViewFrame()->ChildWindowExecute(rReq);
+ // First make sure that the sidebar is visible
+ GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+
+ ::sfx2::sidebar::Sidebar::ShowPanel(
+ "GalleryPanel",
+ GetViewFrame()->GetFrame().GetFrameInterface());
break;
case SID_AVMEDIA_PLAYER :
GetViewFrame()->ChildWindowExecute(rReq);
@@ -1092,7 +1098,7 @@ void SwView::Execute(SfxRequest &rReq)
}
}
break;
- case FN_INSERT_FIELD_DATA_ONLY :
+ case FN_INSERT_FIELD_DATA_ONLY:
{
bool bShow = false;
if( pArgs &&
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 0148ffd53318..6d48aa9dbd85 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -285,7 +285,6 @@ void SwView::GetState(SfxItemSet &rSet)
(m_pWrtShell->GetRedlineMode() & nMask) == nMask ));
}
break;
- case SID_GALLERY :
case SID_AVMEDIA_PLAYER :
case FN_REDLINE_ACCEPT :
{