summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-23 16:07:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-27 14:07:56 +0200
commitc7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch)
tree4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /filter
parenttdf#138883 Prevent renaming Templates (diff)
downloadcore-c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6.tar.gz
core-c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6.zip
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/filtercache.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index b3ac1594fade..c97d39f2319b 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -995,13 +995,13 @@ void FilterCache::impl_validateAndOptimize()
aType[PROPNAME_NAME] >>= sInternalTypeNameCheck;
if (sInternalTypeNameCheck != sType)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does support the property \"Name\" correctly.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" does support the property \"Name\" correctly.\n");
++nWarnings;
}
if (!ce && !cu)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does not contain any URL pattern nor any extensions.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" does not contain any URL pattern nor any extensions.\n");
++nWarnings;
}
#endif
@@ -1077,7 +1077,7 @@ void FilterCache::impl_validateAndOptimize()
(!bReferencedByHandler)
)
{
- sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" is not used by any filter, loader or content handler.\n");
+ sLog.append("Warning\t:\t" "The type \"" + sType + "\" is not used by any filter, loader or content handler.\n");
++nWarnings;
}
}
@@ -1098,7 +1098,7 @@ void FilterCache::impl_validateAndOptimize()
sLog.append("warning\t:\t");
}
- sLog.append("The type \"").append(sType).append("\" points to an invalid filter \"").append(sPrefFilter).append("\".\n");
+ sLog.append("The type \"" + sType + "\" points to an invalid filter \"" + sPrefFilter + "\".\n");
continue;
}
@@ -1107,10 +1107,10 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_TYPE] >>= sFilterTypeReg;
if (sFilterTypeReg != sType)
{
- sLog.append("error\t:\t" "The preferred filter \"")
- .append(sPrefFilter).append("\" of type \"").append(sType)
- .append("\" is registered for another type \"").append(sFilterTypeReg)
- .append("\".\n");
+ sLog.append("error\t:\t" "The preferred filter \"" +
+ sPrefFilter + "\" of type \"" + sType +
+ "\" is registered for another type \"" + sFilterTypeReg +
+ "\".\n");
++nErrors;
}
@@ -1118,8 +1118,8 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_FLAGS] >>= nFlags;
if (!(static_cast<SfxFilterFlags>(nFlags) & SfxFilterFlags::IMPORT))
{
- sLog.append("error\t:\t" "The preferred filter \"").append(sPrefFilter).append("\" of type \"")
- .append(sType).append("\" is not an IMPORT filter!\n");
+ sLog.append("error\t:\t" "The preferred filter \"" + sPrefFilter + "\" of type \"" +
+ sType + "\" is not an IMPORT filter!\n");
++nErrors;
}
@@ -1127,8 +1127,8 @@ void FilterCache::impl_validateAndOptimize()
aPrefFilter[PROPNAME_NAME] >>= sInternalFilterNameCheck;
if (sInternalFilterNameCheck != sPrefFilter)
{
- sLog.append("Warning\t:\t" "The filter \"").append(sPrefFilter)
- .append("\" does support the property \"Name\" correctly.\n");
+ sLog.append("Warning\t:\t" "The filter \"" + sPrefFilter +
+ "\" does support the property \"Name\" correctly.\n");
++nWarnings;
}
}