summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-11-13 18:48:59 +0100
committerKurt Zenker <kz@openoffice.org>2009-11-13 18:48:59 +0100
commit87f9481381fdb60af73084288ab46d626bded683 (patch)
tree1f5c1efaa3f10c72bc0f7dd9a96c82bfb6b41ed9
parentfd9aae257e5e0333b208045a6ac42706d987c3a8 (diff)
parent898b0e6106093ab2eca17adb1421967d7bdc2184 (diff)
CWS-TOOLING: integrate CWS impress178_DEV300
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx25
-rw-r--r--svx/inc/svx/svdoashp.hxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx13
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx28
-rw-r--r--svx/source/svdraw/svdoashp.cxx6
5 files changed, 36 insertions, 38 deletions
diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
index 1e68a61432a0..a7084993b5f2 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
@@ -39,19 +39,19 @@
//////////////////////////////////////////////////////////////////////////////
// predefines
-namespace drawinglayer
-{
- namespace primitive2d
+namespace drawinglayer { namespace primitive2d {
+ enum MeasureTextPosition
{
- enum MeasureTextPosition
- {
- MEASURETEXTPOSITION_AUTOMATIC,
- MEASURETEXTPOSITION_NEGATIVE,
- MEASURETEXTPOSITION_CENTERED,
- MEASURETEXTPOSITION_POSITIVE
- };
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
+ MEASURETEXTPOSITION_AUTOMATIC,
+ MEASURETEXTPOSITION_NEGATIVE,
+ MEASURETEXTPOSITION_CENTERED,
+ MEASURETEXTPOSITION_POSITIVE
+ };
+}}
+
+namespace drawinglayer { namespace attribute {
+ class SdrLineAttribute;
+}}
//////////////////////////////////////////////////////////////////////////////
@@ -80,6 +80,7 @@ namespace drawinglayer
// internal decomposition helper
Primitive2DReference impCreatePart(
+ const attribute::SdrLineAttribute& rLineAttribute,
const basegfx::B2DHomMatrix& rObjectMatrix,
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd,
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index faf1aa7055aa..f65afc0b4efe 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -179,6 +179,8 @@ public:
virtual UINT16 GetObjIdentifier() const;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
+ virtual void SetModel(SdrModel* pNewModel);
+
virtual void RecalcSnapRect();
virtual const Rectangle& GetSnapRect() const;
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 804db0c58a16..36bb586b01d6 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1701,19 +1701,6 @@ 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/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index f5445cefa5f6..cb2452e8ba1f 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/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index dab855fa6f41..217916633998 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1673,6 +1673,12 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
}
}
+void SdrObjCustomShape::SetModel(SdrModel* pNewModel)
+{
+ SdrTextObj::SetModel(pNewModel);
+ mXRenderedCustomShape.clear();
+}
+
UINT16 SdrObjCustomShape::GetObjIdentifier() const
{
return UINT16(OBJ_CUSTOMSHAPE);