summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsf.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-14 09:10:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 07:48:14 +0100
commitc2429e3e95a4298f43c468f36a1a2832992dd40e (patch)
treef43bd173eabe863b896de6057b5aee2f92d808d5 /sd/source/ui/view/drviewsf.cxx
parentb89f239aa9d3d4660380bbd0c893aecde0986032 (diff)
loplugin:flatten in sd/source/ui/view
Change-Id: I28e75ec162cde89fe1aa7d85aecce7ce80878d88 Reviewed-on: https://gerrit.libreoffice.org/67828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drviewsf.cxx')
-rw-r--r--sd/source/ui/view/drviewsf.cxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 48659c094ddf..0a8af78c3014 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -679,61 +679,61 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
rSet.Put( aAllSet, false );
// there were changes at area and/or line attributes
- if( bAttr && pSet )
+ if( !(bAttr && pSet) )
+ return;
+
+ // if the view owns selected objects, corresponding items have to be
+ // changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED
+ if( mpDrawView->AreObjectsMarked() )
{
- // if the view owns selected objects, corresponding items have to be
- // changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED
- if( mpDrawView->AreObjectsMarked() )
+ SfxWhichIter aNewIter( *pSet );
+ nWhich = aNewIter.FirstWhich();
+ while( nWhich )
{
- SfxWhichIter aNewIter( *pSet );
- nWhich = aNewIter.FirstWhich();
- while( nWhich )
+ if (nWhich >= XATTR_LINE_FIRST && nWhich <= XATTR_LINE_LAST
+ && SfxItemState::DEFAULT == pSet->GetItemState(nWhich) )
{
- if (nWhich >= XATTR_LINE_FIRST && nWhich <= XATTR_LINE_LAST
- && SfxItemState::DEFAULT == pSet->GetItemState(nWhich) )
- {
- rSet.ClearItem( nWhich );
- rSet.DisableItem( nWhich );
- }
- nWhich = aNewIter.NextWhich();
+ rSet.ClearItem( nWhich );
+ rSet.DisableItem( nWhich );
}
+ nWhich = aNewIter.NextWhich();
}
+ }
- SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE );
- if ( eState == SfxItemState::DONTCARE )
- {
- rSet.InvalidateItem(EE_PARA_LRSPACE);
- rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
- }
- eState = pSet->GetItemState( EE_PARA_SBL );
- if ( eState == SfxItemState::DONTCARE )
- {
- rSet.InvalidateItem(EE_PARA_SBL);
- rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE);
- }
- eState = pSet->GetItemState( EE_PARA_ULSPACE );
- if ( eState == SfxItemState::DONTCARE )
- {
- rSet.InvalidateItem(EE_PARA_ULSPACE);
- rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE);
- }
+ SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE );
+ if ( eState == SfxItemState::DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_LRSPACE);
+ rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+ }
+ eState = pSet->GetItemState( EE_PARA_SBL );
+ if ( eState == SfxItemState::DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_SBL);
+ rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE);
+ }
+ eState = pSet->GetItemState( EE_PARA_ULSPACE );
+ if ( eState == SfxItemState::DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_ULSPACE);
+ rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE);
+ }
- SvxEscapement eEsc = static_cast<SvxEscapement>(pSet->Get( EE_CHAR_ESCAPEMENT ).GetEnumValue());
- if( eEsc == SvxEscapement::Superscript )
- {
- rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) );
- }
- else if( eEsc == SvxEscapement::Subscript )
- {
- rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, true ) );
- }
+ SvxEscapement eEsc = static_cast<SvxEscapement>(pSet->Get( EE_CHAR_ESCAPEMENT ).GetEnumValue());
+ if( eEsc == SvxEscapement::Superscript )
+ {
+ rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) );
+ }
+ else if( eEsc == SvxEscapement::Subscript )
+ {
+ rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, true ) );
+ }
- eState = pSet->GetItemState( EE_CHAR_KERNING );
- if ( eState == SfxItemState::DONTCARE )
- {
- rSet.InvalidateItem(EE_CHAR_KERNING);
- rSet.InvalidateItem(SID_ATTR_CHAR_KERNING);
- }
+ eState = pSet->GetItemState( EE_CHAR_KERNING );
+ if ( eState == SfxItemState::DONTCARE )
+ {
+ rSet.InvalidateItem(EE_CHAR_KERNING);
+ rSet.InvalidateItem(SID_ATTR_CHAR_KERNING);
}
}