sc/inc/rangenam.hxx | 2 +- sc/source/core/tool/rangenam.cxx | 4 ++-- sc/source/filter/excel/xiname.cxx | 2 +- sc/source/filter/html/htmlimp.cxx | 2 +- sc/source/filter/oox/workbookhelper.cxx | 2 +- sc/source/ui/unoobj/nameuno.cxx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 8ed2f243231bb0eddc17199d57d8a2520448f9df Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Sep 14 08:55:40 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Sep 14 14:51:50 2020 +0200 ScRangeData ctor variant never passed a null ScDocument* Change-Id: Ia5622fc4c00a49003c232fc3947e14d71a7089f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102631 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 1a64db7bb9b6..c1f0550ecad4 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -89,7 +89,7 @@ public: const ScAddress& rAdr = ScAddress(), Type nType = Type::Name, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ); - SC_DLLPUBLIC ScRangeData( ScDocument* pDoc, + SC_DLLPUBLIC ScRangeData( ScDocument& rDoc, const OUString& rName, const ScTokenArray& rArr, const ScAddress& rAdr = ScAddress(), diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 38a14cb94880..8488630acc52 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -79,7 +79,7 @@ ScRangeData::ScRangeData( ScDocument& rDok, } } -ScRangeData::ScRangeData( ScDocument* pDok, +ScRangeData::ScRangeData( ScDocument& rDok, const OUString& rName, const ScTokenArray& rArr, const ScAddress& rAddress, @@ -89,7 +89,7 @@ ScRangeData::ScRangeData( ScDocument* pDok, pCode ( new ScTokenArray( rArr ) ), aPos ( rAddress ), eType ( nType ), - pDoc ( pDok ), + pDoc ( &rDok ), eTempGrammar( FormulaGrammar::GRAM_UNSPECIFIED ), nIndex ( 0 ), bModified ( false ) diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 427e26983dd6..50a16a76cb99 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -236,7 +236,7 @@ void XclImpName::ConvertTokens() void XclImpName::InsertName(const ScTokenArray* pArray) { // create the Calc name data - ScRangeData* pData = new ScRangeData(&GetDoc(), maScName, *pArray, ScAddress(), meNameType); + ScRangeData* pData = new ScRangeData(GetDoc(), maScName, *pArray, ScAddress(), meNameType); pData->GuessPosition(); // calculate base position for relative refs pData->SetIndex( mnNameIndex ); // used as unique identifier in formulas if (mnXclTab == EXC_NAME_GLOBAL) diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 165cbc80b679..7dc6f3de4fe2 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -106,7 +106,7 @@ void ScHTMLImport::InsertRangeName( ScDocument& rDoc, const OUString& rName, con aRefData.Ref2.SetFlag3D( aRefData.Ref2.Tab() != aRefData.Ref1.Tab() ); ScTokenArray aTokArray(rDoc); aTokArray.AddDoubleReference( aRefData ); - ScRangeData* pRangeData = new ScRangeData( &rDoc, rName, aTokArray ); + ScRangeData* pRangeData = new ScRangeData( rDoc, rName, aTokArray ); rDoc.GetRangeName()->insert( pRangeData ); } diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 0a415346b64d..32b393e52215 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -361,7 +361,7 @@ ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, c if ( nUnoType & NamedRangeFlag::ROW_HEADER ) nNewType |= ScRangeData::Type::RowHeader; ScTokenArray aTokenArray(rDoc); (void)ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, rTokens ); - ScRangeData* pNew = new ScRangeData( &rDoc, rName, aTokenArray, ScAddress(), nNewType ); + ScRangeData* pNew = new ScRangeData( rDoc, rName, aTokenArray, ScAddress(), nNewType ); pNew->GuessPosition(); if ( nIndex ) pNew->SetIndex( nIndex ); diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index a55d138687d3..4dafd1dc2185 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -191,7 +191,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray* ScRangeData* pNew = nullptr; if (pNewTokens) - pNew = new ScRangeData( &rDoc, aInsName, *pNewTokens, aPos, nType ); + pNew = new ScRangeData( rDoc, aInsName, *pNewTokens, aPos, nType ); else pNew = new ScRangeData( rDoc, aInsName, aContent, aPos, nType, eGrammar ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits