summaryrefslogtreecommitdiff
path: root/sw/source/ui/fmtui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 14:42:23 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:17:00 +0100
commit00f2787a4a68633206635743298926bf2e65a8fa (patch)
treeefc3a4f02b3d8acd69d25071499be5a475cb0338 /sw/source/ui/fmtui
parentb3dcb2996b70caabda1939c9e85545c97d78404a (diff)
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'sw/source/ui/fmtui')
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 0fef7a5499cb..553dcf9ff5e8 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -540,15 +540,15 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
// collect character styles
- ListBox rCharFmtLB(this);
- rCharFmtLB.Clear();
- rCharFmtLB.InsertEntry( SwViewShell::GetShellRes()->aStrNone );
+ VclPtr<ListBox> rCharFmtLB(new ListBox(this));
+ rCharFmtLB->Clear();
+ rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone );
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
- ::FillCharStyleListBox(rCharFmtLB, pDocShell);
+ ::FillCharStyleListBox(*rCharFmtLB.get(), pDocShell);
std::vector<OUString> aList;
- for(sal_Int32 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
- aList.push_back( rCharFmtLB.GetEntry(j) );
+ for(sal_Int32 j = 0; j < rCharFmtLB->GetEntryCount(); j++)
+ aList.push_back( rCharFmtLB->GetEntry(j) );
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell));