summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-04 11:10:17 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-04 10:55:08 +0000
commit20b9cbd0e586fe89f8e1bdd942135445a256af7b (patch)
tree061d5276c6363be1d6b9db734e00676eec71f513 /toolkit
parent64acc9d576be9166c2da6edc6f8478e2cf31f606 (diff)
merge toolkit::NameContainer_Impl with toolkit::ScriptEventContainer
Change-Id: I14e9401056e31ee9d4ad5945a73ca31969430b4c Reviewed-on: https://gerrit.libreoffice.org/26891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/eventcontainer.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/toolkit/source/controls/eventcontainer.cxx b/toolkit/source/controls/eventcontainer.cxx
index 418e3370431f..2e5b6fb4fec8 100644
--- a/toolkit/source/controls/eventcontainer.cxx
+++ b/toolkit/source/controls/eventcontainer.cxx
@@ -41,13 +41,13 @@ namespace toolkit
{
// Methods XElementAccess
-Type NameContainer_Impl::getElementType()
+Type ScriptEventContainer::getElementType()
throw(RuntimeException, std::exception)
{
return mType;
}
-sal_Bool NameContainer_Impl::hasElements()
+sal_Bool ScriptEventContainer::hasElements()
throw(RuntimeException, std::exception)
{
bool bRet = (mnElementCount > 0);
@@ -55,7 +55,7 @@ sal_Bool NameContainer_Impl::hasElements()
}
// Methods XNameAccess
-Any NameContainer_Impl::getByName( const OUString& aName )
+Any ScriptEventContainer::getByName( const OUString& aName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
NameContainerNameMap::iterator aIt = mHashMap.find( aName );
@@ -68,13 +68,13 @@ Any NameContainer_Impl::getByName( const OUString& aName )
return aRetAny;
}
-Sequence< OUString > NameContainer_Impl::getElementNames()
+Sequence< OUString > ScriptEventContainer::getElementNames()
throw(RuntimeException, std::exception)
{
return mNames;
}
-sal_Bool NameContainer_Impl::hasByName( const OUString& aName )
+sal_Bool ScriptEventContainer::hasByName( const OUString& aName )
throw(RuntimeException, std::exception)
{
NameContainerNameMap::iterator aIt = mHashMap.find( aName );
@@ -84,7 +84,7 @@ sal_Bool NameContainer_Impl::hasByName( const OUString& aName )
// Methods XNameReplace
-void NameContainer_Impl::replaceByName( const OUString& aName, const Any& aElement )
+void ScriptEventContainer::replaceByName( const OUString& aName, const Any& aElement )
throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
const Type& aAnyType = aElement.getValueType();
@@ -111,7 +111,7 @@ void NameContainer_Impl::replaceByName( const OUString& aName, const Any& aEleme
// Methods XNameContainer
-void NameContainer_Impl::insertByName( const OUString& aName, const Any& aElement )
+void ScriptEventContainer::insertByName( const OUString& aName, const Any& aElement )
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException, std::exception)
{
const Type& aAnyType = aElement.getValueType();
@@ -139,7 +139,7 @@ void NameContainer_Impl::insertByName( const OUString& aName, const Any& aElemen
maContainerListeners.elementInserted( aEvent );
}
-void NameContainer_Impl::removeByName( const OUString& Name )
+void ScriptEventContainer::removeByName( const OUString& Name )
throw(NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
NameContainerNameMap::iterator aIt = mHashMap.find( Name );
@@ -172,20 +172,21 @@ void NameContainer_Impl::removeByName( const OUString& Name )
}
// Methods XContainer
-void NameContainer_Impl::addContainerListener( const css::uno::Reference< css::container::XContainerListener >& l ) throw(css::uno::RuntimeException, std::exception)
+void ScriptEventContainer::addContainerListener( const css::uno::Reference< css::container::XContainerListener >& l ) throw(css::uno::RuntimeException, std::exception)
{
maContainerListeners.addInterface( l );
}
-void NameContainer_Impl::removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& l ) throw(css::uno::RuntimeException, std::exception)
+void ScriptEventContainer::removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& l ) throw(css::uno::RuntimeException, std::exception)
{
maContainerListeners.removeInterface( l );
}
-// Ctor
ScriptEventContainer::ScriptEventContainer()
- : NameContainer_Impl( cppu::UnoType<ScriptEventDescriptor>::get())
+ : mnElementCount( 0 ),
+ mType( cppu::UnoType<ScriptEventDescriptor>::get() ),
+ maContainerListeners( *this )
{
}