summaryrefslogtreecommitdiff
path: root/sc/inc/miscuno.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-31 13:07:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-03 06:22:40 +0000
commitfcad02149f3a9964f36522d97faaf303fc321788 (patch)
tree86f2ba2af66bf02c93f78759667a836955fd6d3d /sc/inc/miscuno.hxx
parent74917d23782413aa0f129bcf9e6bf5a1c496d23b (diff)
use actual UNO enums in sc
Change-Id: I51dbe623178e3c463dc4c941f23edac04fbfe349 Reviewed-on: https://gerrit.libreoffice.org/35968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/miscuno.hxx')
-rw-r--r--sc/inc/miscuno.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index e3af738b95b9..dd50fbac5cb6 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -134,8 +134,11 @@ public:
const OUString& rName, sal_Int16 nDefault );
static sal_Int32 GetLongProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
const OUString& rName );
- static sal_Int32 GetEnumProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
- const OUString& rName, long nDefault );
+ template<typename EnumT>
+ static EnumT GetEnumProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
+ const OUString& rName, EnumT nDefault )
+ { return static_cast<EnumT>(GetEnumPropertyImpl(xProp, rName, static_cast<sal_Int32>(nDefault))); }
+
static OUString GetStringProperty(
const css::uno::Reference<css::beans::XPropertySet>& xProp,
const OUString& rName, const OUString& rDefault );
@@ -167,6 +170,9 @@ public:
return css::uno::Sequence<ValueType>(&rVector[0], static_cast<sal_Int32>(rVector.size()));
}
+private:
+ static sal_Int32 GetEnumPropertyImpl( const css::uno::Reference< css::beans::XPropertySet>& xProp,
+ const OUString& rName, sal_Int32 nDefault );
};
#endif