summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-04-20 18:48:05 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-04-29 12:03:06 +0200
commit768882d4e9b955ee1b79ad39cb4232789d0d5ee9 (patch)
tree5cc649beb0bb9fc78428a5baeed3bb0914731c86 /oox
parent623d6cf06ccba392c1993a3b0ad271d508205e73 (diff)
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@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/docprop/docprophandler.cxx12
1 files changed, 11 insertions, 1 deletions
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 )