diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-04 13:07:19 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-05 22:00:56 +0200 |
commit | 01c58c7d6da0a5671460ba4c0e23a2a04d2eb87e (patch) | |
tree | fdfff2c434933e2c7adafd024be1176491862608 /include/sax | |
parent | 9202793ed81c5568f6789504335446b97e8087da (diff) |
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/fshelper.hxx | 32 |
1 files changed, 4 insertions, 28 deletions
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); |