diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-01-18 13:57:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-27 21:04:27 +0100 |
commit | 960c96eabb15577b52f626cb0a3c8932757911b6 (patch) | |
tree | 33ea2c1d31438b2c378f089f342ffe8635363ee3 /sw | |
parent | 6aa65f7664fe0dbe8c9d4ba7f320ef216e928780 (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/48200
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 60f5e02759f6..9c038e776fec 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -472,7 +472,10 @@ ErrCode 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; } |