convert SolverComponent to comphelper::WeakImplHelper

Change-Id: Ia5accd94c3a3b498aa31829832110ec07b780112
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165493
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2024-03-27 11:35:04 +02:00
parent 973d1d8887
commit 2b7e49aa5d
2 changed files with 8 additions and 10 deletions

View File

@@ -89,7 +89,6 @@ double SolverComponent::GetValue( const uno::Reference<sheet::XSpreadsheetDocume
} }
SolverComponent::SolverComponent() : SolverComponent::SolverComponent() :
OPropertyContainer( GetBroadcastHelper() ),
mbMaximize( true ), mbMaximize( true ),
mbNonNegative( false ), mbNonNegative( false ),
mbInteger( false ), mbInteger( false ),
@@ -111,8 +110,8 @@ SolverComponent::~SolverComponent()
{ {
} }
IMPLEMENT_FORWARD_XINTERFACE2( SolverComponent, SolverComponent_Base, OPropertyContainer ) IMPLEMENT_FORWARD_XINTERFACE2( SolverComponent, SolverComponent_Base, comphelper::OPropertyContainer2 )
IMPLEMENT_FORWARD_XTYPEPROVIDER2( SolverComponent, SolverComponent_Base, OPropertyContainer ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( SolverComponent, SolverComponent_Base, comphelper::OPropertyContainer2 )
cppu::IPropertyArrayHelper* SolverComponent::createArrayHelper() const cppu::IPropertyArrayHelper* SolverComponent::createArrayHelper() const
{ {
@@ -121,7 +120,7 @@ cppu::IPropertyArrayHelper* SolverComponent::createArrayHelper() const
return new cppu::OPropertyArrayHelper( aProps ); return new cppu::OPropertyArrayHelper( aProps );
} }
cppu::IPropertyArrayHelper& SAL_CALL SolverComponent::getInfoHelper() cppu::IPropertyArrayHelper& SolverComponent::getInfoHelper()
{ {
return *getArrayHelper(); return *getArrayHelper();
} }

View File

@@ -24,8 +24,8 @@
#include <com/sun/star/table/CellAddress.hpp> #include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <comphelper/broadcasthelper.hxx> #include <comphelper/compbase.hxx>
#include <comphelper/propertycontainer.hxx> #include <comphelper/propertycontainer2.hxx>
#include <comphelper/proparrhlp.hxx> #include <comphelper/proparrhlp.hxx>
#include <unotools/resmgr.hxx> #include <unotools/resmgr.hxx>
@@ -53,14 +53,13 @@ struct ScSolverCellEqual
typedef std::unordered_map< css::table::CellAddress, std::vector<double>, ScSolverCellHash, ScSolverCellEqual > ScSolverCellHashMap; typedef std::unordered_map< css::table::CellAddress, std::vector<double>, ScSolverCellHash, ScSolverCellEqual > ScSolverCellHashMap;
typedef cppu::WeakImplHelper< typedef comphelper::WeakImplHelper<
css::sheet::XSolver, css::sheet::XSolver,
css::sheet::XSolverDescription, css::sheet::XSolverDescription,
css::lang::XServiceInfo > css::lang::XServiceInfo >
SolverComponent_Base; SolverComponent_Base;
class SolverComponent : public comphelper::OMutexAndBroadcastHelper, class SolverComponent : public comphelper::OPropertyContainer2,
public comphelper::OPropertyContainer,
public comphelper::OPropertyArrayUsageHelper< SolverComponent >, public comphelper::OPropertyArrayUsageHelper< SolverComponent >,
public SolverComponent_Base public SolverComponent_Base
{ {
@@ -102,7 +101,7 @@ public:
DECLARE_XTYPEPROVIDER() DECLARE_XTYPEPROVIDER()
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; // from OPropertySetHelper virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override; // from OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override; // from OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override; // from OPropertyArrayUsageHelper
// XSolver // XSolver