diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-08 14:05:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-08 20:44:43 +0200 |
commit | 3e7679738413054c7e6ce973380eac501bf41cf2 (patch) | |
tree | ad80f5bd2f11020fa864488792b6cc0e98a00207 /writerfilter | |
parent | 3bfac2a7fad9737f31443292699bd6fee6ac3a6f (diff) |
move comphelper::string::toInt32 to o3tl
so we can use it in places where we cannot include comphelper
Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/ConversionHelper.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index ec74bad06625..98657263a4bc 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -27,7 +27,7 @@ #include <tools/color.hxx> #include <tools/mapunit.hxx> #include <tools/UnitConversion.hxx> -#include <comphelper/string.hxx> +#include <o3tl/string_view.hxx> using namespace com::sun::star; @@ -674,13 +674,13 @@ util::DateTime ConvertDateStringToDateTime( const OUString& rDateTime ) aDateTime.Year = sal_uInt16( sDate.getToken( 0, '-', nIndex ).toInt32() ); aDateTime.Month = sal_uInt16( sDate.getToken( 0, '-', nIndex ).toInt32() ); if (nIndex != -1) - aDateTime.Day = sal_uInt16( comphelper::string::toInt32(sDate.subView( nIndex )) ); + aDateTime.Day = sal_uInt16( o3tl::toInt32(sDate.subView( nIndex )) ); nIndex = 0; aDateTime.Hours = sal_uInt16( sTime.getToken( 0, ':', nIndex ).toInt32() ); aDateTime.Minutes = sal_uInt16( sTime.getToken( 0, ':', nIndex ).toInt32() ); if (nIndex != -1) - aDateTime.Seconds = sal_uInt16( comphelper::string::toInt32(sTime.subView( nIndex )) ); + aDateTime.Seconds = sal_uInt16( o3tl::toInt32(sTime.subView( nIndex )) ); return aDateTime; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b032726fed1d..597549475936 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -476,7 +476,7 @@ OUString DomainMapper_Impl::GetUnusedPageStyleName() { if ( rStyleName.startsWith( DEFAULT_STYLE ) ) { - sal_Int32 nIndex = comphelper::string::toInt32(rStyleName.subView( strlen( DEFAULT_STYLE ) )); + sal_Int32 nIndex = o3tl::toInt32(rStyleName.subView( strlen( DEFAULT_STYLE ) )); if ( nIndex > nMaxIndex ) nMaxIndex = nIndex; } @@ -5760,7 +5760,7 @@ void DomainMapper_Impl::handleToc { sal_Int32 nIndex = 0; sValue.getToken( 0, '-', nIndex ); - nMaxLevel = static_cast<sal_Int16>(nIndex != -1 ? comphelper::string::toInt32(sValue.subView(nIndex)) : 0); + nMaxLevel = static_cast<sal_Int16>(nIndex != -1 ? o3tl::toInt32(sValue.subView(nIndex)) : 0); } } // \p Defines the separator between the table entry and its page number @@ -6370,7 +6370,7 @@ void DomainMapper_Impl::CloseFieldCommand() if (nStartIndex > 0 && nEndIndex > 0) { // nDown is the requested "lower by" value in points. - sal_Int32 nDown = comphelper::string::toInt32(aCommand.subView(0, nStartIndex)); + sal_Int32 nDown = o3tl::toInt32(aCommand.subView(0, nStartIndex)); OUString aContent = aCommand.copy(nStartIndex + 1, nEndIndex - nStartIndex - 1); PropertyMapPtr pCharContext = GetTopContext(); // dHeight is the font size of the current style. diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2df00afc239a..04ca8cf35b9b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -63,14 +63,14 @@ util::DateTime getDateTimeFromUserProp(const OUString& rString) sal_Int32 nLen = rString.getLength(); if (nLen >= 4) { - aRet.Year = comphelper::string::toInt32(rString.subView(0, 4)); + aRet.Year = o3tl::toInt32(rString.subView(0, 4)); if (nLen >= 8 && rString.match(". ", 4)) { - aRet.Month = comphelper::string::toInt32(rString.subView(6, 2)); + aRet.Month = o3tl::toInt32(rString.subView(6, 2)); if (nLen >= 12 && rString.match(". ", 8)) - aRet.Day = comphelper::string::toInt32(rString.subView(10, 2)); + aRet.Day = o3tl::toInt32(rString.subView(10, 2)); } } return aRet; |