svx/source/customshapes/EnhancedCustomShape2d.cxx | 12 ++++++++---- svx/source/customshapes/EnhancedCustomShapeGeometry.cxx | 15 ++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-)
New commits: commit 951282a27a9dd4c64fc206fcbdd805b4cb602816 Author: Regina Henschel <rb.hensc...@t-online.de> AuthorDate: Thu Apr 18 16:51:13 2019 +0200 Commit: Regina Henschel <rb.hensc...@t-online.de> CommitDate: Wed Apr 24 00:27:17 2019 +0200 tdf#124787 mso-spt143 (RingOutside) has angles in degree When reworking command U the shape 'RingOutside' was not considered. Although it is a 'mso-' shape, it has angles in degree and not in fixed-point number in its defaults. The patch removes in addition the changes introduced by Symphony, which erroneously used total width and height instead of radii for the ellipse size. Change-Id: Iede8e346681796fb3e147dbcfaaa08ed8fe87c54 Reviewed-on: https://gerrit.libreoffice.org/70941 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.hensc...@t-online.de> diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 339973707bdd..0e38216c1cd1 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1660,10 +1660,14 @@ void EnhancedCustomShape2d::CreateSubPath( // The following implementation generates such rendering. It is only for rendering legacy // MS shapes and independent of the meaning of commands U and T in ODF specification. - // Convert from fixedfloat to double - double fSwingAngle; - fStartAngle /= 65536.0; - fSwingAngle = fEndAngle / 65536.0; + // The WordArt shape 'RingOutside' has already angles in degree, all other need + // convertion from fixed-point number. + double fSwingAngle = fEndAngle; + if (sShpType != "mso-spt143") + { + fStartAngle /= 65536.0; + fSwingAngle = fEndAngle / 65536.0; + } // Convert orientation fStartAngle = -fStartAngle; fSwingAngle = -fSwingAngle; diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index ab6d19bcfa07..ce4223582ff1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -6499,20 +6499,17 @@ static const mso_CustomShape msoTextRingInside = const_cast<SvxMSDffHandle*>(mso_sptTextRingInsideHandle), SAL_N_ELEMENTS( mso_sptTextRingInsideHandle ) }; //mso_sptTextRingOutside -//path = U 10800 ?f0 21600 ?f2 180 539 N U 10800 ?f1 21600 ?f2 180 539 N +//path = U 10800 ?f0 10800 ?f2 180 539 N U 10800 ?f1 10800 ?f2 180 539 N +// MSO binary format has swing angle, not end angle, therefore 359 instead of 539. static const SvxMSDffVertPair mso_sptTextRingOutsideVert[] = { - { 10800, 0 MSO_I }, { 21600, 2 MSO_I }, { 180, 539},//U - { 10800, 1 MSO_I }, { 21600, 2 MSO_I }, { 180, 539 }//U - //{ 10800, 0 MSO_I }, { 10800, 0 MSO_I }, { 180, 359 }, - //{ 10800, 1 MSO_I }, { 10800, 0 MSO_I }, { 180, 359 } + { 10800, 0 MSO_I }, { 10800, 0 MSO_I }, { 180, 359 }, + { 10800, 1 MSO_I }, { 10800, 0 MSO_I }, { 180, 359 } }; static const SvxMSDffCalculationData mso_sptTextRingOutsideCalc[] = // adjustment1 : 6629 - 14971 { { 0x2001, { DFF_Prop_adjustValue, 1, 2 } }, - { 0x8000, { 21600, 0, 0x400 } }, - { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, //$0 - { 0x8000, { 21600, 0, DFF_Prop_adjustValue } }//21600-$0 + { 0x8000, { 21600, 0, 0x400 } } }; static const sal_uInt16 mso_sptTextRingOutsideSegm[] = { @@ -6521,7 +6518,7 @@ static const sal_uInt16 mso_sptTextRingOutsideSegm[] = }; static const SvxMSDffHandle mso_sptTextRingOutsideHandle[] = { - { SvxMSDffHandleFlags::RANGE | SvxMSDffHandleFlags::RANGE_Y_MAX_IS_SPECIAL | SvxMSDffHandleFlags::RANGE_Y_MIN_IS_SPECIAL, + { SvxMSDffHandleFlags::RANGE, 10800, 0x100, 10800, 10800, MIN_INT32, 0x7fffffff, 10800, 21600 } }; static const mso_CustomShape msoTextRingOutside = _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits