diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/childwin.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/bastyp/mieclip.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 3 |
5 files changed, 14 insertions, 10 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 94fcdf924bdd..1b47ce57c3ba 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -46,6 +46,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> #include <comphelper/storagehelper.hxx> +#include <comphelper/string.hxx> #include <comphelper/synchronousdispatch.hxx> #include <svl/intitem.hxx> @@ -595,7 +596,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { if ( aCommand.startsWith("slot:") ) { - sal_uInt16 nSlotId = static_cast<sal_uInt16>(aCommand.copy(5).toInt32()); + sal_uInt16 nSlotId = static_cast<sal_uInt16>(comphelper::string::toInt32(aCommand.subView(5))); if ( nSlotId == SID_OPENDOC ) pFileNameItem = nullptr; } diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 29fc51c22660..268e4dcf70fd 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -389,7 +389,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI // Read version char cToken = ','; sal_Int32 nPos = aWinData.indexOf( cToken ); - sal_uInt16 nActVersion = static_cast<sal_uInt16>(aWinData.copy( 0, nPos + 1 ).toInt32()); + sal_uInt16 nActVersion = static_cast<sal_uInt16>(comphelper::string::toInt32(aWinData.subView( 0, nPos + 1 ))); if ( nActVersion != nVersion ) return; @@ -406,12 +406,12 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI if ( nNextPos != -1 ) { // there is extra information - rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(aWinData.copy( nPos+1, nNextPos - nPos - 1 ).toInt32())); + rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(comphelper::string::toInt32(aWinData.subView( nPos+1, nNextPos - nPos - 1 )))); aWinData = aWinData.replaceAt( nPos, nNextPos-nPos+1, u"" ); rInfo.aExtraString = aWinData; } else - rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(aWinData.copy( nPos+1 ).toInt32())); + rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(comphelper::string::toInt32(aWinData.subView( nPos+1 )))); } bool ParentIsFloatingWindow(const vcl::Window *pParent) diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index ae3a2d5e5684..7301949775ab 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -21,6 +21,7 @@ #include <o3tl/safeint.hxx> #include <tools/stream.hxx> +#include <comphelper/string.hxx> #include <sfx2/mieclip.hxx> @@ -48,13 +49,13 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream ) nIndex = 0; OString sTmp(sLine.getToken(0, ':', nIndex)); if (sTmp == "StartHTML") - nStt = sLine.copy(nIndex).toInt32(); + nStt = comphelper::string::toInt32(sLine.subView(nIndex)); else if (sTmp == "EndHTML") - nEnd = sLine.copy(nIndex).toInt32(); + nEnd = comphelper::string::toInt32(sLine.subView(nIndex)); else if (sTmp == "StartFragment") - nFragStart = sLine.copy(nIndex).toInt32(); + nFragStart = comphelper::string::toInt32(sLine.subView(nIndex)); else if (sTmp == "EndFragment") - nFragEnd = sLine.copy(nIndex).toInt32(); + nFragEnd = comphelper::string::toInt32(sLine.subView(nIndex)); else if (sTmp == "SourceURL") sBaseURL = OStringToOUString( sLine.subView(nIndex), RTL_TEXTENCODING_UTF8 ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index baa82c0bc0b3..382aa47ed591 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -78,6 +78,7 @@ #include <comphelper/interaction.hxx> #include <comphelper/sequence.hxx> #include <comphelper/simplefileaccessinteraction.hxx> +#include <comphelper/string.hxx> #include <framework/interaction.hxx> #include <utility> #include <svl/stritem.hxx> @@ -3660,7 +3661,7 @@ void SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision ) sal_Int32 nLength = pImpl->aVersions.getLength(); for ( const auto& rVersion : std::as_const(pImpl->aVersions) ) { - sal_uInt32 nVer = static_cast<sal_uInt32>( rVersion.Identifier.copy(7).toInt32()); + sal_uInt32 nVer = static_cast<sal_uInt32>( comphelper::string::toInt32(rVersion.Identifier.subView(7))); size_t n; for ( n=0; n<aLongs.size(); ++n ) if ( nVer<aLongs[n] ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index a0587f9bb079..b30690b57245 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -60,6 +60,7 @@ #include <com/sun/star/util/InvalidStateException.hpp> #include <com/sun/star/util/CloseVetoException.hpp> #include <comphelper/enumhelper.hxx> +#include <comphelper/string.hxx> #include <cppuhelper/implbase.hxx> #include <comphelper/multicontainer2.hxx> @@ -3558,7 +3559,7 @@ static void ConvertSlotsToCommands( SfxObjectShell const * pDoc, Reference< cont GetCommandFromSequence( aCommand, nIndex, aSeqPropValue ); if ( nIndex >= 0 && aCommand.startsWith( "slot:" ) ) { - const sal_uInt16 nSlot = aCommand.copy( 5 ).toInt32(); + const sal_uInt16 nSlot = comphelper::string::toInt32(aCommand.subView( 5 )); // We have to replace the old "slot-Command" with our new ".uno:-Command" const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( nSlot ); |