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>
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 0055fb5..b1c7f00 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 @@
: 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 @@
{
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 @@
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 @@
aInfo.TimeStamp = aTime;
break;
}
default:
SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}