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 <sbergman@redhat.com>
This commit is contained in:
parent
fd0f6a4e83
commit
4beea25b07
18 changed files with 4 additions and 141 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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: */
|
|
@ -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>
|
||||
|
|
|
@ -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: */
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue