summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/func/fusumry.cxx59
1 files changed, 31 insertions, 28 deletions
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index f1493534e360..f8ef7f027cfb 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -183,40 +183,43 @@ void FuSummaryPage::DoExecute( SfxRequest& )
}
}
- if (pSummaryPage)
- {
- SdrTextObj* pTextObj = (SdrTextObj*) pSummaryPage->GetPresObj(PRESOBJ_OUTLINE);
+ if (!pSummaryPage)
+ return;
- // remove hard break- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- sal_Int32 nParaCount = pOutl->GetParagraphCount();
+ SdrTextObj* pTextObj = (SdrTextObj*) pSummaryPage->GetPresObj(PRESOBJ_OUTLINE);
- for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
- {
- pOutl->SetStyleSheet( nPara, pStyle );
- pOutl->QuickRemoveCharAttribs(nPara);
- pOutl->SetParaAttribs(nPara, aEmptyEEAttr);
- pOutl->SetDepth(pOutl->GetParagraph(nPara), 0);
- }
+ if (!pTextObj)
+ return;
+
+ // remove hard break- and character attributes
+ SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ sal_Int32 nParaCount = pOutl->GetParagraphCount();
+
+ for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
+ {
+ pOutl->SetStyleSheet( nPara, pStyle );
+ pOutl->QuickRemoveCharAttribs(nPara);
+ pOutl->SetParaAttribs(nPara, aEmptyEEAttr);
+ pOutl->SetDepth(pOutl->GetParagraph(nPara), 0);
+ }
- pTextObj->SetOutlinerParaObject( pOutl->CreateParaObject() );
- pTextObj->SetEmptyPresObj(false);
+ pTextObj->SetOutlinerParaObject( pOutl->CreateParaObject() );
+ pTextObj->SetEmptyPresObj(false);
- // remove hard attributes (Flag to sal_True)
- SfxItemSet aAttr(mpDoc->GetPool());
- aAttr.Put(XLineStyleItem(XLINE_NONE));
- aAttr.Put(XFillStyleItem(XFILL_NONE));
- pTextObj->SetMergedItemSet(aAttr);
+ // remove hard attributes (Flag to sal_True)
+ SfxItemSet aAttr(mpDoc->GetPool());
+ aAttr.Put(XLineStyleItem(XLINE_NONE));
+ aAttr.Put(XFillStyleItem(XFILL_NONE));
+ pTextObj->SetMergedItemSet(aAttr);
- if( bBegUndo )
- mpView->EndUndo();
- delete pOutl;
+ if( bBegUndo )
+ mpView->EndUndo();
+ delete pOutl;
- DrawViewShell* pDrawViewShell= dynamic_cast< DrawViewShell* >( mpViewShell );
- if(pDrawViewShell)
- {
- pDrawViewShell->SwitchPage( (pSummaryPage->GetPageNum() - 1) / 2);
- }
+ DrawViewShell* pDrawViewShell= dynamic_cast< DrawViewShell* >( mpViewShell );
+ if(pDrawViewShell)
+ {
+ pDrawViewShell->SwitchPage( (pSummaryPage->GetPageNum() - 1) / 2);
}
}