sc/source/ui/app/inputhdl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 153b3bae5ea6d0d59cf80c1ca1c32df8bfef57ef
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Feb 28 17:47:04 2024 +0600
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Feb 28 17:07:55 2024 +0100

    tdf#159938: only apply wrap when the content was modified
    
    Change-Id: I2f18739239401085a06bbdce6623a484c13d680b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164091
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit f0d8f72eb3447b705d1dcdc35a6f3c66a880ab7e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164111
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index a640d71cb2df..519ebea36b8d 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3143,7 +3143,7 @@ void ScInputHandler::EnterHandler( ScEnterMode 
nBlockMode, bool bBeforeSavingInL
     lcl_RemoveTabs(aString);
     lcl_RemoveTabs(aPreAutoCorrectString);
 
-    if (aString.indexOf('
') != -1)
+    if (bModified && aString.indexOf('
') != -1)
     {
         // Cell contains line breaks, enable wrapping
         ScLineBreakCell aBreakItem(true);

Reply via email to