diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 15:09:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:05:18 +0200 |
commit | 4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch) | |
tree | 1fe9cc9db455779d33c24320fedc1e25888b3e5c /filter | |
parent | a1f31211920bfae1a21ea375fa5280c9c6595e15 (diff) |
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding
strings together, to an OUStringBuffer, where we could rather call
append repeatedly and avoid the temporary creation
Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82
Reviewed-on: https://gerrit.libreoffice.org/59708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 3725a7995f93..d3cf357f165d 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -1001,13 +1001,13 @@ void FilterCache::impl_validateAndOptimize() aType[PROPNAME_NAME] >>= sInternalTypeNameCheck; if (sInternalTypeNameCheck != sType) { - sLog.append("Warning\t:\t" "The type \"" + sType + "\" does support the property \"Name\" correctly.\n"); + sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does support the property \"Name\" correctly.\n"); ++nWarnings; } if (!ce && !cu) { - sLog.append("Warning\t:\t" "The type \"" + sType + "\" does not contain any URL pattern nor any extensions.\n"); + sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does not contain any URL pattern nor any extensions.\n"); ++nWarnings; } #endif @@ -1083,7 +1083,7 @@ void FilterCache::impl_validateAndOptimize() (!bReferencedByHandler) ) { - sLog.append("Warning\t:\t" "The type \"" + sType + "\" is not used by any filter, loader or content handler.\n"); + sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" is not used by any filter, loader or content handler.\n"); ++nWarnings; } } @@ -1104,7 +1104,7 @@ void FilterCache::impl_validateAndOptimize() sLog.append("warning\t:\t"); } - sLog.append("The type \"" + sType + "\" points to an invalid filter \"" + sPrefFilter + "\".\n"); + sLog.append("The type \"").append(sType).append("\" points to an invalid filter \"").append(sPrefFilter).append("\".\n"); continue; } @@ -1113,10 +1113,10 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_TYPE] >>= sFilterTypeReg; if (sFilterTypeReg != sType) { - sLog.append("error\t:\t" "The preferred filter \"" - + sPrefFilter + "\" of type \"" + sType + - "\" is registered for another type \"" + sFilterTypeReg + - "\".\n"); + 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"); ++nErrors; } @@ -1124,8 +1124,8 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_FLAGS] >>= nFlags; if (!(static_cast<SfxFilterFlags>(nFlags) & SfxFilterFlags::IMPORT)) { - sLog.append("error\t:\t" "The preferred filter \"" + sPrefFilter + "\" of type \"" + - sType + "\" is not an IMPORT filter!\n"); + sLog.append("error\t:\t" "The preferred filter \"").append(sPrefFilter).append("\" of type \"") + .append(sType).append("\" is not an IMPORT filter!\n"); ++nErrors; } @@ -1133,8 +1133,8 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_NAME] >>= sInternalFilterNameCheck; if (sInternalFilterNameCheck != sPrefFilter) { - sLog.append("Warning\t:\t" "The filter \"" + sPrefFilter + - "\" does support the property \"Name\" correctly.\n"); + sLog.append("Warning\t:\t" "The filter \"").append(sPrefFilter) + .append("\" does support the property \"Name\" correctly.\n"); ++nWarnings; } } |