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

matteocam matteo.campanelli at gmail.com
Mon Jul 27 04:50:16 PDT 2015


 svx/source/svdraw/svdotext.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 07b44f63ee70ed57eabc33a34713c856719b19ad
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jul 27 13:49:38 2015 +0200

    Add hack to link first two boxes in IsChainable
    
    Change-Id: I2903096b48f06e086e5589d88d9147664a868660

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 5f4f2f5..d9b16b8 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1986,6 +1986,22 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
 
 bool SdrTextObj::IsChainable() const
 {
+    // XXX: Hack to have links together
+    static bool bHasDoneTheLinking = false;
+
+    SdrTextObj *pTxtObj0 =  dynamic_cast< SdrTextObj * >( pPage->GetObj( 0 ) );
+
+    if (!bHasDoneTheLinking && pPage && pPage->GetObjCount() > 1 && this == pTxtObj0)
+    {
+        SdrTextObj *pTxtObj1 =  dynamic_cast< SdrTextObj * >( pPage->GetObj( 1 ) );
+        const_cast<SdrTextObj *>(this)->SetNextLinkInChain(pTxtObj1);
+
+        bHasDoneTheLinking = true;
+    }
+
+
+
+    // XXX
     if (!GetName().startsWith("Chainable")) {
         //fprintf(stderr, "[CHAINABLE?] %p is _not_ chainable\n", this);
         return false;


More information about the Libreoffice-commits mailing list