You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/03/26 13:08:22 UTC
svn commit: r1581802 -
/openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx
Author: alg
Date: Wed Mar 26 12:08:21 2014
New Revision: 1581802
URL: http://svn.apache.org/r1581802
Log:
i124477 set object shadow always at PPT import, it may be applied to object text
Modified:
openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx
Modified: openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx?rev=1581802&r1=1581801&r2=1581802&view=diff
==============================================================================
--- openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx (original)
+++ openoffice/trunk/main/filter/source/msfilter/msdffimp.cxx Wed Mar 26 12:08:21 2014
@@ -2706,42 +2706,52 @@ void DffPropertyReader::ApplyAttributes(
}
if ( bHasShadow )
{
- // #160376# sj: activating shadow only if fill and or linestyle is used
- // this is required because of the latest drawing layer core changes.
- // Issue i104085 is related to this.
- sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
- if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
- nLineFlags &= ~0x08;
- sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
- if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
- nFillFlags &= ~0x10;
- if ( nFillFlags & 0x10 )
- {
- MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
- switch( eMSO_FillType )
- {
- case mso_fillSolid :
- case mso_fillPattern :
- case mso_fillTexture :
- case mso_fillPicture :
- case mso_fillShade :
- case mso_fillShadeCenter :
- case mso_fillShadeShape :
- case mso_fillShadeScale :
- case mso_fillShadeTitle :
- break;
- // case mso_fillBackground :
- default:
- nFillFlags &=~0x10; // no fillstyle used
- break;
- }
- }
- if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) && ( rObjData.eShapeType != mso_sptPictureFrame )) // if there is no fillstyle and linestyle
- bHasShadow = sal_False; // we are turning shadow off.
+ static bool bCheckShadow(false);
- if ( bHasShadow )
- rSet.Put( SdrShadowItem( bHasShadow ) );
- }
+ // #124477# Found no reason not to set shadow, esp. since it is applied to evtl. existing text
+ // and will lead to an error of in PPT someone used text and added the object shadow to the
+ // object carryintg that text. I found no cases where this leads to problems (the old bugtracker
+ // task #160376# from sj is unfortunately no longer available). Keeping the code for now
+ // to allow easy fallback when this shows problems in the future
+ if(bCheckShadow)
+ {
+ // #160376# sj: activating shadow only if fill and or linestyle is used
+ // this is required because of the latest drawing layer core changes.
+ // Issue i104085 is related to this.
+ sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
+ nLineFlags &= ~0x08;
+ sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
+ nFillFlags &= ~0x10;
+ if ( nFillFlags & 0x10 )
+ {
+ MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
+ switch( eMSO_FillType )
+ {
+ case mso_fillSolid :
+ case mso_fillPattern :
+ case mso_fillTexture :
+ case mso_fillPicture :
+ case mso_fillShade :
+ case mso_fillShadeCenter :
+ case mso_fillShadeShape :
+ case mso_fillShadeScale :
+ case mso_fillShadeTitle :
+ break;
+ // case mso_fillBackground :
+ default:
+ nFillFlags &=~0x10; // no fillstyle used
+ break;
+ }
+ }
+ if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) && ( rObjData.eShapeType != mso_sptPictureFrame )) // if there is no fillstyle and linestyle
+ bHasShadow = sal_False; // we are turning shadow off.
+ }
+
+ if ( bHasShadow )
+ rSet.Put( SdrShadowItem( bHasShadow ) );
+ }
ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269#
ApplyFillAttributes( rIn, rSet, rObjData );
if ( rObjData.eShapeType != mso_sptNil || IsProperty( DFF_Prop_pVertices ) )