summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-14 15:23:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-18 10:13:57 +0000
commit21a68e1745dec1f4c4fd5b90d3a58000ed11c324 (patch)
tree2d2d1eac6a3394db8b066fdb142b32245667af04 /cui
parent2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae (diff)
convert TAB to scoped enum
and rename the SID constant to something more meaningful Change-Id: Ic07888936df3d537158fd2fb671b0df11350d676 Reviewed-on: https://gerrit.libreoffice.org/24986 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/tabstpge.hxx2
-rw-r--r--cui/source/tabpages/tabstpge.cxx30
2 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index a91a0801a54a..ed39b6e0405a 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -58,7 +58,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
- void DisableControls( const sal_uInt16 nFlag );
+ void DisableControls( const TabulatorDisableFlags nFlag );
protected:
virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index aa697b33dbb6..8de91ed094bb 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -313,47 +313,47 @@ void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
InitTabPos_Impl(nTabPos);
}
-void SvxTabulatorTabPage::DisableControls(const sal_uInt16 nFlag)
+void SvxTabulatorTabPage::DisableControls(const TabulatorDisableFlags nFlag)
{
- if ((TABTYPE_LEFT & nFlag) == TABTYPE_LEFT)
+ if (TabulatorDisableFlags::TypeLeft & nFlag)
{
m_pLeftTab->Disable();
m_pLeftWin->Disable();
}
- if ( ( TABTYPE_RIGHT & nFlag ) == TABTYPE_RIGHT )
+ if (TabulatorDisableFlags::TypeRight & nFlag)
{
m_pRightTab->Disable();
m_pRightWin->Disable();
}
- if ( ( TABTYPE_CENTER & nFlag ) == TABTYPE_CENTER )
+ if (TabulatorDisableFlags::TypeCenter & nFlag)
{
m_pCenterTab->Disable();
m_pCenterWin->Disable();
}
- if ( ( TABTYPE_DEZIMAL & nFlag ) == TABTYPE_DEZIMAL )
+ if (TabulatorDisableFlags::TypeDecimal & nFlag)
{
m_pDezTab->Disable();
m_pDezWin->Disable();
m_pDezCharLabel->Disable();
m_pDezChar->Disable();
}
- if ( ( TABTYPE_ALL & nFlag ) == TABTYPE_ALL )
+ if (TabulatorDisableFlags::TypeMask & nFlag)
m_pTypeFrame->Disable();
- if ( ( TABFILL_NONE & nFlag ) == TABFILL_NONE )
+ if (TabulatorDisableFlags::FillNone & nFlag)
m_pNoFillChar->Disable();
- if ( ( TABFILL_POINT & nFlag ) == TABFILL_POINT )
+ if (TabulatorDisableFlags::FillPoint & nFlag)
m_pFillPoints->Disable();
- if ( ( TABFILL_DASHLINE & nFlag ) == TABFILL_DASHLINE )
+ if (TabulatorDisableFlags::FillDashLine & nFlag)
m_pFillDashLine->Disable();
- if ( ( TABFILL_SOLIDLINE & nFlag ) == TABFILL_SOLIDLINE )
+ if (TabulatorDisableFlags::FillSolidLine & nFlag)
m_pFillSolidLine->Disable();
- if ( ( TABFILL_SPECIAL & nFlag ) == TABFILL_SPECIAL )
+ if (TabulatorDisableFlags::FillSpecial & nFlag)
{
m_pFillSpecial->Disable();
m_pFillChar->Disable();
}
- if ( ( TABFILL_ALL & nFlag ) == TABFILL_ALL )
- m_pFillFrame->Disable();
+ if (TabulatorDisableFlags::FillMask & nFlag)
+ m_pFillFrame->Disable();
}
SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet )
@@ -689,9 +689,9 @@ IMPL_LINK_NOARG_TYPED(SvxTabulatorTabPage, ModifyHdl_Impl, Edit&, void)
void SvxTabulatorTabPage::PageCreated(const SfxAllItemSet& aSet)
{
- const SfxUInt16Item* pControlItem = aSet.GetItem<SfxUInt16Item>(SID_SVXTABULATORTABPAGE_CONTROLFLAGS, false);
+ const SfxUInt16Item* pControlItem = aSet.GetItem<SfxUInt16Item>(SID_SVXTABULATORTABPAGE_DISABLEFLAGS, false);
if (pControlItem)
- DisableControls(pControlItem->GetValue());
+ DisableControls((TabulatorDisableFlags)pControlItem->GetValue());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */