basctl/inc/pch/precompiled_basctl.hxx | 1 chart2/inc/pch/precompiled_chartcontroller.hxx | 1 comphelper/Library_comphelper.mk | 1 comphelper/source/misc/weak.cxx | 57 ---------------------- cui/inc/pch/precompiled_cui.hxx | 1 include/comphelper/weak.hxx | 64 ------------------------- include/svl/style.hxx | 5 - reportdesign/inc/pch/precompiled_rpt.hxx | 1 reportdesign/inc/pch/precompiled_rptui.hxx | 1 sc/inc/pch/precompiled_sc.hxx | 1 sd/inc/pch/precompiled_sdui.hxx | 1 slideshow/inc/pch/precompiled_slideshow.hxx | 1 solenv/clang-format/excludelist | 2 svl/source/items/style.cxx | 4 - svx/inc/pch/precompiled_svx.hxx | 1 sw/inc/pch/precompiled_msword.hxx | 1 sw/inc/pch/precompiled_sw.hxx | 1 sw/inc/pch/precompiled_vbaswobj.hxx | 1 18 files changed, 4 insertions(+), 141 deletions(-)
New commits: commit 4beea25b0797fe9c9acf05e9e4ef926d0726582a Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Nov 21 12:58:55 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Nov 21 19:35:40 2022 +0100 Drop comphelper::OWeakTypeObject, use cppu::WeakImplHelper<> instead Change-Id: Ie4152d7736ae3f2ffdd3489cd7a444e5035d2422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143030 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx index a92d3a0870f5..4f3566f3f6ea 100644 --- a/basctl/inc/pch/precompiled_basctl.hxx +++ b/basctl/inc/pch/precompiled_basctl.hxx @@ -351,7 +351,6 @@ #include <comphelper/solarmutex.hxx> #include <comphelper/string.hxx> #include <comphelper/uno3.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index b87950ae5bf1..6839b807696d 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -285,7 +285,6 @@ #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/uno3.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk index ffa06369ddbd..6d0536058882 100644 --- a/comphelper/Library_comphelper.mk +++ b/comphelper/Library_comphelper.mk @@ -136,7 +136,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/syntaxhighlight \ comphelper/source/misc/threadpool \ comphelper/source/misc/types \ - comphelper/source/misc/weak \ comphelper/source/misc/weakeventlistener \ comphelper/source/misc/xmlsechelper \ comphelper/source/officeinstdir/officeinstallationdirectories \ diff --git a/comphelper/source/misc/weak.cxx b/comphelper/source/misc/weak.cxx deleted file mode 100644 index 02cf40e2b646..000000000000 --- a/comphelper/source/misc/weak.cxx +++ /dev/null @@ -1,57 +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 <comphelper/weak.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; - -namespace comphelper -{ - -OWeakTypeObject::OWeakTypeObject() -{ -} - -OWeakTypeObject::~OWeakTypeObject() -{ -} - -Any SAL_CALL OWeakTypeObject::queryInterface(const Type & rType ) -{ - if( rType == cppu::UnoType<XTypeProvider>::get() ) - return Any( Reference< XTypeProvider >(this) ); - else - return ::cppu::OWeakObject::queryInterface( rType ); -} - -Sequence< Type > SAL_CALL OWeakTypeObject::getTypes( ) -{ - return Sequence< Type >(); -} - -Sequence< ::sal_Int8 > SAL_CALL OWeakTypeObject::getImplementationId( ) -{ - return Sequence< ::sal_Int8 >(); -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index 7de8ace33474..6553c5874b1a 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -266,7 +266,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/string.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/cppuhelperdllapi.h> diff --git a/include/comphelper/weak.hxx b/include/comphelper/weak.hxx deleted file mode 100644 index 28a23445dd53..000000000000 --- a/include/comphelper/weak.hxx +++ /dev/null @@ -1,64 +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 INCLUDED_COMPHELPER_WEAK_HXX -#define INCLUDED_COMPHELPER_WEAK_HXX - -#include <comphelper/comphelperdllapi.h> - -#include <com/sun/star/lang/XTypeProvider.hpp> -#include <cppuhelper/weak.hxx> - -namespace comphelper -{ -/** Base class to implement a UNO object supporting types and weak references, i.e. the object can be held - weakly (by a css::uno::WeakReference). - This implementation copes with reference counting. Upon last release(), the virtual dtor - is called. - - In addition to the features from cppu::OWeakObject, derivations from this class can - also used as a base class for ::cppu::ImplInheritanceHelper? -*/ -class COMPHELPER_DLLPUBLIC OWeakTypeObject : public ::cppu::OWeakObject, public css::lang::XTypeProvider -{ -public: - OWeakTypeObject(); - virtual ~OWeakTypeObject() override; - - OWeakTypeObject(OWeakTypeObject const &) = default; - OWeakTypeObject(OWeakTypeObject &&) = default; - OWeakTypeObject & operator =(OWeakTypeObject const &) = default; - OWeakTypeObject & operator =(OWeakTypeObject &&) = default; - - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() noexcept override - { ::cppu::OWeakObject::acquire(); } - virtual void SAL_CALL release() noexcept override - { ::cppu::OWeakObject::release(); } - - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) override; - -}; - -} - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 29127eb77356..db265fc98340 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <rtl/ref.hxx> -#include <comphelper/weak.hxx> #include <cppuhelper/implbase.hxx> #include <svl/svldllapi.h> #include <svl/hint.hxx> @@ -113,7 +112,7 @@ SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) from: SfxStyleSheetBasePool::Clear() */ -class SVL_DLLPUBLIC SfxStyleSheetBase : public comphelper::OWeakTypeObject +class SVL_DLLPUBLIC SfxStyleSheetBase : public cppu::WeakImplHelper<> { private: friend class SfxStyleSheetBasePool; @@ -224,7 +223,7 @@ friend class SfxStyleSheetBasePool; class SfxStyleSheetBasePool_Impl; -class SVL_DLLPUBLIC SfxStyleSheetBasePool: public SfxBroadcaster, public comphelper::OWeakTypeObject +class SVL_DLLPUBLIC SfxStyleSheetBasePool: public SfxBroadcaster, public cppu::WeakImplHelper<> { friend class SfxStyleSheetIterator; friend class SfxStyleSheetBase; diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx index 52d9e2c3f225..d58b548163ae 100644 --- a/reportdesign/inc/pch/precompiled_rpt.hxx +++ b/reportdesign/inc/pch/precompiled_rpt.hxx @@ -201,7 +201,6 @@ #include <comphelper/interfacecontainer4.hxx> #include <comphelper/sequence.hxx> #include <comphelper/uno3.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx index ac4d60fb4cec..561a56432e90 100644 --- a/reportdesign/inc/pch/precompiled_rptui.hxx +++ b/reportdesign/inc/pch/precompiled_rptui.hxx @@ -276,7 +276,6 @@ #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include <comphelper/types.hxx> -#include <comphelper/weak.hxx> #include <connectivity/dbtools.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index bddde686d5e4..bf57c56fdbfb 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -284,7 +284,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/uno3.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx index 562100449806..a0ca2927e3d8 100644 --- a/sd/inc/pch/precompiled_sdui.hxx +++ b/sd/inc/pch/precompiled_sdui.hxx @@ -314,7 +314,6 @@ #include <comphelper/interfacecontainer3.hxx> #include <comphelper/interfacecontainer4.hxx> #include <comphelper/servicehelper.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index f5e790b52558..2134b1a0ae84 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -215,7 +215,6 @@ #include <comphelper/compbase.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/interfacecontainer4.hxx> -#include <comphelper/weak.hxx> #include <cppcanvas/basegfxfactory.hxx> #include <cppcanvas/bitmap.hxx> #include <cppcanvas/bitmapcanvas.hxx> diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index b50d8bf4f4f0..bbd9e3f72a6a 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -1419,7 +1419,6 @@ comphelper/source/misc/string.cxx comphelper/source/misc/synchronousdispatch.cxx comphelper/source/misc/syntaxhighlight.cxx comphelper/source/misc/threadpool.cxx -comphelper/source/misc/weak.cxx comphelper/source/misc/weakeventlistener.cxx comphelper/source/misc/xmlsechelper.cxx comphelper/source/officeinstdir/officeinstallationdirectories.cxx @@ -4946,7 +4945,6 @@ include/comphelper/types.hxx include/comphelper/unique_disposing_ptr.hxx include/comphelper/uno3.hxx include/comphelper/unwrapargs.hxx -include/comphelper/weak.hxx include/comphelper/weakbag.hxx include/comphelper/weakeventlistener.hxx include/comphelper/windowsStart.hxx diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index dfa2ada7e88c..4f4ae926f461 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -118,7 +118,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const OUString& rName, SfxStyleSheetBasePo } SfxStyleSheetBase::SfxStyleSheetBase( const SfxStyleSheetBase& r ) - : comphelper::OWeakTypeObject(r) + : WeakImplHelper() , m_pPool( r.m_pPool ) , nFamily( r.nFamily ) , aName( r.aName ) @@ -564,7 +564,7 @@ SfxStyleSheetBasePool::SfxStyleSheetBasePool( SfxItemPool& r ) : SfxStyleSheetBasePool::SfxStyleSheetBasePool( const SfxStyleSheetBasePool& r ) : SfxBroadcaster( r ), - comphelper::OWeakTypeObject(r), + WeakImplHelper(), pImpl(new SfxStyleSheetBasePool_Impl), rPool(r.rPool) { diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index d1243143ac9b..8f83a82187d6 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -217,7 +217,6 @@ #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> -#include <comphelper/weak.hxx> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/cppuhelperdllapi.h> diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx index 1fd81643c451..e1e4b0a4f0ac 100644 --- a/sw/inc/pch/precompiled_msword.hxx +++ b/sw/inc/pch/precompiled_msword.hxx @@ -311,7 +311,6 @@ #include <comphelper/sequence.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/string.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 0c50e04bb69a..7ef065db0814 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -226,7 +226,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/compbase.hxx> diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx index 3769612d9e2d..0f6c09d6150c 100644 --- a/sw/inc/pch/precompiled_vbaswobj.hxx +++ b/sw/inc/pch/precompiled_vbaswobj.hxx @@ -269,7 +269,6 @@ #include <comphelper/interfacecontainer4.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/solarmutex.hxx> -#include <comphelper/weak.hxx> #include <cppu/cppudllapi.h> #include <cppu/unotype.hxx> #include <cppuhelper/cppuhelperdllapi.h>