summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-24 16:22:29 +0200
committerNoel Grandin <noel@peralex.com>2015-07-27 08:18:16 +0200
commit38ecca9b30e0fc5f7cc6264857f983e40dd58195 (patch)
tree3ad61e6d5cddcf161d27cfe4c6ca85fcf1cab8f6 /forms
parentefac5fa06e2d00bd67c582d8a6b1f1fc69c9b9f5 (diff)
inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the number of lines of code Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/EditBase.hxx10
-rw-r--r--forms/source/component/clickableimage.hxx8
-rw-r--r--forms/source/inc/FormComponent.hxx24
-rw-r--r--forms/source/richtext/richtextcontrol.cxx34
4 files changed, 31 insertions, 45 deletions
diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx
index 8d8325c37d8e..0658490ed7e4 100644
--- a/forms/source/component/EditBase.hxx
+++ b/forms/source/component/EditBase.hxx
@@ -58,7 +58,15 @@ protected:
sal_Int16 getLastReadVersion() const { return m_nLastReadVersion; }
public:
- DECLARE_DEFAULT_BOUND_XTOR( OEditBaseModel );
+ OEditBaseModel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory,
+ const OUString& _rUnoControlModelTypeName,
+ const OUString& _rDefault,
+ const bool _bSupportExternalBinding,
+ const bool _bSupportsValidation
+ );
+ DECLARE_DEFAULT_CLONE_CTOR( OEditBaseModel )
+ virtual ~OEditBaseModel();
// XPersistObject
virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index 9337b3cbe061..7a26a97f8d94 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -91,7 +91,13 @@ namespace frm
inline void setDispatchUrlInternal(bool _bDispatch) { m_bDispatchUrlInternal = _bDispatch; }
public:
- DECLARE_DEFAULT_XTOR( OClickableImageBaseModel );
+ OClickableImageBaseModel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory,
+ const OUString& _rUnoControlModelTypeName,
+ const OUString& _rDefault
+ );
+ DECLARE_DEFAULT_CLONE_CTOR( OClickableImageBaseModel )
+ virtual ~OClickableImageBaseModel();
// UNO Binding
DECLARE_UNO3_AGG_DEFAULTS(OClickableImageBaseModel, OControlModel)
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index 5ea0a642935b..6d2ff7959a63 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -519,29 +519,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory \
); \
-// all xtors for an inner class of the object hierarchy
-#define DECLARE_DEFAULT_XTOR( classname ) \
- classname( \
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, \
- const OUString& _rUnoControlModelTypeName, \
- const OUString& _rDefault \
- ); \
- DECLARE_DEFAULT_CLONE_CTOR( classname ) \
- virtual ~classname() \
-
-// all xtors for an inner class of the object hierarchy which is *bound*
-#define DECLARE_DEFAULT_BOUND_XTOR( classname ) \
- classname( \
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, \
- const OUString& _rUnoControlModelTypeName, \
- const OUString& _rDefault, \
- const bool _bSupportExternalBinding, \
- const bool _bSupportsValidation \
- ); \
- DECLARE_DEFAULT_CLONE_CTOR( classname ) \
- virtual ~classname() \
-
-// all xtors for a leas class of the object hierarchy
+// all xtors for a leaf class of the object hierarchy
#define DECLARE_DEFAULT_LEAF_XTOR( classname ) \
classname( \
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory \
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index c67a172a80d3..58c4209cc650 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -49,24 +49,6 @@ namespace frm
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
-#define FORWARD_TO_PEER_1_RET( returnType, unoInterface, method, param1 ) \
- returnType aReturn; \
- Reference< unoInterface > xTypedPeer( getPeer(), UNO_QUERY ); \
- if ( xTypedPeer.is() ) \
- { \
- aReturn = xTypedPeer->method( param1 ); \
- } \
- return aReturn;
-
-#define FORWARD_TO_PEER_3_RET( returnType, unoInterface, method, param1, param2, param3 ) \
- returnType aReturn; \
- Reference< unoInterface > xTypedPeer( getPeer(), UNO_QUERY ); \
- if ( xTypedPeer.is() ) \
- { \
- aReturn = xTypedPeer->method( param1, param2, param3 ); \
- } \
- return aReturn;
-
ORichTextControl::ORichTextControl()
:UnoEditControl()
{
@@ -261,12 +243,24 @@ namespace frm
Reference< XDispatch > SAL_CALL ORichTextControl::queryDispatch( const ::com::sun::star::util::URL& _rURL, const OUString& _rTargetFrameName, sal_Int32 _nSearchFlags ) throw (RuntimeException, std::exception)
{
- FORWARD_TO_PEER_3_RET( Reference< XDispatch >, XDispatchProvider, queryDispatch, _rURL, _rTargetFrameName, _nSearchFlags );
+ Reference< XDispatch > aReturn;
+ Reference< XDispatchProvider > xTypedPeer( getPeer(), UNO_QUERY );
+ if ( xTypedPeer.is() )
+ {
+ aReturn = xTypedPeer->queryDispatch( _rURL, _rTargetFrameName, _nSearchFlags );
+ }
+ return aReturn;
}
Sequence< Reference< XDispatch > > SAL_CALL ORichTextControl::queryDispatches( const Sequence< DispatchDescriptor >& _rRequests ) throw (RuntimeException, std::exception)
{
- FORWARD_TO_PEER_1_RET( Sequence< Reference< XDispatch > >, XDispatchProvider, queryDispatches, _rRequests );
+ Sequence< Reference< XDispatch > > aReturn;
+ Reference< XDispatchProvider > xTypedPeer( getPeer(), UNO_QUERY );
+ if ( xTypedPeer.is() )
+ {
+ aReturn = xTypedPeer->queryDispatches( _rRequests );
+ }
+ return aReturn;
}
bool ORichTextControl::requiresNewPeer( const OUString& _rPropertyName ) const