filter/source/msfilter/msdffimp.cxx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-)
New commits: commit 5278c7770a350771a96780c0e0d7a0bdae0d55b9 Author: Andre Fischer <a...@apache.org> Date: Tue Jul 10 10:01:05 2012 +0000 #i119872# Fixed import of custom shapes from PPT. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index cf760ef..6a98e71 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2243,23 +2243,24 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt { rIn >> nTmp; nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN; - nCnt = (sal_Int16)( nTmp & 0xfff ); - switch( nTmp >> 12 ) + nCnt = (sal_Int16)( nTmp & 0x1fff );//Last 13 bits for segment points number + switch( nTmp >> 13 )//First 3 bits for command type { case 0x0: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break; - case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break; // seems to the relative lineto - case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break; - case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; - case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; // seems to be the relative curveto - case 0x8: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break; - case 0x6: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break; - case 0xa: - case 0xb: + case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; + case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break; + case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break; + case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break; + case 0x5: + case 0x6: { - switch ( ( nTmp >> 8 ) & 0xf ) + switch ( ( nTmp >> 8 ) & 0x1f )//5 bits next to command type is for path escape type { case 0x0: { + //It is msopathEscapeExtension which is transformed into LINETO. + //If issue happens, I think this part can be comment so that it will be taken as unknow command. + //When export, origin data will be export without any change. nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; commit c789d126aacda9c5d2ccf3c51d669b1796180f66 Author: Andre Fischer <a...@apache.org> Date: Fri Jul 6 12:07:22 2012 +0000 #i119887# Fixing import of shadow direction. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 96b69b7..cf760ef 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2604,15 +2604,13 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj { sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) ); rManager.ScaleEmu( nVal ); - if ( nVal ) - rSet.Put( SdrShadowXDistItem( nVal ) ); + rSet.Put( SdrShadowXDistItem( nVal ) ); } if ( IsProperty( DFF_Prop_shadowOffsetY ) ) { sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) ); rManager.ScaleEmu( nVal ); - if ( nVal ) - rSet.Put( SdrShadowYDistItem( nVal ) ); + rSet.Put( SdrShadowYDistItem( nVal ) ); } if ( IsProperty( DFF_Prop_fshadowObscured ) ) { commit cf4260b85213b263f78c51d33557176c813989ef Author: Andre Fischer <a...@apache.org> Date: Mon Jul 9 11:04:52 2012 +0000 #i119888# Fixed import of gradient colored shapes from PPT. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 86fabbd..96b69b7 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2664,7 +2664,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj } ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269# ApplyFillAttributes( rIn, rSet, rObjData ); - if ( rObjData.eShapeType != mso_sptNil ) + if ( rObjData.eShapeType != mso_sptNil || IsProperty( DFF_Prop_pVertices ) ) { ApplyCustomShapeGeometryAttributes( rIn, rSet, rObjData ); ApplyCustomShapeTextAttributes( rSet ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits