summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-04-05 14:03:50 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-04-09 09:53:47 +0900
commit9d5b66bb81c1649f07e93d7ca28789473c387e11 (patch)
treed438b0d984ec8ef2a9702035c46a949b6bb1e879
parent5d15076a3d40e8961fac5e83b2d5654e8c5ae984 (diff)
unique_ptr for SfxTemplatePanelControl pImpl
Change-Id: Ia073d28181d0894e1ec8baddd53d4ac943f69557
-rw-r--r--include/sfx2/templdlg.hxx11
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
2 files changed, 7 insertions, 10 deletions
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 9db1a356685a..a3237d345bd9 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -38,20 +38,19 @@ namespace SfxTemplate
class SfxTemplateDialog_Impl;
-// class SfxTemplatePanelControl -----------------------------------------
class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow
{
public:
SfxTemplatePanelControl (SfxBindings* pBindings, vcl::Window* pParentWindow);
virtual ~SfxTemplatePanelControl();
- virtual void DataChanged( const DataChangedEvent& _rDCEvt ) SAL_OVERRIDE;
- virtual void Resize() SAL_OVERRIDE;
- virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
- void FreeResource (void);
+ virtual void DataChanged( const DataChangedEvent& _rDCEvt ) SAL_OVERRIDE;
+ virtual void Resize() SAL_OVERRIDE;
+ virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
+ void FreeResource (void);
private:
- SfxTemplateDialog_Impl* pImpl;
+ const std::unique_ptr<SfxTemplateDialog_Impl> pImpl;
SfxBindings* mpBindings;
};
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 7d0bea97a369..bcb7b11bc4ec 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -268,7 +268,7 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
SfxTemplatePanelControl::SfxTemplatePanelControl (
SfxBindings* pBindings,
vcl::Window* pParentWindow)
- : DockingWindow(pParentWindow, SfxResId(DLG_STYLE_DESIGNER) ),
+ : DockingWindow(pParentWindow, SfxResId(DLG_STYLE_DESIGNER)),
pImpl(new SfxTemplateDialog_Impl(pBindings, this)),
mpBindings(pBindings)
{
@@ -281,7 +281,6 @@ SfxTemplatePanelControl::SfxTemplatePanelControl (
SfxTemplatePanelControl::~SfxTemplatePanelControl (void)
{
- delete pImpl;
}
void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt )
@@ -1013,8 +1012,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
pTreeBox->SetDragDropMode(SV_DRAGDROP_NONE);
while(pStyle)
{
- StyleTree_Impl* pNew =
- new StyleTree_Impl(pStyle->GetName(), pStyle->GetParent());
+ StyleTree_Impl* pNew = new StyleTree_Impl(pStyle->GetName(), pStyle->GetParent());
aArr.push_back(pNew);
pStyle = pStyleSheetPool->Next();
}