summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-10 13:01:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 08:17:42 +0200
commitf052855343430327d3f92a66e14e9a445ee5fa0a (patch)
treeafecb8c6c8e35517362fd55f67da333c6a0c0fed
parent21b5c88398972bb535aecad72ef02dbb7e0d2b22 (diff)
convert SwFootnoteAdj to scoped enum
and drop read-only FTNADJ_CENTER enumerator Change-Id: Id059a8e84aed703a86f0ef4d66c24e9401dfc3a9
-rw-r--r--sw/inc/pagedesc.hxx6
-rw-r--r--sw/source/core/layout/pagedesc.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx8
3 files changed, 7 insertions, 11 deletions
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index da74648d67fa..2c623288e6a1 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -43,11 +43,9 @@ class SwNode;
class SwPageDescs;
/// Separator line adjustment.
-enum SwFootnoteAdj
+enum class SwFootnoteAdj
{
- FTNADJ_LEFT,
- FTNADJ_CENTER,
- FTNADJ_RIGHT
+ Left, Right
};
/// Footnote information.
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 62784e021393..556a38202eef 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -383,8 +383,8 @@ SwPageFootnoteInfo::SwPageFootnoteInfo()
, m_nBottomDist( 57 )
{
m_eAdjust = FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) ?
- FTNADJ_RIGHT :
- FTNADJ_LEFT;
+ SwFootnoteAdj::Right :
+ SwFootnoteAdj::Left;
}
SwPageFootnoteInfo::SwPageFootnoteInfo( const SwPageFootnoteInfo &rCpy )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 6fddaae2878f..a1051bcfa285 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5573,14 +5573,12 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
SwTwips nX = aRectFnSet.GetPrtLeft(*this);
switch ( rInf.GetAdj() )
{
- case FTNADJ_CENTER:
- nX += nPrtWidth/2 - nWidth/2; break;
- case FTNADJ_RIGHT:
+ case SwFootnoteAdj::Right:
nX += nPrtWidth - nWidth; break;
- case FTNADJ_LEFT:
+ case SwFootnoteAdj::Left:
/* do nothing */; break;
default:
- OSL_ENSURE( false, "New adjustment for footnote lines?" );
+ assert(false);
}
SwTwips nLineWidth = rInf.GetLineWidth();
const SwRect aLineRect = aRectFnSet.IsVert() ?