From 6722dc0da76e6877b7f29164cb7203196729f2ef Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 23 Nov 2000 08:05:32 +0000 Subject: [PATCH] namespace changes --- forms/source/component/GroupManager.cxx | 74 ++++++----- forms/source/component/GroupManager.hxx | 55 ++++---- forms/source/inc/InterfaceContainer.hxx | 160 ++++++++++++------------ 3 files changed, 147 insertions(+), 142 deletions(-) diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index 24df89782333..a26b025bf49b 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: GroupManager.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2000-10-19 11:52:16 $ + * last change: $Author: oj $ $Date: 2000-11-23 09:04:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,7 +66,9 @@ #include "DatabaseForm.hxx" #endif +#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_ #include +#endif #ifndef _COMPHELPER_PROPERTY_HXX_ #include @@ -87,11 +89,23 @@ namespace frm { //......................................................................... +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::sdb; +using namespace ::com::sun::star::sdbc; +using namespace ::com::sun::star::sdbcx; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::form; +using namespace ::com::sun::star::awt; +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::util; + //======================================================================== // class OGroupCompAcc //======================================================================== //------------------------------------------------------------------ -OGroupCompAcc::OGroupCompAcc(const staruno::Reference& rxElement, const OGroupComp& _rGroupComp ) +OGroupCompAcc::OGroupCompAcc(const Reference& rxElement, const OGroupComp& _rGroupComp ) :m_xComponent( rxElement ) ,m_aGroupComp( _rGroupComp ) { @@ -136,7 +150,7 @@ OGroupComp::OGroupComp(const OGroupComp& _rSource) } //------------------------------------------------------------------ -OGroupComp::OGroupComp(const staruno::Reference& rxSet, sal_Int32 nInsertPos ) +OGroupComp::OGroupComp(const Reference& rxSet, sal_Int32 nInsertPos ) :m_xComponent( rxSet ) ,m_nTabIndex(0) ,m_nPos( nInsertPos ) @@ -195,7 +209,7 @@ OGroup::~OGroup() } //------------------------------------------------------------------ -void OGroup::InsertComponent( const staruno::Reference& xSet ) +void OGroup::InsertComponent( const Reference& xSet ) { OGroupComp aNewGroupComp( xSet, m_nInsertPos ); sal_Int32 nPosInserted = insert_sorted(m_aCompArray, aNewGroupComp, OGroupCompLess()); @@ -206,7 +220,7 @@ void OGroup::InsertComponent( const staruno::Reference& } //------------------------------------------------------------------ -void OGroup::RemoveComponent( const staruno::Reference& rxElement ) +void OGroup::RemoveComponent( const Reference& rxElement ) { sal_Int32 nGroupCompAccPos; OGroupCompAcc aSearchCompAcc( rxElement, OGroupComp() ); @@ -256,16 +270,16 @@ public: }; //------------------------------------------------------------------ -staruno::Sequence< staruno::Reference > OGroup::GetControlModels() const +Sequence< Reference > OGroup::GetControlModels() const { sal_Int32 nLen = m_aCompArray.size(); - staruno::Sequence > aControlModelSeq( nLen ); - staruno::Reference* pModels = aControlModelSeq.getArray(); + Sequence > aControlModelSeq( nLen ); + Reference* pModels = aControlModelSeq.getArray(); ConstOGroupCompArrIterator aGroupComps = m_aCompArray.begin(); for (sal_Int32 i = 0; i < nLen; ++i, ++pModels, ++aGroupComps) { - *pModels = staruno::Reference ((*aGroupComps).GetComponent(), staruno::UNO_QUERY); + *pModels = Reference ((*aGroupComps).GetComponent(), UNO_QUERY); } return aControlModelSeq; } @@ -287,11 +301,11 @@ OGroupManager::~OGroupManager() delete m_pCompGroup; } -// starbeans::XPropertyChangeListener +// XPropertyChangeListener //------------------------------------------------------------------ -void OGroupManager::disposing(const starlang::EventObject& evt) throw( staruno::RuntimeException ) +void OGroupManager::disposing(const EventObject& evt) throw( RuntimeException ) { - staruno::Reference xContainer(evt.Source, staruno::UNO_QUERY); + Reference xContainer(evt.Source, UNO_QUERY); if (xContainer.is()) { DELETEZ(m_pCompGroup); @@ -303,9 +317,9 @@ void OGroupManager::disposing(const starlang::EventObject& evt) throw( staruno:: } //------------------------------------------------------------------ -void SAL_CALL OGroupManager::propertyChange(const starbeans::PropertyChangeEvent& evt) +void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) { - staruno::Reference xSet(evt.Source, staruno::UNO_QUERY); + Reference xSet(evt.Source, UNO_QUERY); // Component aus CompGroup entfernen m_pCompGroup->RemoveComponent( xSet ); @@ -353,38 +367,38 @@ void SAL_CALL OGroupManager::propertyChange(const starbeans::PropertyChangeEvent InsertElement( xSet ); } -// starcontainer::XContainerListener +// XContainerListener //------------------------------------------------------------------ -void SAL_CALL OGroupManager::elementInserted(const starcontainer::ContainerEvent& Event) +void SAL_CALL OGroupManager::elementInserted(const ContainerEvent& Event) { - staruno::Reference xSet(*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY); + Reference xSet(*(InterfaceRef *)Event.Element.getValue(), UNO_QUERY); if (xSet.is()) InsertElement( xSet ); } //------------------------------------------------------------------ -void SAL_CALL OGroupManager::elementRemoved(const starcontainer::ContainerEvent& Event) +void SAL_CALL OGroupManager::elementRemoved(const ContainerEvent& Event) { - staruno::Reference xSet(*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY); + Reference xSet(*(InterfaceRef *)Event.Element.getValue(), UNO_QUERY); if (xSet.is()) RemoveElement( xSet ); } //------------------------------------------------------------------ -void SAL_CALL OGroupManager::elementReplaced(const starcontainer::ContainerEvent& Event) +void SAL_CALL OGroupManager::elementReplaced(const ContainerEvent& Event) { - staruno::Reference xSet(*(InterfaceRef *)Event.ReplacedElement.getValue(), staruno::UNO_QUERY); + Reference xSet(*(InterfaceRef *)Event.ReplacedElement.getValue(), UNO_QUERY); if (xSet.is()) RemoveElement( xSet ); - xSet = staruno::Reference (*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY); + xSet = Reference (*(InterfaceRef *)Event.Element.getValue(), UNO_QUERY); if (xSet.is()) InsertElement( xSet ); } // Other functions //------------------------------------------------------------------ -staruno::Sequence > OGroupManager::getControlModels() +Sequence > OGroupManager::getControlModels() { return m_pCompGroup->GetControlModels(); } @@ -396,7 +410,7 @@ sal_Int32 OGroupManager::getGroupCount() } //------------------------------------------------------------------ -void OGroupManager::getGroup(sal_Int32 nGroup, staruno::Sequence< staruno::Reference >& _rGroup, ::rtl::OUString& _rName) +void OGroupManager::getGroup(sal_Int32 nGroup, Sequence< Reference >& _rGroup, ::rtl::OUString& _rName) { sal_uInt16 nGroupPos= m_aActiveGroupMap[nGroup]; OGroup& rGroup = m_aGroupArr[nGroupPos]; @@ -405,7 +419,7 @@ void OGroupManager::getGroup(sal_Int32 nGroup, staruno::Sequence< staruno::Refer } //------------------------------------------------------------------ -void OGroupManager::getGroupByName(const ::rtl::OUString& _rName, staruno::Sequence< staruno::Reference >& _rGroup) +void OGroupManager::getGroupByName(const ::rtl::OUString& _rName, Sequence< Reference >& _rGroup) { sal_Int32 nGroupPos; OGroup aSearchGroup( _rName ); @@ -418,10 +432,10 @@ void OGroupManager::getGroupByName(const ::rtl::OUString& _rName, staruno::Seque } //------------------------------------------------------------------ -void OGroupManager::InsertElement( const staruno::Reference& xSet ) +void OGroupManager::InsertElement( const Reference& xSet ) { // Nur ControlModels - staruno::Reference xControl(xSet, staruno::UNO_QUERY); + Reference xControl(xSet, UNO_QUERY); if (!xControl.is() ) return; @@ -480,10 +494,10 @@ void OGroupManager::InsertElement( const staruno::Reference& xSet ) +void OGroupManager::RemoveElement( const Reference& xSet ) { // Nur ControlModels - staruno::Reference xControl(xSet, staruno::UNO_QUERY); + Reference xControl(xSet, UNO_QUERY); if (!xControl.is() ) return; diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx index 0732fe98774c..6f3590c447be 100644 --- a/forms/source/component/GroupManager.hxx +++ b/forms/source/component/GroupManager.hxx @@ -2,9 +2,9 @@ * * $RCSfile: GroupManager.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2000-10-19 11:52:16 $ + * last change: $Author: oj $ $Date: 2000-11-23 09:04:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,9 +111,6 @@ namespace frm { //......................................................................... - namespace starbeans = ::com::sun::star::beans; - namespace starcontainer = ::com::sun::star::container; - //======================================================================== template sal_Int32 insert_sorted(::std::vector& _rArray, const ELEMENT& _rNewElement, const LESS_COMPARE& _rCompareOp) @@ -150,20 +147,20 @@ namespace frm class OGroupComp { ::rtl::OUString m_aName; - staruno::Reference m_xComponent; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xComponent; sal_Int32 m_nPos; sal_Int16 m_nTabIndex; friend class OGroupCompLess; public: - OGroupComp(const staruno::Reference& rxElement, sal_Int32 nInsertPos ); + OGroupComp(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement, sal_Int32 nInsertPos ); OGroupComp(const OGroupComp& _rSource); OGroupComp(); sal_Bool operator==( const OGroupComp& rComp ) const; - const staruno::Reference& GetComponent() const { return m_xComponent; } + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& GetComponent() const { return m_xComponent; } sal_Int32 GetPos() const { return m_nPos; } sal_Int16 GetTabIndex() const { return m_nTabIndex; } ::rtl::OUString GetName() const { return m_aName; } @@ -175,17 +172,17 @@ DECLARE_STL_VECTOR(OGroupComp, OGroupCompArr); class OGroupComp; class OGroupCompAcc { - staruno::Reference m_xComponent; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xComponent; OGroupComp m_aGroupComp; friend class OGroupCompAccLess; public: - OGroupCompAcc(const staruno::Reference& rxElement, const OGroupComp& _rGroupComp ); + OGroupCompAcc(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement, const OGroupComp& _rGroupComp ); sal_Bool operator==( const OGroupCompAcc& rCompAcc ) const; - const staruno::Reference& GetComponent() const { return m_xComponent; } + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& GetComponent() const { return m_xComponent; } const OGroupComp& GetGroupComponent() const { return m_aGroupComp; } }; @@ -209,12 +206,12 @@ public: sal_Bool operator==( const OGroup& rGroup ) const; ::rtl::OUString GetGroupName() const { return m_aGroupName; } - staruno::Sequence< staruno::Reference > GetControlModels() const; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > GetControlModels() const; - void InsertComponent( const staruno::Reference& rxElement ); - void RemoveComponent( const staruno::Reference& rxElement ); + void InsertComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement ); + void RemoveComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement ); sal_uInt16 Count() const { return m_aCompArray.size(); } - const staruno::Reference& GetObject( sal_uInt16 nP ) const + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& GetObject( sal_uInt16 nP ) const { return m_aCompArray[nP].GetComponent(); } }; @@ -222,7 +219,7 @@ DECLARE_STL_VECTOR(OGroup, OGroupArr); DECLARE_STL_VECTOR(sal_uInt32, OUInt32Arr); //======================================================================== -class OGroupManager : public ::cppu::WeakImplHelper2 +class OGroupManager : public ::cppu::WeakImplHelper2< ::com::sun::star::beans::XPropertyChangeListener, ::com::sun::star::container::XContainerListener> { OGroup* m_pCompGroup; // Alle Components nach TabIndizes sortiert OGroupArr m_aGroupArr; // Alle Components nach Gruppen sortiert @@ -230,29 +227,29 @@ class OGroupManager : public ::cppu::WeakImplHelper2& rxElement ); - void RemoveElement( const staruno::Reference& rxElement ); + void InsertElement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement ); + void RemoveElement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement ); public: OGroupManager(); virtual ~OGroupManager(); -// starlang::XEventListener - virtual void SAL_CALL disposing(const starlang::EventObject& _rSource) throw(staruno::RuntimeException); +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException); -// starbeans::XPropertyChangeListener - virtual void SAL_CALL propertyChange(const starbeans::PropertyChangeEvent& evt); +// ::com::sun::star::beans::XPropertyChangeListener + virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt); -// starcontainer::XContainerListener - virtual void SAL_CALL elementInserted(const starcontainer::ContainerEvent& _rEvent); - virtual void SAL_CALL elementRemoved(const starcontainer::ContainerEvent& _rEvent); - virtual void SAL_CALL elementReplaced(const starcontainer::ContainerEvent& _rEvent); +// ::com::sun::star::container::XContainerListener + virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& _rEvent); + virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& _rEvent); + virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& _rEvent); // Other functions sal_Int32 getGroupCount(); - void getGroup(sal_Int32 nGroup, staruno::Sequence< staruno::Reference >& _rGroup, ::rtl::OUString& Name); - void getGroupByName(const ::rtl::OUString& Name, staruno::Sequence< staruno::Reference >& _rGroup); - staruno::Sequence< staruno::Reference > getControlModels(); + void getGroup(sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup, ::rtl::OUString& Name); + void getGroupByName(const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > getControlModels(); }; diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index c16ac228f294..9257996217dc 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -2,9 +2,9 @@ * * $RCSfile: InterfaceContainer.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2000-10-19 11:50:25 $ + * last change: $Author: oj $ $Date: 2000-11-23 09:05:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,6 +134,9 @@ #ifndef _CPPUHELPER_COMPONENT_HXX_ #include #endif +#ifndef _CPPUHELPER_IMPLBASE7_HXX_ +#include +#endif using namespace comphelper; @@ -142,13 +145,6 @@ namespace frm { //......................................................................... - namespace starcontainer = ::com::sun::star::container; - namespace starscript = ::com::sun::star::script; - namespace starbeans = ::com::sun::star::beans; - namespace stario = ::com::sun::star::io; - namespace starlang = ::com::sun::star::lang; - namespace starform = ::com::sun::star::form; - typedef ::std::vector OInterfaceArray; typedef ::std::hash_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStringHash, ::comphelper::UStringEqual> OInterfaceMap; @@ -160,103 +156,100 @@ typedef ::std::hash_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStri // dieses Container kann selbst den Context fuer Formulare darstellen // oder außen einen Context uebergeben bekommen //================================================================== -class OInterfaceContainer - :public starcontainer::XNameContainer - ,public starcontainer::XIndexContainer - ,public starcontainer::XContainer - ,public starcontainer::XEnumerationAccess - ,public starscript::XEventAttacherManager - ,public starbeans::XPropertyChangeListener - ,public stario::XPersistObject +typedef ::cppu::ImplHelper7< ::com::sun::star::container::XNameContainer, + ::com::sun::star::container::XIndexContainer, + ::com::sun::star::container::XContainer, + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::script::XEventAttacherManager, + ::com::sun::star::beans::XPropertyChangeListener, + ::com::sun::star::io::XPersistObject > OInterfaceContainer_BASE; + +class OInterfaceContainer : public OInterfaceContainer_BASE { protected: OInterfaceArray m_aItems; OInterfaceMap m_aMap; ::cppu::OInterfaceContainerHelper m_aContainerListeners; - ::osl::Mutex& m_rMutex; - staruno::Type m_aElementType; + ::osl::Mutex& m_rMutex; + ::com::sun::star::uno::Type m_aElementType; - staruno::Reference m_xServiceFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xServiceFactory; // EventManager - staruno::Reference m_xEventAttacher; + ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xEventAttacher; public: OInterfaceContainer( - const staruno::Reference& _rxFactory, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, ::osl::Mutex& _rMutex, - const staruno::Type& _rElementType); + const ::com::sun::star::uno::Type& _rElementType); public: - virtual staruno::Any SAL_CALL queryInterface(const staruno::Type& _rType) throw (staruno::RuntimeException); +// ::com::sun::star::io::XPersistObject + virtual ::rtl::OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL write( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream >& OutStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL read( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& InStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); -// stario::XPersistObject - virtual ::rtl::OUString SAL_CALL getServiceName( ) throw(staruno::RuntimeException) = 0; - virtual void SAL_CALL write( const staruno::Reference< stario::XObjectOutputStream >& OutStream ) throw(stario::IOException, staruno::RuntimeException); - virtual void SAL_CALL read( const staruno::Reference< stario::XObjectInputStream >& InStream ) throw(stario::IOException, staruno::RuntimeException); +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException); -// starlang::XEventListener - virtual void SAL_CALL disposing(const starlang::EventObject& _rSource) throw(staruno::RuntimeException); +// ::com::sun::star::beans::XPropertyChangeListener + virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt); -// starbeans::XPropertyChangeListener - virtual void SAL_CALL propertyChange(const starbeans::PropertyChangeEvent& evt); +// ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException) ; + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); -// starcontainer::XElementAccess - virtual staruno::Type SAL_CALL getElementType() throw(staruno::RuntimeException) ; - virtual sal_Bool SAL_CALL hasElements() throw(staruno::RuntimeException); +// ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration> SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException); -// starcontainer::XEnumerationAccess - virtual staruno::Reference SAL_CALL createEnumeration() throw(staruno::RuntimeException); +// ::com::sun::star::container::XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual StringSequence SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException); -// starcontainer::XNameAccess - virtual staruno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException); - virtual StringSequence SAL_CALL getElementNames( ) throw(staruno::RuntimeException); - virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(staruno::RuntimeException); +// ::com::sun::star::container::XNameReplace + virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const ::com::sun::star::uno::Any& _rElement) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// starcontainer::XNameReplace - virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const staruno::Any& _rElement) throw(starlang::IllegalArgumentException, starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException); +// ::com::sun::star::container::XNameContainer + virtual void SAL_CALL insertByName(const ::rtl::OUString& Name, const ::com::sun::star::uno::Any& _rElement) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// starcontainer::XNameContainer - virtual void SAL_CALL insertByName(const ::rtl::OUString& Name, const staruno::Any& _rElement) throw(starlang::IllegalArgumentException, starcontainer::ElementExistException, starlang::WrappedTargetException, staruno::RuntimeException); - virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException); +// ::com::sun::star::container::XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _nIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// starcontainer::XIndexAccess - virtual sal_Int32 SAL_CALL getCount() throw(staruno::RuntimeException); - virtual staruno::Any SAL_CALL getByIndex(sal_Int32 _nIndex) throw(starlang::IndexOutOfBoundsException, starlang::WrappedTargetException, staruno::RuntimeException); +// ::com::sun::star::container::XIndexReplace + virtual void SAL_CALL replaceByIndex(sal_Int32 _nIndex, const ::com::sun::star::uno::Any& _rElement) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// starcontainer::XIndexReplace - virtual void SAL_CALL replaceByIndex(sal_Int32 _nIndex, const staruno::Any& _rElement) throw(starlang::IllegalArgumentException, starlang::IndexOutOfBoundsException, starlang::WrappedTargetException, staruno::RuntimeException); +// ::com::sun::star::container::XIndexContainer + virtual void SAL_CALL insertByIndex(sal_Int32 _nIndex, const ::com::sun::star::uno::Any& Element) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByIndex(sal_Int32 _nIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// starcontainer::XIndexContainer - virtual void SAL_CALL insertByIndex(sal_Int32 _nIndex, const staruno::Any& Element) throw(starlang::IllegalArgumentException, starlang::IndexOutOfBoundsException, starlang::WrappedTargetException, staruno::RuntimeException); - virtual void SAL_CALL removeByIndex(sal_Int32 _nIndex) throw(starlang::IndexOutOfBoundsException, starlang::WrappedTargetException, staruno::RuntimeException); +// ::com::sun::star::container::XContainer + virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener>& _rxListener) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener>& _rxListener) throw(::com::sun::star::uno::RuntimeException); -// starcontainer::XContainer - virtual void SAL_CALL addContainerListener(const staruno::Reference& _rxListener) throw(staruno::RuntimeException); - virtual void SAL_CALL removeContainerListener(const staruno::Reference& _rxListener) throw(staruno::RuntimeException); - -// starscript::XEventAttacherManager - virtual void SAL_CALL registerScriptEvent( sal_Int32 nIndex, const starscript::ScriptEventDescriptor& aScriptEvent ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL registerScriptEvents( sal_Int32 nIndex, const staruno::Sequence< starscript::ScriptEventDescriptor >& aScriptEvents ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL revokeScriptEvent( sal_Int32 nIndex, const ::rtl::OUString& aListenerType, const ::rtl::OUString& aEventMethod, const ::rtl::OUString& aRemoveListenerParam ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL revokeScriptEvents( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL insertEntry( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL removeEntry( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual staruno::Sequence< starscript::ScriptEventDescriptor > SAL_CALL getScriptEvents( sal_Int32 Index ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL attach( sal_Int32 nIndex, const staruno::Reference< staruno::XInterface >& xObject, const staruno::Any& aHelper ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::ServiceNotRegisteredException, staruno::RuntimeException); - virtual void SAL_CALL detach( sal_Int32 nIndex, const staruno::Reference< staruno::XInterface >& xObject ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL addScriptListener( const staruno::Reference< starscript::XScriptListener >& xListener ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - virtual void SAL_CALL removeScriptListener( const staruno::Reference< starscript::XScriptListener >& Listener ) throw(::com::sun::star::lang::IllegalArgumentException, staruno::RuntimeException); - - virtual staruno::Sequence< staruno::Type > SAL_CALL getTypes( ) throw(staruno::RuntimeException); +// ::com::sun::star::script::XEventAttacherManager + virtual void SAL_CALL registerScriptEvent( sal_Int32 nIndex, const ::com::sun::star::script::ScriptEventDescriptor& aScriptEvent ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL registerScriptEvents( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& aScriptEvents ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL revokeScriptEvent( sal_Int32 nIndex, const ::rtl::OUString& aListenerType, const ::rtl::OUString& aEventMethod, const ::rtl::OUString& aRemoveListenerParam ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL revokeScriptEvents( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertEntry( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEntry( sal_Int32 nIndex ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > SAL_CALL getScriptEvents( sal_Int32 Index ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL attach( sal_Int32 nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xObject, const ::com::sun::star::uno::Any& aHelper ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::ServiceNotRegisteredException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL detach( sal_Int32 nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xObject ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addScriptListener( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptListener >& xListener ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeScriptListener( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptListener >& Listener ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); protected: // helper virtual void SAL_CALL disposing(); virtual void insert(sal_Int32 _nIndex, const InterfaceRef& _Object, sal_Bool bEvents = sal_True) - throw(starlang::IllegalArgumentException); + throw(::com::sun::star::lang::IllegalArgumentException); virtual void removeElementsNoEvents(sal_Int32 nIndex); // called after the object is inserted, but before the "real listeners" are notified @@ -264,38 +257,39 @@ protected: // called after the object is removed, but before the "real listeners" are notified virtual void implRemoved(const InterfaceRef& _rxObject) { } - void SAL_CALL writeEvents(const staruno::Reference& _rxOutStream); - void SAL_CALL readEvents(const staruno::Reference& _rxInStream, sal_Int32 nCount); + void SAL_CALL writeEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream); + void SAL_CALL readEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream, sal_Int32 nCount); }; //================================================================== //= OFormComponents //================================================================== +typedef ::cppu::ImplHelper1< ::com::sun::star::form::XFormComponent> OFormComponents_BASE; typedef ::cppu::OComponentHelper FormComponentsBase; // else MSVC kills itself on some statements class OFormComponents : public FormComponentsBase, public OInterfaceContainer, - public starform::XFormComponent + public OFormComponents_BASE { protected: - ::osl::Mutex m_aMutex; + ::osl::Mutex m_aMutex; ::comphelper::InterfaceRef m_xParent; public: - OFormComponents(const staruno::Reference& _rxFactory); + OFormComponents(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); virtual ~OFormComponents(); DECLARE_UNO3_AGG_DEFAULTS(OFormComponents, FormComponentsBase); - virtual staruno::Any SAL_CALL queryAggregation(const staruno::Type& _rType) throw(staruno::RuntimeException); - virtual staruno::Sequence< staruno::Type > SAL_CALL getTypes( ) throw(staruno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); // OComponentHelper virtual void SAL_CALL disposing(); -// starform::XFormComponent - virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(staruno::RuntimeException); - virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(starlang::NoSupportException, staruno::RuntimeException); +// ::com::sun::star::form::XFormComponent + virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); }; //......................................................................... } // namespace frm