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

Luboš Luňák l.lunak at collabora.com
Tue May 29 09:48:13 UTC 2018


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

New commits:
commit fb32f28a2b7f0c33533592b855ead127b858040c
Author: Luboš Luňák <l.lunak at 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.meeks at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>

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.


More information about the Libreoffice-commits mailing list