summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter3.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-26 14:03:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-27 20:31:14 +0200
commit48e279c6748bf023fba12fdc3f4cee402f611c6e (patch)
tree2e1b3a20ccd71f47a66938f882c1fe9d5e947bb4 /sw/qa/extras/uiwriter/uiwriter3.cxx
parentf3665d2a42b39814764f3eb9e20498b8a4be1d00 (diff)
use string_view in INetURLObject::decode
Change-Id: I10e04970ceac33c9c3fbfd0182dd2140e06cb80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter3.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index b2ece7527de4..ba2132e0d8ed 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -738,7 +738,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20tocmark%19C%7Ctoxmark"), url);
- rView.JumpToSwMark(url.copy(1)); // SfxApplication::OpenDocExec_Impl eats the "#"
+ rView.JumpToSwMark(url.subView(1)); // SfxApplication::OpenDocExec_Impl eats the "#"
CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "tocmark"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -753,7 +753,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url);
- rView.JumpToSwMark(url.copy(1));
+ rView.JumpToSwMark(url.subView(1));
CPPUNIT_ASSERT_EQUAL(OUString("foo"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -773,7 +773,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UUser-Defined%7Ctoxmark"), url);
- rView.JumpToSwMark(url.copy(1));
+ rView.JumpToSwMark(url.subView(1));
CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the first"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -788,7 +788,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#2%19the%20udmark%19UUser-Defined%7Ctoxmark"), url);
- rView.JumpToSwMark(url.copy(1));
+ rView.JumpToSwMark(url.subView(1));
CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the 2nd"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -803,7 +803,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url);
- rView.JumpToSwMark(url.copy(1));
+ rView.JumpToSwMark(url.subView(1));
CPPUNIT_ASSERT_EQUAL(OUString("foo"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -823,7 +823,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
rWrtShell.Push();
OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UNewUD!%7C%7Ctoxmark"), url);
- rView.JumpToSwMark(url.copy(1));
+ rView.JumpToSwMark(url.subView(1));
CPPUNIT_ASSERT_EQUAL(OUString("the udmark"),
rWrtShell.GetCursor()->GetNode().GetTextNode()->GetText());
rWrtShell.Pop(SwCursorShell::PopMode::DeleteCurrent);