sc/source/core/tool/editutil.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e099cf1da1d83c1798b0c63fd267bb61973c55ef
Author: Luboš Luňák <l.lu...@collabora.com>
Date:   Tue May 29 10:00:31 2018 +0200

    avoid using EditEngine in ScEditUtils::GetString() if possible
    
    According to 1ecdc7aaf66 it is really needed only for resolving fields,
    so if there's no field, simply concatenate the contents, as used to
    be the case before that commit. This should be faster and also safer
    in the case of Calc's threading enabled.
    
    Change-Id: I23a2e1873deb8538e2a1ae0dd80af7e5356c18a5
    Reviewed-on: https://gerrit.libreoffice.org/54986
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/55275
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>
    Tested-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index d05cac306c86..b40764739a48 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -112,6 +112,9 @@ OUString ScEditUtil::GetMultilineString( const 
EditTextObject& rEdit )
 
 OUString ScEditUtil::GetString( const EditTextObject& rEditText, const 
ScDocument* pDoc )
 {
+    if( !rEditText.HasField())
+        return GetMultilineString( rEditText );
+
     static osl::Mutex aMutex;
     osl::MutexGuard aGuard( aMutex);
     // ScFieldEditEngine is needed to resolve field contents.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to