summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 11:05:17 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 11:05:17 +0000
commitd6429ea3ec340f6e5568a5ac9b96561865e487b6 (patch)
treec4202dcf5d99dec2a81e5838fd791d076ce1f1f4 /sd
parent7826da5bcb04d0e07ccff43dfe643fb33fbce25a (diff)
INTEGRATION: CWS impressodf12 (1.9.6); FILE MERGED
2008/04/25 08:52:57 cl 1.9.6.2: RESYNC: (1.9-1.10); FILE MERGED 2008/04/13 19:05:19 cl 1.9.6.1: #i35937# allow paragraph depth of -1 to switch of numbering
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuprobjs.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index a1f0eee6c4d3..4fc4e1f616fa 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fuprobjs.cxx,v $
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
* This file is part of OpenOffice.org.
*
@@ -101,13 +101,15 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
DBG_ASSERT(aLayoutName.Len(), "Layout unbestimmt");
BOOL bUnique = FALSE;
- USHORT nDepth, nTmp;
+ sal_Int16 nDepth, nTmp;
OutlineView* pOlView = static_cast<OutlineView*>(pOutlineViewShell->GetView());
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( (Window*) mpWindow );
::Outliner* pOutl = pOutlinerView->GetOutliner();
List* pList = pOutlinerView->CreateSelectionList();
Paragraph* pPara = (Paragraph*)pList->First();
nDepth = pOutl->GetDepth((USHORT)pOutl->GetAbsPos( pPara ) );
+ bool bPage = pPara->HasFlag( PARAFLAG_ISPAGE );
+
while( pPara )
{
nTmp = pOutl->GetDepth((USHORT) pOutl->GetAbsPos( pPara ) );
@@ -117,6 +119,12 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
bUnique = FALSE;
break;
}
+
+ if( pPara->HasFlag( PARAFLAG_ISPAGE ) != bPage )
+ {
+ bUnique = FALSE;
+ break;
+ }
bUnique = TRUE;
pPara = (Paragraph*) pList->Next();
@@ -129,7 +137,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
USHORT nDlgId = TAB_PRES_LAYOUT_TEMPLATE_3;
PresentationObjects ePO;
- if( nDepth == 0 )
+ if( bPage )
{
ePO = PO_TITLE;
String aStr(SdResId( STR_LAYOUT_TITLE ));