diff options
author | Stephan Bergmann <sb@openoffice.org> | 2002-07-11 10:07:56 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2002-07-11 10:07:56 +0000 |
commit | da37ae98c926f10afea742250d74cfa8d8d355f8 (patch) | |
tree | fcb8fa9ef951fb239e5d45974affb8a402662c71 /toolkit | |
parent | a34d5b631ce470e0ca68e0dc213e9357723af75d (diff) |
#101115# Make VCLXToolkit support XExtendedToolkit.
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxtoolkit.hxx | 105 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 355 |
2 files changed, 437 insertions, 23 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 7dfc4facead2..181a18e2f8ac 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxtoolkit.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: mt $ $Date: 2001-11-29 16:57:48 $ + * last change: $Author: sb $ $Date: 2002-07-11 11:04:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,6 @@ #ifndef _TOOLKIT_AWT_VCLXTOOLKIT_HXX_ #define _TOOLKIT_AWT_VCLXTOOLKIT_HXX_ - #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif @@ -78,9 +77,15 @@ #ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_ #include <com/sun/star/lang/XTypeProvider.hpp> #endif +#ifndef _DRAFTS_COM_SUN_STAR_AWT_XEXTENDEDTOOLKIT_HPP_ +#include "drafts/com/sun/star/awt/XExtendedToolkit.hpp" +#endif -#ifndef _CPPUHELPER_COMPBASE4_HXX_ -#include <cppuhelper/compbase4.hxx> +#ifndef _CPPUHELPER_COMPBASE5_HXX_ +#include <cppuhelper/compbase5.hxx> +#endif +#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_ +#include "cppuhelper/interfacecontainer.hxx" #endif #ifndef _OSL_MUTEX_HXX_ @@ -102,7 +107,6 @@ namespace awt { class XDataTransfer; } } } } - extern "C" { typedef Window* (SAL_CALL *FN_SvtCreateWindow)( VCLXWindow** ppNewComp, const ::com::sun::star::awt::WindowDescriptor* pDescriptor, Window* pParent, sal_uInt32 nWinBits ); }; @@ -118,12 +122,22 @@ protected: ::osl::Mutex maMutex; }; +// FIXME Remove these dummies: +namespace vcl { + struct TopWindowEvent {}; + struct KeyEvent {}; + struct FocusEvent {}; +} + class VCLXToolkit : public VCLXToolkit_Impl, - public cppu::WeakComponentImplHelper4< + public cppu::WeakComponentImplHelper5< ::com::sun::star::awt::XToolkit, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::awt::XSystemChildFactory, - ::com::sun::star::awt::XDataTransferProviderAccess > + ::com::sun::star::awt::XDataTransferProviderAccess, + ::drafts::com::sun::star::awt::XExtendedToolkit > +// FIXME Needs to be derived from Application/VCL TopWindowListener, +// KeyHandler, and FocusListener { ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; @@ -131,6 +145,36 @@ class VCLXToolkit : public VCLXToolkit_Impl, oslModule hSvToolsLib; FN_SvtCreateWindow fnSvtCreateWindow; + ::cppu::OInterfaceContainerHelper m_aTopWindowListeners; + ::cppu::OInterfaceContainerHelper m_aKeyHandlers; + ::cppu::OInterfaceContainerHelper m_aFocusListeners; + bool m_bTopWindowListener; + bool m_bKeyHandler; + bool m_bFocusListener; + + // FIXME Adopt the following skeleton methods if necessary: + + virtual void windowOpened(::vcl::TopWindowEvent const & rEvent); + + virtual void windowClosing(::vcl::TopWindowEvent const & rEvent); + + virtual void windowClosed(::vcl::TopWindowEvent const & rEvent); + + virtual void windowMinimized(::vcl::TopWindowEvent const & rEvent); + + virtual void windowNormalized(::vcl::TopWindowEvent const & rEvent); + + virtual void windowActivated(::vcl::TopWindowEvent const & rEvent); + + virtual void windowDeactivated(::vcl::TopWindowEvent const & rEvent); + + virtual bool keyPressed(::vcl::KeyEvent const & rEvent); + + virtual bool keyReleased(::vcl::KeyEvent const & rEvent); + + virtual void focusGained(::vcl::FocusEvent const & rEvent); + + virtual void focusLost(::vcl::FocusEvent const & rEvent); protected: ::osl::Mutex& GetMutex() { return maMutex; } @@ -165,10 +209,51 @@ public: ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); -}; + // ::drafts::com::sun::star::awt::XExtendedToolkit: + virtual ::sal_Int32 SAL_CALL getTopWindowCount() + throw (::com::sun::star::uno::RuntimeException); + virtual + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindow > + SAL_CALL getTopWindow(::sal_Int32 nIndex) + throw (::com::sun::star::uno::RuntimeException); -#endif // _TOOLKIT_AWT_VCLXTOOLKIT_HXX_ + virtual + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindow > + SAL_CALL getActiveTopWindow() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addTopWindowListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XTopWindowListener > const & rListener) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removeTopWindowListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XTopWindowListener > const & rListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addKeyHandler( + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::awt::XKeyHandler > const & rHandler) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removeKeyHandler( + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::awt::XKeyHandler > const & rHandler) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addFocusListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener > const & rListener) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removeFocusListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener > const & rListener) + throw (::com::sun::star::uno::RuntimeException); +}; + +#endif // _TOOLKIT_AWT_VCLXTOOLKIT_HXX_ diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 16df778ecb88..99477eee5487 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1,10 +1,10 @@ - /************************************************************************* +/************************************************************************* * * $RCSfile: vclxtoolkit.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: mt $ $Date: 2002-07-01 14:11:13 $ + * last change: $Author: sb $ $Date: 2002-07-11 11:07:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -50,7 +50,7 @@ * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * - * Copyright: 2000 by Sun Microsystems, Inc. + * Copyright: 2002 by Sun Microsystems, Inc. * * All Rights Reserved. * @@ -58,6 +58,7 @@ * * ************************************************************************/ + #ifndef _SVWIN_HXX #include <tools/svwin.h> #endif @@ -78,6 +79,12 @@ #ifndef _COM_SUN_STAR_LANG_SYSTEMDEPENDENT_HPP_ #include <com/sun/star/lang/SystemDependent.hpp> #endif +#include "com/sun/star/awt/FocusEvent.hpp" +#include "com/sun/star/awt/KeyEvent.hpp" +#include "com/sun/star/lang/EventObject.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XInterface.hpp" #include <cppuhelper/typeprovider.hxx> #include <osl/conditn.hxx> @@ -140,6 +147,9 @@ #include <comphelper/processfactory.hxx> #endif +namespace css = ::com::sun::star; +namespace dcss = ::drafts::com::sun::star; + #define VCLWINDOW_FRAMEWINDOW 0x1000 #define VCLWINDOW_SYSTEMCHILDWINDOW 0x1001 @@ -441,9 +451,18 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) // contructor, which might initialize VCL -VCLXToolkit::VCLXToolkit( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ) - : cppu::WeakComponentImplHelper4< ::com::sun::star::awt::XToolkit, ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::awt::XSystemChildFactory, ::com::sun::star::awt::XDataTransferProviderAccess >( GetMutex() ) +VCLXToolkit::VCLXToolkit( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ): + cppu::WeakComponentImplHelper5< + ::com::sun::star::awt::XToolkit, ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::awt::XSystemChildFactory, + ::com::sun::star::awt::XDataTransferProviderAccess, + ::drafts::com::sun::star::awt::XExtendedToolkit >( GetMutex() ), + m_aTopWindowListeners(rBHelper.rMutex), + m_aKeyHandlers(rBHelper.rMutex), + m_aFocusListeners(rBHelper.rMutex), + m_bTopWindowListener(false), + m_bKeyHandler(false), + m_bFocusListener(false) { hSvToolsLib = NULL; fnSvtCreateWindow = NULL; @@ -481,17 +500,40 @@ void SAL_CALL VCLXToolkit::disposing() fnSvtCreateWindow = NULL; } - osl::Guard< osl::Mutex > aGuard( getInitMutex() ); - if( --nVCLToolkitInstanceCount == 0 ) { - if( bInitedByVCLToolkit ) + osl::Guard< osl::Mutex > aGuard( getInitMutex() ); + if( --nVCLToolkitInstanceCount == 0 ) { - Application::Quit(); - JoinMainLoopThread(); - bInitedByVCLToolkit = sal_False; + if( bInitedByVCLToolkit ) + { + Application::Quit(); + JoinMainLoopThread(); + bInitedByVCLToolkit = sal_False; + } } } + if (m_bTopWindowListener) + { + // FIXME Remove this as TopWindowListener from Application/VCL + m_bTopWindowListener = false; + } + if (m_bKeyHandler) + { + // FIXME Remove this as KeyHandler from Application/VCL + m_bKeyHandler = false; + } + if (m_bFocusListener) + { + // FIXME Remove this as FocusListener from Application/VCL + m_bFocusListener = false; + } + ::css::lang::EventObject aEvent( + static_cast< ::cppu::OWeakObject * >(this)); + m_aTopWindowListeners.disposeAndClear(aEvent); + m_aKeyHandlers.disposeAndClear(aEvent); + m_aFocusListeners.disposeAndClear(aEvent); + /* osl::Guard< osl::Mutex > aGuard( getInitMutex() ); // insert in disposing list @@ -1119,3 +1161,290 @@ sal_Bool VCLXToolkit::supportsService( const ::rtl::OUString& rServiceName ) thr ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName2_Toolkit ) ); return ::com::sun::star::uno::Sequence< ::rtl::OUString >( &aServiceName, 1); } + +// dcss::awt::XExtendedToolkit: + +// virtual +::sal_Int32 SAL_CALL VCLXToolkit::getTopWindowCount() + throw (::css::uno::RuntimeException) +{ + return 0; // FIXME +} + +// virtual +::css::uno::Reference< ::css::awt::XTopWindow > SAL_CALL +VCLXToolkit::getTopWindow(::sal_Int32 nIndex) + throw (::css::uno::RuntimeException) +{ + return 0; // FIXME +} + +// virtual +::css::uno::Reference< ::css::awt::XTopWindow > SAL_CALL +VCLXToolkit::getActiveTopWindow() throw (::css::uno::RuntimeException) +{ + return 0; // FIXME +} + +// virtual +void SAL_CALL VCLXToolkit::addTopWindowListener( + ::css::uno::Reference< ::css::awt::XTopWindowListener > const & rListener) + throw (::css::uno::RuntimeException) +{ + OSL_ENSURE(rListener.is(), "Null rListener"); + ::osl::ClearableMutexGuard aGuard(rBHelper.rMutex); + if (rBHelper.bDisposed || rBHelper.bInDispose) + { + aGuard.clear(); + rListener->disposing( + ::css::lang::EventObject( + static_cast< ::cppu::OWeakObject * >(this))); + } + else if (m_aTopWindowListeners.addInterface(rListener) == 1 + && !m_bTopWindowListener) + { + m_bTopWindowListener = true; + // FIXME Add this as TopWindowListener to Application/VCL + } +} + +// virtual +void SAL_CALL VCLXToolkit::removeTopWindowListener( + ::css::uno::Reference< ::css::awt::XTopWindowListener > const & rListener) + throw (::css::uno::RuntimeException) +{ + ::osl::MutexGuard aGuard(rBHelper.rMutex); + if (!(rBHelper.bDisposed || rBHelper.bInDispose) + && m_aTopWindowListeners.removeInterface(rListener) == 0 + && m_bTopWindowListener) + { + // FIXME Remove this as TopWindowListener from Application/VCL + m_bTopWindowListener = false; + } +} + +// virtual +void SAL_CALL VCLXToolkit::addKeyHandler( + ::css::uno::Reference< ::dcss::awt::XKeyHandler > const & rHandler) + throw (::css::uno::RuntimeException) +{ + OSL_ENSURE(rHandler.is(), "Null rHandler"); + ::osl::ClearableMutexGuard aGuard(rBHelper.rMutex); + if (rBHelper.bDisposed || rBHelper.bInDispose) + { + aGuard.clear(); + rHandler->disposing( + ::css::lang::EventObject( + static_cast< ::cppu::OWeakObject * >(this))); + } + else if (m_aKeyHandlers.addInterface(rHandler) == 1 && !m_bKeyHandler) + { + m_bKeyHandler = true; + // FIXME Add this as KeyHandler to Application/VCL + } +} + +// virtual +void SAL_CALL VCLXToolkit::removeKeyHandler( + ::css::uno::Reference< ::dcss::awt::XKeyHandler > const & rHandler) + throw (::css::uno::RuntimeException) +{ + ::osl::MutexGuard aGuard(rBHelper.rMutex); + if (!(rBHelper.bDisposed || rBHelper.bInDispose) + && m_aKeyHandlers.removeInterface(rHandler) == 0 && m_bKeyHandler) + { + // FIXME Remove this as KeyHandler from Application/VCL + m_bKeyHandler = false; + } +} + +// virtual +void SAL_CALL VCLXToolkit::addFocusListener( + ::css::uno::Reference< ::css::awt::XFocusListener > const & rListener) + throw (::css::uno::RuntimeException) +{ + OSL_ENSURE(rListener.is(), "Null rListener"); + ::osl::ClearableMutexGuard aGuard(rBHelper.rMutex); + if (rBHelper.bDisposed || rBHelper.bInDispose) + { + aGuard.clear(); + rListener->disposing( + ::css::lang::EventObject( + static_cast< ::cppu::OWeakObject * >(this))); + } + else if (m_aFocusListeners.addInterface(rListener) == 1 + && !m_bFocusListener) + { + m_bFocusListener = true; + // FIXME Add this as FocusListener to Application/VCL + } +} + +// virtual +void SAL_CALL VCLXToolkit::removeFocusListener( + ::css::uno::Reference< ::css::awt::XFocusListener > const & rListener) + throw (::css::uno::RuntimeException) +{ + ::osl::MutexGuard aGuard(rBHelper.rMutex); + if (!(rBHelper.bDisposed || rBHelper.bInDispose) + && m_aFocusListeners.removeInterface(rListener) == 0 + && m_bFocusListener) + { + m_bFocusListener = false; + // FIXME Remove this as FocusListener from Application/VCL + } +} + +// FIXME Adopt the following skeleton methods if necessary: + +// virtual +void VCLXToolkit::windowOpened(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)->windowOpened(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowClosing(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)->windowClosing(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowClosed(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)->windowClosed(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowMinimized(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)->windowMinimized(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowNormalized(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)-> + windowNormalized(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowActivated(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)->windowActivated(aAwtEvent); +} + +// virtual +void VCLXToolkit::windowDeactivated(::vcl::TopWindowEvent const & rEvent) +{ + ::css::lang::EventObject aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this)); + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aTopWindowListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XTopWindowListener >( + aListeners[i], ::css::uno::UNO_QUERY)-> + windowDeactivated(aAwtEvent); +} + +// virtual +bool VCLXToolkit::keyPressed(::vcl::KeyEvent const & rEvent) +{ + ::css::awt::KeyEvent aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this), + 0, // FIXME Modifiers + 0, // FIXME KeyCode + 0, // FIXME KeyChar + 0); // FIXME KeyFunc + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aHandlers(m_aKeyHandlers.getElements()); + for (sal_Int32 i = 0; i < aHandlers.getLength(); ++i) + if (!::css::uno::Reference< ::dcss::awt::XKeyHandler >( + aHandlers[i], ::css::uno::UNO_QUERY)->keyPressed(aAwtEvent)) + return false; + return true; +} + +// virtual +bool VCLXToolkit::keyReleased(::vcl::KeyEvent const & rEvent) +{ + ::css::awt::KeyEvent aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this), + 0, // FIXME Modifiers + 0, // FIXME KeyCode + 0, // FIXME KeyChar + 0); // FIXME KeyFunc + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aHandlers(m_aKeyHandlers.getElements()); + for (sal_Int32 i = 0; i < aHandlers.getLength(); ++i) + if (!::css::uno::Reference< ::dcss::awt::XKeyHandler >( + aHandlers[i], ::css::uno::UNO_QUERY)->keyReleased(aAwtEvent)) + return false; + return true; +} + +// virtual +void VCLXToolkit::focusGained(::vcl::FocusEvent const & rEvent) +{ + ::css::awt::FocusEvent aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this), + 0, // FIXME FocusFlags + 0, // FIXME NextFocus + false); // FIXME Temporary + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aFocusListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XFocusListener >( + aListeners[i], ::css::uno::UNO_QUERY)->focusGained(aAwtEvent); +} + +// virtual +void VCLXToolkit::focusLost(::vcl::FocusEvent const & rEvent) +{ + ::css::awt::FocusEvent aAwtEvent( + static_cast< ::cppu::OWeakObject * >(this), + 0, // FIXME FocusFlags + 0, // FIXME NextFocus + false); // FIXME Temporary + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > + aListeners(m_aFocusListeners.getElements()); + for (sal_Int32 i = 0; i < aListeners.getLength(); ++i) + ::css::uno::Reference< ::css::awt::XFocusListener >( + aListeners[i], ::css::uno::UNO_QUERY)->focusLost(aAwtEvent); +} |