diff options
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 10 | ||||
-rw-r--r-- | include/svx/flagsdef.hxx | 16 | ||||
-rw-r--r-- | sc/source/ui/styleui/styledlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fmtui/tmpdlg.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 4 |
7 files changed, 28 insertions, 20 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index e8b92a9a8e40..4e49e59e95e1 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1865,14 +1865,14 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet) if (pFlagItem) { - sal_uInt32 nFlags=pFlagItem->GetValue(); - if ( ( nFlags & SVX_SHOW_TBLCTL ) == SVX_SHOW_TBLCTL ) + SvxBackgroundTabFlags nFlags = static_cast<SvxBackgroundTabFlags>(pFlagItem->GetValue()); + if (nFlags & SvxBackgroundTabFlags::SHOW_TBLCTL ) ShowTblControl(); - if ( ( nFlags & SVX_SHOW_PARACTL ) == SVX_SHOW_PARACTL ) + if ( nFlags & SvxBackgroundTabFlags::SHOW_PARACTL ) ShowParaControl(); - if ( ( nFlags & SVX_SHOW_SELECTOR ) == SVX_SHOW_SELECTOR ) + if ( nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR ) ShowSelector(); - if ( ( nFlags & SVX_ENABLE_TRANSPARENCY ) == SVX_ENABLE_TRANSPARENCY ) + if ( nFlags & SvxBackgroundTabFlags::ENABLE_TRANSPARENCY ) EnableTransparency(true, true); } } diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx index 86a8f3480364..4a12a87fc11d 100644 --- a/include/svx/flagsdef.hxx +++ b/include/svx/flagsdef.hxx @@ -38,10 +38,18 @@ namespace o3tl } // flags for SvxBackgroundTabPage -#define SVX_SHOW_SELECTOR 0x01 -#define SVX_SHOW_PARACTL 0x02 -#define SVX_ENABLE_TRANSPARENCY 0x04 -#define SVX_SHOW_TBLCTL 0x08 +enum class SvxBackgroundTabFlags +{ + NONE = 0x00, + SHOW_SELECTOR = 0x01, + SHOW_PARACTL = 0x02, + ENABLE_TRANSPARENCY = 0x04, + SHOW_TBLCTL = 0x08, +}; +namespace o3tl +{ + template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x0f> {}; +} // flags for SvxBorderTabPage #define SVX_HIDESHADOWCTL 0x01 diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx index fc72ca45d783..bb5ced1d9a22 100644 --- a/sc/source/ui/styleui/styledlg.cxx +++ b/sc/source/ui/styleui/styledlg.cxx @@ -167,7 +167,7 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) } else if (nPageId == m_nBackgroundId) { - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR)); + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR))); rTabPage.PageCreated(aSet); } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 41fbe2b8d3b9..a6d8a92ca48a 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1456,7 +1456,7 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) else if (nId == m_nBackPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR)); + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR))); rPage.PageCreated(aSet); } else if (nId == m_nColumnPageId) @@ -2148,7 +2148,7 @@ void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage if (nId == m_nBackPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR)); + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR))); rPage.PageCreated(aSet); } else if (nId == m_nColumnPageId) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index d8d1aa37b320..d8276160da0c 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -479,14 +479,14 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND) else if (nId == m_nBackgroundId) { - sal_Int32 nFlagType = 0; + SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE; if( SFX_STYLE_FAMILY_PARA == nType ) - nFlagType |= SVX_SHOW_PARACTL; + nFlagType |= SvxBackgroundTabFlags::SHOW_PARACTL; if( SFX_STYLE_FAMILY_CHAR != nType ) - nFlagType |= SVX_SHOW_SELECTOR; + nFlagType |= SvxBackgroundTabFlags::SHOW_SELECTOR; if( SFX_STYLE_FAMILY_FRAME == nType ) - nFlagType |= SVX_ENABLE_TRANSPARENCY; - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType)); + nFlagType |= SvxBackgroundTabFlags::ENABLE_TRANSPARENCY; + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType))); rPage.PageCreated(aSet); } else if (nId == m_nConditionId) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3eb2ffc4de93..ce78544e1660 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -354,7 +354,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) if (nId == m_nBackGroundId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR)); + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR))); rPage.PageCreated(aSet); } else if(nId == m_nColumnId) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c76dc0fe477c..a90e84ce9eb7 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1260,8 +1260,8 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (nId == m_nBackgroundId) { - sal_Int32 nFlagType = SVX_SHOW_TBLCTL | SVX_SHOW_SELECTOR; - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType)); + SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::SHOW_TBLCTL | SvxBackgroundTabFlags::SHOW_SELECTOR; + aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType))); rPage.PageCreated(aSet); } else if (nId == m_nBorderId) |