diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-04 11:14:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-05 12:57:00 +0200 |
commit | 9f1701d01d9f664828356976d8592492f85b30f5 (patch) | |
tree | a91eaef0674591af87b06096fdd186283559a8de /filter | |
parent | b8bb44161aeb6e00526a38343b63e678ce7d4a1a (diff) |
use more o3tl::getToken
found by inspecting call sites of OUString::getToken
Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 17 | ||||
-rw-r--r-- | filter/source/msfilter/util.cxx | 5 |
2 files changed, 12 insertions, 10 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 5bbf1c44735f..03f72587e1b2 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -19,6 +19,7 @@ #include "eschesdo.hxx" #include <o3tl/any.hxx> +#include <o3tl/string_view.hxx> #include <svx/svdxcgv.hxx> #include <svx/svdomedia.hxx> #include <svx/xflftrit.hxx> @@ -929,16 +930,16 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart, if ( !bIsMapped && comphelper::string::getTokenCount(aArrowStartName, ' ') == 2 ) { sal_Int32 nIdx{ 0 }; - OUString aArrowName( aArrowStartName.getToken( 0, ' ', nIdx ) ); - if ( aArrowName == "msArrowEnd" ) + std::u16string_view aArrowName( o3tl::getToken(aArrowStartName, 0, ' ', nIdx ) ); + if ( aArrowName == u"msArrowEnd" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aArrowName == "msArrowOpenEnd" ) + else if ( aArrowName == u"msArrowOpenEnd" ) reLineEnd = ESCHER_LineArrowOpenEnd; - else if ( aArrowName == "msArrowStealthEnd" ) + else if ( aArrowName == u"msArrowStealthEnd" ) reLineEnd = ESCHER_LineArrowStealthEnd; - else if ( aArrowName == "msArrowDiamondEnd" ) + else if ( aArrowName == u"msArrowDiamondEnd" ) reLineEnd = ESCHER_LineArrowDiamondEnd; - else if ( aArrowName == "msArrowOvalEnd" ) + else if ( aArrowName == u"msArrowOvalEnd" ) reLineEnd = ESCHER_LineArrowOvalEnd; else nIdx = -1; @@ -946,8 +947,8 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart, // now we have the arrow, and try to determine the arrow size; if ( nIdx>0 ) { - OUString aArrowSize( aArrowStartName.getToken( 0, ' ', nIdx ) ); - sal_Int32 nArrowSize = aArrowSize.toInt32(); + std::u16string_view aArrowSize = o3tl::getToken(aArrowStartName, 0, ' ', nIdx ); + sal_Int32 nArrowSize = o3tl::toInt32(aArrowSize); rnArrowWidth = ( nArrowSize - 1 ) / 3; rnArrowLength = nArrowSize - ( rnArrowWidth * 3 ) - 1; } diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 7747c9a0ecd1..a01db3452b10 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -10,6 +10,7 @@ #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/lang/Locale.hpp> #include <rtl/ustring.hxx> +#include <comphelper/string.hxx> #include <unotools/fontcvt.hxx> #include <unotools/fontdefs.hxx> #include <vcl/BitmapPalette.hxx> @@ -485,10 +486,10 @@ bool WW8ReadFieldParams::GetTokenSttFromTo(sal_Int32* pFrom, sal_Int32* pTo, sal const OUString sParams( GetResult() ); sal_Int32 nIndex = 0; - const OUString sStart( sParams.getToken(0, '-', nIndex) ); + const std::u16string_view sStart = o3tl::getToken(sParams, 0, '-', nIndex); if (nIndex>=0) { - nStart = sStart.toInt32(); + nStart = o3tl::toInt32(sStart); nEnd = o3tl::toInt32(sParams.subView(nIndex)); } } |