[Libreoffice-commits] core.git: compilerplugins/clang include/toolkit toolkit/source
Noel Grandin
noel at peralex.com
Mon Jul 4 10:55:50 UTC 2016
compilerplugins/clang/mergeclasses.results | 1 -
include/toolkit/controls/eventcontainer.hxx | 24 +++++-------------------
toolkit/source/controls/eventcontainer.cxx | 25 +++++++++++++------------
3 files changed, 18 insertions(+), 32 deletions(-)
New commits:
commit 20b9cbd0e586fe89f8e1bdd942135445a256af7b
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jul 4 11:10:17 2016 +0200
merge toolkit::NameContainer_Impl with toolkit::ScriptEventContainer
Change-Id: I14e9401056e31ee9d4ad5945a73ca31969430b4c
Reviewed-on: https://gerrit.libreoffice.org/26891
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 42bbffd..9464dd5 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -388,7 +388,6 @@ merge sw::mark::ICheckboxFieldmark with sw::mark::CheckboxFieldmark
merge sw::sidebarwindows::SwSidebarWin with sw::annotation::SwAnnotationWin
merge sw::util::WrtRedlineAuthor with WW8_WrtRedlineAuthor
merge tdoc_ucp::OfficeDocumentsEventListener with tdoc_ucp::ContentProvider
-merge toolkit::NameContainer_Impl with toolkit::ScriptEventContainer
merge toolkit::ScrollableInterface with toolkit::ScrollableWrapper
merge unographic::GraphicTransformer with unographic::Graphic
merge vcl::DeletionNotifier with SalFrame
diff --git a/include/toolkit/controls/eventcontainer.hxx b/include/toolkit/controls/eventcontainer.hxx
index acc74cb..e41aaa0 100644
--- a/include/toolkit/controls/eventcontainer.hxx
+++ b/include/toolkit/controls/eventcontainer.hxx
@@ -26,13 +26,9 @@
#include <toolkit/helper/listenermultiplexer.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
#include <unordered_map>
-typedef ::cppu::WeakImplHelper2< css::container::XNameContainer,
- css::container::XContainer > NameContainerHelper;
-
-
namespace toolkit
{
@@ -46,7 +42,9 @@ typedef std::unordered_map
NameContainerNameMap;
-class NameContainer_Impl : public NameContainerHelper
+class ScriptEventContainer : public ::cppu::WeakImplHelper<
+ css::container::XNameContainer,
+ css::container::XContainer >
{
NameContainerNameMap mHashMap;
css::uno::Sequence< OUString > mNames;
@@ -57,12 +55,7 @@ class NameContainer_Impl : public NameContainerHelper
ContainerListenerMultiplexer maContainerListeners;
public:
- NameContainer_Impl( css::uno::Type const & aType )
- : mnElementCount( 0 ),
- mType( aType ),
- maContainerListeners( *this )
- {
- }
+ ScriptEventContainer();
// Methods XElementAccess
virtual css::uno::Type SAL_CALL getElementType( )
@@ -105,13 +98,6 @@ public:
throw(css::uno::RuntimeException, std::exception) override;
};
-class ScriptEventContainer : public NameContainer_Impl
-{
-public:
- ScriptEventContainer();
-};
-
-
} // namespace toolkit_namecontainer
#endif // INCLUDED_TOOLKIT_CONTROLS_EVENTCONTAINER_HXX
diff --git a/toolkit/source/controls/eventcontainer.cxx b/toolkit/source/controls/eventcontainer.cxx
index 418e337..2e5b6fb 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 )
{
}
More information about the Libreoffice-commits
mailing list