[Libreoffice-commits] core.git: vcl/source

Eike Rathke erack at redhat.com
Fri Sep 15 15:33:15 UTC 2017


 vcl/source/edit/texteng.cxx |   19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

New commits:
commit 7ab76d2bd9578c2680733bd66fd50902027e0c58
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Sep 15 17:32:07 2017 +0200

    Fix BASIC storage that stored an HTML <P> element
    
    <P STYLE="margin-bottom: 0cm">
    ended up in the XML stream,
    
    Regression from
    
        commit 2e0a25ce2b87d3a4bbf944025fc3720933fb391d
        Date:   Fri Sep 8 08:31:42 2017 +0200
    
            loplugin:constantparam
    
    that removed/kept the wrong path of !bHTML/bHTML
    
    Change-Id: I29ad9c4e7dff7a2d5537f5e52e7316aff7347c7a

diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cb4fa8798603..acdb6b74c427 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2457,23 +2457,8 @@ bool TextEngine::Write( SvStream& rOutput )
         const sal_Int32 nEndPos = nPara == aSel.GetEnd().GetPara()
             ? aSel.GetEnd().GetIndex() : pNode->GetText().getLength();
 
-        OUStringBuffer aText;
-        aText = "<P STYLE=\"margin-bottom: 0cm\">";
-
-        if ( nStartPos == nEndPos )
-        {
-            // Empty lines will be removed by Writer
-            aText.append( "<BR>" );
-        }
-        else
-        {
-            // Text before Attribute
-            aText.append( pNode->GetText().copy( nStartPos, nEndPos-nStartPos ) );
-        }
-
-        aText.append( "</P>" );
-        rOutput.WriteLine(OUStringToOString(aText.makeStringAndClear(),
-            rOutput.GetStreamCharSet()));
+        const OUString aText = pNode->GetText().copy( nStartPos, nEndPos-nStartPos );
+        rOutput.WriteLine(OUStringToOString(aText, rOutput.GetStreamCharSet()));
     }
 
     return rOutput.GetError() == ERRCODE_NONE;


More information about the Libreoffice-commits mailing list