diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 20:43:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 20:43:49 +0100 |
commit | f1879e200bf1ec60e4f56451e57517f6a42873eb (patch) | |
tree | ae66e7d446859a3f047aeba0ce65f16e2f83376c /sc/source/ui/view/prevwsh.cxx | |
parent | 5be108ee578a4000ee77f2ccb9a2c2d5d2bcc39c (diff) |
make CreatePrinterOptionsPage returns a VclPtr<>.
Change-Id: Iaa7814573b48b6c9ed10426b992c944393b23332
Diffstat (limited to 'sc/source/ui/view/prevwsh.cxx')
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 3ec7b481b88b..225b0038d23f 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -531,14 +531,15 @@ bool ScPreviewShell::HasPrintOptionsPage() const return true; } -SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) +VclPtr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT ); + ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT ); if ( ScTpPrintOptionsCreate ) - return (*ScTpPrintOptionsCreate)( pParent, &rOptions); - return 0; + return VclPtr<SfxTabPage>((*ScTpPrintOptionsCreate)( pParent, &rOptions) + SAL_NO_ACQUIRE); + return VclPtr<SfxTabPage>(); } void ScPreviewShell::Activate(bool bMDI) |