summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-07 14:55:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-08 08:27:49 +0200
commit6ce4cf4ca87a2a7d0bbba6f7c94619de3e493263 (patch)
tree526e530bf674ce34de3e139b2634b94669572a27
parent81c150f3e5a48040fb194f1d5b10349ef8fcefb1 (diff)
use cppu::WeakImplHelper in ScCellRangesBase
Change-Id: Ic1f380ef1ace1e3d57853e070e00c91a19d831db Reviewed-on: https://gerrit.libreoffice.org/80410 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/inc/cellsuno.hxx38
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx58
2 files changed, 15 insertions, 81 deletions
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)