You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by su...@apache.org on 2012/08/20 05:29:53 UTC

svn commit: r1374907 - /incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx

Author: sunying
Date: Mon Aug 20 03:29:52 2012
New Revision: 1374907

URL: http://svn.apache.org/viewvc?rev=1374907&view=rev
Log:
#119881# fix the"RingInside" fontwork display incorrectly when open .ppt file
Reported by: Li Feng Wang
Patch by: Ying Sun
Review by: Jian Yuan Li

Modified:
    incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx

Modified: incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx?rev=1374907&r1=1374906&r2=1374907&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx Mon Aug 20 03:29:52 2012
@@ -6462,7 +6462,47 @@ static const mso_CustomShape msoTextChev
 	NULL, 0,
 	(SvxMSDffHandle*)mso_sptTextChevronInvertedHandle, sizeof( mso_sptTextChevronInvertedHandle ) / sizeof( SvxMSDffHandle )
 };
-
+//V 0 0 21600 ?f2 0 ?f0 21600 ?f0 
+//W 0 0 21600 ?f2 21600 ?f0 0 ?f0 N 
+//V 0 ?f3 21600 21600 0 ?f1 21600 ?f1 
+//W 0 ?f3 21600 21600 21600 ?f1 0 ?f1 N
+//mso_sptTextRingInside
+static const SvxMSDffVertPair mso_sptTextRingInsideVert[] =
+{
+	{ 0, 0 }, { 21600, 2 MSO_I }, { 0, 0 MSO_I },{ 21600, 0 MSO_I },//V
+	{ 0, 0 }, { 21600, 2 MSO_I }, { 21600, 0 MSO_I },{ 0, 0 MSO_I },//W
+	{ 0, 3 MSO_I }, { 21600, 21600 }, { 0, 1 MSO_I },{ 21600, 1 MSO_I },//V
+	{ 0, 3 MSO_I }, { 21600, 21600 }, { 21600, 1 MSO_I },{ 0, 1 MSO_I }//W
+};
+static const SvxMSDffCalculationData mso_sptTextRingInsideCalc[] =	// 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
+};
+static const sal_uInt16 mso_sptTextRingInsideSegm[] =
+{
+	0xa604, 0xa504,0x8000,
+	0xa604, 0xa504,0x8000
+};
+static const SvxMSDffHandle mso_sptTextRingInsideHandle[] =
+{
+	{	MSDFF_HANDLE_FLAGS_RANGE| MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL,
+		10800, 0x100, 10800, 10800, 0x80000000, 0x7fffffff, 10800, 21600 }
+};
+static const mso_CustomShape msoTextRingInside =
+{
+	(SvxMSDffVertPair*)mso_sptTextRingInsideVert, sizeof( mso_sptTextRingInsideVert ) / sizeof( SvxMSDffVertPair ),
+	(sal_uInt16*)mso_sptTextRingInsideSegm, sizeof( mso_sptTextRingInsideSegm ) >> 1,
+	(SvxMSDffCalculationData*)mso_sptTextRingInsideCalc, sizeof( mso_sptTextRingInsideCalc ) / sizeof( SvxMSDffCalculationData ),
+	(sal_Int32*)mso_sptDefault13500,
+	(SvxMSDffTextRectangles*)mso_sptFontWorkTextRect, sizeof( mso_sptFontWorkTextRect ) / sizeof( SvxMSDffTextRectangles ),
+	21600, 21600,
+	0x80000000, 0x80000000,
+	NULL, 0,
+	(SvxMSDffHandle*)mso_sptTextRingInsideHandle, sizeof( mso_sptTextRingInsideHandle ) / sizeof( SvxMSDffHandle )
+};
 //mso_sptTextRingOutside
 //path = U 10800 ?f0 21600 ?f2 180 539 N U 10800 ?f1 21600 ?f2 180 539 N
 static const SvxMSDffVertPair mso_sptTextRingOutsideVert[] =
@@ -8425,7 +8465,7 @@ const mso_CustomShape* GetCustomShapeCon
 		case mso_sptTextTriangleInverted :		pCustomShape = &msoTextTriangleInverted; break;
 		case mso_sptTextChevron :				pCustomShape = &msoTextChevron; break;
 		case mso_sptTextChevronInverted :		pCustomShape = &msoTextChevronInverted; break;
-		case mso_sptTextRingInside :			pCustomShape = &msoTextRingOutside; break;	// SJ: TODO->the orientation of the ellipse needs to be changed
+		case mso_sptTextRingInside :			pCustomShape = &msoTextRingInside; break;	// SJ: TODO->the orientation of the ellipse needs to be changed
 		case mso_sptTextRingOutside :			pCustomShape = &msoTextRingOutside; break;
 		case mso_sptTextFadeRight :				pCustomShape = &msoTextFadeRight; break;
 		case mso_sptTextFadeLeft :				pCustomShape = &msoTextFadeLeft; break;