[Libreoffice-commits] core.git: oox/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 29 10:03:44 UTC 2020
oox/source/docprop/docprophandler.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 768882d4e9b955ee1b79ad39cb4232789d0d5ee9
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Apr 20 18:48:05 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Apr 29 12:03:06 2020 +0200
Related tdf#111461: add "variant", "lpstr" and "i4" in docprophandler (oox)
Following these logs:
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 5621
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 3198
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 5621
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 2749
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 5621
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 3198
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 5621
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 2749
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 3198
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 3198
warn:oox:24274:24274:oox/source/docprop/docprophandler.cxx:320: OOXMLDocPropHandler::startFastElement: unknown element 3198
I found that each element corresponded to the line of oox/source/token/tokens.txt - 1
File https://bugs.documentfoundation.org/attachment.cgi?id=135265
contains this in docProps/app.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
<TotalTime>0</TotalTime>
<Application>Microsoft Excel</Application>
<DocSecurity>0</DocSecurity>
<ScaleCrop>false</ScaleCrop>
<HeadingPairs>
<vt:vector size="4" baseType="variant">
<vt:variant>
<vt:lpstr>Feuilles de calcul</vt:lpstr>
</vt:variant>
<vt:variant>
<vt:i4>1</vt:i4>
</vt:variant>
<vt:variant>
<vt:lpstr>Plages nommées</vt:lpstr>
</vt:variant>
<vt:variant>
<vt:i4>2</vt:i4>
</vt:variant>
</vt:vector>
</HeadingPairs>
<TitlesOfParts>
<vt:vector size="3" baseType="lpstr">
<vt:lpstr>GENERALISTE</vt:lpstr>
<vt:lpstr>GENERALISTE!Impression_des_titres</vt:lpstr>
<vt:lpstr>GENERALISTE!Zone_d_impression</vt:lpstr>
</vt:vector>
</TitlesOfParts>
<LinksUpToDate>false</LinksUpToDate>
<SharedDoc>false</SharedDoc>
<HyperlinksChanged>false</HyperlinksChanged>
<AppVersion>12.0000</AppVersion>
</Properties>
Change-Id: I736df31676377d1c342b6c4b35d435edc3719891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92592
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 67de4a8366bd..e26db66b12c6 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -315,9 +315,19 @@ void SAL_CALL OOXMLDocPropHandler::startFastElement( ::sal_Int32 nElement, const
{
m_nType = nElement;
}
+ // variant tags in vector
+ else if ( m_nState && m_nInBlock == 3 && getNamespace( nElement ) == NMSP_officeDocPropsVT )
+ {
+ m_nType = nElement;
+ }
+ // lpstr or i4 tags in vector
+ else if ( m_nState && m_nInBlock == 4 && getNamespace( nElement ) == NMSP_officeDocPropsVT )
+ {
+ m_nType = nElement;
+ }
else
{
- SAL_WARN("oox", "OOXMLDocPropHandler::startFastElement: unknown element " << getBaseToken(nElement));
+ SAL_WARN("oox", "OOXMLDocPropHandler::startFastElement: unknown element " << getBaseToken(nElement) << " m_nState=" << m_nState << " m_nInBlock=" << m_nInBlock);
}
if ( m_nInBlock == SAL_MAX_INT32 )
More information about the Libreoffice-commits
mailing list