summaryrefslogtreecommitdiff
path: root/include/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-23 11:31:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-23 13:25:53 +0100
commitcfda0e43b7c31d31bb4a93e04afa10cd563318d5 (patch)
tree7200cf709565d657bfb51801afb0bc1ae6b518a1 /include/toolkit
parent0750be852e865c6c5f6f26365064126c10770f31 (diff)
Replace macro with template
Change-Id: I0b444eae51b65caf740e625e65137ff9ff8ce4da Reviewed-on: https://gerrit.libreoffice.org/66782 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/toolkit')
-rw-r--r--include/toolkit/controls/unocontrolmodel.hxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/toolkit/controls/unocontrolmodel.hxx b/include/toolkit/controls/unocontrolmodel.hxx
index aa358a927246..28f834b220df 100644
--- a/include/toolkit/controls/unocontrolmodel.hxx
+++ b/include/toolkit/controls/unocontrolmodel.hxx
@@ -98,6 +98,12 @@ protected:
sal_Int32 _nSecondHandle /// second handle, which should supersede _nFirstHandle in the sequence
);
+ template<typename T> void UNO_CONTROL_MODEL_REGISTER_PROPERTIES() {
+ std::vector< sal_uInt16 > aIds;
+ T::ImplGetPropertyIds( aIds );
+ ImplRegisterProperties( aIds );
+ }
+
protected:
#ifdef _MSC_VER
UnoControlModel() //do not use! needed by MSVC at compile time to satisfy WeakAggImplHelper7
@@ -173,13 +179,6 @@ public:
void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Sequence< css::uno::Any >& Values ) override;
};
-#define UNO_CONTROL_MODEL_REGISTER_PROPERTIES(a) \
- do { \
- std::vector< sal_uInt16 > aIds; \
- a::ImplGetPropertyIds( aIds ); \
- ImplRegisterProperties( aIds ); \
- } while (false)
-
#endif // INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLMODEL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */