summaryrefslogtreecommitdiff
path: root/sw/source/uibase/frmdlg/frmmgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-30 10:40:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-30 16:18:59 +0200
commitfb98eb24d451a1b422bad1ed42459b8876397fd6 (patch)
tree461f925eaa306f350cf2ed604cfb5b5dd817bf00 /sw/source/uibase/frmdlg/frmmgr.cxx
parent4e246d407b21b72cfb0f8dd9c6ac51ca06d909a3 (diff)
loplugin:flatten in sw/uibase/fldui..sw/uibase/ribbar
Change-Id: Iff2bd302c3a6cc23be462e5a59aee0d12e7e7c09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99794 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/frmdlg/frmmgr.cxx')
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 926a949e2f98..146ab05384c8 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -148,28 +148,28 @@ void SwFlyFrameAttrMgr::UpdateFlyFrame()
OSL_ENSURE( m_pOwnSh->IsFrameSelected(),
"no frame selected or no shell, update not possible");
- if( m_pOwnSh->IsFrameSelected() )
+ if( !m_pOwnSh->IsFrameSelected() )
+ return;
+
+ //JP 6.8.2001: set never an invalid anchor into the core.
+ const SfxPoolItem *pGItem, *pItem;
+ if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
- //JP 6.8.2001: set never an invalid anchor into the core.
- const SfxPoolItem *pGItem, *pItem;
- if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem ))
- {
- SfxItemSet aGetSet( *m_aSet.GetPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
- if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() &&
- SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem )
- && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() ==
- static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() )
- m_aSet.ClearItem( RES_ANCHOR );
- }
+ SfxItemSet aGetSet( *m_aSet.GetPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
+ if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() &&
+ SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem )
+ && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() ==
+ static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() )
+ m_aSet.ClearItem( RES_ANCHOR );
+ }
- // return wg. BASIC
- if( m_aSet.Count() )
- {
- m_pOwnSh->StartAllAction();
- m_pOwnSh->SetFlyFrameAttr( m_aSet );
- UpdateFlyFrame_();
- m_pOwnSh->EndAllAction();
- }
+ // return wg. BASIC
+ if( m_aSet.Count() )
+ {
+ m_pOwnSh->StartAllAction();
+ m_pOwnSh->SetFlyFrameAttr( m_aSet );
+ UpdateFlyFrame_();
+ m_pOwnSh->EndAllAction();
}
}