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

Caolán McNamara caolanm at redhat.com
Tue Feb 13 20:43:42 UTC 2018


 editeng/source/editeng/impedit2.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9aa9bdb7eae18a8c821b7701b356fe0f5cee1873
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 13 15:10:53 2018 +0000

    tab expansion performance is appalling
    
    Change-Id: I42f7ad652f491220632ec753511ce2964e73e69f
    Reviewed-on: https://gerrit.libreoffice.org/49670
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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


More information about the Libreoffice-commits mailing list