summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-13 15:10:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-13 21:43:19 +0100
commit9aa9bdb7eae18a8c821b7701b356fe0f5cee1873 (patch)
tree39ea43b0f18da0f16f70dbac87f7f4710db426e6 /editeng
parentc137652c30667ffe1dde40c22ee9584190f26dc9 (diff)
tab expansion performance is appalling
Change-Id: I42f7ad652f491220632ec753511ce2964e73e69f Reviewed-on: https://gerrit.libreoffice.org/49670 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 7f0aa10007f3..148335c2efce 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -65,6 +65,7 @@
#include <svl/asiancfg.hxx>
#include <o3tl/make_unique.hxx>
#include <comphelper/lok.hxx>
+#include <unotools/configmgr.hxx>
#include <unicode/ubidi.h>
#include <algorithm>
@@ -2698,7 +2699,9 @@ EditPaM ImpEditEngine::ImpInsertText(const EditSelection& aCurSel, const OUStrin
if ( GetStatus().DoOnlineSpelling() )
aCurWord = SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD );
- const OUString aText(convertLineEnd(rStr, LINEEND_LF));
+ OUString aText(convertLineEnd(rStr, LINEEND_LF));
+ if (utl::ConfigManager::IsFuzzing()) //tab expansion performance in editeng is appalling
+ aText = aText.replaceAll("\t","-");
SfxVoidItem aTabItem( EE_FEATURE_TAB );
// Converts to linesep = \n