summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/paragrph.cxx
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-06-09 19:53:24 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-06-10 11:11:26 +0200
commita292fb847dade1912d281adc44c92a9ba3e8b61d (patch)
tree649b64f1e50821fbb198ea0bbefe0823c12feac7 /cui/source/tabpages/paragrph.cxx
parente11c3740845959ab25f9b644681c97a7ded24d1c (diff)
tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWN
In this case, avoid single, re-used local variable. It gets newly processed at locations used anyways. Change-Id: I89463736cbc28925adc304adb4624ab2740bdfbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116936 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'cui/source/tabpages/paragrph.cxx')
-rw-r--r--cui/source/tabpages/paragrph.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index cb59cc8c8010..83613a78938a 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -214,7 +214,6 @@ std::unique_ptr<SfxTabPage> SvxStdParagraphTabPage::Create( weld::Container* pPa
bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
{
- SfxItemState eState = SfxItemState::UNKNOWN;
const SfxPoolItem* pOld = nullptr;
SfxItemPool* pPool = rOutSet->GetPool();
DBG_ASSERT( pPool, "Where is the pool?" );
@@ -260,12 +259,11 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
OSL_FAIL( "unknown LineDist entry" );
break;
}
- eState = GetItemSet().GetItemState( nWhich );
pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_LINESPACE );
if ( m_bLineDistToggled ||
!pOld || !( *static_cast<const SvxLineSpacingItem*>(pOld) == aSpacing ) ||
- SfxItemState::DONTCARE == eState )
+ SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) )
{
rOutSet->Put( aSpacing );
bModified = true;
@@ -306,10 +304,9 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
aMargin.SetLower(static_cast<sal_uInt16>(m_xBottomDist->GetCoreValue(eUnit)));
}
aMargin.SetContextValue(m_xContextualCB->get_active());
- eState = GetItemSet().GetItemState( nWhich );
if ( !pOld || *static_cast<const SvxULSpaceItem*>(pOld) != aMargin ||
- SfxItemState::DONTCARE == eState )
+ SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) )
{
rOutSet->Put( aMargin );
bModified = true;
@@ -361,10 +358,9 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
aMargin.SetAutoFirst(m_xAutoCB->get_active());
if ( aMargin.GetTextFirstLineOffset() < 0 )
bNullTab = true;
- eState = GetItemSet().GetItemState( nWhich );
if ( !pOld || *static_cast<const SvxLRSpaceItem*>(pOld) != aMargin ||
- SfxItemState::DONTCARE == eState )
+ SfxItemState::DONTCARE == GetItemSet().GetItemState( nWhich ) )
{
rOutSet->Put( aMargin );
bModified = true;