summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-10-14 08:11:06 +0000
committerOliver Bolte <obo@openoffice.org>2009-10-14 08:11:06 +0000
commit16a0ae5f08e01d1fce92b2be35c875b5577a3d9e (patch)
tree4f0ca34db224708796d2688bb72299c1c7fe86c6
parentac17ed33845f70408174282f8fa1f525f652f5e2 (diff)
CWS-TOOLING: integrate CWS c29v001a_OOO320
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.cxx43
1 files changed, 41 insertions, 2 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 30251b6b3a..83f1c70e6c 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 )