From 5fe702f1b69a02a274621a01db68256a94edfd36 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 26 Apr 2022 13:27:39 +0200 Subject: add o3tl::toUInt32 Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/filter/eppt/pptexanimations.cxx | 5 +++-- sd/source/ui/dlg/copydlg.cxx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 74ef8cd96619..bbab0ed2d8b9 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -59,6 +59,7 @@ #include #include #include +#include #include @@ -890,8 +891,8 @@ sal_uInt32 AnimationExporter::GetPresetID( const OUString& rPreset, sal_uInt32 n sal_Int32 nLast = rPreset.lastIndexOf( '_' ); if ( ( nLast != -1 ) && ( ( nLast + 1 ) < rPreset.getLength() ) ) { - OUString aNumber( rPreset.copy( nLast + 1 ) ); - nPresetId = aNumber.toUInt32(); + std::u16string_view aNumber( rPreset.subView( nLast + 1 ) ); + nPresetId = o3tl::toUInt32(aNumber); bPresetId = true; } } diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 66a13be8ed74..70ccf9c4b9be 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -169,8 +169,8 @@ void CopyDlg::Reset() m_xMtrFldAngle->set_value(o3tl::toInt64(o3tl::getToken(aStr, 0, TOKEN, nIdx)), FieldUnit::NONE); m_xMtrFldWidth->set_value(o3tl::toInt64(o3tl::getToken(aStr, 0, TOKEN, nIdx)), FieldUnit::NONE); m_xMtrFldHeight->set_value(o3tl::toInt64(o3tl::getToken(aStr, 0, TOKEN, nIdx)), FieldUnit::NONE); - m_xLbStartColor->SelectEntry( Color( ColorTransparency, aStr.getToken(0, TOKEN, nIdx).toUInt32() ) ); - m_xLbEndColor->SelectEntry( Color( ColorTransparency, aStr.getToken(0, TOKEN, nIdx).toUInt32() ) ); + m_xLbStartColor->SelectEntry( Color( ColorTransparency, o3tl::toUInt32(o3tl::getToken(aStr, 0, TOKEN, nIdx)) ) ); + m_xLbEndColor->SelectEntry( Color( ColorTransparency, o3tl::toUInt32(o3tl::getToken(aStr, 0, TOKEN, nIdx)) ) ); } } -- cgit