summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx11
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx8
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx16
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx3
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx24
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx28
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx7
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx10
9 files changed, 88 insertions, 24 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index ef7df1ae32..28ab8cbff6 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -39,6 +39,7 @@
#include <svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <svx/obj3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -134,6 +135,7 @@ namespace sdr
// create Primitive2DSequence from sub-geometry
const SdrObject* pSdrObjRepresentation = GetCustomShapeObj().GetSdrObjectFromCustomShape();
+ bool b3DShape(false);
if(pSdrObjRepresentation)
{
@@ -142,6 +144,12 @@ namespace sdr
while(aIterator.IsMore())
{
SdrObject& rCandidate = *aIterator.Next();
+
+ if(!b3DShape && dynamic_cast< E3dObject* >(&rCandidate))
+ {
+ b3DShape = true;
+ }
+
const drawinglayer::primitive2d::Primitive2DSequence xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence());
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xGroup, xNew);
}
@@ -220,7 +228,8 @@ namespace sdr
xGroup,
aTextBoxMatrix,
bWordWrap,
- false)); // #SJ# New parameter to force to clipped BlockText for SC
+ false, // #SJ# New parameter to force to clipped BlockText for SC
+ b3DShape));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 454b68cbfb..3facc1c031 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -113,6 +113,11 @@ namespace sdr
new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
GetOle2Obj(),
aObjectMatrix,
+
+ // #i104867# add GraphicVersion number to be able to check for
+ // content change in the primitive later
+ GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion(),
+
bHighContrast));
// create primitive. Use Ole2 primitive here. Prepare attribute settings, will be used soon anyways.
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 9c7810ea46..f9113d7b64 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -39,6 +39,7 @@
#include <svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx>
#include <svtools/itemset.hxx>
#include <svx/sdr/primitive2d/sdrprimitivetools.hxx>
+#include <svx/svdmodel.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -104,6 +105,10 @@ namespace sdr
double fCornerRadiusY;
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
+ // #i105856# use knowledge about pickthrough from the model
+ const bool bPickThroughTransparentTextFrames(
+ GetRectObj().GetModel() && GetRectObj().GetModel()->IsPickThroughTransparentTextFrames());
+
// create primitive
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrRectanglePrimitive2D(
@@ -111,7 +116,8 @@ namespace sdr
*pAttribute,
fCornerRadiusX,
fCornerRadiusY,
- GetRectObj().IsTextFrame()));
+ // #i105856# use fill for HitTest when TextFrame and not PickThrough
+ GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index f77b533a0e..64ac530e55 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -44,6 +44,10 @@
//////////////////////////////////////////////////////////////////////////////
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace sdr
{
namespace overlay
@@ -140,6 +144,18 @@ namespace sdr
maViewInformation2D(0),
mfDiscreteOne(0.0)
{
+ // set Property 'ReducedDisplayQuality' to true to allow simpler interaction
+ // visualisations
+ static bool bUseReducedDisplayQualityForDrag(true);
+
+ if(bUseReducedDisplayQualityForDrag)
+ {
+ uno::Sequence< beans::PropertyValue > xProperties(1);
+ xProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality"));
+ xProperties[0].Value <<= true;
+ maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties);
+ }
+
if(pOldOverlayManager)
{
// take over OverlayObjects from given OverlayManager. Copy
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 91393a4047..31fe3da220 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -370,6 +370,9 @@ namespace sdr
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
+ // #i80730# removed: VCL hack for transparent child windows
+ // No longer needed, checked in DEV300 m54
+
// #i80730# restore visibility of VCL cursor
if(bCursorWasEnabled)
{
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index e38cb57378..93e8b3a6e7 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -68,7 +68,20 @@ namespace drawinglayer
// add shadow
if(aRetval.hasElements() && getSdrSTAttribute().getShadow())
{
- aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ // #i105323# add generic shadow only for 2D shapes. For
+ // 3D shapes shadow will be set at the individual created
+ // visualisation objects and be visualized by the 3d renderer
+ // as a single shadow.
+ //
+ // The shadow for AutoShapes could be handled uniformely by not setting any
+ // shadow items at the helper model objects and only adding shadow here for
+ // 2D and 3D (and it works, too), but this would lead to two 3D scenes for
+ // the 3D object; one for the shadow aond one for the content. The one for the
+ // shadow will be correct (using ColorModifierStack), but expensive.
+ if(!get3DShape())
+ {
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ }
}
return aRetval;
@@ -79,13 +92,15 @@ namespace drawinglayer
const Primitive2DSequence& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
bool bWordWrap,
- bool bForceTextClipToTextRange)
+ bool bForceTextClipToTextRange,
+ bool b3DShape)
: BasePrimitive2D(),
maSdrSTAttribute(rSdrSTAttribute),
maSubPrimitives(rSubPrimitives),
maTextBox(rTextBox),
mbWordWrap(bWordWrap),
- mbForceTextClipToTextRange(bForceTextClipToTextRange)
+ mbForceTextClipToTextRange(bForceTextClipToTextRange),
+ mb3DShape(b3DShape)
{
}
@@ -99,7 +114,8 @@ namespace drawinglayer
&& getSubPrimitives() == rCompare.getSubPrimitives()
&& getTextBox() == rCompare.getTextBox()
&& getWordWrap() == rCompare.getWordWrap()
- && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange());
+ && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange()
+ && get3DShape() == rCompare.get3DShape());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 9d58a01d55..ce9f40037c 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -52,27 +52,29 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DReference SdrMeasurePrimitive2D::impCreatePart(
+ const attribute::SdrLineAttribute& rLineAttribute,
const basegfx::B2DHomMatrix& rObjectMatrix,
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd,
bool bLeftActive,
bool bRightActive) const
{
+ const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
basegfx::B2DPolygon aPolygon;
+
aPolygon.append(rStart);
aPolygon.append(rEnd);
- if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive))
+ if(!pLineStartEnd || (!bLeftActive && !bRightActive))
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0);
}
if(bLeftActive && bRightActive)
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd());
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd);
}
- const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
const basegfx::B2DPolyPolygon aEmpty;
const attribute::SdrLineStartEndAttribute aLineStartEnd(
bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty,
@@ -80,7 +82,7 @@ namespace drawinglayer
bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false,
bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false);
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd);
}
Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
@@ -278,12 +280,12 @@ namespace drawinglayer
const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY());
const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY());
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false));
if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal)
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false));
}
}
else
@@ -294,12 +296,12 @@ namespace drawinglayer
const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY());
const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY());
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true));
}
else
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true));
}
}
@@ -312,13 +314,13 @@ namespace drawinglayer
const basegfx::B2DPoint aLeftUp(0.0, fTopEdge);
const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft);
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false));
// right help line
const basegfx::B2DPoint aRightUp(fDistance, fTopEdge);
const basegfx::B2DPoint aRightDown(fDistance, fBottomRight);
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false));
// text horizontal position
if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal)
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 9c5616ebff..164e122e67 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -157,10 +157,12 @@ namespace drawinglayer
SdrOleContentPrimitive2D::SdrOleContentPrimitive2D(
const SdrOle2Obj& rSdrOle2Obj,
const basegfx::B2DHomMatrix& rObjectTransform,
+ sal_uInt32 nGraphicVersion,
bool bHighContrast)
: BasePrimitive2D(),
mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)),
maObjectTransform(rObjectTransform),
+ mnGraphicVersion(nGraphicVersion),
mbHighContrast(bHighContrast)
{
}
@@ -176,6 +178,11 @@ namespace drawinglayer
return ((bBothNot || bBothAndEqual)
&& getObjectTransform() == rCompare.getObjectTransform()
+
+ // #i104867# to find out if the Graphic content of the
+ // OLE has changed, use GraphicVersion number
+ && getGraphicVersion() == rCompare.getGraphicVersion()
+
&& getHighContrast() == rCompare.getHighContrast());
}
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 209684653a..6449859318 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -68,7 +68,7 @@ namespace drawinglayer
*getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
- else if(getTextFrame())
+ else if(getForceFillForHitTest())
{
// if no fill and it's a text frame, create a fill for HitTest and
// BoundRect fallback
@@ -89,7 +89,7 @@ namespace drawinglayer
getTransform(),
*getSdrLFSTAttribute().getLine()));
}
- else if(!getTextFrame())
+ else if(!getForceFillForHitTest())
{
// if initially no line is defined and it's not a text frame, create
// a line for HitTest and BoundRect
@@ -127,13 +127,13 @@ namespace drawinglayer
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
double fCornerRadiusX,
double fCornerRadiusY,
- bool bTextFrame)
+ bool bForceFillForHitTest)
: BasePrimitive2D(),
maTransform(rTransform),
maSdrLFSTAttribute(rSdrLFSTAttribute),
mfCornerRadiusX(fCornerRadiusX),
mfCornerRadiusY(fCornerRadiusY),
- mbTextFrame(bTextFrame)
+ mbForceFillForHitTest(bForceFillForHitTest)
{
}
@@ -147,7 +147,7 @@ namespace drawinglayer
&& getCornerRadiusY() == rCompare.getCornerRadiusY()
&& getTransform() == rCompare.getTransform()
&& getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()
- && getTextFrame() == rCompare.getTextFrame());
+ && getForceFillForHitTest() == rCompare.getForceFillForHitTest());
}
return false;