[Libreoffice-commits] core.git: framework/inc framework/source offapi/com

Stephan Bergmann sbergman at redhat.com
Mon Sep 9 05:17:27 PDT 2013


 framework/inc/services/EventMultiplexer.hxx       |  118 ---------
 framework/source/services/EventMultiplexer.cxx    |  269 ----------------------
 offapi/com/sun/star/ui/XContextChangeListener.idl |   45 ---
 offapi/com/sun/star/util/EventMultiplexer.idl     |   35 --
 4 files changed, 467 deletions(-)

New commits:
commit f500b2d7d997c8ae0757c3c2d6a7e957e5de9fd3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 9 14:14:43 2013 +0200

    Remove dead code
    
    ...merged in via d02f75a8c36705924ddd6a5921fe3012fafce812 "Resolves: #i121420#
    merge sidebar feature," but apparently already unused in the original AOO
    commit.
    
    Change-Id: I12e4ff05769d95a847881934eab6da722bb1950e

diff --git a/framework/inc/services/EventMultiplexer.hxx b/framework/inc/services/EventMultiplexer.hxx
deleted file mode 100644
index 80ad4cb..0000000
--- a/framework/inc/services/EventMultiplexer.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __FRAMEWORK_SERVICES_EVENT_MULTIPLEXER_HXX_
-#define __FRAMEWORK_SERVICES_EVENT_MULTIPLEXER_HXX_
-
-#include <com/sun/star/util/XEventMultiplexer.hpp>
-
-#include <cppuhelper/compbase3.hxx>
-#include <cppuhelper/basemutex.hxx>
-
-#include "macros/xserviceinfo.hxx"
-
-namespace
-{
-    typedef ::cppu::WeakComponentImplHelper3 <
-        css::util::XEventMultiplexer,
-        css::lang::XSingleComponentFactory,
-        css::lang::XServiceInfo
-        > EventMultiplexerInterfaceBase;
-}
-
-
-namespace css = ::com::sun::star;
-namespace cssu = ::com::sun::star::uno;
-namespace cssl = ::com::sun::star::lang;
-
-namespace framework {
-
-class EventMultiplexer
-    : private ::boost::noncopyable,
-      private ::cppu::BaseMutex,
-      public EventMultiplexerInterfaceBase
-{
-public:
-    EventMultiplexer(const cssu::Reference<css::uno::XComponentContext>& rxContext);
-    virtual ~EventMultiplexer (void);
-
-    // XEventMultiplexer
-    virtual void SAL_CALL addEventListener (
-        const cssu::Reference<css::util::XEventListener>& rxListener,
-        const cssu::Reference<cssu::XInterface>& rxEventFocus)
-        throw(cssu::RuntimeException, cssl::IllegalArgumentException);
-    virtual void SAL_CALL removeEventListener (
-        const cssu::Reference<css::util::XEventListener>& rxListener,
-        const cssu::Reference<cssu::XInterface>& rxEventFocus)
-        throw(cssu::RuntimeException, cssl::IllegalArgumentException);
-    virtual void SAL_CALL removeAllEventListeners (
-        const cssu::Reference<css::util::XEventListener>& rxListener)
-        throw(cssu::RuntimeException, cssl::IllegalArgumentException);
-    virtual void SAL_CALL broadcastEvent (
-        const cssl::EventObject& rEventObject,
-        const cssu::Reference<cssu::XInterface>& rxEventFocus)
-        throw(cssu::RuntimeException);
-
-    // XSingleComponentFactory
-    virtual cssu::Reference<cssu::XInterface> SAL_CALL createInstanceWithContext (
-        const cssu::Reference<cssu::XComponentContext>& rxContext)
-        throw (cssu::Exception, cssu::RuntimeException);
-    virtual cssu::Reference<cssu::XInterface > SAL_CALL createInstanceWithArgumentsAndContext (
-        const cssu::Sequence<cssu::Any>& rArguments,
-        const cssu::Reference<cssu::XComponentContext>& rxContext)
-        throw (cssu::Exception, cssu::RuntimeException);
-
-    // XServiceInfo
-    virtual ::rtl::OUString SAL_CALL getImplementationName (void)
-        throw (cssu::RuntimeException);
-    virtual sal_Bool SAL_CALL supportsService  (
-        const ::rtl::OUString& rsServiceName)
-        throw (cssu::RuntimeException);
-    virtual cssu::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames (void)
-        throw (cssu::RuntimeException);
-
-    static ::rtl::OUString SAL_CALL impl_getStaticImplementationName (void);
-    static cssu::Reference<cssu::XInterface> SAL_CALL impl_createFactory (
-        const cssu::Reference<cssl::XMultiServiceFactory>& xServiceManager);
-
-private:
-    typedef ::std::vector<cssu::Reference<css::util::XEventListener> > ListenerContainer;
-    typedef ::std::map<cssu::Reference<cssu::XInterface>, ListenerContainer> ListenerMap;
-    ListenerMap maListeners;
-
-    /** Notify all listeners in the container that is associated with
-        the given event focus.
-
-        Typically called twice from broadcastEvent(), once for the
-        given event focus and onece for NULL.
-    */
-    void BroadcastEventToSingleContainer (
-        const cssl::EventObject& rEventObject,
-        const cssu::Reference<cssu::XInterface>& rxEventFocus);
-
-    static cssu::Sequence< ::rtl::OUString > SAL_CALL static_GetSupportedServiceNames (void);
-    static cssu::Reference<cssu::XInterface> SAL_CALL static_CreateInstance (
-        const cssu::Reference<cssu::XComponentContext>& rxComponentContext)
-        throw (cssu::Exception);
-};
-
-} // end of namespace framework
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/services/EventMultiplexer.cxx b/framework/source/services/EventMultiplexer.cxx
deleted file mode 100644
index 89d725e..0000000
--- a/framework/source/services/EventMultiplexer.cxx
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "precompiled_framework.hxx"
-
-#include "services/EventMultiplexer.hxx"
-#include "services.h"
-
-using ::rtl::OUString;
-
-#define A2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
-namespace framework {
-
-#define IMPLEMENTATION_NAME "org.apache.openoffice.comp.framework.EventMultiplexer"
-#define SERVICE_NAME "com.sun.star.ui.ContextChangeEventMultiplexer"
-#define SINGLETON_NAME "org.apache.openoffice.comp.framework.EventMultiplexer"
-
-
-EventMultiplexer::EventMultiplexer (const cssu::Reference<css::uno::XComponentContext>& rxContext)
-    : EventMultiplexerInterfaceBase(m_aMutex),
-      maListeners()
-{
-    (void)rxContext;
-}
-
-
-
-
-EventMultiplexer::~EventMultiplexer (void)
-{
-    maListeners.clear();
-}
-
-
-
-
-// XEventMultiplexer
-
-void SAL_CALL EventMultiplexer::addEventListener (
-    const cssu::Reference<css::util::XEventListener>& rxListener,
-    const cssu::Reference<cssu::XInterface>& rxEventFocus)
-    throw(cssu::RuntimeException,cssl::IllegalArgumentException)
-{
-    if ( ! rxListener.is())
-        throw css::lang::IllegalArgumentException(A2S("can not add an empty reference"), static_cast<XWeak*>(this), 0);
-
-    ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
-    if (iListenerContainer == maListeners.end())
-    {
-        // Create a new listener container for the event focus.
-        iListenerContainer = maListeners.insert(
-            ListenerMap::value_type(
-                rxEventFocus,
-                ListenerContainer())).first;
-    }
-    if (iListenerContainer != maListeners.end())
-    {
-        ListenerContainer& rContainer (iListenerContainer->second);
-        if (::std::find(rContainer.begin(), rContainer.end(), rxListener) == rContainer.end())
-            rContainer.push_back(rxListener);
-        else
-        {
-            // The listener was added for the same event focus
-            // previously.  That is an error.
-            throw cssl::IllegalArgumentException(A2S("listener added twice"), static_cast<XWeak*>(this), 0);
-        }
-    }
-}
-
-
-
-
-void SAL_CALL EventMultiplexer::removeEventListener (
-    const cssu::Reference<css::util::XEventListener>& rxListener,
-    const cssu::Reference<cssu::XInterface>& rxEventFocus)
-    throw(cssu::RuntimeException,cssl::IllegalArgumentException)
-{
-    if ( ! rxListener.is())
-        throw cssl::IllegalArgumentException(A2S("can not remove an empty reference"), static_cast<XWeak*>(this), 0);
-
-    ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
-    if (iListenerContainer != maListeners.end())
-    {
-        ListenerContainer& rContainer (iListenerContainer->second);
-        const ListenerContainer::iterator iListener (::std::find(rContainer.begin(), rContainer.end(), rxListener));
-        if (iListener != rContainer.end())
-            rContainer.erase(iListener);
-    }
-
-}
-
-
-
-
-void SAL_CALL EventMultiplexer::removeAllEventListeners (
-    const cssu::Reference<css::util::XEventListener>& rxListener)
-    throw(cssu::RuntimeException,cssl::IllegalArgumentException)
-{
-    if ( ! rxListener.is())
-        throw cssl::IllegalArgumentException(A2S("can not remove an empty reference"), static_cast<XWeak*>(this), 0);
-
-    for (ListenerMap::iterator
-             iContainer(maListeners.begin()),
-             iEnd(maListeners.end());
-         iContainer!=iEnd;
-         ++iContainer)
-    {
-        const ListenerContainer::iterator iListener (::std::find(iContainer->second.begin(), iContainer->second.end(), rxListener));
-        if (iListener != iContainer->second.end())
-            iContainer->second.erase(iListener);
-    }
-}
-
-
-
-
-
-void SAL_CALL EventMultiplexer::broadcastEvent (
-    const cssl::EventObject& rEventObject,
-    const cssu::Reference<cssu::XInterface>& rxEventFocus)
-    throw(cssu::RuntimeException)
-{
-    BroadcastEventToSingleContainer(rEventObject, rxEventFocus);
-    if (rxEventFocus.is())
-        BroadcastEventToSingleContainer(rEventObject, NULL);
-}
-
-
-
-
-void EventMultiplexer::BroadcastEventToSingleContainer (
-    const cssl::EventObject& rEventObject,
-    const cssu::Reference<cssu::XInterface>& rxEventFocus)
-{
-    ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
-    if (iListenerContainer != maListeners.end())
-    {
-        // Create a copy of the listener container to avoid problems
-        // when one of the called listeners calls add... or remove...
-        ListenerContainer aContainer (iListenerContainer->second);
-        for (ListenerContainer::const_iterator
-                 iListener(aContainer.begin()),
-                 iEnd(aContainer.end());
-             iListener!=iEnd;
-             ++iListener)
-        {
-            (*iListener)->notifyEvent(rEventObject);
-        }
-    }
-}
-
-
-
-
-// XSingleComponentFactory
-cssu::Reference<cssu::XInterface> SAL_CALL EventMultiplexer::createInstanceWithContext (
-    const cssu::Reference<cssu::XComponentContext>& rxContext)
-    throw (cssu::Exception, cssu::RuntimeException)
-{
-    return cssu::Reference<cssu::XInterface>();
-}
-
-
-
-
-cssu::Reference<cssu::XInterface > SAL_CALL EventMultiplexer::createInstanceWithArgumentsAndContext (
-    const cssu::Sequence<cssu::Any>& rArguments,
-    const cssu::Reference<cssu::XComponentContext>& rxContext)
-    throw (cssu::Exception, cssu::RuntimeException)
-{
-    return cssu::Reference<cssu::XInterface>();
-}
-
-
-
-
-// XServiceInfo
-
-::rtl::OUString SAL_CALL EventMultiplexer::getImplementationName (void)
-    throw(cssu::RuntimeException)
-{
-    return impl_getStaticImplementationName();
-}
-
-
-
-
-
-sal_Bool SAL_CALL EventMultiplexer::supportsService (
-    const ::rtl::OUString& rsServiceName)
-    throw (cssu::RuntimeException)
-{
-    return ::comphelper::findValue(static_GetSupportedServiceNames(), rsServiceName, sal_True).getLength() != 0;
-}
-
-
-
-
-cssu::Sequence<OUString> SAL_CALL EventMultiplexer::getSupportedServiceNames (void)
-    throw (cssu::RuntimeException)
-{
-    return static_GetSupportedServiceNames();
-}
-
-
-
-
-// Local and static methods.
-
-OUString SAL_CALL EventMultiplexer::impl_getStaticImplementationName (void)
-{
-    return A2S(IMPLEMENTATION_NAME);
-}
-
-
-
-
-cssu::Sequence<OUString> SAL_CALL EventMultiplexer::static_GetSupportedServiceNames (void)
-{
-    cssu::Sequence<OUString> aServiceNames (2);
-    aServiceNames[0] = A2S(SERVICE_NAME);
-    aServiceNames[1] = A2S(SINGLETON_NAME);
-    return aServiceNames;
-}
-
-
-
-
-cssu::Reference<cssu::XInterface> EventMultiplexer::impl_createFactory (
-    const cssu::Reference<cssl::XMultiServiceFactory>& rxServiceManager)
-{
-    return cppu::createSingleComponentFactory(
-        EventMultiplexer::static_CreateInstance,
-        EventMultiplexer::impl_getStaticImplementationName(),
-        EventMultiplexer::static_GetSupportedServiceNames()
-        );
-}
-
-
-
-
-cssu::Reference<cssu::XInterface> SAL_CALL EventMultiplexer::static_CreateInstance (
-    const cssu::Reference<cssu::XComponentContext>& rxComponentContext)
-    throw (cssu::Exception)
-{
-    EventMultiplexer* pObject = new EventMultiplexer(rxComponentContext);
-    cssu::Reference<cssu::XInterface> xService (static_cast<XWeak*>(pObject), cssu::UNO_QUERY);
-    return xService;
-}
-
-}  // end of namespace framework
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/ui/XContextChangeListener.idl b/offapi/com/sun/star/ui/XContextChangeListener.idl
deleted file mode 100644
index 204a0c6..0000000
--- a/offapi/com/sun/star/ui/XContextChangeListener.idl
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_util_XEventListener_idl__
-#define __com_sun_star_util_XEventListener_idl__
-
-#ifndef __com_sun_star_uno_XInterface_idl__
-#include <com/sun/star/uno/XInterface.idl>
-#endif
-
-#ifndef __com_sun_star_lang_XEventListener_idl__
-#include <com/sun/star/lang/XEventListener.idl>
-#endif
-
-#ifndef __com_sun_star_lang_EventObject_idl__
-#include <com/sun/star/lang/EventObject.idl>
-#endif
-
-module com { module sun { module star { module util {
-
-/** Generic event listener.
-*/
-interface XEventListener : ::com::sun::star::lang::XEventListener
-{
-    void notifyEvent (
-        [in] com::sun::star::lang::EventObject event);
-} ;
-
-} ; } ; } ; } ;
-
-#endif
diff --git a/offapi/com/sun/star/util/EventMultiplexer.idl b/offapi/com/sun/star/util/EventMultiplexer.idl
deleted file mode 100644
index db8d128..0000000
--- a/offapi/com/sun/star/util/EventMultiplexer.idl
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_util_EventMultiplexer_idl__
-#define __com_sun_star_util_EventMultiplexer_idl__
-
-#ifndef __com_sun_star_util_XEventMultiplexer_idl__
-#include <com/sun/star/util/XEventMultiplexer.idl>
-#endif
-
-module com {  module sun {  module star {  module util {
-
-/** Multiplex generic events.
-*/
-service EventMultiplexer : com::sun::star::util::XEventMultiplexer
-{
-};
-
-}; }; }; }; // com.sun.star.util
-
-#endif


More information about the Libreoffice-commits mailing list