Kaydet (Commit) 3b0e3e37 authored tarafından Andras Timar's avatar Andras Timar

fdo#66854 keep shadow distance of non-supported MSO shadow type

this is a slight improvement of d7367b70
the rendering of star from #i119634# bugdoc was kept
the rendering of the yellow circle shadows from fdo#66854 bugdoc
was improved

Change-Id: Ife53328ef665131fb954eb33c2e8269ad10da0fe
üst ca99a47b
...@@ -2522,6 +2522,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const ...@@ -2522,6 +2522,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const
{ {
sal_Bool bHasShadow = sal_False; sal_Bool bHasShadow = sal_False;
bool bNonZeroShadowOffset = false;
if ( IsProperty( DFF_Prop_gtextSize ) ) if ( IsProperty( DFF_Prop_gtextSize ) )
rSet.Put( SvxFontHeightItem( rManager.ScalePt( GetPropertyValue( DFF_Prop_gtextSize ) ), 100, EE_CHAR_FONTHEIGHT ) ); rSet.Put( SvxFontHeightItem( rManager.ScalePt( GetPropertyValue( DFF_Prop_gtextSize ) ), 100, EE_CHAR_FONTHEIGHT ) );
...@@ -2554,12 +2555,14 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj ...@@ -2554,12 +2555,14 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) ); sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) );
rManager.ScaleEmu( nVal ); rManager.ScaleEmu( nVal );
rSet.Put( SdrShadowXDistItem( nVal ) ); rSet.Put( SdrShadowXDistItem( nVal ) );
bNonZeroShadowOffset = ( nVal > 0 );
} }
if ( IsProperty( DFF_Prop_shadowOffsetY ) ) if ( IsProperty( DFF_Prop_shadowOffsetY ) )
{ {
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) ); sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) );
rManager.ScaleEmu( nVal ); rManager.ScaleEmu( nVal );
rSet.Put( SdrShadowYDistItem( nVal ) ); rSet.Put( SdrShadowYDistItem( nVal ) );
bNonZeroShadowOffset = ( nVal > 0 );
} }
if ( IsProperty( DFF_Prop_fshadowObscured ) ) if ( IsProperty( DFF_Prop_fshadowObscured ) )
{ {
...@@ -2575,7 +2578,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj ...@@ -2575,7 +2578,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
if ( IsProperty( DFF_Prop_shadowType ) ) if ( IsProperty( DFF_Prop_shadowType ) )
{ {
MSO_ShadowType eShadowType = static_cast< MSO_ShadowType >( GetPropertyValue( DFF_Prop_shadowType ) ); MSO_ShadowType eShadowType = static_cast< MSO_ShadowType >( GetPropertyValue( DFF_Prop_shadowType ) );
if( eShadowType != mso_shadowOffset ) if( eShadowType != mso_shadowOffset && !bNonZeroShadowOffset )
{ {
//0.12" == 173 twip == 302 100mm //0.12" == 173 twip == 302 100mm
sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302; sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment