summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
Diffstat (limited to 'unoidl')
-rw-r--r--unoidl/source/sourceprovider-parser.y7
-rw-r--r--unoidl/source/unoidl-read.cxx3
-rw-r--r--unoidl/source/unoidl-write.cxx3
3 files changed, 4 insertions, 9 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 6512e4a69d64..8f813c3a6c45 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -261,9 +261,7 @@ unoidl::detail::SourceProviderEntity * findEntity_(
assert(data != 0);
assert(name != 0);
OUString n;
- if (name->startsWith(".")) {
- n = name->copy(1);
- } else {
+ if (!name->startsWith(".", &n)) {
for (std::vector<OUString>::const_reverse_iterator i(data->modules.rbegin());
i != data->modules.rend(); ++i)
{
@@ -345,7 +343,7 @@ Found findEntity(
static_cast<unoidl::TypedefEntity *>(e->entity.get())
->getType());
typeNucleus = t;
- while (typeNucleus.startsWith("[]")) {
+ while (typeNucleus.startsWith("[]", &typeNucleus)) {
if (!args.empty()) {
error(
location, yyscanner,
@@ -363,7 +361,6 @@ Found findEntity(
return FOUND_ERROR;
}
++rank;
- typeNucleus = typeNucleus.copy(2);
}
sal_Int32 i = typeNucleus.indexOf('<');
if (i != -1) {
diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx
index 2bbe8b672dba..1a7633535579 100644
--- a/unoidl/source/unoidl-read.cxx
+++ b/unoidl/source/unoidl-read.cxx
@@ -91,9 +91,8 @@ OUString decomposeType(
OUString nucl(type);
*rank = 0;
typeArguments->clear();
- while (nucl.startsWith("[]")) {
+ while (nucl.startsWith("[]", &nucl)) {
++*rank;
- nucl = nucl.copy(2);
}
sal_Int32 i = nucl.indexOf('<');
if (i != -1) {
diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx
index ad9268e59a6e..8b3b3bf4b287 100644
--- a/unoidl/source/unoidl-write.cxx
+++ b/unoidl/source/unoidl-write.cxx
@@ -57,12 +57,11 @@ void badUsage() {
OUString getArgumentUri(sal_uInt32 argument, bool * entities) {
OUString arg;
rtl_getAppCommandArg(argument, &arg.pData);
- if (arg.startsWith("@")) {
+ if (arg.startsWith("@", &arg)) {
if (entities == 0) {
badUsage();
}
*entities = true;
- arg = arg.copy(1);
} else if (entities != 0) {
*entities = false;
}