summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2016-04-20 21:42:28 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-05-03 09:28:06 +0000
commiteca3455190ed9a2c4796e7954f2533dc71cd1ab6 (patch)
treec7010d0bff2a36ce49b422bfaa4a40507c76d478
parent2fce97c51ceb15c7722ed828b2cc0ea4b21c8c95 (diff)
Resolves: tdf#98940 (-1 not mapping to maximum string length anymore)
Change-Id: I58e4a63bce17b880a97c7ccfb4d42dfb930e54c5 Reviewed-on: https://gerrit.libreoffice.org/24268 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 af3425b30d9d..d24ff158764f 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -218,7 +218,7 @@ void TextEngine::SetFont( const vcl::Font& rFont )
void TextEngine::SetMaxTextLen( sal_Int32 nLen )
{
- mnMaxTextLen = nLen;
+ mnMaxTextLen = nLen>=0 ? nLen : EDIT_NOLIMIT;
}
void TextEngine::SetMaxTextWidth( long nMaxWidth )