diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-02 15:37:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-02 17:39:10 +0100 |
commit | 28be7b98070b7475cc675e76f075c941133cb790 (patch) | |
tree | 3237d5ca81cd7cc835a1200f5ae41e1008174b13 /include/xmloff/xmlictxt.hxx | |
parent | drop the SvXMLExport::EndElement method.. (diff) | |
download | core-28be7b98070b7475cc675e76f075c941133cb790.tar.gz core-28be7b98070b7475cc675e76f075c941133cb790.zip |
create common macro and method for logging unknown attributes
instead of repeating the code everywhere
Change-Id: Idb94054b392ed256e64259cdb17d1522bf3c52b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105184
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff/xmlictxt.hxx')
-rw-r--r-- | include/xmloff/xmlictxt.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 7753a00f3c68..03dd3121ba5c 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <rtl/ustring.hxx> #include <xmloff/namespacemap.hxx> +#include <sax/fastattribs.hxx> #include <memory> namespace com::sun::star::xml::sax { class XAttributeList; } @@ -131,6 +132,14 @@ public: virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) final override; }; +void XMLOFF_DLLPUBLIC XMLOFF_WARN_UNKNOWN(const char *area, sax_fastparser::FastAttributeList::FastAttributeIter const & rIter); + +#define XMLOFF_WARN_UNKNOWN_ATTR(area, token, value) \ + SAL_WARN(area, "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(token) << "=" << value); + +#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token) \ + SAL_WARN(area, "unknown element " << SvXMLImport::getPrefixAndNameFromToken(token)); + #endif // INCLUDED_XMLOFF_XMLICTXT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |