summaryrefslogtreecommitdiff
path: root/codemaker/source/cppumaker/cppumaker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'codemaker/source/cppumaker/cppumaker.cxx')
-rw-r--r--codemaker/source/cppumaker/cppumaker.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx
index 384e2b5aa079..5e666456c301 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -32,6 +32,7 @@
#include <sal/main.h>
#include <sal/types.h>
#include <unoidl/unoidl.hxx>
+#include <o3tl/string_view.hxx>
#include "cppuoptions.hxx"
#include "cpputype.hxx"
@@ -54,16 +55,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
typeMgr->loadProvider(convertToFileUrl(f), true);
}
codemaker::GeneratedTypeSet generated;
- if (options.isValid("-T")) {
- OUString names(b2u(options.getOption("-T")));
+ if (options.isValid("-T"_ostr)) {
+ OUString names(b2u(options.getOption("-T"_ostr)));
for (sal_Int32 i = 0; i != -1;) {
- OUString name(names.getToken(0, ';', i));
- if (!name.isEmpty()) {
+ std::u16string_view name(o3tl::getToken(names, 0, ';', i));
+ if (!name.empty()) {
produce(
- (name == "*"
- ? ""
- : name.endsWith(".*")
- ? name.copy(0, name.getLength() - std::strlen(".*"))
+ OUString(name == u"*"
+ ? u""
+ : o3tl::ends_with(name, u".*")
+ ? name.substr(0, name.size() - std::strlen(".*"))
: name),
typeMgr, generated, options);
}
@@ -71,7 +72,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
} else {
produce("", typeMgr, generated, options);
}
- if (!options.isValid("-nD")) {
+ if (!options.isValid("-nD"_ostr)) {
// C++ header files generated for the following UNO types are
// included in header files in cppu/inc/com/sun/star/uno (Any.hxx,
// Reference.hxx, Type.h), so it seems best to always generate those