summaryrefslogtreecommitdiff
path: root/xmloff/source/xforms/SchemaRestrictionContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-07 20:54:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-08 13:18:41 +0200
commit36e0e88b28e818faf25b8e32cc8c4dc444b8a0be (patch)
treeb7b5c8e13b6e05f871b01a3d0bf68c1d1329ef12 /xmloff/source/xforms/SchemaRestrictionContext.cxx
parentcf5bbe3fce4a250ab25998053965bdc604c6114e (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/xforms/SchemaRestrictionContext.cxx')
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.cxx7
1 files changed, 4 insertions, 3 deletions
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 <com/sun/star/xsd/DataTypeClass.hpp>
#include <com/sun/star/xsd/WhiteSpaceTreatment.hpp>
+#include <comphelper/string.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
@@ -150,11 +151,11 @@ static Any xforms_date( const OUString& rValue )
{
util::Date aDate;
aDate.Year = static_cast<sal_uInt16>(
- rValue.copy( 0, nPos1 ).toInt32() );
+ comphelper::string::toInt32(rValue.subView( 0, nPos1 )) );
aDate.Month = static_cast<sal_uInt16>(
- rValue.copy( nPos1 + 1, nPos2 - nPos1 - 1 ).toInt32() );
+ comphelper::string::toInt32(rValue.subView( nPos1 + 1, nPos2 - nPos1 - 1 )) );
aDate.Day = static_cast<sal_uInt16>(
- rValue.copy( nPos2 + 1 ).toInt32() );
+ comphelper::string::toInt32(rValue.subView( nPos2 + 1 )) );
aAny <<= aDate;
}
return aAny;