summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-30 11:20:37 +0200
committerNoel Grandin <noel@peralex.com>2015-04-01 09:36:19 +0200
commit4b66829390b286010b37b37ec1537a320d8cea8f (patch)
treee3070f55a80dd8d6f5944db4594608865d0fbbcc /sw/source/filter/xml
parent427ef167e1a49ba7fcdef082de43622e02a84ce5 (diff)
convert BOX_LINE and BOXINFO_LINE to enum class
since their usage is intertwined. Also introduce new o3tl utilities enumrange and enumarray to make working with scoped enums a little simpler. Change-Id: I2e1cc65dd7c638e59f17d96dfae504747cad6533
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx8
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx16
2 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index ba5aeef44a21..2e58b38ebb98 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -566,10 +566,10 @@ bool SvXMLExportItemMapper::QueryXMLValue(
const SvxBorderLine* pRight = pBox->GetRight();
const SvxBorderLine* pTop = pBox->GetTop();
const SvxBorderLine* pBottom = pBox->GetBottom();
- const sal_uInt16 nTopDist = pBox->GetDistance( BOX_LINE_TOP );
- const sal_uInt16 nBottomDist = pBox->GetDistance( BOX_LINE_BOTTOM );
- const sal_uInt16 nLeftDist = pBox->GetDistance( BOX_LINE_LEFT );
- const sal_uInt16 nRightDist = pBox->GetDistance( BOX_LINE_RIGHT );
+ const sal_uInt16 nTopDist = pBox->GetDistance( SvxBoxItemLine::TOP );
+ const sal_uInt16 nBottomDist = pBox->GetDistance( SvxBoxItemLine::BOTTOM );
+ const sal_uInt16 nLeftDist = pBox->GetDistance( SvxBoxItemLine::LEFT );
+ const sal_uInt16 nRightDist = pBox->GetDistance( SvxBoxItemLine::RIGHT );
// check if we need to export it
switch( nMemberId )
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 5dde34b5e661..7bd9541f659a 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -456,16 +456,16 @@ bool SvXMLImportItemMapper::PutXMLValue(
if( nMemberId == LEFT_BORDER_PADDING ||
nMemberId == ALL_BORDER_PADDING )
- pBox->SetDistance( (sal_uInt16)nTemp, BOX_LINE_LEFT );
+ pBox->SetDistance( (sal_uInt16)nTemp, SvxBoxItemLine::LEFT );
if( nMemberId == RIGHT_BORDER_PADDING ||
nMemberId == ALL_BORDER_PADDING )
- pBox->SetDistance( (sal_uInt16)nTemp, BOX_LINE_RIGHT );
+ pBox->SetDistance( (sal_uInt16)nTemp, SvxBoxItemLine::RIGHT );
if( nMemberId == TOP_BORDER_PADDING ||
nMemberId == ALL_BORDER_PADDING )
- pBox->SetDistance( (sal_uInt16)nTemp, BOX_LINE_TOP );
+ pBox->SetDistance( (sal_uInt16)nTemp, SvxBoxItemLine::TOP );
if( nMemberId == BOTTOM_BORDER_PADDING ||
nMemberId == ALL_BORDER_PADDING )
- pBox->SetDistance( (sal_uInt16)nTemp, BOX_LINE_BOTTOM);
+ pBox->SetDistance( (sal_uInt16)nTemp, SvxBoxItemLine::BOTTOM);
break;
case ALL_BORDER:
@@ -578,10 +578,10 @@ bool SvXMLImportItemMapper::PutXMLValue(
break;
}
- pBox->SetLine( aBoxes.pTop, BOX_LINE_TOP );
- pBox->SetLine( aBoxes.pBottom, BOX_LINE_BOTTOM );
- pBox->SetLine( aBoxes.pLeft, BOX_LINE_LEFT );
- pBox->SetLine( aBoxes.pRight, BOX_LINE_RIGHT );
+ pBox->SetLine( aBoxes.pTop, SvxBoxItemLine::TOP );
+ pBox->SetLine( aBoxes.pBottom, SvxBoxItemLine::BOTTOM );
+ pBox->SetLine( aBoxes.pLeft, SvxBoxItemLine::LEFT );
+ pBox->SetLine( aBoxes.pRight, SvxBoxItemLine::RIGHT );
bOk = true;
}