summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-02-14 00:17:06 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-23 10:35:28 +0100
commit5760c24f1db822283849ca97e91498f78e99a295 (patch)
tree8c72dceac5cdbb4bb2c5912af435119956169aec
parent2f0c969bf89e11fbcfc16b5d52bfd3ef9548983f (diff)
tdf#78174: toolkit: work around GCC 4.9 -Os link failure
A build with gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1) for 32-bit x86 fails because of these undefined symbols: > nm --demangle workdir/CxxObject/svx/source/fmcomp/fmgridif.o | grep \\bWindowListenerMultiplexer::acquire U non-virtual thunk to WindowListenerMultiplexer::acquire() They should probably be generated inline. Work around by out-lining the definition of the methods. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812 (cherry picked from commit 6b3aa0fe4094e87290bd33a30bd6cd99ee78ce38) toolkit: export some ListenerMultiplexer types These are used from svx and apparently some (buggy?) toolchains fail with fmgridif.cxx:: undefined reference to `non-virtual thunk to WindowListenerMultiplexer::acquire()' (cherry picked from commit bb182b47ca7362b05c03d583d3547643d9a99562) Change-Id: I318f7c39bdf1243be385bc6dc0a47862b22e92c5 Reviewed-on: https://gerrit.libreoffice.org/14510 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 5e6cd9b7a15e7e6a994e8f3e4fafed2928dbf42d)
-rw-r--r--include/toolkit/helper/listenermultiplexer.hxx10
-rw-r--r--include/toolkit/helper/macros.hxx10
-rw-r--r--toolkit/source/helper/listenermultiplexer.cxx9
3 files changed, 20 insertions, 9 deletions
diff --git a/include/toolkit/helper/listenermultiplexer.hxx b/include/toolkit/helper/listenermultiplexer.hxx
index a3de5ff60c5d..61fdbdcf9a77 100644
--- a/include/toolkit/helper/listenermultiplexer.hxx
+++ b/include/toolkit/helper/listenermultiplexer.hxx
@@ -83,7 +83,7 @@ DECL_LISTENERMULTIPLEXER_END
// class FocusListenerMultiplexer
-DECL_LISTENERMULTIPLEXER_START( FocusListenerMultiplexer, ::com::sun::star::awt::XFocusListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( FocusListenerMultiplexer, ::com::sun::star::awt::XFocusListener )
void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
DECL_LISTENERMULTIPLEXER_END
@@ -92,7 +92,7 @@ DECL_LISTENERMULTIPLEXER_END
// class WindowListenerMultiplexer
-DECL_LISTENERMULTIPLEXER_START( WindowListenerMultiplexer, ::com::sun::star::awt::XWindowListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( WindowListenerMultiplexer, ::com::sun::star::awt::XWindowListener )
void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -112,7 +112,7 @@ DECL_LISTENERMULTIPLEXER_END
// class KeyListenerMultiplexer
-DECL_LISTENERMULTIPLEXER_START( KeyListenerMultiplexer, ::com::sun::star::awt::XKeyListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( KeyListenerMultiplexer, ::com::sun::star::awt::XKeyListener )
void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
DECL_LISTENERMULTIPLEXER_END
@@ -130,7 +130,7 @@ DECL_LISTENERMULTIPLEXER_END
// class MouseMotionListenerMultiplexer
-DECL_LISTENERMULTIPLEXER_START( MouseMotionListenerMultiplexer, ::com::sun::star::awt::XMouseMotionListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( MouseMotionListenerMultiplexer, ::com::sun::star::awt::XMouseMotionListener )
void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
DECL_LISTENERMULTIPLEXER_END
@@ -138,7 +138,7 @@ DECL_LISTENERMULTIPLEXER_END
// class PaintListenerMultiplexer
-DECL_LISTENERMULTIPLEXER_START( PaintListenerMultiplexer, ::com::sun::star::awt::XPaintListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( PaintListenerMultiplexer, ::com::sun::star::awt::XPaintListener )
void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
DECL_LISTENERMULTIPLEXER_END
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index e048e751cce4..b212dff06610 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -112,8 +112,8 @@ class ClassName : public ListenerMultiplexerBase, public InterfaceName \
public: \
ClassName( ::cppu::OWeakObject& rSource ); \
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
- void SAL_CALL acquire() throw() SAL_OVERRIDE { ListenerMultiplexerBase::acquire(); } \
- void SAL_CALL release() throw() SAL_OVERRIDE { ListenerMultiplexerBase::release(); } \
+ void SAL_CALL acquire() throw() SAL_OVERRIDE; \
+ void SAL_CALL release() throw() SAL_OVERRIDE; \
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -124,8 +124,8 @@ class TOOLKIT_DLLPUBLIC ClassName : public ListenerMultiplexerBase, public Inter
public: \
ClassName( ::cppu::OWeakObject& rSource ); \
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
- void SAL_CALL acquire() throw() SAL_OVERRIDE { ListenerMultiplexerBase::acquire(); } \
- void SAL_CALL release() throw() SAL_OVERRIDE { ListenerMultiplexerBase::release(); } \
+ void SAL_CALL acquire() throw() SAL_OVERRIDE; \
+ void SAL_CALL release() throw() SAL_OVERRIDE; \
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -140,6 +140,8 @@ ClassName::ClassName( ::cppu::OWeakObject& rSource ) \
: ListenerMultiplexerBase( rSource ) \
{ \
} \
+void SAL_CALL ClassName::acquire() throw() { ListenerMultiplexerBase::acquire(); } \
+void SAL_CALL ClassName::release() throw() { ListenerMultiplexerBase::release(); } \
::com::sun::star::uno::Any ClassName::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) \
{ \
::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, \
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index fb4e48c381e5..57bfcb1d1cec 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -47,6 +47,15 @@ EventListenerMultiplexer::EventListenerMultiplexer( ::cppu::OWeakObject& rSource
{
}
+void SAL_CALL EventListenerMultiplexer::acquire() throw ()
+{
+ return ListenerMultiplexerBase::acquire();
+}
+void SAL_CALL EventListenerMultiplexer::release() throw ()
+{
+ return ListenerMultiplexerBase::release();
+}
+
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any EventListenerMultiplexer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception)
{