diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-21 12:18:36 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-07-22 15:00:12 +0200 |
commit | 28f26e9719880674b1fb43e13ad6272d285bfb08 (patch) | |
tree | d909f2c034191d156ac5003ccebf93aa94fd59ec /vcl | |
parent | 9da9cabfc68a73d4ac9db7ec86f44c8713edb9e0 (diff) |
Resolves: tdf#100558 last 'section' of date field not incremented
presumably a regression from...
commit 3cad6c806e5247ce20b78eb688551aa5d872b934
Author: Chr. Rossmanith <ChrRossmanith@gmx.de>
Date: Fri Mar 1 21:47:10 2013 +0100
Replace (Xub)String with OUString in vcl(field)
where UniString::Search returned a max short on not-found
while OUString::indexOf returns a -1
Change-Id: Ia3ef80dd318375ccdb3bdcee9bed7b70bf67cae1
(cherry picked from commit 82913e694a4169f9ddeef399e659aec78cc9c8d6)
Reviewed-on: https://gerrit.libreoffice.org/27375
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 836a7634b2042de4f08fcc2296fc33ca2d040a60)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/field2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index b08bd78814d7..c415b04795e4 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1343,7 +1343,7 @@ void DateField::ImplDateSpinArea( bool bUp ) for ( sal_Int8 i = 1; i <= 3; i++ ) { nPos = aText.indexOf( aDateSep, nPos ); - if ( nPos >= (sal_Int32)aSelection.Max() ) + if (nPos < 0 || nPos >= (sal_Int32)aSelection.Max()) { nDateArea = i; break; |