summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-09 10:04:38 +0200
committerNoel Grandin <noel@peralex.com>2015-01-09 10:06:17 +0200
commit901e5c3a21a1299d10c44bc844246fe8c329bb82 (patch)
tree358ff817974d0eb5c047aa28fe83a2c1871f756b /sw/source/ui
parentcd9e2ecba38c31eb30e05d3ee2c9f4629dd89d40 (diff)
fdo#84938: convert FRMTYPE_ #defines to 'enum class'
and consequently fix bug in SwPageFrm::PreparePage where it was comparing against the wrong #define's Change-Id: I681f7e9f3f9bbe1ddf2613814ed36cfe0955825f
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx8
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx8
-rw-r--r--sw/source/ui/table/tabledlg.cxx4
5 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index e0d9c542c71b..a7616885ad21 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -183,7 +183,7 @@ void SwBreakDlg::CheckEnable()
bEnable = false;
}
else if(rSh.GetFrmType(0,true)
- & (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
+ & (FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE))
{
m_pPageBtn->Enable(false);
if(m_pPageBtn->IsChecked())
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 903ce472956f..f95e5113b81d 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -208,8 +208,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if( m_nParaExt == nId )
{
// pagebreak only when the cursor is in the body-area and not in a table
- const sal_uInt16 eType = rSh.GetFrmType(0,true);
- if( !(FRMTYPE_BODY & eType) ||
+ const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ if( !(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,true));
@@ -227,8 +227,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
// Seitenumbruch nur, wenn der Cursor im Body-Bereich und nicht in
// einer Tabelle steht
- const sal_uInt16 eType = rSh.GetFrmType(0,true);
- if(!(FRMTYPE_BODY & eType) ||
+ const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ if(!(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL)
{
aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,true));
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index e25749690afc..dc7caf05b44e 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -691,7 +691,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
}
else
nWidth = rSh.GetAnyCurRect(
- FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, true )
+ FrmTypeFlags::FLY_ANY & rSh.GetFrmType( 0, true )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 6e76ef318c5f..f1b4407b58ac 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -267,12 +267,12 @@ void SwIndexMarkPane::InitControls()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const sal_uInt16 nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() &&
- 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY )));
+ !(nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FLY_ANY )));
SearchTypeHdl(m_pApplyToAllCB);
}
@@ -355,12 +355,12 @@ void SwIndexMarkPane::Activate()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const sal_uInt16 nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() &&
- 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY )));
+ !(nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FLY_ANY )));
SearchTypeHdl(m_pApplyToAllCB);
}
ModifyHdl(m_pTypeDCB);
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 2c11c22c8b47..c929c2136456 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1237,8 +1237,8 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if (nId == m_nTextFlowId)
{
static_cast<SwTextFlowPage&>(rPage).SetShell(pShell);
- const sal_uInt16 eType = pShell->GetFrmType(0,true);
- if( !(FRMTYPE_BODY & eType) )
+ const FrmTypeFlags eType = pShell->GetFrmType(0,true);
+ if( !(FrmTypeFlags::BODY & eType) )
static_cast<SwTextFlowPage&>(rPage).DisablePageBreak();
}
}