diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 19:16:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-17 15:04:06 +0200 |
commit | 44af87f7392792e045e5afe5df19e946ef81241b (patch) | |
tree | 464e5b1821859bb3bd3b7188ba3d75d00a171b43 /sc/source/ui/vba | |
parent | d7ef802bbb3b2f01fdbf7af6da50d272bcf0abd1 (diff) |
ScCompiler ctors never passed a null ScDocument*
add one assert to ScXMLConditionalFormatContext where this isn't
immediately certain.
Change-Id: I2103c5cd42288e0a5d2a1c2e2d2d031f806773bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r-- | sc/source/ui/vba/vbaname.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbanames.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 45e88a4c1395..5f923da844dd 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -114,7 +114,7 @@ void ScVbaName::setContent( const OUString& rContent, const formula::FormulaGra if (pOldData) { // Shorter way of doing this ? - ScCompiler aComp( &rDoc, pOldData->GetPos(), eGrammar ); + ScCompiler aComp( rDoc, pOldData->GetPos(), eGrammar ); std::unique_ptr<ScTokenArray> pArray(aComp.CompileString(sContent)); pOldData->SetCode(*pArray); } diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 1b498536ad9f..79a7a80ab68c 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -149,7 +149,7 @@ ScVbaNames::Add( const css::uno::Any& Name , if ( !xRange.is() && !sFormula.isEmpty() ) { ScAddress aBlank; - ScCompiler aComp( &getScDocument(), aBlank, eGram ); + ScCompiler aComp( getScDocument(), aBlank, eGram ); std::unique_ptr<ScTokenArray> pTokens(aComp.CompileString(sFormula)); if ( pTokens ) { diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 0efbaa4965b9..9624c8ae15a4 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -877,7 +877,7 @@ protected: if ( pUnoRangesBase ) { ScRangeList aCellRanges = pUnoRangesBase->GetRangeList(); - ScCompiler aCompiler( &m_rDoc, aCellRanges.front().aStart, m_eGrammar ); + ScCompiler aCompiler( m_rDoc, aCellRanges.front().aStart, m_eGrammar ); // compile the string in the format passed in std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(sFormula)); // set desired convention to that of the document @@ -920,7 +920,7 @@ public: pUnoRangesBase ) { ScRangeList aCellRanges = pUnoRangesBase->GetRangeList(); - ScCompiler aCompiler( &m_rDoc, aCellRanges.front().aStart, formula::FormulaGrammar::GRAM_DEFAULT ); + ScCompiler aCompiler( m_rDoc, aCellRanges.front().aStart, formula::FormulaGrammar::GRAM_DEFAULT ); std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(sVal)); // set desired convention aCompiler.SetGrammar( m_eGrammar ); |