summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-06-02 23:55:42 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-06-03 12:17:46 +0200
commit565340d457f41197474a75ba1b036bdc3d569041 (patch)
tree4b721fb07dceceb5815b06cfa722fa8527c8057e
parent91b5e86d5ef1318bd894b1fc3b537fb4615673da (diff)
Fix tdf#100937: LO Freezed when I insert a very long text in...
... the Description box The issue was triggered by ImpVclMEdit::Resize initially calling TextEngine::SetMaxTextWidth() with a negative width (due to an initial empty area, further "reduced" to take into account a vertical scroll bar) and then with positive values in following iterations. I preferred to consider such negative widths a no-op instead of extending them to the "maximum" possible width. Change-Id: I756652a30c23ebe6674e481e7d8d6e0d8ba45e75
-rw-r--r--vcl/source/edit/texteng.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 3beff673c1be..90f40a0f939d 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -219,7 +219,7 @@ void TextEngine::SetMaxTextLen( sal_Int32 nLen )
void TextEngine::SetMaxTextWidth( long nMaxWidth )
{
- if ( nMaxWidth != mnMaxTextWidth )
+ if ( nMaxWidth>=0 && nMaxWidth != mnMaxTextWidth )
{
mnMaxTextWidth = nMaxWidth;
FormatFullDoc();