summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /include/comphelper
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/DirectoryHelper.hxx3
-rw-r--r--include/comphelper/backupfilehelper.hxx19
-rw-r--r--include/comphelper/configuration.hxx4
-rw-r--r--include/comphelper/ofopxmlhelper.hxx6
4 files changed, 20 insertions, 12 deletions
diff --git a/include/comphelper/DirectoryHelper.hxx b/include/comphelper/DirectoryHelper.hxx
index 61b0287e9f77..e614252beaf4 100644
--- a/include/comphelper/DirectoryHelper.hxx
+++ b/include/comphelper/DirectoryHelper.hxx
@@ -14,6 +14,7 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
#include <set>
+#include <string_view>
namespace comphelper
{
@@ -26,7 +27,7 @@ public:
static void scanDirsAndFiles(const OUString& rDirURL, std::set<OUString>& rDirs,
std::set<std::pair<OUString, OUString>>& rFiles);
static bool deleteDirRecursively(const OUString& rDirURL);
- static bool moveDirContent(const OUString& rSourceDirURL, const OUString& rTargetDirURL,
+ static bool moveDirContent(const OUString& rSourceDirURL, std::u16string_view rTargetDirURL,
const std::set<OUString>& rExcludeList);
};
}
diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx
index e0a2ca244fb0..abf8044a28ca 100644
--- a/include/comphelper/backupfilehelper.hxx
+++ b/include/comphelper/backupfilehelper.hxx
@@ -15,6 +15,7 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
#include <set>
+#include <string_view>
#include <vector>
namespace comphelper
@@ -189,21 +190,21 @@ namespace comphelper
static const std::vector< OUString >& getCustomizationFileNames();
// file push helpers
- bool tryPush_Files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- bool tryPush_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool tryPush_Files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, const OUString& rTargetURL);
+ bool tryPush_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// file pop possibilities helper
- bool isPopPossible_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- static bool isPopPossible_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool isPopPossible_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, std::u16string_view rTargetURL);
+ static bool isPopPossible_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// file pop helpers
- bool tryPop_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- bool tryPop_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool tryPop_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, const OUString& rTargetURL);
+ bool tryPop_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// ExtensionInfo helpers
- bool tryPush_extensionInfo(const OUString& rTargetURL);
- static bool isPopPossible_extensionInfo(const OUString& rTargetURL);
- bool tryPop_extensionInfo(const OUString& rTargetURL);
+ bool tryPush_extensionInfo(std::u16string_view rTargetURL);
+ static bool isPopPossible_extensionInfo(std::u16string_view rTargetURL);
+ bool tryPop_extensionInfo(std::u16string_view rTargetURL);
// FileDirInfo helpers
void fillDirFileInfo();
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx
index e56951281f9e..1ed37dcd45c3 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -13,6 +13,8 @@
#include <sal/config.h>
#include <optional>
+#include <string_view>
+
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
@@ -102,7 +104,7 @@ public:
OUString const & path, css::uno::Any const & value);
css::uno::Any getLocalizedPropertyValue(
- OUString const & path) const;
+ std::u16string_view path) const;
static void setLocalizedPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
diff --git a/include/comphelper/ofopxmlhelper.hxx b/include/comphelper/ofopxmlhelper.hxx
index 2fa651406411..fe778bf1e6ca 100644
--- a/include/comphelper/ofopxmlhelper.hxx
+++ b/include/comphelper/ofopxmlhelper.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
#define INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/Sequence.h>
#include <comphelper/comphelperdllapi.h>
@@ -40,7 +44,7 @@ namespace comphelper::OFOPXMLHelper {
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >
ReadRelationsInfoSequence(
const css::uno::Reference< css::io::XInputStream >& xInStream,
- const OUString & aStreamName,
+ std::u16string_view aStreamName,
const css::uno::Reference< css::uno::XComponentContext >& rContext );
// returns sequence containing two entries of type sequence<StringPair>