diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-10-15 16:29:40 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-10-15 16:29:40 +0000 |
commit | 2e660ad9d8158c181abbc40e2ddee292b35919b6 (patch) | |
tree | 17b81605687a66b69100f9ef4649eb8133769c67 | |
parent | 130da5cbf25fb3991c6f27f8afe51e3ca5943657 (diff) |
CWS-TOOLING: integrate CWS c29v001a
2009-10-06 hb #160731# use SetReadOnlyUI instead of item at medium to get read only functionality
2009-10-05 hb #160731# added virtual destructor to IDocumentExternal data to make compilable under wntmsci12
2009-10-02 hb #160731# store fReadOnlyRecommended/fWriteReservation in WW8FibData
2009-10-02 hb #160731# handle stepping of offset correctly when reading strings
2009-10-02 hb #160731# write SttbAssoc/fReadOnlyRecommended/fWriteReservation
2009-10-02 hb #160731# Added new class WW8FibData
2009-10-02 hb #160731# new identifier for external type: FIB
2009-10-02 hb #160731# Added new class WW8FibData
2009-10-02 hb dbg_out for OUString
2009-10-01 hb read and write SttbfAssoc
2009-10-01 hb store external data in SwDoc
2009-09-29 hb merged DEV300_m60
2009-09-29 hb merged changes from private repository
2009-09-04 Henning Brinkmann added WW8Sttb for reading the WW8Sttb
2009-09-15 hb137859 #160401# made compilable
2009-09-15 hb137859 merged changes by hb
2009-09-15 sj93757 #160376# fixed shadow problem
2009-09-15 Henning Brinkmann merged changes for #160401#
2009-09-01 Henning Brinkmann #160401# added fReadOnlyRecommended and fWriteReservation to WW8Fib. If one of those is set, the document is read read-only.
-rw-r--r-- | svx/source/msfilter/msdffimp.cxx | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 5542dacbdbdc..c9cfde91547a 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -3234,6 +3234,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const { // MapUnit eMap( rManager.GetModel()->GetScaleUnit() ); + sal_Bool bHasShadow = sal_False; + for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() ) { UINT32 nRecType = GetCurKey(); @@ -3305,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const break; case DFF_Prop_fshadowObscured : { - sal_Bool bHasShadow = ( nContent & 2 ) != 0; - rSet.Put( SdrShadowItem( bHasShadow ) ); + bHasShadow = ( nContent & 2 ) != 0; if ( bHasShadow ) { if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) @@ -3319,6 +3320,44 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const } } + 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. + UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash )); + if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType )) + nLineFlags &= ~0x08; + 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 ) ) // 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 ) |