diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-02-21 10:01:15 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-02-21 10:01:15 +0000 |
commit | 2432470efea36df481ddb87156aafa8c7fbe765e (patch) | |
tree | c39e42d55ec253eaecdb9cb3f19f6914d3f1d272 | |
parent | df1b4c1f5f92b29135a7c552993f4a27953689cd (diff) |
overload createPeer - disable AutoToggle on the peer
-rw-r--r-- | forms/source/component/RadioButton.cxx | 22 | ||||
-rw-r--r-- | forms/source/component/RadioButton.hxx | 8 |
2 files changed, 26 insertions, 4 deletions
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index f37026b42c17..b4846473d9a5 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RadioButton.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-11-23 08:48:15 $ + * last change: $Author: fs $ $Date: 2001-02-21 11:01:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,10 +74,16 @@ #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif +#ifndef _CPPUHELPER_EXTRACT_HXX_ +#include <cppuhelper/extract.hxx> +#endif #ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ #include <com/sun/star/container/XIndexAccess.hpp> #endif +#ifndef _COM_SUN_STAR_AWT_XVCLWINDOWPEER_HPP_ +#include <com/sun/star/awt/XVclWindowPeer.hpp> +#endif //......................................................................... namespace frm @@ -119,6 +125,18 @@ ORadioButtonControl::ORadioButtonControl(const Reference<XMultiServiceFactory>& { } +//------------------------------------------------------------------ +void SAL_CALL ORadioButtonControl::createPeer(const Reference<starawt::XToolkit>& _rxToolkit, const Reference<starawt::XWindowPeer>& _rxParent) throw (RuntimeException) +{ + OBoundControl::createPeer(_rxToolkit, _rxParent); + + // switch off the auto-toggle, we do this ourself .... + // (formerly this switch-off was done in the toolkit - but the correct place is here ...) + Reference< XVclWindowPeer > xVclWindowPeer( getPeer(), UNO_QUERY ); + if (xVclWindowPeer.is()) + xVclWindowPeer->setProperty(::rtl::OUString::createFromAscii("AutoToggle"), ::cppu::bool2any(sal_False)); +} + //================================================================== InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException) { diff --git a/forms/source/component/RadioButton.hxx b/forms/source/component/RadioButton.hxx index a5b57c86a195..7349f1be30c9 100644 --- a/forms/source/component/RadioButton.hxx +++ b/forms/source/component/RadioButton.hxx @@ -2,9 +2,9 @@ * * $RCSfile: RadioButton.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-11-23 08:48:15 $ + * last change: $Author: fs $ $Date: 2001-02-21 11:01:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -152,6 +152,10 @@ public: // XServiceInfo IMPLEMENTATION_NAME(ORadioButtonControl); virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + +protected: + // XControl + virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference<starawt::XToolkit>& Toolkit, const ::com::sun::star::uno::Reference<starawt::XWindowPeer>& Parent) throw (::com::sun::star::uno::RuntimeException); }; //......................................................................... |