diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-04-24 14:58:54 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-04-25 16:49:41 +0200 |
commit | e68b6e349c31ac1376e90218013e1e7612f2b522 (patch) | |
tree | b1c19255d11dc1e99c08b71b4ae12e31412bef7b | |
parent | dec025d4cb51f252ecd7e981fe36800cf2bedff5 (diff) |
Optimize plain-text import.
Cost of managing rsids is very significant >50% of import time, new
Rsids will be generated for changes anyway.
Also avoid un-necessary splitting of paragraphs on new-line.
Change-Id: Ib959306f187f93bd3a85ead11fd2342b99d4ece3
Reviewed-on: https://gerrit.libreoffice.org/36938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 0256f782fc30..e3045b0edee8 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -481,7 +481,7 @@ sal_uLong SwASCIIParser::ReadChars() { // We found a CR/LF, thus save the text InsertText( OUString( pLastStt )); - pDoc->getIDocumentContentOperations().SplitNode( *pPam->GetPoint(), false ); + pDoc->getIDocumentContentOperations().AppendTextNode( *pPam->GetPoint() ); pLastStt = pStt; nLineLen = 0; } @@ -498,8 +498,6 @@ sal_uLong SwASCIIParser::ReadChars() void SwASCIIParser::InsertText( const OUString& rStr ) { pDoc->getIDocumentContentOperations().InsertString( *pPam, rStr ); - pDoc->UpdateRsid( *pPam, rStr.getLength() ); - pDoc->UpdateParRsid( pPam->GetPoint()->nNode.GetNode().GetTextNode() ); if( pItemSet && g_pBreakIt && nScript != ( SvtScriptType::LATIN | SvtScriptType::ASIAN | |