summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2019-07-16 10:18:44 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2019-07-16 09:23:23 +0200
commit8d9ab38937ead9cefbbdc8fc3dfda6e1f82136cd (patch)
tree1f39daef21a597184858e5812a3f5b54c78ed034
parentee2f74f480874620b35db95e2e310f16264a3ddc (diff)
Follow up patch tdf#126067 Correct indentation.
Change-Id: Idfe608afb8b02f8b9f56b9da76e3f2009617b183 Reviewed-on: https://gerrit.libreoffice.org/75676 Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Tested-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 910c65fc640b3e422f3c660ba71844552fa426b3) Reviewed-on: https://gerrit.libreoffice.org/75678
-rw-r--r--sd/source/ui/view/drawview.cxx89
1 files changed, 44 insertions, 45 deletions
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index c4c8ad3a3546..8c3d49bde085 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -366,60 +366,59 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, SdPage& rPage, SfxItemSe
{
if (bMaster)
{
- // Presentation object outline
- for (sal_uInt16 nLevel = 9; nLevel > 0; nLevel--)
- {
- OUString aName = rPage.GetLayoutName() + " " +
- OUString::number(nLevel);
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->
- Find(aName, SfxStyleFamily::Page));
- DBG_ASSERT(pSheet, "StyleSheet not found");
+ // Presentation object outline
+ for (sal_uInt16 nLevel = 9; nLevel > 0; nLevel--)
+ {
+ OUString aName = rPage.GetLayoutName() + " " +
+ OUString::number(nLevel);
+ SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->
+ Find(aName, SfxStyleFamily::Page));
+ DBG_ASSERT(pSheet, "StyleSheet not found");
- SfxItemSet aTempSet( pSheet->GetItemSet() );
+ SfxItemSet aTempSet( pSheet->GetItemSet() );
- if( nLevel > 1 )
- {
- // for all levels over 1, clear all items that will be
- // hard set to level 1
- SfxWhichIter aWhichIter(rSet);
- sal_uInt16 nWhich(aWhichIter.FirstWhich());
- while( nWhich )
+ if( nLevel > 1 )
{
- if( SfxItemState::SET == rSet.GetItemState( nWhich ) )
- aTempSet.ClearItem( nWhich );
- nWhich = aWhichIter.NextWhich();
- }
-
- }
- else
- {
- // put the items hard into level one
- aTempSet.Put( rSet );
- }
+ // for all levels over 1, clear all items that will be
+ // hard set to level 1
+ SfxWhichIter aWhichIter(rSet);
+ sal_uInt16 nWhich(aWhichIter.FirstWhich());
+ while( nWhich )
+ {
+ if( SfxItemState::SET == rSet.GetItemState( nWhich ) )
+ aTempSet.ClearItem( nWhich );
+ nWhich = aWhichIter.NextWhich();
+ }
- aTempSet.ClearInvalidItems();
+ }
+ else
+ {
+ // put the items hard into level one
+ aTempSet.Put( rSet );
+ }
- // Undo-Action
- mpDocSh->GetUndoManager()->AddUndoAction(
- std::make_unique<StyleSheetUndoAction>(&mrDoc, pSheet, &aTempSet));
+ aTempSet.ClearInvalidItems();
- pSheet->GetItemSet().Set(aTempSet,false);
- pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
- }
+ // Undo-Action
+ mpDocSh->GetUndoManager()->AddUndoAction(
+ std::make_unique<StyleSheetUndoAction>(&mrDoc, pSheet, &aTempSet));
- // remove all hard set items from shape that are now set in style
- SfxWhichIter aWhichIter(rSet);
- sal_uInt16 nWhich(aWhichIter.FirstWhich());
- while( nWhich )
- {
- if( SfxItemState::SET == rSet.GetItemState( nWhich ) )
- pObject->ClearMergedItem( nWhich );
- nWhich = aWhichIter.NextWhich();
- }
+ pSheet->GetItemSet().Set(aTempSet,false);
+ pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
+ }
+ // remove all hard set items from shape that are now set in style
+ SfxWhichIter aWhichIter(rSet);
+ sal_uInt16 nWhich(aWhichIter.FirstWhich());
+ while( nWhich )
+ {
+ if( SfxItemState::SET == rSet.GetItemState( nWhich ) )
+ pObject->ClearMergedItem( nWhich );
+ nWhich = aWhichIter.NextWhich();
+ }
}
-
- pObject->SetMergedItemSet(rSet);
+ else
+ pObject->SetMergedItemSet(rSet);
bOk = true;
}