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 /xmloff/source/draw | |
parent | 3940cf7d716f3e469f47d3c831a799e58edf2eb8 (diff) |
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 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/XMLNumberStyles.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/animimp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximppage.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 18 |
5 files changed, 17 insertions, 16 deletions
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 2894b0a04616..1696fc038ac8 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -545,7 +545,7 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( mbTextual = IsXMLToken( sValue, XML_TRUE ); break; default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } @@ -595,7 +595,7 @@ SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rIm if( aIter.getToken() == XML_ELEMENT(NUMBER, XML_AUTOMATIC_ORDER) ) mbAutomatic = IsXMLToken( sValue, XML_TRUE ); else - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString()); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 47417bcc27a1..89cf45a37540 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -405,7 +405,7 @@ XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, sal_ pParent->mbPlayFull = IsXMLToken( sValue, XML_TRUE ); break; default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } } @@ -443,7 +443,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, meKind = XMLE_PLAY; break; default: - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nElement)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); // unknown action, overread return; } @@ -480,7 +480,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, maPathShapeId = sValue; break; default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } } diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index ac2015982a19..1fb556828199 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -339,7 +339,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLBodyContext::crea break; } default: - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nElement)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); } return nullptr; } diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 6b987c42d417..96265c78bb9f 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -134,7 +134,8 @@ DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, const Refere } break; default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); } + XMLOFF_WARN_UNKNOWN("xmloff", aIter); + } } mxAnnotation->setPosition( aPosition ); diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index f875ba196e65..10720869eaa3 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -106,7 +106,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLDrawingPageProper rProperties.push_back( aPropState ); } else - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString()); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } break; } @@ -348,7 +348,7 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( break; } default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } } @@ -380,7 +380,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPageMasterContext return mxPageMasterStyle.get(); } else - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nElement)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); return nullptr; } @@ -413,7 +413,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPresentationPageL maList.push_back(xLclContext); } else - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nElement)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); return xContext.get(); } @@ -664,7 +664,7 @@ SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext( break; } default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } } @@ -730,7 +730,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext( break; } default: - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } @@ -882,7 +882,7 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( case XML_ELEMENT(STYLE, XML_STYLE): break; // ignore default: - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nElement)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); } // call base class @@ -1397,7 +1397,7 @@ SdXMLHeaderFooterDeclContext::SdXMLHeaderFooterDeclContext(SvXMLImport& rImport, } else { - SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString()); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } } @@ -1425,7 +1425,7 @@ void SdXMLHeaderFooterDeclContext::endFastElement(sal_Int32 nToken) } else { - SAL_WARN("xmloff", "unknown element " << SvXMLImport::getPrefixAndNameFromToken(nToken)); + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nToken); } } |