summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/driverblocklist.hxx4
-rw-r--r--vcl/source/app/stdtext.cxx2
-rw-r--r--vcl/source/control/field2.cxx4
-rw-r--r--vcl/source/helper/driverblocklist.cxx5
-rw-r--r--vcl/source/window/builder.cxx5
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx6
7 files changed, 18 insertions, 12 deletions
diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
index fa85dd7dab24..c63fc14acd61 100644
--- a/vcl/inc/driverblocklist.hxx
+++ b/vcl/inc/driverblocklist.hxx
@@ -26,7 +26,7 @@ enum class VersionType
};
VCL_DLLPUBLIC bool IsDeviceBlocked(const OUString& blocklistURL, VersionType versionType,
- const OUString& driverVersion, const OUString& vendorId,
+ const OUString& driverVersion, std::u16string_view vendorId,
const OUString& deviceId);
#ifdef _WIN32
@@ -144,7 +144,7 @@ OUString VCL_DLLPUBLIC GetVendorId(DeviceVendor id);
bool VCL_DLLPUBLIC FindBlocklistedDeviceInList(
std::vector<DriverInfo>& aDeviceInfos, VersionType versionType, OUString const& sDriverVersion,
- OUString const& sAdapterVendorID, OUString const& sAdapterDeviceID, OperatingSystem system,
+ std::u16string_view sAdapterVendorID, OUString const& sAdapterDeviceID, OperatingSystem system,
const OUString& blocklistURL = OUString());
#define GFX_DRIVER_VERSION(a, b, c, d) \
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 7d6bae82016c..0d5e8411bc60 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -25,7 +25,7 @@
#include <svdata.hxx>
void ShowServiceNotAvailableError(weld::Widget* pParent,
- const OUString& rServiceName, bool bError)
+ std::u16string_view rServiceName, bool bError)
{
OUString aText = VclResId(SV_STDTEXT_SERVICENOTAVAILABLE).replaceAll("%s", rServiceName);
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 7fbeed108d99..fc39b48de12d 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -461,7 +461,7 @@ static void ImplPatternProcessStrictModify( weld::Entry& rEntry,
rEntry.select_region(nStartPos, nEndPos);
}
-static sal_Int32 ImplPatternLeftPos(const OString& rEditMask, sal_Int32 nCursorPos)
+static sal_Int32 ImplPatternLeftPos(std::string_view rEditMask, sal_Int32 nCursorPos)
{
// search non-literal predecessor
sal_Int32 nNewPos = nCursorPos;
@@ -1193,7 +1193,7 @@ static sal_uInt16 ImplCutNumberFromString( OUString& rStr )
return nValue;
}
-static bool ImplCutMonthName( OUString& rStr, const OUString& _rLookupMonthName )
+static bool ImplCutMonthName( OUString& rStr, std::u16string_view _rLookupMonthName )
{
sal_Int32 index = 0;
rStr = rStr.replaceFirst(_rLookupMonthName, "", &index);
diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx
index 0fb1edd73f75..a24cdc98fbcb 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -596,7 +596,8 @@ DriverInfo::DriverInfo(OperatingSystem os, const OUString& vendor, VersionCompar
}
bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos, VersionType versionType,
- OUString const& sDriverVersion, OUString const& sAdapterVendorID,
+ OUString const& sDriverVersion,
+ std::u16string_view sAdapterVendorID,
OUString const& sAdapterDeviceID, OperatingSystem system,
const OUString& blocklistURL)
{
@@ -700,7 +701,7 @@ bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos, VersionT
}
bool IsDeviceBlocked(const OUString& blocklistURL, VersionType versionType,
- const OUString& driverVersion, const OUString& vendorId,
+ const OUString& driverVersion, std::u16string_view vendorId,
const OUString& deviceId)
{
std::vector<DriverInfo> driverList;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 3e9200df6d2e..c1163335aaff 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -11,6 +11,7 @@
#include <config_options.h>
#include <memory>
+#include <string_view>
#include <unordered_map>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -76,9 +77,9 @@
#include <dlfcn.h>
#endif
-static bool toBool(const OString &rValue)
+static bool toBool(std::string_view rValue)
{
- return (!rValue.isEmpty() && (rValue[0] == 't' || rValue[0] == 'T' || rValue[0] == '1'));
+ return (!rValue.empty() && (rValue[0] == 't' || rValue[0] == 'T' || rValue[0] == '1'));
}
namespace
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 6aa30005942e..245befc2c3a7 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1318,9 +1318,9 @@ void VclGrid::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
rJsonWriter.put("type", "grid");
}
-bool toBool(const OUString &rValue)
+bool toBool(std::u16string_view rValue)
{
- return (!rValue.isEmpty() && (rValue[0] == 't' || rValue[0] == 'T' || rValue[0] == '1'));
+ return (!rValue.empty() && (rValue[0] == 't' || rValue[0] == 'T' || rValue[0] == '1'));
}
bool VclGrid::set_property(const OString &rKey, const OUString &rValue)
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 6d08fbb7842a..099e5f929adb 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -29,6 +29,10 @@
printer job functions.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
// For spawning PDF and FAX generation
#include <unistd.h>
#include <sys/wait.h>
@@ -340,7 +344,7 @@ static std::vector<OUString> getFaxNumbers()
return aFaxNumbers;
}
-static bool createPdf( const OUString& rToFile, const OUString& rFromFile, const OUString& rCommandLine )
+static bool createPdf( std::u16string_view rToFile, const OUString& rFromFile, const OUString& rCommandLine )
{
return passFileToCommandLine( rFromFile, rCommandLine.replaceAll("(OUTFILE)", rToFile) );
}