summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-09 21:47:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-10 07:36:57 +0100
commit830e5e055760c31693e72e036ad473f4a3c43b55 (patch)
tree6e1cf0033f0a0ff60cc32b31f13e7af44ef38225 /sc
parent09cb778b6eb7d3a5b9029965a1320b49c90e7295 (diff)
pass FastAttributeList around by rtl::Reference
Change-Id: I958a22f60975c74dfaeb8469b4c0cd3759d40130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xepage.cxx5
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx13
3 files changed, 7 insertions, 13 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index c31c81dba4db..4457aee5bea4 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -848,7 +848,7 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
}
else
{
- sax_fastparser::FastAttributeList* pAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
sal_Int32 aDateGroup[3] = { XML_year, XML_month, XML_day };
sal_Int32 idx = 0;
for (size_t i = 0; idx >= 0 && i < 3; i++)
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 64d671a3acba..e2f51d706def 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -94,7 +94,7 @@ XclExpSetup::XclExpSetup( const XclPageData& rPageData ) :
void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
{
- sax_fastparser::FastAttributeList* pAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
if( rStrm.getVersion() != oox::core::ISOIEC_29500_2008 ||
mrData.mnStrictPaperSize != EXC_PAPERSIZE_USER )
{
@@ -130,8 +130,7 @@ void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
pAttrList->add( XML_copies, OString::number( mrData.mnCopies ).getStr() );
// OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
- css::uno::Reference< css::xml::sax::XFastAttributeList > aAttrs(pAttrList);
- rStrm.GetCurrentStream()->singleElement( XML_pageSetup, aAttrs );
+ rStrm.GetCurrentStream()->singleElement( XML_pageSetup, pAttrList );
}
void XclExpSetup::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 98e983459144..c4cdce34ad45 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -458,9 +458,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
pAttList->add(XML_longText, ToPsz10(true));
}
- sax_fastparser::XFastAttributeListRef xAttributeList(pAttList);
-
- pDefStrm->startElement(XML_sharedItems, xAttributeList);
+ pDefStrm->startElement(XML_sharedItems, pAttList);
//if (bListItems) // see TODO above
{
@@ -1028,8 +1026,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if(bDimInTabularMode)
pAttList->add( XML_outline, ToPsz10(false));
- sax_fastparser::XFastAttributeListRef xAttributeList(pAttList);
- pPivotStrm->startElement(XML_pivotField, xAttributeList);
+ pPivotStrm->startElement(XML_pivotField, pAttList);
pPivotStrm->startElement(XML_items,
XML_count, OString::number(static_cast<tools::Long>(aMemberSequence.size() + aSubtotalSequence.size())));
@@ -1040,8 +1037,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (nMember.second)
pItemAttList->add(XML_h, ToPsz10(true));
pItemAttList->add(XML_x, OString::number(static_cast<tools::Long>(nMember.first)));
- sax_fastparser::XFastAttributeListRef xItemAttributeList(pItemAttList);
- pPivotStrm->singleElement(XML_item, xItemAttributeList);
+ pPivotStrm->singleElement(XML_item, pItemAttList);
}
for (const OString& sSubtotal : aSubtotalSequence)
@@ -1154,8 +1150,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
// Just skip exporting number format
}
}
- sax_fastparser::XFastAttributeListRef xItemAttributeList(pItemAttList);
- pPivotStrm->singleElement(XML_dataField, xItemAttributeList);
+ pPivotStrm->singleElement(XML_dataField, pItemAttList);
}
pPivotStrm->endElement(XML_dataFields);