[ooo-build-commit] .: sw/source
Noel Power
noelp at kemper.freedesktop.org
Mon Oct 4 07:09:16 PDT 2010
sw/source/ui/uiview/viewprt.cxx | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
New commits:
commit a2486209b950544c8db3650521d0c9689744f3b8
Author: Noel Power <noel.power at novell.com>
Date: Mon Oct 4 15:08:54 2010 +0100
ok, lets assert and code defensively
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 0f7aabd..6c8825a 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -321,13 +321,23 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions, BOOL bPreview )
{
+ SfxTabPage* pPage = NULL;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( TP_OPTPRINT_PAGE );
- SfxTabPage* pPage = (*fnCreatePage)( pParent, rOptions );
- SfxAllItemSet aSet(*(rOptions.GetPool()));
- aSet.Put (SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
- aSet.Put (SfxBoolItem(SID_FAX_LIST, sal_True));
- pPage->PageCreated(aSet);
+ DBG_ASSERT( pFac, "No Print Dialog" );
+ if ( pFact )
+ {
+ ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( TP_OPTPRINT_PAGE );
+ pPage = (*fnCreatePage)( pParent, rOptions );
+ }
+
+ DBG_ASSERT( pPage, "No page" );
+ if ( pPage )
+ {
+ SfxAllItemSet aSet(*(rOptions.GetPool()));
+ aSet.Put (SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
+ aSet.Put (SfxBoolItem(SID_FAX_LIST, sal_True));
+ pPage->PageCreated(aSet);
+ }
return pPage;
}
More information about the ooo-build-commit
mailing list