[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 14 07:59:07 UTC 2020
sc/inc/fmtuno.hxx | 2 +-
sc/source/ui/unoobj/cellsuno.cxx | 2 +-
sc/source/ui/unoobj/fmtuno.cxx | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit f9cf09f7bf17b5996b3b246c39cd22ba0ec2f82c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 20:02:38 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 09:58:20 2020 +0200
CreateValidationData never called with a null ScDocument*
Change-Id: I4681e7ede552575913e06311b7cd23fad4c56be6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102610
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 0819fe5a016f..f67af17e947e 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -194,7 +194,7 @@ public:
const formula::FormulaGrammar::Grammar eGrammar);
virtual ~ScTableValidationObj() override;
- ScValidationData* CreateValidationData( ScDocument* pDoc,
+ ScValidationData* CreateValidationData( ScDocument& rDoc,
formula::FormulaGrammar::Grammar eGrammar ) const;
// XSheetCondition
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7425705096a3..86a2ca68d1a6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2353,7 +2353,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
std::unique_ptr<ScValidationData> pNewData(
- pValidObj->CreateValidationData( &rDoc, eGrammar ));
+ pValidObj->CreateValidationData( rDoc, eGrammar ));
sal_uLong nIndex = rDoc.AddValidationEntry( *pNewData );
pNewData.reset();
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index f8a363541109..766438ee9d2e 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -583,7 +583,7 @@ ScTableValidationObj::ScTableValidationObj(const ScDocument* pDoc, sal_uLong nKe
ClearData_Impl(); // Defaults
}
-ScValidationData* ScTableValidationObj::CreateValidationData( ScDocument* pDoc,
+ScValidationData* ScTableValidationObj::CreateValidationData( ScDocument& rDoc,
formula::FormulaGrammar::Grammar eGrammar ) const
{
// ScValidationData = Core-Struktur
@@ -593,7 +593,7 @@ ScValidationData* ScTableValidationObj::CreateValidationData( ScDocument* pDoc,
ScValidationData* pRet = new ScValidationData( static_cast<ScValidationMode>(nValMode),
nMode,
- aExpr1, aExpr2, pDoc, aSrcPos,
+ aExpr1, aExpr2, &rDoc, aSrcPos,
maExprNmsp1, maExprNmsp2,
eGrammar1, eGrammar2 );
pRet->SetIgnoreBlank(bIgnoreBlank);
@@ -601,15 +601,15 @@ ScValidationData* ScTableValidationObj::CreateValidationData( ScDocument* pDoc,
if ( aTokens1.hasElements() )
{
- ScTokenArray aTokenArray(*pDoc);
- if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aTokens1) )
+ ScTokenArray aTokenArray(rDoc);
+ if ( ScTokenConversion::ConvertToTokenArray(rDoc, aTokenArray, aTokens1) )
pRet->SetFormula1(aTokenArray);
}
if ( aTokens2.hasElements() )
{
- ScTokenArray aTokenArray(*pDoc);
- if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aTokens2) )
+ ScTokenArray aTokenArray(rDoc);
+ if ( ScTokenConversion::ConvertToTokenArray(rDoc, aTokenArray, aTokens2) )
pRet->SetFormula2(aTokenArray);
}
More information about the Libreoffice-commits
mailing list