summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-01-18 13:57:22 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-06 14:59:30 +0100
commitcfb68bab5fdbcfbb9370cf59cc3c1d5acd6f9737 (patch)
tree7c6e279200cb1871d5c60bebc04c9a5b9abb5012
parent8a322f65715af84f3a2dc089700671b9172f3333 (diff)
tdf#115088: Pasting multi-line text from external source behaves strangely
Regression from: e68b6e349c31ac1376e90218013e1e7612f2b522 AppendTextNode might be sufficient for import (when there is no content in the document), but for clipboard operations better to use the original SplitNode method. Change-Id: I7de3e9bc9c5356acb0b4cc43927a0d39079522b2 Reviewed-on: https://gerrit.libreoffice.org/48124 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 657da4697379274295e9fd32d3abc1334ebd50d2) Reviewed-on: https://gerrit.libreoffice.org/48204 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit c163db958f0e105b8d37eaef6388a4f89c57d251) Reviewed-on: https://gerrit.libreoffice.org/49301 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sw/source/filter/ascii/parasc.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index e3045b0edee8..bd9af08c3cb7 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -481,7 +481,10 @@ sal_uLong SwASCIIParser::ReadChars()
{
// We found a CR/LF, thus save the text
InsertText( OUString( pLastStt ));
- pDoc->getIDocumentContentOperations().AppendTextNode( *pPam->GetPoint() );
+ if(bNewDoc)
+ pDoc->getIDocumentContentOperations().AppendTextNode( *pPam->GetPoint() );
+ else
+ pDoc->getIDocumentContentOperations().SplitNode( *pPam->GetPoint(), false );
pLastStt = pStt;
nLineLen = 0;
}