summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/prevwsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/prevwsh.cxx')
-rw-r--r--sc/source/ui/view/prevwsh.cxx9
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)