summaryrefslogtreecommitdiff
path: root/svx/source/customshapes
diff options
context:
space:
mode:
authormb93783 <mb93783@v60x-so15.Germany.Sun.COM>2009-12-02 12:43:33 +0100
committermb93783 <mb93783@v60x-so15.Germany.Sun.COM>2009-12-02 12:43:33 +0100
commitff9b3663452083bfc1b8f867d1dc606eebe8f99b (patch)
tree3e934547b4cc059fb713d598f4713e7d09f2ed69 /svx/source/customshapes
parent3c98dd4ea8c6d7494779ec1aa3a636030bfc7452 (diff)
parent4d9f378e82dd5a49ec7b72df0494007b455fdcf9 (diff)
merge to m66
Diffstat (limited to 'svx/source/customshapes')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx58
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx12
2 files changed, 51 insertions, 19 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index b20b7525c7..eba03cd9ea 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -695,7 +695,16 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created
- // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here
+ // #i105323# For 2D AtoShapes, the shadow attirbute does not need to be applied to any
+ // of the constucted helper SdrObjects. This would lead to problems since the shadow
+ // of one helper object would fall on one helper object behind it (e.g. with the
+ // eyes of the smiley shape). This is not wanted; instead a single shadow 'behind'
+ // the AutoShape visualisation is wanted. This is done with primitive functionailty
+ // now in SdrCustomShapePrimitive2D::create2DDecomposition, but only for 2D objects
+ // (see there and in EnhancedCustomShape3d::Create3DObject to read more).
+ // This exception may be removed later when AutoShapes will create primitives directly.
+ // So, currently remove the ShadowAttribute from the ItemSet to not apply it to any
+ // 2D helper shape.
ClearItem(SDRATTR_SHADOW);
Point aP( pCustomShapeObj->GetSnapRect().Center() );
@@ -730,23 +739,23 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
/*const sal_Int32* pDefData =*/ ApplyShapeAttributes( rGeometryItem );
switch( eSpType )
{
- case mso_sptCan : nColorData = 0x20400000; break;
- case mso_sptCube : nColorData = 0x302e0000; break;
- case mso_sptActionButtonBlank : nColorData = 0x502ce400; break;
- case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break;
- case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break;
- case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break;
- case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break;
- case mso_sptBevel : nColorData = 0x502ce400; break;
- case mso_sptFoldedCorner : nColorData = 0x20e00000; break;
- case mso_sptSmileyFace : nColorData = 0x20e00000; break;
+ case mso_sptCan : nColorData = 0x20400000; break;
+ case mso_sptCube : nColorData = 0x302e0000; break;
+ case mso_sptActionButtonBlank : nColorData = 0x502ce400; break;
+ case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break;
+ case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break;
+ case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break;
+ case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break;
+ case mso_sptBevel : nColorData = 0x502ce400; break;
+ case mso_sptFoldedCorner : nColorData = 0x20e00000; break;
+ case mso_sptSmileyFace : nColorData = 0x20e00000; break;
case mso_sptNil :
{
if( sShapeType.getLength() > 4 &&
@@ -1700,6 +1709,19 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
if(aNewB2DPolyPolygon.count())
{
+ if( !bLineGeometryNeededOnly )
+ {
+ // hack aNewB2DPolyPolygon to fill logic rect - this is
+ // needed to produce gradient fills that look like mso
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
+ aLogicRect.GetHeight()));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+ }
// #i37011#
bool bForceCreateTwoObjects(false);
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index f53d79bf5b..fcce0b5a0e 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -323,7 +323,17 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
Point aCenter( aSnapRect.Center() );
SfxItemSet aSet( pCustomShape->GetMergedItemSet() );
- aSet.ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created
+
+ //SJ: vertical writing is not required, by removing this item no outliner is created
+ aSet.ClearItem( SDRATTR_TEXTDIRECTION );
+
+ // #i105323# For 3D AutoShapes, the shadow attribute has to be applied to each
+ // created visualisation helper model shape individually. The shadow itself
+ // will then be rendered from the 3D renderer correctly for the whole 3D scene
+ // (and thus behind all objects of which the visualisation may be built). So,
+ // dio NOT remove it from the ItemSet here.
+ // aSet.ClearItem(SDRATTR_SHADOW);
+
std::vector< E3dCompoundObject* > aPlaceholderObjectList;
double fExtrusionBackward, fExtrusionForward;