diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2019-07-16 10:18:44 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2019-07-16 09:21:43 +0200 |
commit | 910c65fc640b3e422f3c660ba71844552fa426b3 (patch) | |
tree | eea2c7a5c64df3e27a8303aea093989802f90b8e /sd | |
parent | b53403c54c4fef4ecf5b9b8ba98eb643a0297858 (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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 89 |
1 files changed, 44 insertions, 45 deletions
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index d53c19561b04..5bc53d0700fa 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -367,60 +367,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; } |