summaryrefslogtreecommitdiff
path: root/sax
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 /sax
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 'sax')
-rw-r--r--sax/source/tools/fshelper.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index b285ba9f3219..a560e5bd1bad 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -60,18 +60,16 @@ void FastSerializerHelper::endElement(sal_Int32 elementTokenId)
mpSerializer->endFastElement(elementTokenId);
}
-void FastSerializerHelper::startElement(sal_Int32 elementTokenId, const XFastAttributeListRef& xAttrList)
+void FastSerializerHelper::startElement(sal_Int32 elementTokenId, const rtl::Reference<FastAttributeList>& xAttrList)
{
- FastAttributeList* pAttrList = dynamic_cast< FastAttributeList* >(xAttrList.get());
- assert(pAttrList);
- mpSerializer->startFastElement(elementTokenId, pAttrList);
+ assert(xAttrList);
+ mpSerializer->startFastElement(elementTokenId, xAttrList.get());
}
-void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, const XFastAttributeListRef& xAttrList)
+void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, const rtl::Reference<FastAttributeList>& xAttrList)
{
- FastAttributeList* pAttrList = dynamic_cast< FastAttributeList* >(xAttrList.get());
- assert(pAttrList);
- mpSerializer->singleFastElement(elementTokenId, pAttrList);
+ assert(xAttrList);
+ mpSerializer->singleFastElement(elementTokenId, xAttrList.get());
}
FastSerializerHelper* FastSerializerHelper::write(const char* value)
@@ -146,7 +144,7 @@ void FastSerializerHelper::mergeTopMarks(
mpSerializer->mergeTopMarks(nTag, eMergeType);
}
-FastAttributeList * FastSerializerHelper::createAttrList()
+rtl::Reference<FastAttributeList> FastSerializerHelper::createAttrList()
{
return new FastAttributeList( nullptr );
}