tdf#112480 drawooo:enhanced-path only with ODF ver > 1.2
Saving in ODF 1.2 strict using a debug build crashes in
SvXMLNamespaceMap::GetQNameByKey. A pro build does not crash but
returns the local name without a prefix, which produces the
output reported in Bugzilla.
Change-Id: I497cd4a2861f26616cc9ff0b65ca017834097f75
Reviewed-on: https://gerrit.libreoffice.org/65631
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index fbbd35f..e1bea5b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -4100,7 +4100,7 @@
}
aStr = aStrBuffer.makeStringAndClear();
rExport.AddAttribute( bExtended ? XML_NAMESPACE_DRAW_EXT : XML_NAMESPACE_DRAW, XML_ENHANCED_PATH, aStr );
if ( !bExtended && bNeedExtended )
if ( !bExtended && bNeedExtended && (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) )
ImpExportEnhancedPath( rExport, rCoordinates, rSegments, true );
}