[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - include/svx svx/source
matteocam
matteo.campanelli at gmail.com
Fri Aug 15 06:56:23 PDT 2014
include/svx/svdedxv.hxx | 2 +-
include/svx/svdotext.hxx | 4 ++++
svx/source/svdraw/svdotext.cxx | 7 +++++++
svx/source/svdraw/svdotextdecomposition.cxx | 9 +++++----
4 files changed, 17 insertions(+), 5 deletions(-)
New commits:
commit cdf57fcab95e3c9e9ebc38baed1fc2a57e199620
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Aug 15 15:53:19 2014 +0200
Calling handler when chaining for recursive overflow check
Change-Id: Ic419356aa73bd64e428c5cc2c1cac5a05aeb8fa3
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index cd282ee..0a8eeac 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -115,7 +115,7 @@ protected:
bool ImpIsTextEditAllSelected() const;
void ImpMakeTextCursorAreaVisible();
- // Handler fuer AutoGrowing Text bei aktivem Outliner
+ // Handler fuer AutoGrowing und Chained Text bei aktivem Outliner
DECL_LINK(ImpOutlinerStatusEventHdl,EditStatus*);
DECL_LINK(ImpOutlinerCalcFieldValueHdl,EditFieldInfo*);
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index dce4166..a15a24d 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -605,6 +605,10 @@ public:
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impCopyTextInTextObj(SdrTextObj *pNextTextObj) const;
+
+ // Handler for Chained Text
+ DECL_LINK(ImpDecomposeChainedText,EditStatus*);
+
void embedText() const;
// timing generators
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index d15d67c..ebfa40d 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -2028,6 +2028,13 @@ SdrTextObj* SdrTextObj::GetNextLinkInChain() const
}
+IMPL_LINK(SdrTextObj,ImpDecomposeChainedText,EditStatus*,pEditStat)
+{
+ // XXX: Check on the outliner here?
+ onEditOutlinerStatusEvent( pEditStat );
+ return 0;
+}
+
// The concept of the text object:
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 140b239..50469a4 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -751,12 +751,13 @@ void SdrTextObj::impCopyTextInTextObj(SdrTextObj *pNextTextObj) const
)
);
rOutliner.SetUpdateMode(true);
- rOutliner.SetStatusEventHdl1(LINK(this,SdrObjEditView,ImpOutlinerStatusEventHdl));
+ rOutliner.SetStatusEventHdl1(LINK(this,SdrTextObj,ImpDecomposeChainedText));
rOutliner.SetText(*mpOverflowingText); // XXX: copies overflown text
Size aNewSize(rOutliner.CalcTextSize());
// create OutlinerParaObject for pNextTextObj
OutlinerParaObject* pNewParaObject=rOutliner.CreateParaObject();
rOutliner.Clear();
+ rOutliner.SetStatusEventHdl1(Link());
aNewSize.Width()++; // because of possible rounding errors
aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
commit 746e2e17e4141399cb502fc0c1e379253843beb4
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Aug 15 03:41:56 2014 +0200
Set chaining handler when chaining text
Change-Id: If3ccfe268abde5fd0a52ce519f4a8d8ed3b15fb8
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 4ed8b58..140b239 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -751,6 +751,7 @@ void SdrTextObj::impCopyTextInTextObj(SdrTextObj *pNextTextObj) const
)
);
rOutliner.SetUpdateMode(true);
+ rOutliner.SetStatusEventHdl1(LINK(this,SdrObjEditView,ImpOutlinerStatusEventHdl));
rOutliner.SetText(*mpOverflowingText); // XXX: copies overflown text
Size aNewSize(rOutliner.CalcTextSize());
// create OutlinerParaObject for pNextTextObj
@@ -766,11 +767,10 @@ void SdrTextObj::impCopyTextInTextObj(SdrTextObj *pNextTextObj) const
pNextTextObj->ImpJustifyRect(aNewRect);
if (aNewRect!=aNextRect) {
pNextTextObj->SetLogicRect(aNewRect);
-
-
- // Set text object's string
- pNextTextObj->SetOutlinerParaObject( pNewParaObject );
}
+ // Set text object's string
+ pNextTextObj->SetOutlinerParaObject( pNewParaObject );
+
}
void SdrTextObj::impDecomposeAutoFitTextPrimitive(
More information about the Libreoffice-commits
mailing list