From ca66b8c025fafe5fa79b749d17a28710322621c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 8 Jan 2016 11:01:38 +0000 Subject: [PATCH] SfxTemplatePanelControl doesn't have to be a DockingWindow anymore so we can drop one more DockingWindow from .src files leaving just one left Change-Id: I2e12398ce7682193aace966ebb8d153ec9acea2e --- include/sfx2/templdlg.hxx | 5 ++--- sfx2/source/dialog/templdlg.cxx | 16 +++++----------- sfx2/source/dialog/templdlg.src | 18 ------------------ 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index 75fdfb186b16..94d213409676 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -38,17 +38,16 @@ namespace SfxTemplate class SfxTemplateDialog_Impl; -class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow +class SFX2_DLLPUBLIC SfxTemplatePanelControl : public vcl::Window { public: - SfxTemplatePanelControl (SfxBindings* pBindings, vcl::Window* pParentWindow); + SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Window* pParentWindow); virtual ~SfxTemplatePanelControl(); virtual void dispose() override; virtual void DataChanged( const DataChangedEvent& _rDCEvt ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nStateChange ) override; - void FreeResource(); private: std::unique_ptr pImpl; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 75807592fe03..2aa03aacb02c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -341,7 +341,7 @@ std::unique_ptr SfxActionListBox::CreateContextMenu() } SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Window* pParentWindow) - : DockingWindow(pParentWindow, SfxResId(DLG_STYLE_DESIGNER)) + : Window(pParentWindow) , pImpl(new SfxTemplateDialog_Impl(pBindings, this)) , mpBindings(pBindings) { @@ -360,7 +360,7 @@ SfxTemplatePanelControl::~SfxTemplatePanelControl() void SfxTemplatePanelControl::dispose() { pImpl.reset(); - DockingWindow::dispose(); + Window::dispose(); } void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt ) @@ -372,19 +372,14 @@ void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt ) pImpl->updateNonFamilyImages(); } - DockingWindow::DataChanged( _rDCEvt ); + Window::DataChanged( _rDCEvt ); } void SfxTemplatePanelControl::Resize() { if(pImpl) pImpl->Resize(); - DockingWindow::Resize(); -} - -void SfxTemplatePanelControl::FreeResource() -{ - DockingWindow::FreeResource(); + Window::Resize(); } void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) @@ -403,7 +398,7 @@ void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) // SetFloatingPos( aPoint ); } - DockingWindow::StateChanged( nStateChange ); + Window::StateChanged( nStateChange ); } void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries_t& rEntries) const @@ -2258,7 +2253,6 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel { } - pDlgWindow->FreeResource(); Initialize(); } diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src index 2fddb59d5212..16f2e57cf29d 100644 --- a/sfx2/source/dialog/templdlg.src +++ b/sfx2/source/dialog/templdlg.src @@ -45,22 +45,4 @@ String STR_STYLE_FILTER_HIERARCHICAL Text [ en-US ] = "Hierarchical" ; }; - // DLG_STYLE_DESIGNER ---------------------------------------------------- -DockingWindow DLG_STYLE_DESIGNER -{ - HelpId = CMD_SID_STYLE_DESIGNER ; - OutputSize = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 116 , 215 ) ; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Closeable = TRUE ; - Zoomable = TRUE ; - Sizeable = TRUE ; - Dockable = TRUE ; - EnableResizing = TRUE ; - Border = TRUE ; - Moveable = TRUE ; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */