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

New commits:
commit fe00f635ab95ddb7050f847b13e65b6d25bf60a3
Author: matteocam <[email protected]>
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);
     }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to