[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 14 08:01:57 UTC 2020
sc/inc/compiler.hxx | 2 +-
sc/source/core/tool/compiler.cxx | 6 +++---
sc/source/filter/excel/xeformula.cxx | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 7223a0c1b87e865c75961fd837abce9b6ed15592
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 20:18:55 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 10:01:13 2020 +0200
ScCompiler::MoveRelWrap never passed a null ScDocument*
Change-Id: I8a5847877bf3de458a9ec81ed02602f067c3a279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102615
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 91933ae7865c..f702749d36a8 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -463,7 +463,7 @@ public:
const ScAddress& GetPos() const { return aPos; }
void MoveRelWrap();
- static void MoveRelWrap( const ScTokenArray& rArr, const ScDocument* pDoc, const ScAddress& rPos,
+ static void MoveRelWrap( const ScTokenArray& rArr, const ScDocument& rDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow );
/** If the character is allowed as tested by nFlags (SC_COMPILER_C_...
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 337c936690fd..f47d142e4382 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5007,15 +5007,15 @@ void ScCompiler::MoveRelWrap()
// Wrap-adjust relative references of a RangeName to current position,
// don't call for other token arrays!
-void ScCompiler::MoveRelWrap( const ScTokenArray& rArr, const ScDocument* pDoc, const ScAddress& rPos,
+void ScCompiler::MoveRelWrap( const ScTokenArray& rArr, const ScDocument& rDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow )
{
for ( auto t: rArr.References() )
{
if ( t->GetType() == svSingleRef || t->GetType() == svExternalSingleRef )
- ScRefUpdate::MoveRelWrap( *pDoc, rPos, nMaxCol, nMaxRow, SingleDoubleRefModifier( *t->GetSingleRef() ).Ref() );
+ ScRefUpdate::MoveRelWrap( rDoc, rPos, nMaxCol, nMaxRow, SingleDoubleRefModifier( *t->GetSingleRef() ).Ref() );
else
- ScRefUpdate::MoveRelWrap( *pDoc, rPos, nMaxCol, nMaxRow, *t->GetDoubleRef() );
+ ScRefUpdate::MoveRelWrap( rDoc, rPos, nMaxCol, nMaxRow, *t->GetDoubleRef() );
}
}
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index c1c2d1b1c943..f2edeffb263c 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -597,7 +597,7 @@ void XclExpFmlaCompImpl::Init( XclFormulaType eType, const ScTokenArray& rScTokA
{
// clone the passed token array, convert references relative to current cell position
mxData->mxOwnScTokArr = rScTokArr.Clone();
- ScCompiler::MoveRelWrap( *mxData->mxOwnScTokArr, &GetDoc(), *pScBasePos, GetDoc().MaxCol(), GetDoc().MaxRow() );
+ ScCompiler::MoveRelWrap( *mxData->mxOwnScTokArr, GetDoc(), *pScBasePos, GetDoc().MaxCol(), GetDoc().MaxRow() );
// don't remember pScBasePos in mxData->mpScBasePos, shared formulas use real relative refs
}
break;
More information about the Libreoffice-commits
mailing list