From 36e0e88b28e818faf25b8e32cc8c4dc444b8a0be Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 Apr 2022 20:54:55 +0200 Subject: use more subView when converting to Int32 Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/xforms/SchemaRestrictionContext.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xmloff/source/xforms/SchemaRestrictionContext.cxx') diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index ea6db4f1befb..68da0bdd95c9 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -150,11 +151,11 @@ static Any xforms_date( const OUString& rValue ) { util::Date aDate; aDate.Year = static_cast( - rValue.copy( 0, nPos1 ).toInt32() ); + comphelper::string::toInt32(rValue.subView( 0, nPos1 )) ); aDate.Month = static_cast( - rValue.copy( nPos1 + 1, nPos2 - nPos1 - 1 ).toInt32() ); + comphelper::string::toInt32(rValue.subView( nPos1 + 1, nPos2 - nPos1 - 1 )) ); aDate.Day = static_cast( - rValue.copy( nPos2 + 1 ).toInt32() ); + comphelper::string::toInt32(rValue.subView( nPos2 + 1 )) ); aAny <<= aDate; } return aAny; -- cgit