67 uno::Sequence<uno::Type>
77 return css::uno::Sequence<sal_Int8>();
86 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
87 ScRange aOneRange( rRanges[ 0 ] );
101 nTab, nStartCol, nStartRow, nEndCol, nEndRow,
true,
false );
103 ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
111 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
112 ScRange aOneRange( rRanges[ 0 ] );
126 SetNewRange( aMatrix );
146 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
147 ScRange aNewRange( rRanges[ 0 ] );
153 SetNewRange( aNewRange );
161 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
162 ScRange aNewRange( rRanges[ 0 ] );
165 aNewRange.
aEnd.
SetRow( GetDocShell()->GetDocument().MaxRow() );
167 SetNewRange( aNewRange );
174 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
175 ScRange aNewRange( rRanges[ 0 ] );
178 aNewRange.
aEnd.
SetCol( GetDocShell()->GetDocument().MaxCol() );
180 SetNewRange( aNewRange );
186 if ( nColumns <= 0 || nRows <= 0 )
188 OSL_FAIL(
"Empty range not allowed");
194 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
195 ScRange aNewRange( rRanges[ 0 ] );
199 const auto & rDoc = GetDocShell()->GetDocument();
202 if ( nEndX < 0 ) nEndX = 0;
203 if ( nEndX > rDoc.MaxCol() ) nEndX = rDoc.MaxCol();
204 if ( nEndY < 0 ) nEndY = 0;
205 if ( nEndY > rDoc.MaxRow() ) nEndY = rDoc.MaxRow();
213 SetNewRange( aNewRange );
227 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
228 ScRange aNewRange( rRanges[0] );
243 SetNewRange( aNewRange );
254 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
255 ScRange aNewRange( rRanges[ 0 ]);
270 SetNewRange( aNewRange );
282 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
283 ScRange aOneRange( rRanges[ 0 ]);
297 nTab, nStartCol, nStartRow, nEndCol, nEndRow,
false,
false );
299 ScRange aNew( nStartCol, nStartRow, nTab );
310 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
311 ScRange aOneRange( rRanges[ 0 ] );
325 nTab, nStartCol, nStartRow, nEndCol, nEndRow,
false,
false );
327 ScRange aNew( nEndCol, nEndRow, nTab );
335 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
336 ScRange aOneRange( rRanges[ 0 ] );
341 ScMarkData aMark(GetDocument()->GetSheetLimits());
350 SetNewRange(
ScRange( nNewX, nNewY, nTab ) );
357 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
358 ScRange aOneRange( rRanges[ 0 ] );
363 ScMarkData aMark(GetDocument()->GetSheetLimits());
372 SetNewRange(
ScRange( nNewX, nNewY, nTab ) );
379 OSL_ENSURE( rRanges.
size() == 1,
"Range? Ranges?" );
380 ScRange aOneRange( rRanges[ 0 ] );
383 const auto & rDoc = GetDocShell()->GetDocument();
384 if ( aOneRange.
aStart.
Col() + nColumnOffset >= 0 &&
385 aOneRange.
aEnd.
Col() + nColumnOffset <= rDoc.MaxCol() &&
386 aOneRange.
aStart.
Row() + nRowOffset >= 0 &&
387 aOneRange.
aEnd.
Row() + nRowOffset <= rDoc.MaxRow() )
392 static_cast<SCCOL>(aOneRange.
aEnd.
Col() + nColumnOffset),
410 sal_Int32 nColumn, sal_Int32 nRow )
417 sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
424 const OUString& rRange )
434 return "ScCellCursorObj";
445 return comphelper::concatSequences<OUString>(
virtual void SAL_CALL gotoEndOfUsedArea(sal_Bool bExpand) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL collapseToSize(sal_Int32 nColumns, sal_Int32 nRows) override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual css::uno::Reference< css::sheet::XSpreadsheet > SAL_CALL getSpreadsheet() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL gotoEnd() override
virtual void SAL_CALL gotoPrevious() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual ~ScCellCursorObj() override
virtual void SAL_CALL expandToEntireRows() override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL gotoStartOfUsedArea(sal_Bool bExpand) override
ScCellCursorObj(ScDocShell *pDocSh, const ScRange &rR)
virtual void SAL_CALL collapseToMergedArea() override
virtual void SAL_CALL collapseToCurrentRegion() override
virtual void SAL_CALL expandToEntireColumns() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL collapseToCurrentArray() override
virtual void SAL_CALL gotoOffset(sal_Int32 nColumnOffset, sal_Int32 nRowOffset) override
virtual void SAL_CALL gotoNext() override
virtual void SAL_CALL gotoStart() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::sheet::XSpreadsheet > SAL_CALL getSpreadsheet() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
const ScDocument & GetDocument() const
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
SC_DLLPUBLIC void GetNextPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData &rMark, SCCOL nTabStartCol=SC_TABSTART_NONE) const
SC_DLLPUBLIC void ExtendOverlapped(SCCOL &rStartCol, SCROW &rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
css::uno::Type const & get()
constexpr OUStringLiteral SCCELLCURSOR_SERVICE
constexpr OUStringLiteral SCSHEETCELLCURSOR_SERVICE
#define SC_QUERYINTERFACE(x)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)