summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-29 11:06:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-01 08:30:18 +0200
commit5200a73627d13e2997f81b53f61e143e77e328ee (patch)
treef95c8346d061ecd0ad33d574895d18e169662785 /test
parentb90d3d316dd9c720c83180b31f6bbd7003fead78 (diff)
use more string_view in various
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test')
-rw-r--r--test/source/bootstrapfixture.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index be273f0a1955..d9048b39465d 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -29,6 +29,7 @@
#include <vcl/salgtype.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/virdev.hxx>
+#include <o3tl/string_view.hxx>
#include <memory>
#include <cstring>
@@ -223,8 +224,8 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
else
{
sal_Int32 nStartOfNumber = nIndex + std::strlen("Grand total of errors in submitted package: ");
- OUString aNumber = aContentOUString.copy(nStartOfNumber);
- sal_Int32 nErrors = aNumber.toInt32();
+ std::u16string_view aNumber = aContentOUString.subView(nStartOfNumber);
+ sal_Int32 nErrors = o3tl::toInt32(aNumber);
OString aMsg = "validation error in OOXML export: Errors: " + OString::number(nErrors);
if(nErrors)
{