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
This commit is contained in:
Caolán McNamara
2016-01-08 11:01:38 +00:00
parent b7dc6101da
commit ca66b8c025
3 changed files with 7 additions and 32 deletions

View File

@@ -38,17 +38,16 @@ namespace SfxTemplate
class SfxTemplateDialog_Impl; class SfxTemplateDialog_Impl;
class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow class SFX2_DLLPUBLIC SfxTemplatePanelControl : public vcl::Window
{ {
public: public:
SfxTemplatePanelControl (SfxBindings* pBindings, vcl::Window* pParentWindow); SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Window* pParentWindow);
virtual ~SfxTemplatePanelControl(); virtual ~SfxTemplatePanelControl();
virtual void dispose() override; virtual void dispose() override;
virtual void DataChanged( const DataChangedEvent& _rDCEvt ) override; virtual void DataChanged( const DataChangedEvent& _rDCEvt ) override;
virtual void Resize() override; virtual void Resize() override;
virtual void StateChanged( StateChangedType nStateChange ) override; virtual void StateChanged( StateChangedType nStateChange ) override;
void FreeResource();
private: private:
std::unique_ptr<SfxTemplateDialog_Impl> pImpl; std::unique_ptr<SfxTemplateDialog_Impl> pImpl;

View File

@@ -341,7 +341,7 @@ std::unique_ptr<PopupMenu> SfxActionListBox::CreateContextMenu()
} }
SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Window* pParentWindow) SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Window* pParentWindow)
: DockingWindow(pParentWindow, SfxResId(DLG_STYLE_DESIGNER)) : Window(pParentWindow)
, pImpl(new SfxTemplateDialog_Impl(pBindings, this)) , pImpl(new SfxTemplateDialog_Impl(pBindings, this))
, mpBindings(pBindings) , mpBindings(pBindings)
{ {
@@ -360,7 +360,7 @@ SfxTemplatePanelControl::~SfxTemplatePanelControl()
void SfxTemplatePanelControl::dispose() void SfxTemplatePanelControl::dispose()
{ {
pImpl.reset(); pImpl.reset();
DockingWindow::dispose(); Window::dispose();
} }
void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt ) void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt )
@@ -372,19 +372,14 @@ void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt )
pImpl->updateNonFamilyImages(); pImpl->updateNonFamilyImages();
} }
DockingWindow::DataChanged( _rDCEvt ); Window::DataChanged( _rDCEvt );
} }
void SfxTemplatePanelControl::Resize() void SfxTemplatePanelControl::Resize()
{ {
if(pImpl) if(pImpl)
pImpl->Resize(); pImpl->Resize();
DockingWindow::Resize(); Window::Resize();
}
void SfxTemplatePanelControl::FreeResource()
{
DockingWindow::FreeResource();
} }
void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange )
@@ -403,7 +398,7 @@ void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange )
// SetFloatingPos( aPoint ); // SetFloatingPos( aPoint );
} }
DockingWindow::StateChanged( nStateChange ); Window::StateChanged( nStateChange );
} }
void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries_t& rEntries) const void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries_t& rEntries) const
@@ -2258,7 +2253,6 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel
{ {
} }
pDlgWindow->FreeResource();
Initialize(); Initialize();
} }

View File

@@ -45,22 +45,4 @@ String STR_STYLE_FILTER_HIERARCHICAL
Text [ en-US ] = "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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */