diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2021-03-20 20:05:19 +0100 |
---|---|---|
committer | Regina Henschel <rb.henschel@t-online.de> | 2021-03-22 19:08:27 +0100 |
commit | 2bf8c1e0e211601a70b6b28fdb92f636c7969513 (patch) | |
tree | 8e0eb7ab30abe29dacd96c5fe26e400796bee7c5 /xmloff/source/draw | |
parent | fe0543c8186ece4a1c315e6b14acabcb7d6f4d16 (diff) |
tdf#141127 Use ODF default values for draw:extrusion-skew
The default value for extrusion skew angle is 45 in ODF and -135 in
binary MS Office. LO had used -135 in case the draw:extrusion-skew
attribute was missing on import. This could be fixed in GetSkew() in
EnhancedCustomShape3d.cxx#92. But that would break import of ppt files.
So I have decided not to search, were the binary import would need to
be tweaked, but I set the default values directly in file open in case
the attribute is missing.
Change-Id: Ieeffa64099fdbdbe0ba9d4dab7ed2f19d397a6e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112819
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/ximpcustomshape.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index ebaf15651950..15d296187348 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -1286,6 +1286,15 @@ void XMLEnhancedCustomShapeContext::endFastElement(sal_Int32 ) } } + //tdf#141127 Add ODF default values. Otherwise defaults from MS Office binary format are used. + if (!maExtrusion.empty()) + { + auto it = std::find_if(maExtrusion.begin(), maExtrusion.end(), + [](css::beans::PropertyValue& rProp){return EASGet(rProp.Name) == EAS_Skew;} ); + if (it == maExtrusion.end()) + GetEnhancedParameterPair(maExtrusion, "50 45", EAS_Skew); + } + SdXMLCustomShapePropertyMerge( mrCustomShapeGeometry, maExtrusion, EASGet( EAS_Extrusion ) ); SdXMLCustomShapePropertyMerge( mrCustomShapeGeometry, maPath, EASGet( EAS_Path ) ); SdXMLCustomShapePropertyMerge( mrCustomShapeGeometry, maTextPath, EASGet( EAS_TextPath ) ); |