diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-25 10:58:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-25 11:01:52 +0200 |
commit | 89ecdc47e14e3be7fe939b5e76985b9531fcfb42 (patch) | |
tree | 806ae2abe619b1304ba0d6d29dc41be6a2815fd1 /sfx2/source | |
parent | 805df2f4131be1a62e64da87cc990c07481b988f (diff) |
Revert "fdo#73151 Always open Styles&Formatting dialog in the sidebar"
This reverts commit 473ed449a4b6f550dc1af47a07c6e0ef243a98b2, which made
JunitTest_toolkit_unoapi fail, as
AccessibleDropDownListBox.createTestEnvironment
(qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java) was no longer
able to find its AccessilbeRole.COMBO_BOX AccessibleDropDownListBox, which it
apparently expected to find in a docked stylist (cf. DesktopTools.dockStylist
in AccessibleDropDownListBox.initialize).
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appchild.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/appl/appreg.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 11 |
5 files changed, 34 insertions, 11 deletions
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx index a0add3ebf2d9..43ff5f1fbe9d 100644 --- a/sfx2/source/appl/appchild.cxx +++ b/sfx2/source/appl/appchild.cxx @@ -132,6 +132,20 @@ SfxChildWinFactArr_Impl& SfxApplication::GetChildWinFactories_Impl() const } + +SfxTemplateDialog* SfxApplication::GetTemplateDialog() +{ + if ( pAppData_Impl->pViewFrame ) + { + SfxChildWindow *pChild = pAppData_Impl->pViewFrame->GetChildWindow(SfxTemplateDialogWrapper::GetChildWindowId()); + return pChild ? (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 e9c1e6e1905a..caa32b13a0f2 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -54,6 +54,7 @@ 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 91490b4e9b55..45db4a656934 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -90,6 +90,9 @@ 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 { @@ -345,6 +348,19 @@ 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 fe7cf61affab..9da6c9772900 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -44,6 +44,7 @@ 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; } } } } @@ -153,6 +154,7 @@ protected: friend class DropListBox_Impl; friend class SfxTemplateControllerItem; + friend class SfxTemplateDialogWrapper; SfxBindings* pBindings; SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC]; @@ -309,6 +311,7 @@ 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 458fb01168c3..e4e44d166bde 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -133,7 +133,6 @@ 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> @@ -3139,16 +3138,6 @@ 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; |