[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - filter/source

Andras Timar andras.timar at collabora.com
Wed Nov 20 02:40:49 PST 2013


 filter/source/msfilter/msdffimp.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a4d67ba5dc65e0eaa3ffe7fcfcdb55f59413385d
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue Nov 19 11:08:09 2013 +0100

    fdo#66854 keep shadow distance of non-supported MSO shadow type
    
    this is a slight improvement of d7367b709dc4e97714fb2084b872a96389e768fb
    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
    Reviewed-on: https://gerrit.libreoffice.org/6719
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b02d599..dfbcab1 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2521,6 +2521,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
 void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const
 {
     sal_Bool bHasShadow = sal_False;
+    bool bNonZeroShadowOffset = false;
 
     if ( IsProperty( DFF_Prop_gtextSize ) )
         rSet.Put( SvxFontHeightItem( rManager.ScalePt( GetPropertyValue( DFF_Prop_gtextSize ) ), 100, EE_CHAR_FONTHEIGHT ) );
@@ -2553,12 +2554,14 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
         sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) );
         rManager.ScaleEmu( nVal );
         rSet.Put( SdrShadowXDistItem( nVal ) );
+        bNonZeroShadowOffset = ( nVal > 0 );
     }
     if ( IsProperty( DFF_Prop_shadowOffsetY ) )
     {
         sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) );
         rManager.ScaleEmu( nVal );
         rSet.Put( SdrShadowYDistItem( nVal ) );
+        bNonZeroShadowOffset = ( nVal > 0 );
     }
     if ( IsProperty( DFF_Prop_fshadowObscured ) )
     {
@@ -2574,7 +2577,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
     if ( IsProperty( 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
             sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302;


More information about the Libreoffice-commits mailing list