summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-24 09:13:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-24 16:24:51 +0200
commitfe1ea3f546a539787d7f5e9c25fcf47dc0cbe2c0 (patch)
tree3b52b05a162921d0ea21b0e09e64cd82d07ec03d /sc/inc
parent85af9e1d7a5820b989b004594e5462093b300021 (diff)
some places where ScDocument* is never passed a nullptr
Change-Id: Ie06fef80990b539d5b6cc87c80d9bbd3e851766c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/chartarr.hxx4
-rw-r--r--sc/inc/chartpos.hxx6
-rw-r--r--sc/inc/conditio.hxx4
-rw-r--r--sc/inc/dbdocutl.hxx2
-rw-r--r--sc/inc/docpool.hxx2
-rw-r--r--sc/inc/filter.hxx2
-rw-r--r--sc/inc/fmtuno.hxx2
-rw-r--r--sc/inc/formulacell.hxx4
-rw-r--r--sc/inc/patattr.hxx2
-rw-r--r--sc/inc/reftokenhelper.hxx4
10 files changed, 16 insertions, 16 deletions
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index c06400c34c69..c35fc4a6e66e 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -57,14 +57,14 @@ public:
class ScChartArray // only parameter-struct
{
- ScDocument* pDocument;
+ ScDocument& rDocument;
ScChartPositioner aPositioner;
private:
std::unique_ptr<ScMemChart> CreateMemChartSingle();
std::unique_ptr<ScMemChart> CreateMemChartMulti();
public:
- ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList );
+ ScChartArray( ScDocument& rDoc, const ScRangeListRef& rRangeList );
const ScRangeListRef& GetRangeList() const { return aPositioner.GetRangeList(); }
const ScChartPositionMap* GetPositionMap() { return aPositioner.GetPositionMap(); }
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx
index 0069b1a80c50..ab953ef1461a 100644
--- a/sc/inc/chartpos.hxx
+++ b/sc/inc/chartpos.hxx
@@ -103,7 +103,7 @@ class ScDocument;
class ScChartPositioner final // only parameter struct
{
ScRangeListRef aRangeListRef;
- ScDocument* pDocument;
+ ScDocument& rDocument;
std::unique_ptr<ScChartPositionMap> pPositionMap;
ScChartGlue eGlue;
SCCOL nStartCol;
@@ -118,10 +118,10 @@ class ScChartPositioner final // only parameter struct
void CreatePositionMap();
public:
- ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
+ ScChartPositioner( ScDocument& rDoc, SCTAB nTab,
SCCOL nStartColP, SCROW nStartRowP,
SCCOL nEndColP, SCROW nEndRowP );
- ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rRangeList );
+ ScChartPositioner( ScDocument& rDoc, const ScRangeListRef& rRangeList );
ScChartPositioner( const ScChartPositioner& rPositioner );
~ScChartPositioner();
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 364538749910..6a6339336907 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -668,8 +668,8 @@ public:
ScRangeList GetCombinedRange() const;
- void RemoveFromDocument(ScDocument* pDoc) const;
- void AddToDocument(ScDocument* pDoc) const;
+ void RemoveFromDocument(ScDocument& rDoc) const;
+ void AddToDocument(ScDocument& rDoc) const;
iterator begin();
const_iterator begin() const;
diff --git a/sc/inc/dbdocutl.hxx b/sc/inc/dbdocutl.hxx
index 8ceb525b2bc2..759490eeda03 100644
--- a/sc/inc/dbdocutl.hxx
+++ b/sc/inc/dbdocutl.hxx
@@ -40,7 +40,7 @@ public:
StrData();
};
- static void PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
+ static void PutData( ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
const css::uno::Reference< css::sdbc::XRow>& xRow,
long nRowPos,
long nType, bool bCurrency, StrData* pStrData = nullptr );
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index 75989a1beb77..9c3a6edcc50a 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -42,7 +42,7 @@ public:
virtual MapUnit GetMetric( sal_uInt16 nWhich ) const override;
void StyleDeleted( const ScStyleSheet* pStyle ); // delete templates(?) in organizer
- void CellStyleCreated( const OUString& rName, const ScDocument* pDoc );
+ void CellStyleCreated( const OUString& rName, const ScDocument& rDoc );
virtual bool GetPresentation( const SfxPoolItem& rItem,
MapUnit ePresentationMetric,
OUString& rText,
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 25a4c6e2cc56..b92c98c16cf8 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -73,7 +73,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
// various import helpers
virtual std::unique_ptr<ScEEAbsImport> CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0;
virtual std::unique_ptr<ScEEAbsImport> CreateHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const ScRange& rRange ) = 0;
- virtual OUString GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ) = 0;
+ virtual OUString GetHTMLRangeNameList( ScDocument& rDoc, const OUString& rOrigName ) = 0;
// various export filters
virtual ErrCode ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) = 0;
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index f67af17e947e..38c306ac26e5 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -190,7 +190,7 @@ private:
public:
ScTableValidationObj() = delete;
- ScTableValidationObj(const ScDocument* pDoc, sal_uLong nKey,
+ ScTableValidationObj(const ScDocument& rDoc, sal_uLong nKey,
const formula::FormulaGrammar::Grammar eGrammar);
virtual ~ScTableValidationObj() override;
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 68176a37cd5b..9be8b84df8a9 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -332,9 +332,9 @@ public:
*/
svl::SharedString GetRawString() const;
const ScMatrix* GetMatrix();
- bool GetMatrixOrigin( const ScDocument* pDoc, ScAddress& rPos ) const;
+ bool GetMatrixOrigin( const ScDocument& rDoc, ScAddress& rPos ) const;
void GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows );
- sc::MatrixEdge GetMatrixEdge( const ScDocument* pDoc, ScAddress& rOrgPos ) const;
+ sc::MatrixEdge GetMatrixEdge( const ScDocument& rDoc, ScAddress& rOrgPos ) const;
FormulaError GetErrCode(); // interpret first if necessary
FormulaError GetRawError() const; // don't interpret, just return code or result error
bool GetErrorOrValue( FormulaError& rErr, double& rVal );
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 1c21460f0351..d6c21e07ac01 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -125,7 +125,7 @@ public:
void SetStyleSheet(ScStyleSheet* pNewStyle, bool bClearDirectFormat = true);
const ScStyleSheet* GetStyleSheet() const { return pStyle; }
const OUString* GetStyleName() const;
- void UpdateStyleSheet(const ScDocument* pDoc);
+ void UpdateStyleSheet(const ScDocument& rDoc);
void StyleToName();
bool IsVisible() const;
diff --git a/sc/inc/reftokenhelper.hxx b/sc/inc/reftokenhelper.hxx
index c8ba9acca9b0..28af075a4258 100644
--- a/sc/inc/reftokenhelper.hxx
+++ b/sc/inc/reftokenhelper.hxx
@@ -61,8 +61,8 @@ namespace ScRefTokenHelper
bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScTokenRef& pToken);
- ScTokenRef createRefToken(const ScDocument* pDoc, const ScAddress& rAddr);
- ScTokenRef createRefToken(const ScDocument* pDoc, const ScRange& rRange);
+ ScTokenRef createRefToken(const ScDocument& rDoc, const ScAddress& rAddr);
+ ScTokenRef createRefToken(const ScDocument& rDoc, const ScRange& rRange);
};
#endif