From 1764d6917510709b3d182cc19c3295ee31d277ff Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Wed, 2 Oct 2024 12:15:31 -0400 Subject: tdf#159690 tdf#159938 Revert "tdf#158252 sc: Enable text wrapping... ... when inputting line breaks in cell" This reverts 24.2 commit 17e362e56f9e15d0214c441e632c91d22e58519d because it was made as a regression fix for a commit that I just reverted, AS WELL AS having several (duplicate) regression bugs of its own. Duplicate Bug 163150 is a good example of why a linefeed shouldn't automatically imply wrap text - it specified "fit to cell size". Duplicate Bug 159834 complains about this happening on drag/drop. Change-Id: Iad5fb87f9ab71230221c402a84ca682dba0ed004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174402 Tested-by: Jenkins Reviewed-by: Justin Luth (cherry picked from commit 55a8fce5d76bba0657ed76c85439fac8d1d00c8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174339 Reviewed-by: Xisco Fauli (cherry picked from commit c1d2902b64dc02026f7842a43e540283b67df13d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174445 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176142 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar --- sc/source/ui/app/inputhdl.cxx | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 9df0cef85609..06f046346e10 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -3170,17 +3169,6 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL lcl_RemoveTabs(aString); lcl_RemoveTabs(aPreAutoCorrectString); - if (bModified && aString.indexOf('\n') != -1) - { - // Cell contains line breaks, enable wrapping - ScLineBreakCell aBreakItem(true); - pActiveViewSh->ApplyAttr(aBreakItem); - - SfxViewFrame* pViewFrm = SfxViewFrame::Current(); - if (pViewFrm) - pViewFrm->GetBindings().Invalidate(SID_ATTR_ALIGN_LINEBREAK); - } - // Test if valid (always with simple string) if (bModified && nValidation) { -- cgit