summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-15 15:48:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-17 10:49:09 +0200
commit5774c6f4bb365a690049713307481d9a63aa20a6 (patch)
tree10a7326ae7dab9d47e45f07935280b2ab3d17f42 /sc/source
parentd8ca58f46a99d4502f75ce8177b09d2841ce3489 (diff)
ColumnStorageDumper ctor never called with null ScDocument*
Change-Id: I0d2e2c4b556bb6a3baba6a1fa663a48da8290cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102885 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/column2.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index ef354cd943bf..8e209b65eeb1 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1661,9 +1661,9 @@ namespace {
struct ColumnStorageDumper
{
- const ScDocument* mpDoc;
+ const ScDocument& mrDoc;
- ColumnStorageDumper( const ScDocument* pDoc ) : mpDoc(pDoc) {}
+ ColumnStorageDumper( const ScDocument& rDoc ) : mrDoc(rDoc) {}
void operator() (const sc::CellStoreType::value_type& rNode) const
{
@@ -1732,7 +1732,7 @@ struct ColumnStorageDumper
void printFormula(const ScFormulaCell* pCell) const
{
- sc::TokenStringContext aCxt(mpDoc, mpDoc->GetGrammar());
+ sc::TokenStringContext aCxt(&mrDoc, mrDoc.GetGrammar());
OUString aFormula = pCell->GetCode()->CreateString(aCxt, pCell->aPos);
cout << " * formula: " << aFormula << endl;
}
@@ -1773,7 +1773,7 @@ struct ColumnStorageDumper
void ScColumn::DumpColumnStorage() const
{
cout << "-- table: " << nTab << "; column: " << nCol << endl;
- std::for_each(maCells.begin(), maCells.end(), ColumnStorageDumper(&GetDoc()));
+ std::for_each(maCells.begin(), maCells.end(), ColumnStorageDumper(GetDoc()));
cout << "--" << endl;
}
#endif