summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-16 10:15:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-16 10:15:20 +0000
commit0d9ad65f689a975747903b226baa0132d057f523 (patch)
treeac29cfd4cb2af545609d91d63386fcaf490a2b57 /sw
parenta6afec6b004aaab3dd5c114bf92725b54d89b4c1 (diff)
replace SwFootnoteAdj with css::text::HorizontalAdjust
to ensure the retention of the values the code depends on Change-Id: I3baafc1ee66481518aec5928585464c8a214be16
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pagedesc.hxx13
-rw-r--r--sw/source/core/layout/pagedesc.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/ui/misc/pgfnote.cxx2
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx2
5 files changed, 10 insertions, 15 deletions
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 9b9378f948a3..c259e37ce64d 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -27,6 +27,7 @@
#include <editeng/numitem.hxx>
#include <editeng/borderline.hxx>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/text/HorizontalAdjust.hpp>
#include <o3tl/typed_flags_set.hxx>
#include <boost/multi_index_container.hpp>
@@ -42,12 +43,6 @@ class SwTextFormatColl;
class SwNode;
class SwPageDescs;
-/// Separator line adjustment.
-enum class SwFootnoteAdj
-{
- Left = 0, Center = 1, Right = 2
-};
-
/// Footnote information.
class SW_DLLPUBLIC SwPageFootnoteInfo
{
@@ -57,7 +52,7 @@ private:
editeng::SvxBorderStyle m_eLineStyle; ///< Style of the separator line
Color m_LineColor; ///< color of the separator line
Fraction m_Width; ///< percentage width of the separator line.
- SwFootnoteAdj m_eAdjust; ///< line adjustment.
+ css::text::HorizontalAdjust m_eAdjust; ///< line adjustment.
SwTwips m_nTopDist; ///< distance between body and separator.
SwTwips m_nBottomDist; ///< distance between separator and first footnote
@@ -67,7 +62,7 @@ public:
const Color& GetLineColor() const { return m_LineColor;}
editeng::SvxBorderStyle GetLineStyle() const { return m_eLineStyle; }
const Fraction& GetWidth() const { return m_Width; }
- SwFootnoteAdj GetAdj() const { return m_eAdjust; }
+ css::text::HorizontalAdjust GetAdj() const { return m_eAdjust; }
SwTwips GetTopDist() const { return m_nTopDist; }
SwTwips GetBottomDist() const { return m_nBottomDist; }
@@ -76,7 +71,7 @@ public:
void SetLineStyle(editeng::SvxBorderStyle const eSet) {m_eLineStyle = eSet;}
void SetLineColor(const Color& rCol) { m_LineColor = rCol;}
void SetWidth(const Fraction & rNew) { m_Width = rNew; }
- void SetAdj(SwFootnoteAdj const eNew) { m_eAdjust = eNew; }
+ void SetAdj(css::text::HorizontalAdjust const eNew) { m_eAdjust = eNew; }
void SetTopDist (SwTwips const nNew) { m_nTopDist = nNew; }
void SetBottomDist(SwTwips const nNew) { m_nBottomDist = nNew; }
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 556a38202eef..14a09148f234 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()) ?
- SwFootnoteAdj::Right :
- SwFootnoteAdj::Left;
+ css::text::HorizontalAdjust_RIGHT :
+ css::text::HorizontalAdjust_LEFT;
}
SwPageFootnoteInfo::SwPageFootnoteInfo( const SwPageFootnoteInfo &rCpy )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 51ed71308f1d..e11c00954ae2 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5573,9 +5573,9 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
SwTwips nX = aRectFnSet.GetPrtLeft(*this);
switch ( rInf.GetAdj() )
{
- case SwFootnoteAdj::Right:
+ case css::text::HorizontalAdjust_RIGHT:
nX += nPrtWidth - nWidth; break;
- case SwFootnoteAdj::Left:
+ case css::text::HorizontalAdjust_LEFT:
/* do nothing */; break;
default:
SAL_WARN("sw.core", "New adjustment for footnote lines?");
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 44f6d033c781..6f27e4ced9af 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -266,7 +266,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
rFootnoteInfo.SetLineColor( m_pLineColorBox->GetSelectEntryColor() );
// Position
- rFootnoteInfo.SetAdj((SwFootnoteAdj)m_pLinePosBox->GetSelectEntryPos());
+ rFootnoteInfo.SetAdj((css::text::HorizontalAdjust)m_pLinePosBox->GetSelectEntryPos());
// Breite
rFootnoteInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100));
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 579085aa1988..c8dd123f05b0 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -166,7 +166,7 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
sal_Int16 nSet = 0;
rVal >>= nSet;
if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust
- aFootnoteInfo.SetAdj((SwFootnoteAdj)nSet);
+ aFootnoteInfo.SetAdj((css::text::HorizontalAdjust)nSet);
else
bRet = false;
}