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>
This commit is contained in:
committed by
Armin Le Grand
parent
e11c374084
commit
a292fb847d
@@ -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;
|
||||
|
Reference in New Issue
Block a user