Simplify ScCellRangesBase and descendants

Change-Id: I2416ab8a9263bd7858e0d62055067b3c6132e0b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178093
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2024-12-08 20:07:09 +05:00
parent 06e81f5783
commit 98352eda9b
4 changed files with 69 additions and 428 deletions

View file

@ -371,10 +371,11 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};
class UNLESS_MERGELIBS(SC_DLLPUBLIC) ScCellRangesObj final : public ScCellRangesBase,
public css::sheet::XSheetCellRangeContainer,
public css::container::XNameContainer,
public css::container::XEnumerationAccess
using ScCellRangesObj_BASE = cppu::ImplInheritanceHelper<ScCellRangesBase,
css::sheet::XSheetCellRangeContainer,
css::container::XNameContainer,
css::container::XEnumerationAccess>;
class UNLESS_MERGELIBS(SC_DLLPUBLIC) ScCellRangesObj final : public ScCellRangesObj_BASE
{
public:
struct ScNamedEntry
@ -394,11 +395,6 @@ public:
ScCellRangesObj(ScDocShell* pDocSh, const ScRangeList& rR);
virtual ~ScCellRangesObj() override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
IF_MERGELIBS(SC_DLLPUBLIC)
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
virtual void RefChanged() override;
// XSheetCellRanges
@ -448,30 +444,27 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
class SAL_DLLPUBLIC_RTTI ScCellRangeObj : public ScCellRangesBase,
public css::sheet::XCellRangeAddressable,
public css::sheet::XSheetCellRange,
public css::sheet::XArrayFormulaRange,
public css::sheet::XArrayFormulaTokens,
public css::sheet::XCellRangeData,
public css::sheet::XCellRangeFormula,
public css::sheet::XMultipleOperation,
public css::util::XMergeable,
public css::sheet::XCellSeries,
public css::table::XAutoFormattable,
public css::util::XSortable,
public css::sheet::XSheetFilterableEx,
public css::sheet::XSubTotalCalculatable,
public css::util::XImportable,
public css::sheet::XCellFormatRangesSupplier,
public css::sheet::XUniqueCellFormatRangesSupplier,
public css::table::XColumnRowRange
using ScCellRangeObj_BASE = cppu::ImplInheritanceHelper<ScCellRangesBase,
css::sheet::XCellRangeAddressable,
css::sheet::XSheetCellRange,
css::sheet::XArrayFormulaRange,
css::sheet::XArrayFormulaTokens,
css::sheet::XCellRangeData,
css::sheet::XCellRangeFormula,
css::sheet::XMultipleOperation,
css::util::XMergeable,
css::sheet::XCellSeries,
css::table::XAutoFormattable,
css::util::XSortable,
css::sheet::XSheetFilterableEx,
css::sheet::XSubTotalCalculatable,
css::util::XImportable,
css::sheet::XCellFormatRangesSupplier,
css::sheet::XUniqueCellFormatRangesSupplier,
css::table::XColumnRowRange>;
class SAL_DLLPUBLIC_RTTI ScCellRangeObj : public ScCellRangeObj_BASE
{
private:
const SfxItemPropertySet* pRangePropSet;
@ -502,11 +495,6 @@ public:
static css::uno::Reference<css::table::XCellRange>
CreateRangeFromDoc( const ScDocument& rDoc, const ScRange& rR );
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
virtual void RefChanged() override;
// XCellRangeAddressable
@ -619,23 +607,20 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
//! really derive cell from range?
class SAL_DLLPUBLIC_RTTI ScCellObj final : public ScCellRangeObj,
public css::text::XText,
public css::container::XEnumerationAccess,
public css::table::XCell2,
public css::sheet::XFormulaTokens,
public css::sheet::XCellAddressable,
public css::sheet::XSheetAnnotationAnchor,
public css::text::XTextFieldsSupplier,
public css::document::XActionLockable
using ScCellObj_BASE = cppu::ImplInheritanceHelper<ScCellRangeObj,
css::text::XText,
css::container::XEnumerationAccess,
css::table::XCell2,
css::sheet::XFormulaTokens,
css::sheet::XCellAddressable,
css::sheet::XSheetAnnotationAnchor,
css::text::XTextFieldsSupplier,
css::document::XActionLockable>;
class SAL_DLLPUBLIC_RTTI ScCellObj final : public ScCellObj_BASE
{
private:
rtl::Reference<SvxUnoText> mxUnoText;
@ -665,10 +650,6 @@ public:
ScCellObj(ScDocShell* pDocSh, const ScAddress& rP);
virtual ~ScCellObj() override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
virtual void RefChanged() override;
SvxUnoText& GetUnoText();
@ -749,10 +730,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
// XActionLockable
virtual sal_Bool SAL_CALL isActionLocked() override;
virtual void SAL_CALL addActionLock() override;
@ -761,26 +738,27 @@ public:
virtual sal_Int16 SAL_CALL resetActionLocks() override;
};
class SAL_DLLPUBLIC_RTTI ScTableSheetObj final : public ScCellRangeObj,
public css::sheet::XSpreadsheet,
public css::container::XNamed,
public css::sheet::XSheetPageBreak,
public css::sheet::XCellRangeMovement,
public css::table::XTableChartsSupplier,
public css::table::XTablePivotChartsSupplier,
public css::sheet::XDataPilotTablesSupplier,
public css::sheet::XScenariosSupplier,
public css::sheet::XSheetAnnotationsSupplier,
public css::drawing::XDrawPageSupplier,
public css::sheet::XPrintAreas,
public css::sheet::XSheetLinkable,
public css::sheet::XSheetAuditing,
public css::sheet::XSheetOutline,
public css::util::XProtectable,
public css::sheet::XScenario,
public css::sheet::XScenarioEnhanced,
public css::sheet::XExternalSheetName,
public css::document::XEventsSupplier
using ScTableSheetObj_BASE = cppu::ImplInheritanceHelper<ScCellRangeObj,
css::sheet::XSpreadsheet,
css::container::XNamed,
css::sheet::XSheetPageBreak,
css::sheet::XCellRangeMovement,
css::table::XTableChartsSupplier,
css::table::XTablePivotChartsSupplier,
css::sheet::XDataPilotTablesSupplier,
css::sheet::XScenariosSupplier,
css::sheet::XSheetAnnotationsSupplier,
css::drawing::XDrawPageSupplier,
css::sheet::XPrintAreas,
css::sheet::XSheetLinkable,
css::sheet::XSheetAuditing,
css::sheet::XSheetOutline,
css::util::XProtectable,
css::sheet::XScenario,
css::sheet::XScenarioEnhanced,
css::sheet::XExternalSheetName,
css::document::XEventsSupplier>;
class SAL_DLLPUBLIC_RTTI ScTableSheetObj final : public ScTableSheetObj_BASE
{
friend class ScTableSheetsObj; // for insertByName()
@ -802,10 +780,6 @@ public:
void InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab);
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
// XSpreadsheet
virtual css::uno::Reference< css::sheet::XSheetCellCursor >
SAL_CALL createCursor() override;
@ -952,14 +926,11 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
class ScTableColumnObj final : public ScCellRangeObj,
public css::container::XNamed
using ScTableColumnObj_BASE = cppu::ImplInheritanceHelper<ScCellRangeObj,
css::container::XNamed>;
class ScTableColumnObj final : public ScTableColumnObj_BASE
{
private:
const SfxItemPropertySet* pColPropSet;
@ -974,11 +945,6 @@ public:
ScTableColumnObj(ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab);
virtual ~ScTableColumnObj() override;
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
// XNamed
virtual OUString SAL_CALL getName() override;
virtual void SAL_CALL setName( const OUString& aName ) override;
@ -991,10 +957,6 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
class ScTableRowObj final : public ScCellRangeObj

View file

@ -24,20 +24,16 @@
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
#include <com/sun/star/sheet/XUsedAreaCursor.hpp>
class ScCellCursorObj final : public ScCellRangeObj,
public css::sheet::XSheetCellCursor,
public css::sheet::XUsedAreaCursor,
public css::table::XCellCursor
using ScCellCursorObj_BASE = cppu::ImplInheritanceHelper<ScCellRangeObj,
css::sheet::XSheetCellCursor,
css::sheet::XUsedAreaCursor,
css::table::XCellCursor>;
class ScCellCursorObj final : public ScCellCursorObj_BASE
{
public:
ScCellCursorObj(ScDocShell* pDocSh, const ScRange& rR);
virtual ~ScCellCursorObj() override;
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
// XSheetCellCursor
virtual void SAL_CALL collapseToCurrentRegion() override;
virtual void SAL_CALL collapseToCurrentArray() override;
@ -75,10 +71,6 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -3927,7 +3927,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
}
ScCellRangesObj::ScCellRangesObj(ScDocShell* pDocSh, const ScRangeList& rR)
: ScCellRangesBase(pDocSh, rR)
: ScCellRangesObj_BASE(pDocSh, rR)
{
}
@ -3940,51 +3940,6 @@ void ScCellRangesObj::RefChanged()
ScCellRangesBase::RefChanged();
}
uno::Any SAL_CALL ScCellRangesObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<sheet::XSheetCellRangeContainer*>(this),
static_cast<sheet::XSheetCellRanges*>(this),
static_cast<container::XIndexAccess*>(this),
static_cast<container::XElementAccess*>(static_cast<container::XIndexAccess*>(this)),
static_cast<container::XEnumerationAccess*>(this),
static_cast<container::XNameContainer*>(this),
static_cast<container::XNameReplace*>(this),
static_cast<container::XNameAccess*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangesBase::queryInterface( rType );
}
void SAL_CALL ScCellRangesObj::acquire() noexcept
{
ScCellRangesBase::acquire();
}
void SAL_CALL ScCellRangesObj::release() noexcept
{
ScCellRangesBase::release();
}
uno::Sequence<uno::Type> SAL_CALL ScCellRangesObj::getTypes()
{
static const uno::Sequence<uno::Type> aTypes = comphelper::concatSequences(
ScCellRangesBase::getTypes(),
uno::Sequence<uno::Type>
{
cppu::UnoType<sheet::XSheetCellRangeContainer>::get(),
cppu::UnoType<container::XNameContainer>::get(),
cppu::UnoType<container::XEnumerationAccess>::get()
} );
return aTypes;
}
uno::Sequence<sal_Int8> SAL_CALL ScCellRangesObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// XCellRanges
rtl::Reference<ScCellRangeObj> ScCellRangesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
@ -4490,7 +4445,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( const ScDo
}
ScCellRangeObj::ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR) :
ScCellRangesBase( pDocSh, rR ),
ScCellRangeObj_BASE( pDocSh, rR ),
pRangePropSet( lcl_GetRangePropertySet() ),
aRange( rR )
{
@ -4515,76 +4470,6 @@ void ScCellRangeObj::RefChanged()
}
}
uno::Any SAL_CALL ScCellRangeObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<sheet::XCellRangeAddressable*>(this),
static_cast<table::XCellRange*>(this),
static_cast<sheet::XSheetCellRange*>(this),
static_cast<sheet::XArrayFormulaRange*>(this),
static_cast<sheet::XArrayFormulaTokens*>(this),
static_cast<sheet::XCellRangeData*>(this),
static_cast<sheet::XCellRangeFormula*>(this),
static_cast<sheet::XMultipleOperation*>(this),
static_cast<util::XMergeable*>(this),
static_cast<sheet::XCellSeries*>(this),
static_cast<table::XAutoFormattable*>(this),
static_cast<util::XSortable*>(this),
static_cast<sheet::XSheetFilterableEx*>(this),
static_cast<sheet::XSheetFilterable*>(this),
static_cast<sheet::XSubTotalCalculatable*>(this),
static_cast<table::XColumnRowRange*>(this),
static_cast<util::XImportable*>(this),
static_cast<sheet::XCellFormatRangesSupplier*>(this),
static_cast<sheet::XUniqueCellFormatRangesSupplier*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangesBase::queryInterface( rType );
}
void SAL_CALL ScCellRangeObj::acquire() noexcept
{
ScCellRangesBase::acquire();
}
void SAL_CALL ScCellRangeObj::release() noexcept
{
ScCellRangesBase::release();
}
uno::Sequence<uno::Type> SAL_CALL ScCellRangeObj::getTypes()
{
static const uno::Sequence<uno::Type> aTypes = comphelper::concatSequences(
ScCellRangesBase::getTypes(),
uno::Sequence<uno::Type>
{
cppu::UnoType<sheet::XCellRangeAddressable>::get(),
cppu::UnoType<sheet::XSheetCellRange>::get(),
cppu::UnoType<sheet::XArrayFormulaRange>::get(),
cppu::UnoType<sheet::XArrayFormulaTokens>::get(),
cppu::UnoType<sheet::XCellRangeData>::get(),
cppu::UnoType<sheet::XCellRangeFormula>::get(),
cppu::UnoType<sheet::XMultipleOperation>::get(),
cppu::UnoType<util::XMergeable>::get(),
cppu::UnoType<sheet::XCellSeries>::get(),
cppu::UnoType<table::XAutoFormattable>::get(),
cppu::UnoType<util::XSortable>::get(),
cppu::UnoType<sheet::XSheetFilterableEx>::get(),
cppu::UnoType<sheet::XSubTotalCalculatable>::get(),
cppu::UnoType<table::XColumnRowRange>::get(),
cppu::UnoType<util::XImportable>::get(),
cppu::UnoType<sheet::XCellFormatRangesSupplier>::get(),
cppu::UnoType<sheet::XUniqueCellFormatRangesSupplier>::get()
} );
return aTypes;
}
uno::Sequence<sal_Int8> SAL_CALL ScCellRangeObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// XCellRange
// ColumnCount / RowCount vanished
@ -5713,7 +5598,7 @@ const SfxItemPropertyMap& ScCellObj::GetCellPropertyMap()
}
ScCellObj::ScCellObj(ScDocShell* pDocSh, const ScAddress& rP) :
ScCellRangeObj( pDocSh, ScRange(rP,rP) ),
ScCellObj_BASE( pDocSh, ScRange(rP,rP) ),
pCellPropSet( lcl_GetCellPropertySet() ),
aCellPos( rP ),
nActionLockCount( 0 )
@ -5754,61 +5639,6 @@ void ScCellObj::RefChanged()
}
}
uno::Any SAL_CALL ScCellObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<table::XCell*>(this),
static_cast<table::XCell2*>(this),
static_cast<sheet::XFormulaTokens*>(this),
static_cast<sheet::XCellAddressable*>(this),
static_cast<text::XText*>(this),
static_cast<text::XSimpleText*>(this),
static_cast<text::XTextRange*>(this),
static_cast<container::XEnumerationAccess*>(this),
static_cast<container::XElementAccess*>(this),
static_cast<sheet::XSheetAnnotationAnchor*>(this),
static_cast<text::XTextFieldsSupplier*>(this),
static_cast<document::XActionLockable*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangeObj::queryInterface( rType );
}
void SAL_CALL ScCellObj::acquire() noexcept
{
ScCellRangeObj::acquire();
}
void SAL_CALL ScCellObj::release() noexcept
{
ScCellRangeObj::release();
}
uno::Sequence<uno::Type> SAL_CALL ScCellObj::getTypes()
{
static const uno::Sequence<uno::Type> aTypes = comphelper::concatSequences(
ScCellRangeObj::getTypes(),
uno::Sequence<uno::Type>
{
cppu::UnoType<table::XCell>::get(),
cppu::UnoType<sheet::XCellAddressable>::get(),
cppu::UnoType<text::XText>::get(),
cppu::UnoType<container::XEnumerationAccess>::get(),
cppu::UnoType<sheet::XSheetAnnotationAnchor>::get(),
cppu::UnoType<text::XTextFieldsSupplier>::get(),
cppu::UnoType<document::XActionLockable>::get(),
cppu::UnoType<sheet::XFormulaTokens>::get(),
cppu::UnoType<table::XCell2>::get()
} );
return aTypes;
}
uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// helper methods
OUString ScCellObj::GetInputString_Impl(bool bEnglish) const // for getFormula / FormulaLocal
@ -6496,7 +6326,7 @@ static ScRange MaxDocRange(ScDocShell* pDocSh, SCTAB nTab)
}
ScTableSheetObj::ScTableSheetObj( ScDocShell* pDocSh, SCTAB nTab ) :
ScCellRangeObj( pDocSh, MaxDocRange(pDocSh, nTab) ),
ScTableSheetObj_BASE( pDocSh, MaxDocRange(pDocSh, nTab) ),
pSheetPropSet(lcl_GetSheetPropertySet())
{
}
@ -6511,78 +6341,6 @@ void ScTableSheetObj::InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab)
InitInsertRange( pDocSh, ScRange(0,0,nTab, rDoc.MaxCol(),rDoc.MaxRow(),nTab) );
}
uno::Any SAL_CALL ScTableSheetObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<sheet::XSpreadsheet*>(this),
static_cast<container::XNamed*>(this),
static_cast<sheet::XSheetPageBreak*>(this),
static_cast<sheet::XCellRangeMovement*>(this),
static_cast<table::XTableChartsSupplier*>(this),
static_cast<sheet::XDataPilotTablesSupplier*>(this),
static_cast<sheet::XScenariosSupplier*>(this),
static_cast<sheet::XSheetAnnotationsSupplier*>(this),
static_cast<drawing::XDrawPageSupplier*>(this),
static_cast<sheet::XPrintAreas*>(this),
static_cast<sheet::XSheetAuditing*>(this),
static_cast<sheet::XSheetOutline*>(this),
static_cast<util::XProtectable*>(this),
static_cast<sheet::XScenario*>(this),
static_cast<sheet::XScenarioEnhanced*>(this),
static_cast<sheet::XSheetLinkable*>(this),
static_cast<sheet::XExternalSheetName*>(this),
static_cast<document::XEventsSupplier*>(this),
static_cast<table::XTablePivotChartsSupplier*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangeObj::queryInterface( rType );
}
void SAL_CALL ScTableSheetObj::acquire() noexcept
{
ScCellRangeObj::acquire();
}
void SAL_CALL ScTableSheetObj::release() noexcept
{
ScCellRangeObj::release();
}
uno::Sequence<uno::Type> SAL_CALL ScTableSheetObj::getTypes()
{
static const uno::Sequence<uno::Type> aTypes = comphelper::concatSequences(
ScCellRangeObj::getTypes(),
uno::Sequence<uno::Type>
{
cppu::UnoType<sheet::XSpreadsheet>::get(),
cppu::UnoType<container::XNamed>::get(),
cppu::UnoType<sheet::XSheetPageBreak>::get(),
cppu::UnoType<sheet::XCellRangeMovement>::get(),
cppu::UnoType<table::XTableChartsSupplier>::get(),
cppu::UnoType<sheet::XDataPilotTablesSupplier>::get(),
cppu::UnoType<sheet::XScenariosSupplier>::get(),
cppu::UnoType<sheet::XSheetAnnotationsSupplier>::get(),
cppu::UnoType<drawing::XDrawPageSupplier>::get(),
cppu::UnoType<sheet::XPrintAreas>::get(),
cppu::UnoType<sheet::XSheetAuditing>::get(),
cppu::UnoType<sheet::XSheetOutline>::get(),
cppu::UnoType<util::XProtectable>::get(),
cppu::UnoType<sheet::XScenario>::get(),
cppu::UnoType<sheet::XScenarioEnhanced>::get(),
cppu::UnoType<sheet::XSheetLinkable>::get(),
cppu::UnoType<sheet::XExternalSheetName>::get(),
cppu::UnoType<document::XEventsSupplier>::get(),
cppu::UnoType<table::XTablePivotChartsSupplier>::get()
} );
return aTypes;
}
uno::Sequence<sal_Int8> SAL_CALL ScTableSheetObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// Helper functions
SCTAB ScTableSheetObj::GetTab_Impl() const
@ -8247,7 +8005,7 @@ uno::Sequence<OUString> SAL_CALL ScTableSheetObj::getSupportedServiceNames()
}
ScTableColumnObj::ScTableColumnObj( ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab ) :
ScCellRangeObj( pDocSh, ScRange(nCol,0,nTab, nCol, pDocSh->GetDocument().MaxRow(),nTab) ),
ScTableColumnObj_BASE( pDocSh, ScRange(nCol,0,nTab, nCol, pDocSh->GetDocument().MaxRow(),nTab) ),
pColPropSet(lcl_GetColumnPropertySet())
{
}
@ -8256,38 +8014,6 @@ ScTableColumnObj::~ScTableColumnObj()
{
}
uno::Any SAL_CALL ScTableColumnObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<container::XNamed*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangeObj::queryInterface( rType );
}
void SAL_CALL ScTableColumnObj::acquire() noexcept
{
ScCellRangeObj::acquire();
}
void SAL_CALL ScTableColumnObj::release() noexcept
{
ScCellRangeObj::release();
}
uno::Sequence<uno::Type> SAL_CALL ScTableColumnObj::getTypes()
{
return comphelper::concatSequences(
ScCellRangeObj::getTypes(),
uno::Sequence<uno::Type> { cppu::UnoType<container::XNamed>::get() } );
}
uno::Sequence<sal_Int8> SAL_CALL ScTableColumnObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// XNamed
OUString SAL_CALL ScTableColumnObj::getName()

View file

@ -32,7 +32,7 @@ constexpr OUString SCSHEETCELLCURSOR_SERVICE = u"com.sun.star.sheet.SheetCellCur
constexpr OUString SCCELLCURSOR_SERVICE = u"com.sun.star.table.CellCursor"_ustr;
ScCellCursorObj::ScCellCursorObj(ScDocShell* pDocSh, const ScRange& rR) :
ScCellRangeObj( pDocSh, rR )
ScCellCursorObj_BASE( pDocSh, rR )
{
}
@ -40,45 +40,6 @@ ScCellCursorObj::~ScCellCursorObj()
{
}
uno::Any SAL_CALL ScCellCursorObj::queryInterface( const uno::Type& rType )
{
uno::Any aReturn = ::cppu::queryInterface(rType,
static_cast<sheet::XSheetCellCursor*>(this),
static_cast<sheet::XUsedAreaCursor*>(this),
static_cast<table::XCellCursor*>(this));
if ( aReturn.hasValue() )
return aReturn;
return ScCellRangeObj::queryInterface( rType );
}
void SAL_CALL ScCellCursorObj::acquire() noexcept
{
ScCellRangeObj::acquire();
}
void SAL_CALL ScCellCursorObj::release() noexcept
{
ScCellRangeObj::release();
}
uno::Sequence<uno::Type> SAL_CALL ScCellCursorObj::getTypes()
{
return comphelper::concatSequences(
ScCellRangeObj::getTypes(),
uno::Sequence<uno::Type>
{
cppu::UnoType<sheet::XSheetCellCursor>::get(),
cppu::UnoType<sheet::XUsedAreaCursor>::get(),
cppu::UnoType<table::XCellCursor>::get()
} );
}
uno::Sequence<sal_Int8> SAL_CALL ScCellCursorObj::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// XSheetCellCursor
void SAL_CALL ScCellCursorObj::collapseToCurrentRegion()