Kaydet (Commit) bab595df authored tarafından Tamás Zolnai's avatar Tamás Zolnai

tdf#112936: Pivot table: LO created XLSX file makes Excel to crash

It's not actually clear, why Excel crashes, but setting the version
makes it working. I expect that this version number (which specifies MSO
Excel versions) makes MSO to handle the pivot table differently. As the
internal implementation of the pivot table was changed in different
versions. The name "DATA" might had a special meaning in the earlier
versions (e.g. XP, MSO 2000) which leads this crash.
So setting the version to MSO 2007 seems a good solution for this.
Older versions not seems a target of LO exported XLSX files in these days.
Also smaller values leads to the crash described in the bug report.

Change-Id: I6e9edc949d1670d657effff9277cfd86ff163458
Reviewed-on: https://gerrit.libreoffice.org/43208Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst 141fe1c5
......@@ -221,6 +221,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
FSNS(XML_xmlns, XML_r), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
FSNS(XML_r, XML_id), XclXmlUtils::ToOString(aRelId).getStr(),
XML_recordCount, OString::number(rEntry.mpCache->GetDataSize()).getStr(),
XML_createdVersion, "3", // MS Excel 2007, tdf#112936: setting version number makes MSO to handle the pivot table differently
FSEND);
if (rEntry.meType == Worksheet)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment