writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 8f25d823a8d5488ae4880ae009a026f6fc07f611 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Nov 6 14:52:42 2013 +0000 check for return of -1 from getToken as demonstrated by ooo91883-1.doc Change-Id: I11a7f0747334f4cecbfd34c9353598d875be02c2 diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index e1515d4..aaea9e0 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1161,12 +1161,14 @@ util::DateTime lcl_DateStringToDateTime( const OUString& rDateTime ) nIndex = 0; aDateTime.Year = sal_uInt16( sDate.getToken( 0, '-', nIndex ).toInt32() ); aDateTime.Month = sal_uInt16( sDate.getToken( 0, '-', nIndex ).toInt32() ); - aDateTime.Day = sal_uInt16( sDate.copy( nIndex ).toInt32() ); + if (nIndex != -1) + aDateTime.Day = sal_uInt16( sDate.copy( nIndex ).toInt32() ); nIndex = 0; aDateTime.Hours = sal_uInt16( sTime.getToken( 0, ':', nIndex ).toInt32() ); aDateTime.Minutes = sal_uInt16( sTime.getToken( 0, ':', nIndex ).toInt32() ); - aDateTime.Seconds = sal_uInt16( sTime.copy( nIndex ).toInt32() ); + if (nIndex != -1) + aDateTime.Seconds = sal_uInt16( sTime.copy( nIndex ).toInt32() ); return aDateTime; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits