summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2015-09-06 12:06:47 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-09-20 13:05:15 +0200
commite910e775cf9982b6e14df2630ca21026efe09d65 (patch)
treebfa1abe5431b658e144b40733fddc26afce9d247 /svx/source/sdr
parente59fca52399ab1f96b5bb525b56b444c5674ae6d (diff)
chained editeng: Enhance existing svx classes with chaining-related methods
Change-Id: I10829d8f07f8881af6d1a9422cbdae00e83a7ac8
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 385de990fca4..ac7815dc66cc 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -480,6 +480,48 @@ namespace drawinglayer
} // end of namespace primitive2d
} // end of namespace drawinglayer
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+
+ SdrChainedTextPrimitive2D::SdrChainedTextPrimitive2D(
+ const SdrText* pSdrText,
+ const OutlinerParaObject& rOutlinerParaObject,
+ const basegfx::B2DHomMatrix& rTextRangeTransform)
+ : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
+ maTextRangeTransform(rTextRangeTransform)
+ { }
+
+ Primitive2DSequence SdrChainedTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const
+ {
+ Primitive2DSequence aRetval;
+ getSdrText()->GetObject().impDecomposeChainedTextPrimitive(aRetval, *this, aViewInformation);
+
+ return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
+ }
+
+ bool SdrChainedTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ {
+ if(SdrTextPrimitive2D::operator==(rPrimitive))
+ {
+ const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive;
+
+ return (getTextRangeTransform() == rCompare.getTextRangeTransform());
+ }
+
+ return false;
+ }
+
+ SdrTextPrimitive2D* SdrChainedTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const
+ {
+ return new SdrChainedTextPrimitive2D(getSdrText(), getOutlinerParaObject(), rTransform * getTextRangeTransform());
+ }
+
+ // provide unique ID
+ ImplPrimitive2DIDBlock(SdrChainedTextPrimitive2D, PRIMITIVE2D_ID_SDRCHAINEDTEXTPRIMITIVE2D)
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
namespace drawinglayer