[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/inc svx/source

2015-07-30 Thread matteocam
 svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx |2 +-
 svx/source/svdraw/svdotextdecomposition.cxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2d86d1734984090882e170097d313bc00144680d
Author: matteocam matteo.campane...@gmail.com
Date:   Thu Jul 30 11:29:40 2015 +0200

Remove wordwrap method from SdrChainedTextPrimitive

Change-Id: I2800aede1597eb0d94e9bdcb1634f2509503d1fb

diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
index a3e0357..c6fbe5e 100644
--- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -353,7 +353,7 @@ namespace drawinglayer
 
 // get data
 const basegfx::B2DHomMatrix getTextRangeTransform() const { 
return maTextRangeTransform; }
-bool getWordWrap() const { return true; } // XXX: Hack! Should 
have a proper implementation
+//bool getWordWrap() const { return true; } // XXX: Hack! Should 
have a proper implementation//
 
 // compare operator
 virtual bool operator==(const BasePrimitive2D rPrimitive) const 
SAL_OVERRIDE;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 25feda4..5c2309f 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1498,7 +1498,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 const bool bVerticalWritintg(pOutlinerParaObject-IsVertical());
 const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
 
-if((rSdrChainedTextPrimitive.getWordWrap() || IsTextFrame()))
+if(IsTextFrame())
 {
 rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/inc svx/source

2015-06-09 Thread matteocam
 svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx   |8 --
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |9 +--
 svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx|   24 ++-
 svx/source/svdraw/svdoutl.cxx|2 -
 4 files changed, 32 insertions(+), 11 deletions(-)

New commits:
commit 8bbccf4b277e95818213b4fcebf1999a8ff18117
Author: matteocam matteo.campane...@gmail.com
Date:   Tue Jun 9 14:29:06 2015 -0400

Extended SdrChainedTextPrimitive2D to deal w/ transform matrix

Change-Id: Ic54cf6e83d67eed45e183c22ac0aa914d995627b

diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
index aaefeb6..db1baec 100644
--- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -339,6 +339,8 @@ namespace drawinglayer
 {
 private:
 // XXX: might have position of overflowing text
+
+::basegfx::B2DHomMatrix maTextRangeTransform;   // text range 
transformation from unit range ([0.0 .. 1.0]) to text range
 protected:
 // local decomposition.
 virtual Primitive2DSequence create2DDecomposition(const 
geometry::ViewInformation2D aViewInformation) const SAL_OVERRIDE;
@@ -346,12 +348,14 @@ namespace drawinglayer
 public:
 SdrChainedTextPrimitive2D(
 const SdrText* pSdrText,
-const OutlinerParaObject rOutlinerParaObjectPtrs);
+const OutlinerParaObject rOutlinerParaObjectPtrs,
+const ::basegfx::B2DHomMatrix rTextRangeTransform);
 
 // get data
+const basegfx::B2DHomMatrix getTextRangeTransform() const { 
return maTextRangeTransform; }
 
 // compare operator
-//virtual bool operator==(const BasePrimitive2D rPrimitive) const 
SAL_OVERRIDE;
+virtual bool operator==(const BasePrimitive2D rPrimitive) const 
SAL_OVERRIDE;
 
 // transformed clone operator
 virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix rTransform) const SAL_OVERRIDE;
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 3267c8d..73749e9 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -307,13 +307,18 @@ namespace drawinglayer
 else if(rText.isAutoFit())
 {
 // isotrophically scaled text in range
-pNew = new SdrAutoFitTextPrimitive2D(rText.getSdrText(), 
rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap);
+pNew = new SdrAutoFitTextPrimitive2D(
+rText.getSdrText(),
+rText.getOutlinerParaObject(),
+aAnchorTransform,
+bWordWrap);
 }
 else if( rText.isToBeChained() /* !rText.isInEditMode()*/ ) 
// FIXME(matteocam)
 {
 pNew = new SdrChainedTextPrimitive2D(
 rText.getSdrText(),
-rText.getOutlinerParaObject() );
+rText.getOutlinerParaObject(),
+aAnchorTransform );
 }
 else // text in range
 {
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 4e4edee..b4f2d94 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -487,8 +487,10 @@ namespace drawinglayer
 
 SdrChainedTextPrimitive2D::SdrChainedTextPrimitive2D(
 const SdrText* pSdrText,
-const OutlinerParaObject rOutlinerParaObject)
-: SdrTextPrimitive2D(pSdrText, rOutlinerParaObject)
+const OutlinerParaObject rOutlinerParaObject,
+const basegfx::B2DHomMatrix rTextRangeTransform)
+: SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
+  maTextRangeTransform(rTextRangeTransform)
 { }
 
 Primitive2DSequence 
SdrChainedTextPrimitive2D::create2DDecomposition(const 
geometry::ViewInformation2D aViewInformation) const
@@ -499,11 +501,21 @@ namespace drawinglayer
 return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
 }
 
-SdrTextPrimitive2D* 
SdrChainedTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix 
) const
+bool SdrChainedTextPrimitive2D::operator==(const BasePrimitive2D 
rPrimitive) const
+ {
+ if(SdrTextPrimitive2D::operator==(rPrimitive))
+ {
+ const SdrBlockTextPrimitive2D rCompare =