From 830e5e055760c31693e72e036ad473f4a3c43b55 Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 9 Feb 2021 21:47:22 +0200 Subject: 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 --- sax/source/tools/fshelper.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'sax') 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& 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& 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 FastSerializerHelper::createAttrList() { return new FastAttributeList( nullptr ); } -- cgit