[Libreoffice-bugs] [Bug 113841] Assertion failed in SvXMLNamespaceMap::GetQNameByKey when opening a certain XLSX, and ODF format version is set to 1.2 (strict)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Dec 30 11:33:28 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=113841

--- Comment #9 from Julien Nabet <serval2412 at yahoo.fr> ---
Depending of bIsOOoNamespace, either it's true and we use
XML_NAMESPACE_CHART_EXT or it's false and we use XML_NAMESPACE_SVG.
In our case, the var is put to true, so it's expected we assert if we use ODF
1.2

I must recognize I don't know if bIsOOoNamespace should be put to false here,
just found these related commits about it:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e26194b675380ad6b6a1287f97bce93006be176c
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c0f7a3f7cf33debd0f6049c415c412d14526a79e

If this variable should indeed be put to true, we should just test that
nCurrentODFVersion > SvtSaveOptions::ODFVER_012 to call addSize method or not.
This would give:
diff --git a/xmloff/source/chart/SchXMLExport.cxx
b/xmloff/source/chart/SchXMLExport.cxx
index 1e59110e84b8..02b03a677599 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1386,7 +1386,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference<
chart::XChartDocument >
                             if( nLegendExpansion ==
chart::ChartLegendExpansion_CUSTOM)
                             {
                                 awt::Size aSize( xLegendShape->getSize() );
-                                addSize( aSize, true );
+                                if( nCurrentODFVersion >
SvtSaveOptions::ODFVER_012 )
+                                    addSize( aSize, true );
                                 OUStringBuffer aAspectRatioString;
                                 ::sax::Converter::convertDouble(
                                     aAspectRatioString,

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181230/1d6cb851/attachment.html>


More information about the Libreoffice-bugs mailing list