summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-30 16:02:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-31 06:59:51 +0000
commit9a165a86795c65c42a94bf6f7f48545c797f2db3 (patch)
tree23d0359987e767ff36a9c899a77a3f7b797f54c8 /xmloff
parentdcffc21805828ddff7de1282f3d40ffdf3fac38d (diff)
use actual UNO enums in xmloff
Change-Id: I585825ad3faf972acde548817187183029856971 Reviewed-on: https://gerrit.libreoffice.org/35914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementexport.cxx2
-rw-r--r--xmloff/source/forms/formattributes.hxx4
-rw-r--r--xmloff/source/forms/formenums.cxx2
-rw-r--r--xmloff/source/forms/formenums.hxx2
-rw-r--r--xmloff/source/forms/gridcolumnproptranslator.cxx8
-rw-r--r--xmloff/source/style/adjushdl.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index a2a1b10fc580..0048db73e6c1 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -663,7 +663,7 @@ namespace xmloff
OAttributeMetaData::getCommonControlAttributeName( CCAFlags::Orientation ),
PROPERTY_ORIENTATION,
aOrientationMap,
- (sal_uInt16)ScrollBarOrientation::HORIZONTAL
+ ScrollBarOrientation::HORIZONTAL
);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx
index a5dd78959604..04575930942b 100644
--- a/xmloff/source/forms/formattributes.hxx
+++ b/xmloff/source/forms/formattributes.hxx
@@ -378,10 +378,10 @@ namespace xmloff
template<typename EnumT>
void addEnumProperty(
const sal_Char* _pAttributeName, const OUString& _rPropertyName,
- const sal_uInt16 _nAttributeDefault, const SvXMLEnumMapEntry<EnumT>* _pValueMap,
+ const EnumT _nAttributeDefault, const SvXMLEnumMapEntry<EnumT>* _pValueMap,
const css::uno::Type* _pType = nullptr)
{
- addEnumPropertyImpl(_pAttributeName, _rPropertyName, _nAttributeDefault,
+ addEnumPropertyImpl(_pAttributeName, _rPropertyName, static_cast<sal_uInt16>(_nAttributeDefault),
reinterpret_cast<const SvXMLEnumMapEntry<sal_uInt16>*>(_pValueMap), _pType);
}
diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx
index 30b13cdb82e9..b0da002e7e60 100644
--- a/xmloff/source/forms/formenums.cxx
+++ b/xmloff/source/forms/formenums.cxx
@@ -150,7 +150,7 @@ const SvXMLEnumMapEntry<sal_Int16> aListLinkageMap[] =
{ XML_SELECTION_INDEXES, 1 },
{ XML_TOKEN_INVALID, 0 }
};
-const SvXMLEnumMapEntry<sal_uInt16> aOrientationMap[] =
+const SvXMLEnumMapEntry<sal_Int32> aOrientationMap[] =
{
{ XML_HORIZONTAL, ScrollBarOrientation::HORIZONTAL },
{ XML_VERTICAL, ScrollBarOrientation::VERTICAL },
diff --git a/xmloff/source/forms/formenums.hxx b/xmloff/source/forms/formenums.hxx
index 7ed7dcf8acac..cc63e961f270 100644
--- a/xmloff/source/forms/formenums.hxx
+++ b/xmloff/source/forms/formenums.hxx
@@ -45,7 +45,7 @@ extern const SvXMLEnumMapEntry<sal_uInt16> aBorderTypeMap[];
extern const SvXMLEnumMapEntry<sal_uInt16> aFontEmphasisMap[];
extern const SvXMLEnumMapEntry<sal_uInt16> aFontReliefMap[];
extern const SvXMLEnumMapEntry<sal_Int16> aListLinkageMap[];
-extern const SvXMLEnumMapEntry<sal_uInt16> aOrientationMap[];
+extern const SvXMLEnumMapEntry<sal_Int32> aOrientationMap[];
extern const SvXMLEnumMapEntry<sal_Int16> aVisualEffectMap[];
extern const SvXMLEnumMapEntry<sal_Int16> aImagePositionMap[];
extern const SvXMLEnumMapEntry<sal_uInt16> aImageAlignMap[];
diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx
index b149d4f9665c..e1241a1e600b 100644
--- a/xmloff/source/forms/gridcolumnproptranslator.cxx
+++ b/xmloff/source/forms/gridcolumnproptranslator.cxx
@@ -74,8 +74,8 @@ namespace xmloff
{ ParagraphAdjust_RIGHT, awt::TextAlign::RIGHT },
{ ParagraphAdjust_BLOCK, awt::TextAlign::RIGHT },
{ ParagraphAdjust_STRETCH, awt::TextAlign::LEFT },
- { ParagraphAdjust_MAKE_FIXED_SIZE, awt::TextAlign::LEFT },
- { ParagraphAdjust_MAKE_FIXED_SIZE, -1 }
+ { ParagraphAdjust::ParagraphAdjust_MAKE_FIXED_SIZE, awt::TextAlign::LEFT },
+ { ParagraphAdjust::ParagraphAdjust_MAKE_FIXED_SIZE, -1 }
};
void valueAlignToParaAdjust(Any& rValue)
@@ -100,9 +100,9 @@ namespace xmloff
sal_Int32 nValue = 0;
rValue >>= nValue;
const AlignmentTranslationEntry* pTranslation = AlignmentTranslations;
- while ( ParagraphAdjust_MAKE_FIXED_SIZE != pTranslation->nParagraphValue)
+ while ( ParagraphAdjust::ParagraphAdjust_MAKE_FIXED_SIZE != pTranslation->nParagraphValue)
{
- if ( nValue == pTranslation->nParagraphValue)
+ if ( (ParagraphAdjust)nValue == pTranslation->nParagraphValue)
{
rValue <<= pTranslation->nControlValue;
return;
diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx
index bb2e36590612..50049509bb8e 100644
--- a/xmloff/source/style/adjushdl.cxx
+++ b/xmloff/source/style/adjushdl.cxx
@@ -111,7 +111,7 @@ bool XMLLastLineAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any
rValue >>= nVal;
- if( nVal != style::ParagraphAdjust_LEFT )
+ if( (style::ParagraphAdjust)nVal != style::ParagraphAdjust_LEFT )
bRet = SvXMLUnitConverter::convertEnum( aOut, (style::ParagraphAdjust)nVal, pXML_Para_Align_Last_Enum, XML_START );
rStrExpValue = aOut.makeStringAndClear();