diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-31 09:13:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-31 13:23:04 +0200 |
commit | 2cc5877a0cd08560478fe1f4206d7904e61e0557 (patch) | |
tree | baa1a4cf00ef99f12ac44e259242c78902db6c82 /sw/source/uibase/misc | |
parent | 81fbf1386a36972be7d3eff3f7a0c6bab80be764 (diff) |
tdf#84938 convert INSERT_NUM_ constants to scoped enum
Change-Id: If5880558bb04a71ebc4ef76aa4f5aac3d10040f9
Diffstat (limited to 'sw/source/uibase/misc')
-rw-r--r-- | sw/source/uibase/misc/numberingtypelistbox.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index faf6f3215eb4..a0eeb5182d17 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -49,7 +49,7 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( vcl::Window* pWin, WinBits nStyl bool SwNumberingTypeListBox::set_property(const OString &rKey, const OString &rValue) { if (rKey == "type") - Reload(rValue.toInt32()); + Reload(static_cast<SwInsertNumTypes>(rValue.toInt32())); else return ListBox::set_property(rKey, rValue); return true; @@ -74,12 +74,12 @@ void SwNumberingTypeListBox::dispose() ListBox::dispose(); } -void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) +void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) { Clear(); uno::Sequence<sal_Int16> aTypes; const sal_Int16* pTypes = nullptr; - if(0 != (nTypeFlags&INSERT_NUM_EXTENDED_TYPES) ) + if(nTypeFlags & SwInsertNumTypes::Extended) { if(pImpl->xInfo.is()) { @@ -97,20 +97,20 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) switch(nValue) { case style::NumberingType::NUMBER_NONE: - bInsert = 0 != (nTypeFlags&INSERT_NUM_TYPE_NO_NUMBERING); + bInsert = bool(nTypeFlags & SwInsertNumTypes::NoNumbering); nPos = 0; break; case style::NumberingType::CHAR_SPECIAL: - bInsert = 0 != (nTypeFlags&INSERT_NUM_TYPE_BULLET); + bInsert = bool(nTypeFlags & SwInsertNumTypes::Bullet); break; case style::NumberingType::PAGE_DESCRIPTOR: - bInsert = 0 != (nTypeFlags&INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING); + bInsert = bool(nTypeFlags & SwInsertNumTypes::PageStyleNumbering); break; case style::NumberingType::BITMAP: - bInsert = 0 != (nTypeFlags&INSERT_NUM_TYPE_BITMAP ); + bInsert = bool(nTypeFlags & SwInsertNumTypes::Bitmap ); break; default: @@ -137,7 +137,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) SetEntryData( nEntry, reinterpret_cast<void*>(nValue) ); } } - if(0 != (nTypeFlags&INSERT_NUM_EXTENDED_TYPES) ) + if(nTypeFlags & SwInsertNumTypes::Extended) { if(pTypes) { |