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

matteocam matteo.campanelli at gmail.com
Tue Jun 16 15:26:31 PDT 2015


 include/editeng/overflowingtxt.hxx          |    1 +
 svx/source/svdraw/svdotextdecomposition.cxx |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit fe00f635ab95ddb7050f847b13e65b6d25bf60a3
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 16 18:25:37 2015 -0400

    Checking whether to reuse heading text
    
    Change-Id: I0afeeee344132bf577a0e159b871beec961f6a19

diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index baec920..e4f9a2d 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -50,6 +50,7 @@ public:
 
         OUString GetHeadingLines() const;
         OUString GetEndingLines() const;
+        bool HasOtherParas() const { return !(mTailTxt == "" && mpMidParas == NULL); }
 };
 
 class EDITENG_DLLPUBLIC NonOverflowingText {
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index b5f70fc..cd3e2c7 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -833,7 +833,8 @@ OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutlin
 
     // Set headText at the beginning of box
     OUString aHeadTxt = mpOverflowingText->GetHeadingLines();
-    if (aHeadTxt != "") {
+    // If we haven't used heading text yet
+    if (mpOverflowingText->HasOtherParas()) {
         Paragraph *pNewPara0 = pOutliner->GetParagraph(0);
         pOutliner->SetText(aHeadTxt, pNewPara0);
     }


More information about the Libreoffice-commits mailing list