namespace changes

This commit is contained in:
Ocke Janssen 2000-11-23 08:05:32 +00:00
parent 81c8196ae8
commit 6722dc0da7
3 changed files with 147 additions and 142 deletions

View file

@ -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 <com/sun/star/beans/XFastPropertySet.hpp>
#endif
#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
@ -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<starbeans::XPropertySet>& rxElement, const OGroupComp& _rGroupComp )
OGroupCompAcc::OGroupCompAcc(const Reference<XPropertySet>& rxElement, const OGroupComp& _rGroupComp )
:m_xComponent( rxElement )
,m_aGroupComp( _rGroupComp )
{
@ -136,7 +150,7 @@ OGroupComp::OGroupComp(const OGroupComp& _rSource)
}
//------------------------------------------------------------------
OGroupComp::OGroupComp(const staruno::Reference<starbeans::XPropertySet>& rxSet, sal_Int32 nInsertPos )
OGroupComp::OGroupComp(const Reference<XPropertySet>& 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<starbeans::XPropertySet>& xSet )
void OGroup::InsertComponent( const Reference<XPropertySet>& 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<starbeans::XPropertySet>&
}
//------------------------------------------------------------------
void OGroup::RemoveComponent( const staruno::Reference<starbeans::XPropertySet>& rxElement )
void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
{
sal_Int32 nGroupCompAccPos;
OGroupCompAcc aSearchCompAcc( rxElement, OGroupComp() );
@ -256,16 +270,16 @@ public:
};
//------------------------------------------------------------------
staruno::Sequence< staruno::Reference<starawt::XControlModel> > OGroup::GetControlModels() const
Sequence< Reference<XControlModel> > OGroup::GetControlModels() const
{
sal_Int32 nLen = m_aCompArray.size();
staruno::Sequence<staruno::Reference<starawt::XControlModel> > aControlModelSeq( nLen );
staruno::Reference<starawt::XControlModel>* pModels = aControlModelSeq.getArray();
Sequence<Reference<XControlModel> > aControlModelSeq( nLen );
Reference<XControlModel>* pModels = aControlModelSeq.getArray();
ConstOGroupCompArrIterator aGroupComps = m_aCompArray.begin();
for (sal_Int32 i = 0; i < nLen; ++i, ++pModels, ++aGroupComps)
{
*pModels = staruno::Reference<starawt::XControlModel> ((*aGroupComps).GetComponent(), staruno::UNO_QUERY);
*pModels = Reference<XControlModel> ((*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<starcontainer::XContainer> xContainer(evt.Source, staruno::UNO_QUERY);
Reference<XContainer> 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<starbeans::XPropertySet> xSet(evt.Source, staruno::UNO_QUERY);
Reference<XPropertySet> 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<starbeans::XPropertySet> xSet(*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY);
Reference<XPropertySet> 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<starbeans::XPropertySet> xSet(*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY);
Reference<XPropertySet> 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<starbeans::XPropertySet> xSet(*(InterfaceRef *)Event.ReplacedElement.getValue(), staruno::UNO_QUERY);
Reference<XPropertySet> xSet(*(InterfaceRef *)Event.ReplacedElement.getValue(), UNO_QUERY);
if (xSet.is())
RemoveElement( xSet );
xSet = staruno::Reference<starbeans::XPropertySet> (*(InterfaceRef *)Event.Element.getValue(), staruno::UNO_QUERY);
xSet = Reference<XPropertySet> (*(InterfaceRef *)Event.Element.getValue(), UNO_QUERY);
if (xSet.is())
InsertElement( xSet );
}
// Other functions
//------------------------------------------------------------------
staruno::Sequence<staruno::Reference<starawt::XControlModel> > OGroupManager::getControlModels()
Sequence<Reference<XControlModel> > OGroupManager::getControlModels()
{
return m_pCompGroup->GetControlModels();
}
@ -396,7 +410,7 @@ sal_Int32 OGroupManager::getGroupCount()
}
//------------------------------------------------------------------
void OGroupManager::getGroup(sal_Int32 nGroup, staruno::Sequence< staruno::Reference<starawt::XControlModel> >& _rGroup, ::rtl::OUString& _rName)
void OGroupManager::getGroup(sal_Int32 nGroup, Sequence< Reference<XControlModel> >& _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<starawt::XControlModel> >& _rGroup)
void OGroupManager::getGroupByName(const ::rtl::OUString& _rName, Sequence< Reference<XControlModel> >& _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<starbeans::XPropertySet>& xSet )
void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
{
// Nur ControlModels
staruno::Reference<starawt::XControlModel> xControl(xSet, staruno::UNO_QUERY);
Reference<XControlModel> xControl(xSet, UNO_QUERY);
if (!xControl.is() )
return;
@ -480,10 +494,10 @@ void OGroupManager::InsertElement( const staruno::Reference<starbeans::XProperty
}
//------------------------------------------------------------------
void OGroupManager::RemoveElement( const staruno::Reference<starbeans::XPropertySet>& xSet )
void OGroupManager::RemoveElement( const Reference<XPropertySet>& xSet )
{
// Nur ControlModels
staruno::Reference<starawt::XControlModel> xControl(xSet, staruno::UNO_QUERY);
Reference<XControlModel> xControl(xSet, UNO_QUERY);
if (!xControl.is() )
return;

View file

@ -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 <class ELEMENT, class LESS_COMPARE>
sal_Int32 insert_sorted(::std::vector<ELEMENT>& _rArray, const ELEMENT& _rNewElement, const LESS_COMPARE& _rCompareOp)
@ -150,20 +147,20 @@ namespace frm
class OGroupComp
{
::rtl::OUString m_aName;
staruno::Reference<starbeans::XPropertySet> 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<starbeans::XPropertySet>& 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<starbeans::XPropertySet>& 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<starbeans::XPropertySet> 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<starbeans::XPropertySet>& 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<starbeans::XPropertySet>& 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<starawt::XControlModel> > GetControlModels() const;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > GetControlModels() const;
void InsertComponent( const staruno::Reference<starbeans::XPropertySet>& rxElement );
void RemoveComponent( const staruno::Reference<starbeans::XPropertySet>& 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<starbeans::XPropertySet>& 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<starbeans::XPropertyChangeListener, starcontainer::XContainerListener>
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<starbeans::XPropertyChangeL
// die mehr als 1 Element haben
// Helper functions
void InsertElement( const staruno::Reference<starbeans::XPropertySet>& rxElement );
void RemoveElement( const staruno::Reference<starbeans::XPropertySet>& 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<starawt::XControlModel> >& _rGroup, ::rtl::OUString& Name);
void getGroupByName(const ::rtl::OUString& Name, staruno::Sequence< staruno::Reference<starawt::XControlModel> >& _rGroup);
staruno::Sequence< staruno::Reference<starawt::XControlModel> > 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();
};

View file

@ -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 <cppuhelper/component.hxx>
#endif
#ifndef _CPPUHELPER_IMPLBASE7_HXX_
#include <cppuhelper/implbase7.hxx>
#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<InterfaceRef> 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<starlang::XMultiServiceFactory> m_xServiceFactory;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xServiceFactory;
// EventManager
staruno::Reference<starscript::XEventAttacherManager> m_xEventAttacher;
::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xEventAttacher;
public:
OInterfaceContainer(
const staruno::Reference<starlang::XMultiServiceFactory>& _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<starcontainer::XEnumeration> 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<starcontainer::XContainerListener>& _rxListener) throw(staruno::RuntimeException);
virtual void SAL_CALL removeContainerListener(const staruno::Reference<starcontainer::XContainerListener>& _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<stario::XObjectOutputStream>& _rxOutStream);
void SAL_CALL readEvents(const staruno::Reference<stario::XObjectInputStream>& _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<starlang::XMultiServiceFactory>& _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