diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 14:48:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 15:50:58 +0200 |
commit | 3e57aad962c9d24c535daff893db203314709cfc (patch) | |
tree | 5744fcaae69751cdd4174f5da6024ba656e77ccc /cui/source/tabpages/tpshadow.cxx | |
parent | bb3ea0ae51bb943f7bb3dca80eee153f9c55c03e (diff) |
loplugin:flatten in cui
Change-Id: I0ea0784ab8c4542747da1e15fa7c60c60bccb602
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92423
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages/tpshadow.cxx')
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 1c8c5051d0b9..de448b197fd4 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -168,42 +168,42 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) if (pPageTypeItem) SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); - if( m_nDlgType == 0 ) + if( m_nDlgType != 0 ) + return; + + if( !m_pColorList.is() ) + return; + + // ColorList + if( *m_pnColorListState & ChangeType::CHANGED || + *m_pnColorListState & ChangeType::MODIFIED ) { - if( m_pColorList.is() ) + if( *m_pnColorListState & ChangeType::CHANGED ) { - // ColorList - if( *m_pnColorListState & ChangeType::CHANGED || - *m_pnColorListState & ChangeType::MODIFIED ) + SvxAreaTabDialog* pArea = dynamic_cast<SvxAreaTabDialog*>(GetDialogController()); + if( pArea ) { - if( *m_pnColorListState & ChangeType::CHANGED ) - { - SvxAreaTabDialog* pArea = dynamic_cast<SvxAreaTabDialog*>(GetDialogController()); - if( pArea ) - { - m_pColorList = pArea->GetNewColorList(); - } - else - { - SvxLineTabDialog* pLine = dynamic_cast<SvxLineTabDialog*>(GetDialogController()); - if( pLine ) - m_pColorList = pLine->GetNewColorList(); - } - } - - SfxItemSet rAttribs( rSet ); - // rSet contains shadow attributes too, but we want - // to use it for updating rectangle attributes only, - // so set the shadow to none here - SdrOnOffItem aItem( makeSdrShadowItem( false )); - rAttribs.Put( aItem ); - - m_aCtlXRectPreview.SetRectangleAttributes( rAttribs ); - ModifyShadowHdl_Impl( *m_xMtrTransparent ); + m_pColorList = pArea->GetNewColorList(); + } + else + { + SvxLineTabDialog* pLine = dynamic_cast<SvxLineTabDialog*>(GetDialogController()); + if( pLine ) + m_pColorList = pLine->GetNewColorList(); } - m_nPageType = PageType::Shadow; } + + SfxItemSet rAttribs( rSet ); + // rSet contains shadow attributes too, but we want + // to use it for updating rectangle attributes only, + // so set the shadow to none here + SdrOnOffItem aItem( makeSdrShadowItem( false )); + rAttribs.Put( aItem ); + + m_aCtlXRectPreview.SetRectangleAttributes( rAttribs ); + ModifyShadowHdl_Impl( *m_xMtrTransparent ); } + m_nPageType = PageType::Shadow; } |