diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-09-25 16:04:27 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-09-25 19:31:28 +0200 |
commit | 146dac7d30823678b9e87f8128904f5815c1a2ed (patch) | |
tree | ef3cd9dc7cc9ca7e9ba0a94de35cc3c42d5522d0 /xmloff/source/draw/shapeexport.cxx | |
parent | 71aeb561e7e4e87f69e438705a59146ad02cbc71 (diff) |
tdf#162690, tdf#162687: Adapt to ODF 1.4
After this, the workaround introduced to
OpenDocument-v1.4+libreoffice-schema.rng in
afa4965e4df6f1f0c43c0a059f216e7f8a21ba82 "schema: update to ODF 1.4 OS"
can be removed
Change-Id: Iecf31cec0bf187155a97e5b6ccf8173b6aba82fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173940
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 99e7e916cf4d..a72f327e0846 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -4704,8 +4704,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc if ( rProp.Value >>= fExtrusionSpecularity ) { SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion(); - if (fExtrusionSpecularity > 100.0 && eVersion >= SvtSaveOptions::ODFSVER_012 - && (eVersion & SvtSaveOptions::ODFSVER_EXTENDED)) + if (fExtrusionSpecularity > 100.0 && eVersion & SvtSaveOptions::ODFSVER_EXTENDED) { // tdf#147580 write values > 100% in loext ::sax::Converter::convertDouble( @@ -4719,18 +4718,13 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_EXTRUSION_SPECULARITY_LOEXT, aStr ); } // tdf#147580 ODF 1 allows arbitrary percent, later versions not - if (eVersion >= SvtSaveOptions::ODFSVER_012) + if (eVersion >= SvtSaveOptions::ODFSVER_012 && eVersion < SvtSaveOptions::ODFSVER_014) { fExtrusionSpecularity = std::clamp<double>(fExtrusionSpecularity, 0.0, 100.0); } - ::sax::Converter::convertDouble( - aStrBuffer, - fExtrusionSpecularity, - false, - util::MeasureUnit::PERCENT, - util::MeasureUnit::PERCENT); - aStrBuffer.append( '%' ); + ::sax::Converter::convertDouble( aStrBuffer, fExtrusionSpecularity ); aStr = aStrBuffer.makeStringAndClear(); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_EXTRUSION_SPECULARITY, aStr ); } } |