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 /oox/source/vml | |
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 'oox/source/vml')
-rw-r--r-- | oox/source/vml/vmldrawing.cxx | 4 | ||||
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 8 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 8 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx index aa64ce397caa..ea587298baa1 100644 --- a/oox/source/vml/vmldrawing.cxx +++ b/oox/source/vml/vmldrawing.cxx @@ -38,7 +38,7 @@ #include <oox/vml/vmlshapecontainer.hxx> #include <tools/diagnose_ex.h> #include <tools/gen.hxx> -#include <comphelper/string.hxx> +#include <o3tl/string_view.hxx> namespace oox::vml { @@ -66,7 +66,7 @@ OUString lclGetShapeId( sal_Int32 nShapeId ) sal_Int32 lclGetShapeId( const OUString& rShapeId ) { // identifier consists of a literal NUL character, a lowercase 's', and the id - return ((rShapeId.getLength() >= 3) && (rShapeId[ 0 ] == '\0') && (rShapeId[ 1 ] == 's')) ? comphelper::string::toInt32(rShapeId.subView( 2 )) : -1; + return ((rShapeId.getLength() >= 3) && (rShapeId[ 0 ] == '\0') && (rShapeId[ 1 ] == 's')) ? o3tl::toInt32(rShapeId.subView( 2 )) : -1; } } // namespace diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index a93996d94289..5967e7be0f34 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -45,7 +45,7 @@ #include <oox/token/tokens.hxx> #include <svx/svdtrans.hxx> #include <comphelper/propertysequence.hxx> -#include <comphelper/string.hxx> +#include <o3tl/string_view.hxx> #include <vcl/virdev.hxx> namespace oox::vml { @@ -275,7 +275,7 @@ Color ConversionHelper::decodeColor( const GraphicHelper& rGraphicHelper, // try palette colors enclosed in brackets if( (aColorIndex.getLength() >= 3) && (aColorIndex[ 0 ] == '[') && (aColorIndex[ aColorIndex.getLength() - 1 ] == ']') ) { - aDmlColor.setPaletteClr( comphelper::string::toInt32(aColorIndex.subView( 1, aColorIndex.getLength() - 2 )) ); + aDmlColor.setPaletteClr( o3tl::toInt32(aColorIndex.subView( 1, aColorIndex.getLength() - 2 )) ); return aDmlColor; } @@ -292,7 +292,7 @@ Color ConversionHelper::decodeColor( const GraphicHelper& rGraphicHelper, case XML_darken: nModToken = XML_shade;break; case XML_lighten: nModToken = XML_tint; } - sal_Int32 nValue = comphelper::string::toInt32(aColorIndex.subView( nOpenParen + 1, nCloseParen - nOpenParen - 1 )); + sal_Int32 nValue = o3tl::toInt32(aColorIndex.subView( nOpenParen + 1, nCloseParen - nOpenParen - 1 )); if( (nModToken != XML_TOKEN_INVALID) && (0 <= nValue) && (nValue < 255) ) { /* Simulate this modifier color by a color with related transformation. @@ -337,7 +337,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r if ( state != START && state != UNSUPPORTED ) { if ( nTokenLen > 0 ) - aCoordList.push_back( comphelper::string::toInt32(rPath.subView( nTokenStart, nTokenLen )) ); + aCoordList.push_back( o3tl::toInt32(rPath.subView( nTokenStart, nTokenLen )) ); else aCoordList.push_back( 0 ); nTokenLen = 0; diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index a0768503560b..c5ccb9346289 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -69,7 +69,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/storagehelper.hxx> -#include <comphelper/string.hxx> +#include <o3tl/string_view.hxx> using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::uno::Any; @@ -314,7 +314,7 @@ void ShapeBase::finalizeFragmentImport() static const OUStringLiteral sShapeTypePrefix = u"shapetype_"; OUString tmp; if (aType.startsWith(sShapeTypePrefix)) { - maTypeModel.moShapeType = comphelper::string::toInt32(aType.subView(sShapeTypePrefix.getLength())); + maTypeModel.moShapeType = o3tl::toInt32(aType.subView(sShapeTypePrefix.getLength())); } else if (aType.startsWith("_x0000_t", &tmp)) { maTypeModel.moShapeType = tmp.toInt32(); @@ -378,8 +378,8 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS if (idPos < seqPos) { auto idPosEnd = idPos+2; - id = comphelper::string::toInt32(sLinkChainName.subView(idPosEnd, seqPos - idPosEnd)); - seq = comphelper::string::toInt32(sLinkChainName.subView(seqPos+2)); + id = o3tl::toInt32(sLinkChainName.subView(idPosEnd, seqPos - idPosEnd)); + seq = o3tl::toInt32(sLinkChainName.subView(seqPos+2)); } } diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index d41539083917..d5e7996cbada 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -35,7 +35,7 @@ #include <osl/diagnose.h> #include <filter/msfilter/escherex.hxx> -#include <comphelper/string.hxx> +#include <o3tl/string_view.hxx> namespace oox::vml { @@ -300,7 +300,7 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent, if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) ) { mrTypeModel.maShapeId = mrTypeModel.maShapeName; - mrTypeModel.moShapeType = comphelper::string::toInt32(mrTypeModel.maShapeName.subView(sShapeTypePrefix.getLength())); + mrTypeModel.moShapeType = o3tl::toInt32(mrTypeModel.maShapeName.subView(sShapeTypePrefix.getLength())); } else if (mrTypeModel.maShapeName.startsWith("_x0000_t", &tmp)) { |