From 1705fbe9daac56ee9bea8d8fd7c7f57e2bec49b5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Apr 2020 12:29:17 +0200 Subject: move the castToFastAttributeList function to the slightly higher namespace, to make it easy and more readable to use directly in a for-loop-range expression. And make it return a reference rather than a pointer, since it is never allowed to be nullptr. Change-Id: I15d0b32493ef65cfc601b247c272b318f1eadfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93049 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/script/XMLEventsImportContext.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xmloff/source/script/XMLEventsImportContext.cxx') diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index cb7679cc3b63..5960b5215e91 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -165,9 +165,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLEventsImportContext // a) search for script:language and script:event-name attribute OUString sLanguage; OUString sEventName; - sax_fastparser::FastAttributeList *pAttribList = - sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); - for (auto &aIter : *pAttribList) + for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) { OUString sValue = aIter.toString(); -- cgit