View | Details | Raw Unified | Return to issue 119872
Collapse All | Expand All

(-)filter/source/msfilter/msdffimp.cxx (-11 / +12 lines)
Lines 2362-2384 Link Here
2362
				{
2362
				{
2363
					rIn >> nTmp;
2363
					rIn >> nTmp;
2364
					nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN;
2364
					nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN;
2365
					nCnt = (sal_Int16)( nTmp & 0xfff );
2365
					nCnt = (sal_Int16)( nTmp & 0x1fff );//Last 13 bits for segment points number
2366
					switch( nTmp >> 12 )
2366
					switch( nTmp >> 13 )//First 3 bits for command type
2367
					{
2367
					{
2368
						case 0x0: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break;
2368
						case 0x0: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break;
2369
						case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break;	// seems to the relative lineto
2369
						case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break;
2370
						case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break;
2370
						case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break;
2371
						case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break;
2371
						case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break;
2372
						case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break;	// seems to be the relative curveto
2372
						case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break;
2373
						case 0x8: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break;
2373
						case 0x5:
2374
						case 0x6: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break;
2374
						case 0x6:
2375
						case 0xa:
2376
						case 0xb:
2377
						{
2375
						{
2378
							switch ( ( nTmp >> 8 ) & 0xf )
2376
							switch ( ( nTmp >> 8 ) & 0x1f )//5 bits next to command type is for path escape type
2379
							{
2377
							{
2380
								case 0x0:
2378
								case 0x0:
2381
								{
2379
								{
2380
									//It is msopathEscapeExtension which is transformed into LINETO.
2381
									//If issue happens, I think this part can be comment so that it will be taken as unknow command.
2382
									//When export, origin data will be export without any change.
2382
									nCommand = EnhancedCustomShapeSegmentCommand::LINETO;
2383
									nCommand = EnhancedCustomShapeSegmentCommand::LINETO;
2383
									if ( !nCnt )
2384
									if ( !nCnt )
2384
										nCnt = 1;
2385
										nCnt = 1;

Return to issue 119872