diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-07 20:54:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-08 13:18:41 +0200 |
commit | 36e0e88b28e818faf25b8e32cc8c4dc444b8a0be (patch) | |
tree | b7b5c8e13b6e05f871b01a3d0bf68c1d1329ef12 /sd | |
parent | cf5bbe3fce4a250ab25998053965bdc604c6114e (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 'sd')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterTextView.cxx | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 906c3dc4f7f3..03a0a0d18b9b 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <comphelper/processfactory.hxx> #include <comphelper/propertysequence.hxx> +#include <comphelper/string.hxx> #include <editeng/outlobj.hxx> #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> @@ -695,11 +696,11 @@ bool SdXMLFilter::Import( ErrCode& nError ) sal_Int32 nIndex = sBuildId.indexOf('$'); if( nIndex != -1 ) { - sal_Int32 nUPD = sBuildId.copy( 0, nIndex ).toInt32(); + sal_Int32 nUPD = comphelper::string::toInt32(sBuildId.subView( 0, nIndex )); if( nUPD == 300 ) { - sal_Int32 nBuildId = sBuildId.copy( nIndex+1 ).toInt32(); + sal_Int32 nBuildId = comphelper::string::toInt32(sBuildId.subView( nIndex+1 )); if( (nBuildId > 0) && (nBuildId < 9316) ) bTransform = true; // treat OOo 3.0 beta1 as OOo 2.x } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 81b2801ac5c1..53e9373a37d5 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/i18n/ScriptType.hpp> +#include <comphelper/string.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -369,11 +370,11 @@ sal_Int32 PresenterTextView::Implementation::ParseDistance (const OUString& rsDi sal_Int32 nDistance (0); if (rsDistance.endsWith("px")) { - nDistance = rsDistance.copy(0,rsDistance.getLength()-2).toInt32(); + nDistance = comphelper::string::toInt32(rsDistance.subView(0,rsDistance.getLength()-2)); } else if (rsDistance.endsWith("l")) { - const sal_Int32 nLines (rsDistance.copy(0,rsDistance.getLength()-1).toInt32()); + const sal_Int32 nLines (comphelper::string::toInt32(rsDistance.subView(0,rsDistance.getLength()-1))); // Take the height of the first line as the height of every line. const sal_uInt32 nFirstLineHeight (mpEditEngine->GetLineHeight(0)); nDistance = nFirstLineHeight * nLines; |