sd/source/ui/view/drawview.cxx | 89 ++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 45 deletions(-)
New commits: commit 910c65fc640b3e422f3c660ba71844552fa426b3 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Tue Jul 16 10:18:44 2019 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Tue Jul 16 09:21:43 2019 +0200 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.k...@collabora.com> Tested-by: Gülşah Köse <gulsah.k...@collabora.com> 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits