diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-05 12:24:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-06 07:46:11 +0100 |
commit | 97ebc98f0e956712d242e13f15531742f844a738 (patch) | |
tree | f8f59969604c4cac28a3efba17c4c281752fa62f /xmloff | |
parent | 4b363760b9f196e139ee367d54252c4d6cbe25f3 (diff) |
convert some macros to local functions
Change-Id: If2c89f0f53615f6200b6cd1fb6267cc9b47df927
Reviewed-on: https://gerrit.libreoffice.org/62884
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/transform/Oasis2OOo.cxx | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 9d0a361a3ca0..6e8aad50b037 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -90,8 +90,10 @@ enum XMLUserDefinedTransformerAction // BM: a macro to put two tokens into one sal_Int32 for the action // XML_ATACTION_RENAME_ATTRIBUTE -#define RENAME_ENTRY( f, s ) \ - (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16)) +static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s ) +{ + return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16); +} static XMLTransformerActionInit const aActionTable[] = { diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index f555e35c1db0..5d0931f48935 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -98,8 +98,10 @@ enum XMLUserDefinedTransformerAction // a macro to put two tokens into one sal_Int32 for the action // XML_ATACTION_RENAME_ATTRIBUTE -#define RENAME_ENTRY( f, s ) \ - (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16)) +static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s ) +{ + return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16); +} static XMLTransformerActionInit const aActionTable[] = { |