summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-09-25 16:54:39 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-10-06 08:15:42 +0000
commita836afe471d6df7bfc932fc419f7ccad7d40efb2 (patch)
treef8127d8f3ec0eb970223d227062510e15ef639cb /sfx2
parentf5cfed29b05184894ec6ad2d14f73bff0b5a2783 (diff)
fdo#73151 Always open Styles&Formatting dialog in the sidebar
Change-Id: I05b63dc00023945d92fd837bd64042135d3f9aed Reviewed-on: https://gerrit.libreoffice.org/11648 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/frmslots.sdi1
-rw-r--r--sfx2/source/appl/appchild.cxx14
-rw-r--r--sfx2/source/appl/appreg.cxx1
-rw-r--r--sfx2/source/dialog/templdlg.cxx16
-rw-r--r--sfx2/source/inc/templdgi.hxx3
-rw-r--r--sfx2/source/view/viewfrm.cxx11
6 files changed, 11 insertions, 35 deletions
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 362ced41e89b..617f77f1d95f 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -94,7 +94,6 @@ interface Window
SID_STYLE_DESIGNER // ole(no) api(final/play/rec)
[
ExecMethod = ChildWindowExecute ;
- StateMethod = ChildWindowState ;
]
SID_RECORDING_FLOATWINDOW // ole(no) api(final/play/rec)
[
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index b2cbe576ea04..a0add3ebf2d9 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -132,20 +132,6 @@ SfxChildWinFactArr_Impl& SfxApplication::GetChildWinFactories_Impl() const
}
-
-SfxTemplateDialog* SfxApplication::GetTemplateDialog()
-{
- if ( pAppData_Impl->pViewFrame )
- {
- SfxChildWindow *pChild = pAppData_Impl->pViewFrame->GetChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
- return pChild ? static_cast<SfxTemplateDialog*>(pChild->GetWindow()) : 0;
- }
-
- return NULL;
-}
-
-
-
SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
{
if ( pFrame )
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index caa32b13a0f2..e9c1e6e1905a 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -54,7 +54,6 @@ void SfxApplication::Registrations_Impl()
SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
SfxNavigatorWrapper::RegisterChildWindow( false, NULL, SFX_CHILDWIN_NEVERHIDE );
SfxPartChildWnd_Impl::RegisterChildWindow();
- SfxTemplateDialogWrapper::RegisterChildWindow(true);
SfxDockingWrapper::RegisterChildWindow();
SfxInfoBarContainerChild::RegisterChildWindow( true, NULL, SFX_CHILDWIN_NEVERHIDE );
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 855e9b74263f..f44bfe99dd72 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -90,9 +90,6 @@ static sal_uInt16 nLastItemId = USHRT_MAX;
TYPEINIT0(SfxCommonTemplateDialog_Impl);
TYPEINIT1(SfxTemplateDialog_Impl,SfxCommonTemplateDialog_Impl);
-SFX_IMPL_DOCKINGWINDOW_WITHID(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
-
-
class SfxCommonTemplateDialog_Impl::DeletionWatcher : private boost::noncopyable
{
@@ -348,19 +345,6 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
}
-
-SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(vcl::Window *pParentWnd,
- sal_uInt16 nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
- SfxChildWindow(pParentWnd, nId)
-{
- SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParentWnd);
- pWindow = pWin;
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
-
- pWin->Initialize( pInfo );
- pWin->SetMinOutputSizePixel(pWin->pImpl->GetMinOutputSizePixel());
-}
-
//===== SfxTemplatePanelControl ===============================================
SfxTemplatePanelControl::SfxTemplatePanelControl (
SfxBindings* pBindings,
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 9da6c9772900..fe7cf61affab 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -44,7 +44,6 @@ class SvTreeListBox ;
class StyleTreeListBox_Impl;
class SfxTemplateDialog_Impl;
class SfxCommonTemplateDialog_Impl;
-class SfxTemplateDialogWrapper;
class SfxDockingWindow;
namespace com { namespace sun { namespace star { namespace frame { class XModuleManager2; } } } }
@@ -154,7 +153,6 @@ protected:
friend class DropListBox_Impl;
friend class SfxTemplateControllerItem;
- friend class SfxTemplateDialogWrapper;
SfxBindings* pBindings;
SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC];
@@ -311,7 +309,6 @@ class SfxTemplateDialog_Impl : public SfxCommonTemplateDialog_Impl
{
private:
friend class SfxTemplateControllerItem;
- friend class SfxTemplateDialogWrapper;
friend class DropToolBox_Impl;
friend class SfxTemplatePanelControl;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 12cbb94c3cb7..5b47c7c34b60 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -133,6 +133,7 @@ using ::com::sun::star::container::XIndexContainer;
#include <sfx2/frmdescr.hxx>
#include <sfx2/sfxuno.hxx>
#include <sfx2/progress.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
#include "workwin.hxx"
#include "helper.hxx"
#include <sfx2/minfitem.hxx>
@@ -3135,6 +3136,16 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
rReq.Done();
return;
}
+ if (nSID == SID_STYLE_DESIGNER)
+ {
+ // First make sure that the sidebar is visible
+ ShowChildWindow(SID_SIDEBAR);
+
+ ::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel",
+ GetFrame().GetFrameInterface());
+ rReq.Done();
+ return;
+ }
bool bHasChild = HasChildWindow(nSID);
bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;