summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-06-29 10:53:11 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-06-30 15:04:05 +0200
commit28d1c25092ddefdf90d0554532b7611698b2d18e (patch)
tree466703d8f5583787b53c2f6368d9ce89cb39e620 /svx/source/sdr
parent282def6f503bbbdd48f2af722985dcfd197e2fc6 (diff)
n#676858: ghost uneditable drawing objects
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx10
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcircobj.cxx17
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx10
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx13
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx12
5 files changed, 58 insertions, 4 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 45cd62053ad4..50205c25241c 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -45,6 +45,7 @@
#include <svx/xfltrit.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -171,6 +172,15 @@ namespace sdr
}
}
+ if (rCaptionObj.IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+
return xRetval;
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index dd41ddcd900a..03fcc439c74f 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -36,6 +36,7 @@
#include <svl/itemset.hxx>
#include <svx/sxciaitm.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -78,6 +79,8 @@ namespace sdr
// create primitive data
const sal_uInt16 nIdentifier(GetCircObj().GetObjIdentifier());
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
+
// always create primitives to allow the decomposition of SdrEllipsePrimitive2D
// or SdrEllipseSegmentPrimitive2D to create needed invisible elements for HitTest
// and/or BoundRect
@@ -88,7 +91,7 @@ namespace sdr
aObjectMatrix,
aAttribute));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
else
{
@@ -108,8 +111,18 @@ namespace sdr
bCloseSegment,
bCloseUsingCenter));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+
+ if (GetCircObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 16d717451d4e..db4094c3cdfd 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -39,6 +39,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/obj3d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -233,6 +234,15 @@ namespace sdr
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aObjectRange));
+ if (GetCustomShapeObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+
return xRetval;
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 46a8d4611021..34c1b99802c1 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -35,6 +35,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <svx/sdr/primitive2d/sdrpathprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -137,7 +138,17 @@ namespace sdr
aAttribute,
aUnitPolyPolygon));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ drawinglayer::primitive2d::Primitive2DSequence xRetval(&xReference, 1);
+
+ if (GetPathObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index cfa44f41a43a..fd6a688934f0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -37,6 +37,7 @@
#include <svx/sdr/primitive2d/sdrprimitivetools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/svdmodel.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -95,8 +96,17 @@ namespace sdr
fCornerRadiusY,
// #i105856# use fill for HitTest when TextFrame and not PickThrough
GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
+ drawinglayer::primitive2d::Primitive2DSequence xRetVal(&xReference, 1);
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ if ( GetRectObj().IsGhosted( ) )
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetVal, aBColorModifier));
+ xRetVal = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+ return xRetVal;
}
} // end of namespace contact
} // end of namespace sdr