summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2016-04-20 21:42:28 +0200
committerDavid Tardon <dtardon@redhat.com>2016-05-06 06:56:45 +0000
commitc927b6692257e427d622add6324fc1c55fce9aa3 (patch)
treeeb4ebc3a23c401e019918495c11d55020da51f72
parente089e027adddc3a9058ba3013ac7bde2f2547b16 (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> (cherry picked from commit eca3455190ed9a2c4796e7954f2533dc71cd1ab6) Reviewed-on: https://gerrit.libreoffice.org/24654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@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 6763664329c1..fec262f51e44 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 )