diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-29 15:43:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-29 15:43:43 +0100 |
commit | 71af22ce8c75d8b161b1bdbb26d0469572c393d0 (patch) | |
tree | 0112373df0d0ef297da398b0332fc6574ca89f19 | |
parent | 2f200f1e760477300ea0a6eb75cf0bf6841cf81f (diff) |
expand these unhelpful macros
Change-Id: I38b5948d4782f97f6de62057a42b414dd0db8512
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index f4edebab4286..fcd7a3a98d71 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -75,12 +75,6 @@ using namespace ::com::sun::star; -// define ---------------------------------------------------------------- - -#define ISITEMSET rSet.GetItemState(nWhich)>=SfxItemState::DEFAULT - -#define CLEARTITEM rSet.InvalidateItem(nWhich) - // static ---------------------------------------------------------------- const sal_uInt16 SvxCharNamePage::pNameRanges[] = @@ -188,24 +182,21 @@ void SvxCharBasePage::dispose() SfxTabPage::dispose(); } - void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) { m_pPreviewWin->SetFromItemSet( rSet, m_bPreviewBackgroundToCharacter ); } - void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) { sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); - if( ISITEMSET ) + if (rSet.GetItemState(nWhich)>=SfxItemState::DEFAULT) { const SvxCharScaleWidthItem &rItem = static_cast<const SvxCharScaleWidthItem&>( rSet.Get( nWhich ) ); m_pPreviewWin->SetFontWidthScale( rItem.GetValue() ); } } - namespace { @@ -996,7 +987,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - CLEARTITEM; + rSet.InvalidateItem(nWhich); bChanged = true; switch ( eLangGrp ) @@ -1043,7 +1034,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - CLEARTITEM; + rSet.InvalidateItem(nWhich); // FontSize long nSize = static_cast<long>(pSizeBox->GetValue()); @@ -1103,7 +1094,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - CLEARTITEM; + rSet.InvalidateItem(nWhich); bChanged = true; switch ( eLangGrp ) @@ -1158,7 +1149,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - CLEARTITEM; + rSet.InvalidateItem(nWhich); return bModified; } @@ -1617,7 +1608,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) if (bChanged) rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - CLEARTITEM; + rSet.InvalidateItem(nWhich); return bChanged; } |