include/sax/fshelper.hxx | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-)
New commits: commit d9fbe7a108b7e3a5bf15e9b81fd903c615fba675 Author: Mike Kaganski <[email protected]> AuthorDate: Sat Jul 4 13:07:19 2020 +0300 Commit: Gabor Kelemen <[email protected]> CommitDate: Thu Feb 25 13:42:53 2021 +0100 Simplify FastSerializerHelper::*ElementNS to just call corresponding *Element Change-Id: Idd7ab4961fe5e4871ea5b64e7d837f98743eb301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97954 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111535 Tested-by: Gabor Kelemen <[email protected]> Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index 7c1f9a2ea1af..b38689a5927f 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -66,21 +66,9 @@ public: /// Start an element. After the first two arguments there can be a number of (attribute, value) pairs. template<typename... Args> - void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, sal_Int32 attribute, const char* value, Args &&... args) + void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, Args &&... args) { - if (value) - pushAttributeValue(attribute, value); - startElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...); - } - template<typename... Args> - void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, sal_Int32 attribute, const OString& value, Args &&... args) - { - pushAttributeValue(attribute, value); - startElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...); - } - void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId) - { - startElement(FSNS(namespaceTokenId, elementTokenId)); + startElement(FSNS(namespaceTokenId, elementTokenId), std::forward<Args>(args)...); } /// Create a single element. After the first argument there can be a number of (attribute, value) pairs. @@ -101,21 +89,9 @@ public: /// Create a single element. After the first two arguments there can be a number of (attribute, value) pairs. template<typename... Args> - void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, sal_Int32 attribute, const char* value, Args &&... args) - { - if (value) - pushAttributeValue(attribute, value); - singleElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...); - } - template<typename... Args> - void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, sal_Int32 attribute, const OString& value, Args &&... args) - { - pushAttributeValue(attribute, value); - singleElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...); - } - void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId) + void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, Args &&... args) { - singleElement(FSNS(namespaceTokenId, elementTokenId)); + singleElement(FSNS(namespaceTokenId, elementTokenId), std::forward<Args>(args)...); } void endElement(sal_Int32 elementTokenId); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
