diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 12:49:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 21:23:40 +0100 |
commit | 2c354558454e66c158c71164eaf56ad18433291c (patch) | |
tree | 8ae44aca42435daa86ebf67c1ed0c4366a2a3dbd /sc/source/filter | |
parent | 7cb1599411c309a8544c8e86845593026a773f32 (diff) |
cid#1455325 establish that pDoc cannot be null there
Change-Id: Ia7bca1e74a8ede90e29ec6cbd63c7fdcaf25b072
Reviewed-on: https://gerrit.libreoffice.org/82696
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/excrecds.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xedbdata.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeextlst.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xelink.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xename.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/excel/xetable.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeview.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 6 | ||||
-rw-r--r-- | sc/source/filter/xcl97/XclExpChangeTrack.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 14 |
14 files changed, 41 insertions, 41 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 4fbe955d8b52..b68fa71e018a 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -484,7 +484,7 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm ) XML_hashValue, rProt.maPasswordHash.maHashValue.isEmpty() ? nullptr : rProt.maPasswordHash.maHashValue.toUtf8().getStr(), XML_saltValue, rProt.maPasswordHash.maSaltValue.isEmpty() ? nullptr : rProt.maPasswordHash.maSaltValue.toUtf8().getStr(), XML_spinCount, rProt.maPasswordHash.mnSpinCount ? OString::number( rProt.maPasswordHash.mnSpinCount).getStr() : nullptr, - XML_sqref, rProt.maRangeList.is() ? XclXmlUtils::ToOString( &rStrm.GetRoot().GetDoc(), *rProt.maRangeList).getStr() : nullptr); + XML_sqref, rProt.maRangeList.is() ? XclXmlUtils::ToOString( rStrm.GetRoot().GetDoc(), *rProt.maRangeList).getStr() : nullptr); } rWorksheet->endElement( XML_protectedRanges); } @@ -986,7 +986,7 @@ void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm ) return; sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream(); - rWorksheet->startElement(XML_autoFilter, XML_ref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), maRef)); + rWorksheet->startElement(XML_autoFilter, XML_ref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maRef)); // OOXTODO: XML_extLst, XML_sortState if( !maFilterList.IsEmpty() ) maFilterList.SaveXml( rStrm ); diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index d1fa70c52dd5..98079cd96345 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -310,7 +310,7 @@ void XclExpMergedcells::SaveXml( XclExpXmlStream& rStrm ) { const ScRange & rRange = maMergedRanges[ i ]; rWorksheet->singleElement(XML_mergeCell, XML_ref, - XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), rRange)); + XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), rRange)); } rWorksheet->endElement( XML_mergeCells ); } @@ -522,7 +522,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm ) oox::getRelationship(Relationship::HYPERLINK), msTarget, true ) : OUString(); rStrm.GetCurrentStream()->singleElement( XML_hyperlink, - XML_ref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), maScPos), + XML_ref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maScPos), FSNS( XML_r, XML_id ), !sId.isEmpty() ? sId.toUtf8().getStr() : nullptr, @@ -1357,7 +1357,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat else if(pFormatEntry->GetType() == ScFormatEntry::Type::Date) maCFList.AppendNewRecord( new XclExpDateFormat( GetRoot(), static_cast<const ScCondDateFormatEntry&>(*pFormatEntry), ++rIndex ) ); } - aScRanges.Format( msSeqRef, ScRefFlags::VALID, &GetDoc(), formula::FormulaGrammar::CONV_XL_OOX, ' ', true ); + aScRanges.Format( msSeqRef, ScRefFlags::VALID, GetDoc(), formula::FormulaGrammar::CONV_XL_OOX, ' ', true ); if(!aExtEntries.empty() && xExtLst.get()) { @@ -1851,7 +1851,7 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm ) XML_showDropDown, ToPsz( ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ), XML_showErrorMessage, ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ), XML_showInputMessage, ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ), - XML_sqref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), maScRanges), + XML_sqref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maScRanges), XML_type, lcl_GetValidationType(mnFlags) ); if( !msFormula1.isEmpty() ) { diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx index 7dfb44eec058..6eacd6ef1a61 100644 --- a/sc/source/filter/excel/xedbdata.cxx +++ b/sc/source/filter/excel/xedbdata.cxx @@ -182,7 +182,7 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry ) XML_id, OString::number( rEntry.mnTableId), XML_name, rData.GetName().toUtf8(), XML_displayName, rData.GetName().toUtf8(), - XML_ref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aRange), + XML_ref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aRange), XML_headerRowCount, ToPsz10(rData.HasHeader()), XML_totalsRowCount, ToPsz10(rData.HasTotals()), XML_totalsRowShown, ToPsz10(rData.HasTotals()) // we don't support that but if there are totals they are shown diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index c49e6a709177..44325e4804aa 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1285,7 +1285,7 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm ) sax_fastparser::FSHelperPtr rComments = rStrm.GetCurrentStream(); rComments->startElement( XML_comment, - XML_ref, XclXmlUtils::ToOString(&mrRoot.GetDoc(), maScPos), + XML_ref, XclXmlUtils::ToOString(mrRoot.GetDoc(), maScPos), XML_authorId, OString::number(nAuthorId) // OOXTODO: XML_guid ); diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx index a3c25320ff72..f13335a6605b 100644 --- a/sc/source/filter/excel/xeextlst.cxx +++ b/sc/source/filter/excel/xeextlst.cxx @@ -464,7 +464,7 @@ void XclExpExtConditionalFormatting::SaveXml( XclExpXmlStream& rStrm ) maCfRules.SaveXml( rStrm ); rWorksheet->startElementNS(XML_xm, XML_sqref); - rWorksheet->write(XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), maRange)); + rWorksheet->write(XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maRange)); rWorksheet->endElementNS( XML_xm, XML_sqref ); diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 44fa0292f69d..4142ae5e625e 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1230,26 +1230,26 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm ) if (rtl::math::isFinite( fVal)) { // t='n' is omitted - pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aAdr)); + pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aAdr)); pFS->startElement(XML_v); pFS->write( fVal ); } else { - pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aAdr), XML_t, "e"); + pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aAdr), XML_t, "e"); pFS->startElement(XML_v); pFS->write( "#VALUE!" ); // OOXTODO: support other error values } } else if( rValue.has< OUString >() ) { - pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aAdr), XML_t, "str"); + pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aAdr), XML_t, "str"); pFS->startElement(XML_v); pFS->write( rValue.get< OUString >() ); } else if( rValue.has< bool >() ) { - pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aAdr), XML_t, "b"); + pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aAdr), XML_t, "b"); pFS->startElement(XML_v); pFS->write( rValue.get< bool >() ? "1" : "0" ); } diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 1e84fa0e0711..67a1fd3464df 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -446,7 +446,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, const XclExpNameRef xName( new XclExpName( GetRoot(), cBuiltIn ) ); xName->SetTokenArray( xTokArr ); xName->SetLocalTab( aRange.aStart.Tab() ); - OUString sSymbol(aRange.Format(ScRefFlags::RANGE_ABS_3D, &GetDoc(), ScAddress::Details( ::formula::FormulaGrammar::CONV_XL_A1))); + OUString sSymbol(aRange.Format(GetDoc(), ScRefFlags::RANGE_ABS_3D, ScAddress::Details( ::formula::FormulaGrammar::CONV_XL_A1))); xName->SetSymbol( sSymbol ); return Append( xName ); } @@ -457,7 +457,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, const xName->SetTokenArray( xTokArr ); xName->SetLocalTab( nScTab ); OUString sSymbol; - rRangeList.Format( sSymbol, ScRefFlags::RANGE_ABS_3D, &GetDoc(), ::formula::FormulaGrammar::CONV_XL_A1 ); + rRangeList.Format( sSymbol, ScRefFlags::RANGE_ABS_3D, GetDoc(), ::formula::FormulaGrammar::CONV_XL_A1 ); xName->SetSymbol( sSymbol ); return Append( xName ); } diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index e5af3d924863..28986d8632b0 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -271,7 +271,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr OUString aSheetName; GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName); pDefStrm->singleElement(XML_worksheetSource, - XML_ref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), rEntry.maSrcRange), + XML_ref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), rEntry.maSrcRange), XML_sheet, aSheetName.toUtf8()); pDefStrm->endElement(XML_cacheSource); @@ -864,7 +864,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP pPivotStrm->write("<")->writeId(XML_location); rStrm.WriteAttributes(XML_ref, - XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aOutRange), + XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aOutRange), XML_firstHeaderRow, OUString::number(nFirstHeaderRow), XML_firstDataRow, OUString::number(nFirstDataRow), XML_firstDataCol, OUString::number(nFirstDataCol)); diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 19115bc86d68..ccfa2cfc9634 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -718,18 +718,18 @@ OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer ) RTL_TEXTENCODING_UTF8); } -OString XclXmlUtils::ToOString( const ScDocument* pDoc, const ScRange& rRange, bool bFullAddressNotation ) +OString XclXmlUtils::ToOString( const ScDocument& rDoc, const ScRange& rRange, bool bFullAddressNotation ) { - OUString sRange(rRange.Format( ScRefFlags::VALID, pDoc, + OUString sRange(rRange.Format( rDoc, ScRefFlags::VALID, ScAddress::Details( FormulaGrammar::CONV_XL_A1 ), bFullAddressNotation ) ); return sRange.toUtf8(); } -OString XclXmlUtils::ToOString( const ScDocument* pDoc, const ScRangeList& rRangeList ) +OString XclXmlUtils::ToOString( const ScDocument& rDoc, const ScRangeList& rRangeList ) { OUString s; - rRangeList.Format(s, ScRefFlags::VALID, pDoc, FormulaGrammar::CONV_XL_OOX, ' '); + rRangeList.Format(s, ScRefFlags::VALID, rDoc, FormulaGrammar::CONV_XL_OOX, ' '); return s.toUtf8(); } @@ -768,14 +768,14 @@ static ScRange lcl_ToRange( const XclRange& rRange ) return aRange; } -OString XclXmlUtils::ToOString( const ScDocument* pDoc, const XclRangeList& rRanges ) +OString XclXmlUtils::ToOString( const ScDocument& rDoc, const XclRangeList& rRanges ) { ScRangeList aRanges; for( const auto& rRange : rRanges ) { aRanges.push_back( lcl_ToRange( rRange ) ); } - return ToOString( pDoc, aRanges ); + return ToOString( rDoc, aRanges ); } OUString XclXmlUtils::ToOUString( const char* s ) diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 27c7a4960da5..4604b860172f 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -1524,7 +1524,7 @@ void XclExpDimensions::SaveXml( XclExpXmlStream& rStrm ) // To be compatible with MS Office 2007, // we need full address notation format // e.g. "A1:AMJ177" and not partial like: "1:177". - XML_ref, XclXmlUtils::ToOString(&mrRoot.GetDoc(), aRange, true) ); + XML_ref, XclXmlUtils::ToOString(mrRoot.GetDoc(), aRange, true) ); } void XclExpDimensions::WriteBody( XclExpStream& rStrm ) diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx index b7efb0ac1a27..7fadf895eda5 100644 --- a/sc/source/filter/excel/xeview.cxx +++ b/sc/source/filter/excel/xeview.cxx @@ -232,7 +232,7 @@ void XclExpSelection::SaveXml( XclExpXmlStream& rStrm ) XML_pane, lcl_GetActivePane( mnPane ), XML_activeCell, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), maSelData.maXclCursor ).getStr(), XML_activeCellId, OString::number(maSelData.mnCursorIdx), - XML_sqref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), maSelData.maXclSelection) ); + XML_sqref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maSelData.maXclSelection) ); } void XclExpSelection::WriteBody( XclExpStream& rStrm ) diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 2a2a07bcca61..085e23fffaec 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -254,11 +254,11 @@ public: static OString ToOString( const Color& rColor ); static OString ToOString( const ScfUInt16Vec& rBuffer ); static OStringBuffer& ToOString( OStringBuffer& s, const ScAddress& rRange ); - static OString ToOString( const ScDocument* pDoc, const ScRange& rRange, bool bFullAddressNotation = false ); - static OString ToOString( const ScDocument* pDoc, const ScRangeList& rRangeList ); + static OString ToOString( const ScDocument& rDoc, const ScRange& rRange, bool bFullAddressNotation = false ); + static OString ToOString( const ScDocument& rDoc, const ScRangeList& rRangeList ); static OStringBuffer& ToOString( OStringBuffer& s, const XclAddress& rAddress ); static OString ToOString( const XclExpString& s ); - static OString ToOString( const ScDocument* pDoc, const XclRangeList& rRangeList ); + static OString ToOString( const ScDocument& rDoc, const XclRangeList& rRangeList ); static OUString ToOUString( const char* s ); static OUString ToOUString( const ScfUInt16Vec& rBuffer, sal_Int32 nStart = 0, sal_Int32 nLength = -1 ); diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index b8d1cef7ada2..9a7ee2fa7392 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -992,7 +992,7 @@ static void lcl_WriteCell( XclExpXmlStream& rStrm, sal_Int32 nElement, const ScA sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream(); pStream->startElement(nElement, - XML_r, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), rPosition), + XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), rPosition), XML_s, nullptr, // OOXTODO: not supported XML_t, lcl_GetType(pData), XML_cm, nullptr, // OOXTODO: not supported @@ -1053,7 +1053,7 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm ) lcl_WriteCell( rRevisionLogStrm, XML_oc, aPosition, pOldData.get() ); if (!pNewData) { - pStream->singleElement(XML_nc, XML_r, XclXmlUtils::ToOString(&rRevisionLogStrm.GetRoot().GetDoc(), aPosition)); + pStream->singleElement(XML_nc, XML_r, XclXmlUtils::ToOString(rRevisionLogStrm.GetRoot().GetDoc(), aPosition)); } } if( pNewData ) @@ -1169,7 +1169,7 @@ void XclExpChTrInsert::SaveXml( XclExpXmlStream& rRevisionLogStrm ) XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted? XML_sId, OString::number(GetTabId(aRange.aStart.Tab())), XML_eol, ToPsz10(mbEndOfList), - XML_ref, XclXmlUtils::ToOString(&rRevisionLogStrm.GetRoot().GetDoc(), aRange), + XML_ref, XclXmlUtils::ToOString(rRevisionLogStrm.GetRoot().GetDoc(), aRange), XML_action, lcl_GetAction( nOpCode ), XML_edge, nullptr); // OOXTODO: ??? @@ -1293,8 +1293,8 @@ void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm ) XML_ua, ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure. XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted? XML_sheetId, OString::number(GetTabId(aDestRange.aStart.Tab())), - XML_source, XclXmlUtils::ToOString(&rRevisionLogStrm.GetRoot().GetDoc(), aSourceRange), - XML_destination, XclXmlUtils::ToOString(&rRevisionLogStrm.GetRoot().GetDoc(), aDestRange), + XML_source, XclXmlUtils::ToOString(rRevisionLogStrm.GetRoot().GetDoc(), aSourceRange), + XML_destination, XclXmlUtils::ToOString(rRevisionLogStrm.GetRoot().GetDoc(), aDestRange), XML_sourceSheetId, OString::number(GetTabId(aSourceRange.aStart.Tab())) ); // OOXTODO: does this handle XML_rfmt, XML_undo? XclExpChTrAction* pAction = GetAddAction(); @@ -1343,7 +1343,7 @@ void XclExpChTr0x014A::SaveXml( XclExpXmlStream& rStrm ) XML_sheetId, OString::number(GetTabId(aRange.aStart.Tab())), XML_xfDxf, nullptr, // OOXTODO: not supported XML_s, nullptr, // OOXTODO: style - XML_sqref, XclXmlUtils::ToOString(&rStrm.GetRoot().GetDoc(), aRange), + XML_sqref, XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), aRange), XML_start, nullptr, // OOXTODO: for string changes XML_length, nullptr); // OOXTODO: for string changes // OOXTODO: XML_dxf, XML_extLst diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 5597b635ecbd..da91d360aee3 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1121,7 +1121,7 @@ ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, const ScDo return rAddress.Parse(rString, pDoc, formula::FormulaGrammar::CONV_XL_R1C1); } -void transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument* pDoc) +void transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument& rDoc) { if (rOldURL.startsWith("#")) { @@ -1132,19 +1132,19 @@ void transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument* ScRange aRange; ScAddress aAddress; - ScRefFlags nResult = parseRange(aAddressString, aRange, pDoc); + ScRefFlags nResult = parseRange(aAddressString, aRange, &rDoc); if ( nResult & ScRefFlags::VALID ) { - OUString aString = aRange.Format(nResult, pDoc, formula::FormulaGrammar::CONV_XL_OOX); + OUString aString = aRange.Format(rDoc, nResult, formula::FormulaGrammar::CONV_XL_OOX); rNewURL = "#" + aString; return; } else { - nResult = parseAddress(aAddressString, aAddress, pDoc); + nResult = parseAddress(aAddressString, aAddress, &rDoc); if( nResult & ScRefFlags::VALID ) { - OUString aString = aAddress.Format(nResult, pDoc, formula::FormulaGrammar::CONV_XL_OOX); + OUString aString = aAddress.Format(nResult, &rDoc, formula::FormulaGrammar::CONV_XL_OOX); rNewURL = "#" + aString; return; } @@ -1164,7 +1164,7 @@ ScURLTransformer::ScURLTransformer(ScDocument& rDoc) OUString ScURLTransformer::getTransformedString(const OUString& rURL) const { OUString aNewURL; - transformURL(rURL, aNewURL, &mrDoc); + transformURL(rURL, aNewURL, mrDoc); return aNewURL; } @@ -1338,7 +1338,7 @@ void ExcEScenarioCell::SaveXml( XclExpXmlStream& rStrm ) const rStrm.GetCurrentStream()->singleElement( XML_inputCells, // OOXTODO: XML_deleted, // OOXTODO: XML_numFmtId, - XML_r, XclXmlUtils::ToOString( &rStrm.GetRoot().GetDoc(), ScAddress( nCol, nRow, 0 ) ), + XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetDoc(), ScAddress( nCol, nRow, 0 ) ), // OOXTODO: XML_undone, XML_val, XclXmlUtils::ToOString( sText ) ); } |