summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-28 13:08:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-29 14:22:48 +0100
commit0ef5c47547bec6319b853326603f3b807407fe78 (patch)
treeced33b9ae621fa1cd807f8647a5149eed8bc743b /sc/inc
parent07bde58988705ca45a619eb7a4e670a5d951abf6 (diff)
sc: rowcol: tdf#50916 convert core/tool
Change-Id: I0fe5a7ef4a79d0832802945ce1b9da4752f1d5fc Reviewed-on: https://gerrit.libreoffice.org/81598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/address.hxx18
-rw-r--r--sc/inc/chgtrack.hxx4
-rw-r--r--sc/inc/compiler.hxx4
-rw-r--r--sc/inc/markdata.hxx4
-rw-r--r--sc/inc/rangenam.hxx2
-rw-r--r--sc/inc/refdata.hxx16
-rw-r--r--sc/inc/sharedformula.hxx2
-rw-r--r--sc/inc/tokenarray.hxx6
8 files changed, 31 insertions, 25 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 6a4c5570c877..ec63932c5fc6 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -550,9 +550,11 @@ public:
SC_DLLPUBLIC ScRefFlags ParseAny( const OUString&, const ScDocument*,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- SC_DLLPUBLIC ScRefFlags ParseCols( const OUString&,
+ SC_DLLPUBLIC ScRefFlags ParseCols( const ScDocument* pDoc,
+ const OUString&,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- SC_DLLPUBLIC void ParseRows( const OUString&,
+ SC_DLLPUBLIC void ParseRows( const ScDocument* pDoc,
+ const OUString&,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
/** Parse an Excel style reference up to and including the sheet name
@@ -623,11 +625,11 @@ public:
ScRange& rErrorRange, const ScDocument* pDocument = nullptr );
/** Same as Move() but with sticky end col/row anchors. */
- [[nodiscard]] SC_DLLPUBLIC bool MoveSticky( SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ,
+ [[nodiscard]] SC_DLLPUBLIC bool MoveSticky( const ScDocument* pDoc, SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ,
ScRange& rErrorRange );
- SC_DLLPUBLIC void IncColIfNotLessThan(SCCOL nStartCol, SCCOL nOffset);
- SC_DLLPUBLIC void IncRowIfNotLessThan(SCROW nStartRow, SCROW nOffset);
+ SC_DLLPUBLIC void IncColIfNotLessThan(const ScDocument* pDoc, SCCOL nStartCol, SCCOL nOffset);
+ SC_DLLPUBLIC void IncRowIfNotLessThan(const ScDocument* pDoc, SCROW nStartRow, SCROW nOffset);
SC_DLLPUBLIC void ExtendTo( const ScRange& rRange );
SC_DLLPUBLIC bool Intersects( const ScRange& rRange ) const; // do two ranges intersect?
@@ -642,12 +644,12 @@ public:
/** Increment or decrement end column unless sticky or until it becomes
sticky. Checks if the range encompasses at least two columns so should
be called before adjusting the start column. */
- void IncEndColSticky( SCCOL nDelta );
+ void IncEndColSticky( const ScDocument* pDoc, SCCOL nDelta );
/** Increment or decrement end row unless sticky or until it becomes
sticky. Checks if the range encompasses at least two rows so should
be called before adjusting the start row. */
- void IncEndRowSticky( SCROW nDelta );
+ void IncEndRowSticky( const ScDocument* pDoc, SCROW nDelta );
inline bool operator==( const ScRange& rRange ) const;
inline bool operator!=( const ScRange& rRange ) const;
@@ -977,7 +979,7 @@ inline OUString ScColToAlpha( SCCOL nCol )
}
/// get column number of A..IV... string
-bool AlphaToCol( SCCOL& rCol, const OUString& rStr);
+bool AlphaToCol( const ScDocument* pDoc, SCCOL& rCol, const OUString& rStr);
#endif // INCLUDED_SC_INC_ADDRESS_HXX
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 502d463a6c3e..730cedc20cd0 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -369,7 +369,7 @@ class SAL_DLLPUBLIC_RTTI ScChangeActionIns : public ScChangeAction
bool const mbEndOfList; /// whether or not a row was auto-inserted at the bottom.
- ScChangeActionIns( const ScRange& rRange, bool bEndOfList = false );
+ ScChangeActionIns( const ScDocument* pDoc, const ScRange& rRange, bool bEndOfList = false );
virtual void AddContent( ScChangeActionContent* ) override {}
virtual void DeleteCellEntries() override {}
@@ -439,7 +439,7 @@ class ScChangeActionDel final : public ScChangeAction
SCCOL nDx;
SCROW nDy;
- ScChangeActionDel( const ScRange& rRange, SCCOL nDx, SCROW nDy, ScChangeTrack* );
+ ScChangeActionDel( const ScDocument* pDoc, const ScRange& rRange, SCCOL nDx, SCROW nDy, ScChangeTrack* );
virtual void AddContent( ScChangeActionContent* ) override;
virtual void DeleteCellEntries() override;
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 8be539a606f6..b45af659ecab 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -165,7 +165,7 @@ public:
false. Used only in ScCompiler::NextNewToken() to preserve non-existing
sheet names in otherwise valid references.
*/
- bool IsValidReference() const;
+ bool IsValidReference(const ScDocument* pDoc) const;
formula::FormulaToken* CreateToken() const; // create typified token
};
@@ -189,6 +189,7 @@ public:
virtual ~Convention();
virtual void makeRefStr(
+ const ScDocument* pDoc,
OUStringBuffer& rBuffer,
formula::FormulaGrammar::Grammar eGram,
const ScAddress& rPos,
@@ -219,6 +220,7 @@ public:
const OUString& rTabName, const ScSingleRefData& rRef ) const = 0;
virtual void makeExternalRefStr(
+ const ScDocument* pDoc,
OUStringBuffer& rBuffer, const ScAddress& rPos,
sal_uInt16 nFileId, const OUString& rFileName, const std::vector<OUString>& rTabNames,
const OUString& rTabName, const ScComplexRefData& rRef ) const = 0;
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index 2052c23daa52..b605c8a1bbf7 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -140,8 +140,8 @@ public:
void InsertTab( SCTAB nTab );
void DeleteTab( SCTAB nTab );
- void ShiftCols(SCCOL nStartCol, long nColOffset);
- void ShiftRows(SCROW nStartRow, long nRowOffset);
+ void ShiftCols(const ScDocument* pDoc, SCCOL nStartCol, long nColOffset);
+ void ShiftRows(const ScDocument* pDoc, SCROW nStartRow, long nRowOffset);
// Generate envelopes if multimarked and fills the passed ScRange object with
// the smallest range that includes the marked area plus its envelopes.
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 4ca0054050fd..93d9e49effd4 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -153,7 +153,7 @@ public:
void ValidateTabRefs();
- static void MakeValidName( OUString& rName );
+ static void MakeValidName( const ScDocument* pDoc, OUString& rName );
SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, const ScDocument* pDoc );
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 1274636d17da..f46e13e60821 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -90,14 +90,14 @@ public:
void SetRelName( bool bVal ) { Flags.bRelName = bVal; }
bool IsRelName() const { return Flags.bRelName; }
- bool Valid() const;
- bool ColValid() const;
- bool RowValid() const;
+ bool Valid(const ScDocument* pDoc) const;
+ bool ColValid(const ScDocument* pDoc) const;
+ bool RowValid(const ScDocument* pDoc) const;
bool TabValid() const;
/** In external references nTab is -1 if the external document was not
loaded but the sheet was cached, or >=0 if the external document was
loaded. */
- bool ValidExternal() const;
+ bool ValidExternal(const ScDocument* pDoc) const;
ScAddress toAbs( const ScAddress& rPos ) const;
void SetAddress( const ScAddress& rAddr, const ScAddress& rPos );
@@ -144,12 +144,12 @@ struct ScComplexRefData
/// InitFlags and set range, relative to rPos if rRef1 and rRef2 say so.
void InitFromRefAddresses( const ScRefAddress& rRef1, const ScRefAddress& rRef2, const ScAddress& rPos );
- bool Valid() const;
+ bool Valid(const ScDocument* pDoc) const;
/** In external references nTab is -1 for the start tab and -1 for the end
tab if one sheet and the external document was not loaded but sheet was
cached, or >=0 also if more than one sheets. */
- bool ValidExternal() const;
+ bool ValidExternal(const ScDocument* pDoc) const;
/** Whether this references entire columns, A:A */
bool IsEntireCol() const
@@ -185,12 +185,12 @@ struct ScComplexRefData
/** Increment or decrement end column unless or until sticky.
@see ScRange::IncEndColSticky()
@return TRUE if changed. */
- bool IncEndColSticky( SCCOL nDelta, const ScAddress& rPos );
+ bool IncEndColSticky( const ScDocument* pDoc, SCCOL nDelta, const ScAddress& rPos );
/** Increment or decrement end row unless or until sticky.
@see ScRange::IncEndRowSticky()
@return TRUE if changed. */
- bool IncEndRowSticky( SCROW nDelta, const ScAddress& rPos );
+ bool IncEndRowSticky( const ScDocument* pDoc, SCROW nDelta, const ScAddress& rPos );
bool IsDeleted() const;
diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
index b7c9577b2dfa..b8ba5555812d 100644
--- a/sc/inc/sharedformula.hxx
+++ b/sc/inc/sharedformula.hxx
@@ -128,7 +128,7 @@ public:
* @param rCells cell storage container
* @param rRows row positions at which to unshare formula cells.
*/
- static void unshareFormulaCells(CellStoreType& rCells, std::vector<SCROW>& rRows);
+ static void unshareFormulaCells(const ScDocument* pDoc, CellStoreType& rCells, std::vector<SCROW>& rRows);
/**
* Have all formula cells belonging to a group start listening to their
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 721577866214..151655c3ebc5 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -90,7 +90,9 @@ public:
/** Determines the extent of direct adjacent
references. Only use with real functions, e.g.
GetOuterFuncOpCode() == ocSum ! */
- bool GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
+ bool GetAdjacentExtendOfOuterFuncRefs(
+ const ScDocument* pDoc,
+ SCCOLROW& nExtend,
const ScAddress& rPos, ScDirection );
formula::FormulaToken* AddRawToken( const ScRawToken& );
@@ -251,7 +253,7 @@ public:
* Create a string representation of formula token array without modifying
* the internal state of the token array.
*/
- OUString CreateString( sc::TokenStringContext& rCxt, const ScAddress& rPos ) const;
+ OUString CreateString( const ScDocument* pDoc, sc::TokenStringContext& rCxt, const ScAddress& rPos ) const;
void WrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow );
bool NeedsWrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ) const;