summaryrefslogtreecommitdiff
path: root/sc/inc/externalrefmgr.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-02-16 11:05:38 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-02-17 01:13:52 +0100
commit6267a995ea5a621f5f147e5866b6af9cdd205b9c (patch)
tree97ce13066eea1d901e80469ffa7a29da0360de16 /sc/inc/externalrefmgr.hxx
parentf3b2dd0fc4c413c9a8382aecbd8b7f842bfa8c28 (diff)
remove MAXCOL/MAXROW from ScExternalRefCache
The range is used just for filtering out, and since this is about references to other documents, I wasn't sure which document to use as the limits, so I did a copy that of the functions that returns all. Change-Id: I9711534004796496558848adef03d38ddb115441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129988 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/externalrefmgr.hxx')
-rw-r--r--sc/inc/externalrefmgr.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 1064910ad975..20931043bfd1 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -144,11 +144,13 @@ public:
void setReferenced( bool bReferenced );
bool isReferenced() const;
/// Obtain a sorted vector of rows.
- void getAllRows(::std::vector<SCROW>& rRows, SCROW nLow = 0, SCROW nHigh = MAXROW) const;
+ void getAllRows(::std::vector<SCROW>& rRows, SCROW nLow, SCROW nHigh) const;
+ void getAllRows(::std::vector<SCROW>& rRows) const;
/// Returns the half-open range of used rows in this table. Returns [0,0) if table is empty.
SC_DLLPUBLIC ::std::pair< SCROW, SCROW > getRowRange() const;
/// Obtain a sorted vector of columns.
- void getAllCols(SCROW nRow, ::std::vector<SCCOL>& rCols, SCCOL nLow = 0, SCCOL nHigh = MAXCOL) const;
+ void getAllCols(SCROW nRow, ::std::vector<SCCOL>& rCols, SCCOL nLow, SCCOL nHigh) const;
+ void getAllCols(SCROW nRow, ::std::vector<SCCOL>& rCols) const;
/// Returns the half-open range of used columns in the specified row. Returns [0,0) if row is empty.
SC_DLLPUBLIC ::std::pair< SCCOL, SCCOL > getColRange( SCROW nRow ) const;
void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
@@ -168,6 +170,10 @@ public:
private:
bool isInCachedRanges(SCCOL nCol, SCROW nRow) const;
TokenRef getEmptyOrNullToken(SCCOL nCol, SCROW nRow) const;
+ template< typename P >
+ void getAllRows(::std::vector<SCROW>& rRows, P predicate) const;
+ template< typename P >
+ void getAllCols(SCROW nRow, ::std::vector<SCCOL>& rCols, P predicate) const;
private:
/** Data cache */