diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-04-11 21:02:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-11 21:46:18 +0200 |
commit | f53077423fe1d62eb4392dd393a9bf6df84bd517 (patch) | |
tree | f6446955f6feb46e3446b24bf177c67dd738ca77 /xmloff | |
parent | c076b99dd21edae0364cf9319a221a1d6a4bd487 (diff) |
tdf#131931 No version history shown
regression from
commit 1872b44c9a2ee2bd00be54c6c310b72579d7a47f
use FastParser for the XMLVersionListImport
Change-Id: Ib6e9e14758c25c6ff090fe8f929984449e045c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/meta/xmlversion.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 0055fb56d802..b1c7f001da4f 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -22,6 +22,7 @@ #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmlmetae.hxx> #include <osl/diagnose.h> +#include <sal/log.hxx> #include <xmloff/xmltoken.hxx> #include <comphelper/processfactory.hxx> @@ -105,8 +106,6 @@ XMLVersionListImport::XMLVersionListImport( : SvXMLImport(rContext, ""), maVersions( rVersions ) { - GetNamespaceMap().Add( xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST), - xmloff::token::GetXMLToken(xmloff::token::XML_N_VERSIONS_LIST), XML_NAMESPACE_VERSIONS_LIST ); } XMLVersionListImport::~XMLVersionListImport() throw() @@ -139,7 +138,8 @@ XMLVersionListContext::createFastChildContext(sal_Int32 nElement, { SvXMLImportContext *pContext = nullptr; - if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_ENTRY) ) + if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_ENTRY) + || nElement == XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_VERSION_ENTRY) ) { pContext = new XMLVersionContext( GetImport(), xAttrList ); } @@ -161,16 +161,19 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport, switch( aIter.getToken() ) { case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_TITLE): + case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_TITLE): { aInfo.Identifier = aIter.toString(); break; } case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_COMMENT): + case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_COMMENT): { aInfo.Comment = aIter.toString(); break; } case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_CREATOR): + case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_CREATOR): { aInfo.Author = aIter.toString(); break; @@ -182,6 +185,9 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport, aInfo.TimeStamp = aTime; break; } + default: + SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString()); + break; } } |