[Libreoffice-commits] core.git: 3 commits - include/ucbhelper sc/inc sc/source ucbhelper/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 8 06:28:43 UTC 2019
include/ucbhelper/resultsethelper.hxx | 22 +--------
include/ucbhelper/resultsetmetadata.hxx | 19 -------
sc/inc/cellsuno.hxx | 38 ++++++---------
sc/source/ui/unoobj/cellsuno.cxx | 58 ------------------------
ucbhelper/source/provider/resultsethelper.cxx | 33 -------------
ucbhelper/source/provider/resultsetmetadata.cxx | 31 ------------
6 files changed, 21 insertions(+), 180 deletions(-)
New commits:
commit 6ce4cf4ca87a2a7d0bbba6f7c94619de3e493263
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:55:51 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:27:49 2019 +0200
use cppu::WeakImplHelper in ScCellRangesBase
Change-Id: Ic1f380ef1ace1e3d57853e070e00c91a19d831db
Reviewed-on: https://gerrit.libreoffice.org/80410
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 30d5d0038a6b..0c6790f39eb1 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -159,21 +159,21 @@ namespace ooo
}
}
-class SC_DLLPUBLIC ScCellRangesBase : public css::beans::XPropertySet,
- public css::beans::XMultiPropertySet,
- public css::beans::XPropertyState,
- public css::sheet::XSheetOperation,
- public css::chart::XChartDataArray,
- public css::util::XIndent,
- public css::sheet::XCellRangesQuery,
- public css::sheet::XFormulaQuery,
- public css::util::XReplaceable,
- public css::util::XModifyBroadcaster,
- public css::lang::XServiceInfo,
- public css::lang::XUnoTunnel,
- public css::lang::XTypeProvider,
- public css::beans::XTolerantMultiPropertySet,
- public cppu::OWeakObject,
+class SC_DLLPUBLIC ScCellRangesBase :
+ public cppu::WeakImplHelper<
+ css::beans::XPropertySet,
+ css::beans::XMultiPropertySet,
+ css::beans::XPropertyState,
+ css::sheet::XSheetOperation,
+ css::chart::XChartDataArray,
+ css::util::XIndent,
+ css::sheet::XCellRangesQuery,
+ css::sheet::XFormulaQuery,
+ css::util::XReplaceable,
+ css::util::XModifyBroadcaster,
+ css::lang::XServiceInfo,
+ css::lang::XUnoTunnel,
+ css::beans::XTolerantMultiPropertySet>,
public SfxListener
{
friend class ScTabViewObj; // for select()
@@ -239,10 +239,6 @@ public:
ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR);
virtual ~ScCellRangesBase() override;
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
-
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
virtual void RefChanged();
@@ -384,10 +380,6 @@ public:
// XUnoTunnel
UNO3_GETIMPLEMENTATION_DECL(ScCellRangesBase)
-
- // XTypeProvider
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
class SC_DLLPUBLIC ScCellRangesObj : public ScCellRangesBase,
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 737e5bcb4176..f7339ba9f568 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1723,64 +1723,6 @@ void ScCellRangesBase::SetCursorOnly( bool bSet )
bCursorOnly = bSet;
}
-uno::Any SAL_CALL ScCellRangesBase::queryInterface( const uno::Type& rType )
-{
- SC_QUERYINTERFACE( beans::XPropertySet )
- SC_QUERYINTERFACE( beans::XMultiPropertySet )
- SC_QUERYINTERFACE( beans::XTolerantMultiPropertySet )
- SC_QUERYINTERFACE( beans::XPropertyState )
- SC_QUERYINTERFACE( sheet::XSheetOperation )
- SC_QUERYINTERFACE( chart::XChartDataArray )
- SC_QUERYINTERFACE( chart::XChartData )
- SC_QUERYINTERFACE( util::XIndent )
- SC_QUERYINTERFACE( sheet::XCellRangesQuery )
- SC_QUERYINTERFACE( sheet::XFormulaQuery )
- SC_QUERYINTERFACE( util::XReplaceable )
- SC_QUERYINTERFACE( util::XSearchable )
- SC_QUERYINTERFACE( util::XModifyBroadcaster )
- SC_QUERYINTERFACE( lang::XServiceInfo )
- SC_QUERYINTERFACE( lang::XUnoTunnel )
- SC_QUERYINTERFACE( lang::XTypeProvider )
-
- return OWeakObject::queryInterface( rType );
-}
-
-void SAL_CALL ScCellRangesBase::acquire() throw()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ScCellRangesBase::release() throw()
-{
- OWeakObject::release();
-}
-
-uno::Sequence<uno::Type> SAL_CALL ScCellRangesBase::getTypes()
-{
- static uno::Sequence<uno::Type> const aTypes
- {
- cppu::UnoType<beans::XPropertySet>::get(),
- cppu::UnoType<beans::XMultiPropertySet>::get(),
- cppu::UnoType<beans::XPropertyState>::get(),
- cppu::UnoType<sheet::XSheetOperation>::get(),
- cppu::UnoType<chart::XChartDataArray>::get(),
- cppu::UnoType<util::XIndent>::get(),
- cppu::UnoType<sheet::XCellRangesQuery>::get(),
- cppu::UnoType<sheet::XFormulaQuery>::get(),
- cppu::UnoType<util::XReplaceable>::get(),
- cppu::UnoType<util::XModifyBroadcaster>::get(),
- cppu::UnoType<lang::XServiceInfo>::get(),
- cppu::UnoType<lang::XUnoTunnel>::get(),
- cppu::UnoType<lang::XTypeProvider>::get()
- };
- return aTypes;
-}
-
-uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId()
-{
- return css::uno::Sequence<sal_Int8>();
-}
-
void ScCellRangesBase::PaintGridRanges_Impl( )
{
for (size_t i = 0, nCount = aRanges.size(); i < nCount; ++i)
commit 81c150f3e5a48040fb194f1d5b10349ef8fcefb1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:50:38 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:27:40 2019 +0200
use cppu::WeakImplHelper in ResultSetMetaData
Change-Id: I28df6cd28ca099bb1a07c18a35eebd5529e094e9
Reviewed-on: https://gerrit.libreoffice.org/80409
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/ucbhelper/resultsetmetadata.hxx b/include/ucbhelper/resultsetmetadata.hxx
index a0d9d553bb51..7fecfafedb76 100644
--- a/include/ucbhelper/resultsetmetadata.hxx
+++ b/include/ucbhelper/resultsetmetadata.hxx
@@ -26,7 +26,7 @@
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
namespace com { namespace sun { namespace star {
@@ -71,9 +71,7 @@ ResultSetColumnData::ResultSetColumnData()
* implementations of service com.sun.star.ucb.ContentResultSet.
*/
class UCBHELPER_DLLPUBLIC ResultSetMetaData final :
- public ::cppu::OWeakObject,
- public css::lang::XTypeProvider,
- public css::sdbc::XResultSetMetaData
+ public cppu::WeakImplHelper<css::sdbc::XResultSetMetaData>
{
std::unique_ptr<ucbhelper_impl::ResultSetMetaData_Impl> m_pImpl;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -115,19 +113,6 @@ public:
*/
virtual ~ResultSetMetaData() override;
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
-
- // XTypeProvider
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL
- getImplementationId() override;
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL
- getTypes() override;
-
// XResultSetMetaData
/**
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index e8a8155b7365..fe3d2b7c1e1f 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -106,37 +106,6 @@ ResultSetMetaData::~ResultSetMetaData()
}
-// XInterface methods.
-
-void SAL_CALL ResultSetMetaData::acquire()
- throw()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ResultSetMetaData::release()
- throw()
-{
- OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL ResultSetMetaData::queryInterface( const css::uno::Type & rType )
-{
- css::uno::Any aRet = cppu::queryInterface( rType,
- static_cast< XTypeProvider* >(this),
- static_cast< XResultSetMetaData* >(this)
- );
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_2( ResultSetMetaData,
- XTypeProvider,
- XResultSetMetaData );
-
-
// XResultSetMetaData methods.
commit c1692639bcee2f3b0b0f03347f8743b8a7307300
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:49:16 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:27:22 2019 +0200
use cppu::WeakImplHelper in ResultSetImplHelper
Change-Id: If82ae3f5cee0ae893fd32ecafe3c7baf7ec00ed4
Reviewed-on: https://gerrit.libreoffice.org/80408
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/ucbhelper/resultsethelper.hxx b/include/ucbhelper/resultsethelper.hxx
index 15c74b4235c1..b297ebcebc82 100644
--- a/include/ucbhelper/resultsethelper.hxx
+++ b/include/ucbhelper/resultsethelper.hxx
@@ -26,7 +26,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
@@ -51,10 +51,9 @@ namespace ucbhelper {
* - all required interfaces for service css::ucb::DynamicResultSet
*/
class UCBHELPER_DLLPUBLIC ResultSetImplHelper :
- public cppu::OWeakObject,
- public css::lang::XTypeProvider,
- public css::lang::XServiceInfo,
- public css::ucb::XDynamicResultSet
+ public cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::ucb::XDynamicResultSet>
{
std::unique_ptr<cppu::OInterfaceContainerHelper> m_pDisposeEventListeners;
bool m_bStatic;
@@ -128,19 +127,6 @@ public:
*/
virtual ~ResultSetImplHelper() override;
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
-
- // XTypeProvider
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL
- getImplementationId() override;
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL
- getTypes() override;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx
index 279bbc4deb84..e9c97dff46e7 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -65,39 +65,6 @@ ResultSetImplHelper::~ResultSetImplHelper()
}
-// XInterface methods.
-void SAL_CALL ResultSetImplHelper::acquire()
- throw()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ResultSetImplHelper::release()
- throw()
-{
- OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL ResultSetImplHelper::queryInterface( const css::uno::Type & rType )
-{
- css::uno::Any aRet = cppu::queryInterface( rType,
- static_cast< lang::XTypeProvider* >(this),
- static_cast< lang::XServiceInfo* >(this),
- static_cast< lang::XComponent* >(this),
- static_cast< css::ucb::XDynamicResultSet* >(this)
- );
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_3( ResultSetImplHelper,
- lang::XTypeProvider,
- lang::XServiceInfo,
- css::ucb::XDynamicResultSet );
-
-
// XServiceInfo methods.
OUString SAL_CALL ResultSetImplHelper::getImplementationName()
More information about the Libreoffice-commits
mailing list