summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimpit.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-09 09:04:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-13 09:02:22 +0000
commit7e9857c2935bb2533806db4e71c6cd1e171c3478 (patch)
treed9f8a6d4f94e19f349b67141359cc7c49130b5fc /sw/source/filter/xml/xmlimpit.cxx
parent7c0e3d0b37131b12262d0f610505b3384923c4a1 (diff)
templatize SvXMLEnumMapEntry
in preparation for "scoped UNO enums". This is a little hacky: In order to limit the scope of this change, the templated SvXMLEnumMapEntry struct actually has a fixed size field, and we cast it to SvXMLEnumMapEntry<sal_uInt16>* in various places, to avoid carrying the type param around. Change-Id: Idfbc5561303c557598dd5564b7a7259ae5261d83 Reviewed-on: https://gerrit.libreoffice.org/34987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmlimpit.cxx')
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index e9af97b7634b..6b90a664c656 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -673,13 +673,13 @@ bool SvXMLImportItemMapper::PutXMLValue(
case MID_GRAPHIC_REPEAT:
{
SvxGraphicPosition eGraphicPos = rBrush.GetGraphicPos();
- sal_uInt16 nPos = GPOS_NONE;
+ SvxGraphicPosition nPos = GPOS_NONE;
if( SvXMLUnitConverter::convertEnum( nPos, rValue,
psXML_BrushRepeat ) )
{
if( GPOS_MM != nPos || GPOS_NONE == eGraphicPos ||
GPOS_AREA == eGraphicPos || GPOS_TILED == eGraphicPos )
- rBrush.SetGraphicPos( (SvxGraphicPosition)nPos );
+ rBrush.SetGraphicPos( nPos );
bOk = true;
}
}
@@ -688,7 +688,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case MID_GRAPHIC_POSITION:
{
SvxGraphicPosition ePos = GPOS_NONE, eTmp;
- sal_uInt16 nTmp;
+ SvxGraphicPosition nTmp;
SvXMLTokenEnumerator aTokenEnum( rValue );
OUString aToken;
bool bHori = false, bVert = false;
@@ -738,9 +738,9 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
if( bVert )
sw_frmitems_MergeXMLHoriPos(
- ePos, (SvxGraphicPosition)nTmp );
+ ePos, nTmp );
else if( !bHori )
- ePos = (SvxGraphicPosition)nTmp;
+ ePos = nTmp;
else
bOk = false;
bHori = true;
@@ -750,9 +750,9 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
if( bHori )
sw_frmitems_MergeXMLVertPos(
- ePos, (SvxGraphicPosition)nTmp );
+ ePos, nTmp );
else if( !bVert )
- ePos = (SvxGraphicPosition)nTmp;
+ ePos = nTmp;
else
bOk = false;
bVert = true;
@@ -819,7 +819,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
SwFormatHoriOrient& rHoriOrient = dynamic_cast<SwFormatHoriOrient&>(rItem);
- sal_uInt16 nValue;
+ sal_Int16 nValue;
bOk = SvXMLUnitConverter::convertEnum( nValue, rValue,
aXMLTableAlignMap );
if( bOk )
@@ -831,7 +831,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
SwFormatVertOrient& rVertOrient = dynamic_cast<SwFormatVertOrient&>(rItem);
- sal_uInt16 nValue;
+ sal_Int16 nValue;
bOk = SvXMLUnitConverter::convertEnum( nValue, rValue,
aXMLTableVAlignMap );
if( bOk )