summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-07 20:54:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-08 13:18:41 +0200
commit36e0e88b28e818faf25b8e32cc8c4dc444b8a0be (patch)
treeb7b5c8e13b6e05f871b01a3d0bf68c1d1329ef12 /sw/source/uibase/uiview
parentcf5bbe3fce4a250ab25998053965bdc604c6114e (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 'sw/source/uibase/uiview')
-rw-r--r--sw/source/uibase/uiview/view2.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 2b976f28b46f..8484919c5a58 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -116,6 +116,7 @@
#include <dbmgr.hxx>
#include <reffld.hxx>
#include <comphelper/lok.hxx>
+#include <comphelper/string.hxx>
#include <PostItMgr.hxx>
@@ -2159,7 +2160,7 @@ auto PrepareJumpToTOXMark(SwDoc const& rDoc, OUString const& rName)
SAL_WARN("sw.ui", "JumpToTOXMark: missing separator");
return std::optional<std::pair<SwTOXMark, sal_Int32>>();
}
- sal_Int32 const counter(rName.copy(0, first).toInt32());
+ sal_Int32 const counter(comphelper::string::toInt32(rName.subView(0, first)));
if (counter <= 0)
{
SAL_WARN("sw.ui", "JumpToTOXMark: invalid counter");
@@ -2306,7 +2307,7 @@ bool SwView::JumpToSwMark( std::u16string_view rMark )
sal_Int32 nNoPos = sName.indexOf( cSequenceMarkSeparator );
if ( nNoPos != -1 )
{
- sal_uInt16 nSeqNo = sName.copy( nNoPos + 1 ).toInt32();
+ sal_uInt16 nSeqNo = comphelper::string::toInt32(sName.subView( nNoPos + 1 ));
sName = sName.copy( 0, nNoPos );
bRet = m_pWrtShell->GotoRefMark(sName, REF_SEQUENCEFLD, nSeqNo);
}