summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-22 23:26:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-23 08:49:35 +0200
commit09fc31370252a09dd8affda0b0c743133e023244 (patch)
treec4127bc4ee5cc99cb3577515cc3438fba32b8767 /desktop/source
parente43eeac1a99ea0d70192dfd7cecf3e8f52f3e53c (diff)
Extend loplugin:stringviewparam to starts/endsWith: desktop
Change-Id: I42fa4d25eca6b2c5d14212eca3a6ebc7146cce5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122500 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/migration/migration_impl.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index a3e21a4a1f24..cf2d201d22e6 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -19,9 +19,11 @@
#pragma once
#include <memory>
+#include <string_view>
#include <unordered_map>
#include <vector>
+#include <o3tl/string_view.hxx>
#include <sal/types.h>
#include <rtl/ustring.hxx>
@@ -64,9 +66,9 @@ typedef std::vector< migration_step > migrations_v;
typedef std::unique_ptr< migrations_v > migrations_vr;
typedef std::vector< supported_migration > migrations_available;
-inline bool areBothOpenFrom(std::u16string_view cmd1, OUString const & cmd2)
+inline bool areBothOpenFrom(std::u16string_view cmd1, std::u16string_view cmd2)
{
- return cmd1 == u".uno:Open" && cmd2.startsWith(".uno:OpenFrom");
+ return cmd1 == u".uno:Open" && o3tl::starts_with(cmd2, u".uno:OpenFrom");
}
/**