diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-13 19:54:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-14 09:56:42 +0200 |
commit | 0f6dcf2d0a024798aea87a9406f039b3386476f5 (patch) | |
tree | 4a5fbe3280f360ce8fb929d17908f6c239630c18 | |
parent | f7605c97f6a0693bee71b8118a48c19968bea52a (diff) |
keep as a reference
Change-Id: I94fda4083218f86a7c5b648bba8638e78e6b95df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102607
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/oox/extlstcontext.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 06aa3d836120..4d81695a20ef 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -95,10 +95,10 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl ScFormatEntry& rFormat = **maEntries.rbegin(); assert(rFormat.GetType() == ScFormatEntry::Type::Iconset); ScIconSetFormat& rIconSet = static_cast<ScIconSetFormat&>(rFormat); - ScDocument* pDoc = &getScDocument(); + ScDocument& rDoc = getScDocument(); SCTAB nTab = getSheetIndex(); ScAddress aPos(0, 0, nTab); - mpCurrentRule->SetData(&rIconSet, pDoc, aPos); + mpCurrentRule->SetData(&rIconSet, &rDoc, aPos); mpCurrentRule.reset(); } if (nElement == XLS14_TOKEN(cfRule)) @@ -124,9 +124,9 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl } else if (aType == "iconSet") { - ScDocument* pDoc = &getScDocument(); + ScDocument& rDoc = getScDocument(); mpCurrentRule.reset(new IconSetRule(*this)); - maEntries.push_back(std::make_unique<ScIconSetFormat>(pDoc)); + maEntries.push_back(std::make_unique<ScIconSetFormat>(&rDoc)); return new IconSetContext(*this, mpCurrentRule.get()); } else if (aType == "cellIs") @@ -192,8 +192,8 @@ void ExtConditionalFormattingContext::onEndElement() case XM_TOKEN(sqref): { ScRangeList aRange; - ScDocument* pDoc = &getScDocument(); - bool bSuccess = ScRangeStringConverter::GetRangeListFromString(aRange, aChars, pDoc, formula::FormulaGrammar::CONV_XL_OOX); + ScDocument& rDoc = getScDocument(); + bool bSuccess = ScRangeStringConverter::GetRangeListFromString(aRange, aChars, &rDoc, formula::FormulaGrammar::CONV_XL_OOX); if (!bSuccess || aRange.empty()) break; @@ -210,7 +210,7 @@ void ExtConditionalFormattingContext::onEndElement() { ScAddress rPos = aRange.GetTopLeftCorner(); rStyle = getStyles().createExtDxfStyle(rStyleIdx); - ScCondFormatEntry* pEntry = new ScCondFormatEntry(eOperator, rFormula, "", pDoc, + ScCondFormatEntry* pEntry = new ScCondFormatEntry(eOperator, rFormula, "", &rDoc, rPos, rStyle, "", "", formula::FormulaGrammar::GRAM_OOXML , formula::FormulaGrammar::GRAM_OOXML, @@ -318,9 +318,9 @@ ContextHandlerRef ExtGlobalWorkbookContext::onCreateContext( sal_Int32 nElement, { if (nElement == LOEXT_TOKEN(extCalcPr)) { - ScDocument* pDoc = &getScDocument(); + ScDocument& rDoc = getScDocument(); sal_Int32 nToken = rAttribs.getToken( XML_stringRefSyntax, XML_CalcA1 ); - ScCalcConfig aCalcConfig = pDoc->GetCalcConfig(); + ScCalcConfig aCalcConfig = rDoc.GetCalcConfig(); switch( nToken ) { @@ -340,7 +340,7 @@ ContextHandlerRef ExtGlobalWorkbookContext::onCreateContext( sal_Int32 nElement, aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_UNSPECIFIED ); break; } - pDoc->SetCalcConfig(aCalcConfig); + rDoc.SetCalcConfig(aCalcConfig); } return this; |