summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-22 14:59:54 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:38 +0200
commit83ab72efe7dbb9047e89ba2775228b2d81f96bc9 (patch)
treecfa3f2a661775d285b57369b63ee369a3aa7c881 /cui
parent0779e5a6a7bd4388638c337718ff3f934b64bd3a (diff)
convert SW_BORDER_MODE constants to scoped enum
Change-Id: I7b2e03a5cacf5d2a706ba8e2d3b276fcb3f7e88b
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/border.hxx2
-rw-r--r--cui/source/tabpages/border.cxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 8f129977a546..75b438b1962a 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -103,7 +103,7 @@ private:
ImageList aBorderImgLst;
long nMinValue; ///< minimum distance
- int nSWMode; ///< table, textframe, paragraph
+ SwBorderModes nSWMode; ///< table, textframe, paragraph
bool mbHorEnabled; ///< true = Inner horizontal border enabled.
bool mbVerEnabled; ///< true = Inner vertical border enabled.
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 387e003402c3..b304afa3955a 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -93,7 +93,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
aShadowImgLst( CUI_RES(IL_SDW_BITMAPS)),
aBorderImgLst( CUI_RES(IL_PRE_BITMAPS)),
nMinValue(0),
- nSWMode(0),
+ nSWMode(SwBorderModes::NONE),
mbHorEnabled( false ),
mbVerEnabled( false ),
mbTLBREnabled( false ),
@@ -581,7 +581,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
// there are no shadows in Html-mode and only complete borders
m_pShadowFrame->Disable();
- if( !(nSWMode & SW_BORDER_MODE_TABLE) )
+ if( !(nSWMode & SwBorderModes::TABLE) )
{
m_pUserDefFT->Disable();
m_pFrameSel->Disable();
@@ -666,7 +666,7 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
if( !m_pLeftMF->GetText().isEmpty() || !m_pRightMF->GetText().isEmpty() ||
!m_pTopMF->GetText().isEmpty() || !m_pBottomMF->GetText().isEmpty() )
{
- if ( ((mbHorEnabled || mbVerEnabled || (nSWMode & SW_BORDER_MODE_TABLE)) &&
+ if ( ((mbHorEnabled || mbVerEnabled || (nSWMode & SwBorderModes::TABLE)) &&
(m_pLeftMF->IsModified()||m_pRightMF->IsModified()||
m_pTopMF->IsModified()||m_pBottomMF->IsModified()) )||
m_pFrameSel->GetFrameBorderState( svx::FRAMEBORDER_TOP ) != svx::FRAMESTATE_HIDE
@@ -1107,7 +1107,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl)
if(!mbUseMarginItem && m_pLeftMF->IsVisible())
{
bool bLineSet = m_pFrameSel->IsAnyBorderVisible();
- bool bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE));
+ bool bMinAllowed = bool(nSWMode & (SwBorderModes::FRAME|SwBorderModes::TABLE));
bool bSpaceModified = m_pLeftMF->IsModified()||
m_pRightMF->IsModified()||
m_pTopMF->IsModified()||
@@ -1152,7 +1152,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl)
SvxBoxInfoItemValidFlags nValid = SvxBoxInfoItemValidFlags::TOP|SvxBoxInfoItemValidFlags::BOTTOM|SvxBoxInfoItemValidFlags::LEFT|SvxBoxInfoItemValidFlags::RIGHT;
// for other objects (paragraph, page, frame, character) the edit is disabled, if there's no border set
- if(!(nSWMode & SW_BORDER_MODE_TABLE))
+ if(!(nSWMode & SwBorderModes::TABLE))
{
if(bLineSet)
{
@@ -1217,16 +1217,16 @@ void SvxBorderTabPage::PageCreated(const SfxAllItemSet& aSet)
SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false);
if (pSWModeItem)
{
- nSWMode = pSWModeItem->GetValue();
+ nSWMode = static_cast<SwBorderModes>(pSWModeItem->GetValue());
// #i43593#
// show checkbox <m_pMergeWithNextCB> for format.paragraph
- if ( nSWMode == SW_BORDER_MODE_PARA )
+ if ( nSWMode == SwBorderModes::PARA )
{
m_pMergeWithNextCB->Show();
m_pPropertiesFrame->Show();
}
// show checkbox <m_pMergeAdjacentBordersCB> for format.paragraph
- else if ( nSWMode == SW_BORDER_MODE_TABLE )
+ else if ( nSWMode == SwBorderModes::TABLE )
{
m_pMergeAdjacentBordersCB->Show();
m_pPropertiesFrame->Show();
@@ -1239,7 +1239,7 @@ void SvxBorderTabPage::PageCreated(const SfxAllItemSet& aSet)
void SvxBorderTabPage::SetTableMode()
{
- nSWMode = SW_BORDER_MODE_TABLE;
+ nSWMode = SwBorderModes::TABLE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */