diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 10:23:28 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 12:46:01 +0200 |
commit | 3d236177be255b2027a997bfc12fe0833ca9a2f7 (patch) | |
tree | d67582e355bccb43cf133c1857f5dd6136be2f35 /vcl | |
parent | 6c65c62c26a8aa4d04466545f8f04ec86b797012 (diff) |
Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.
Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/brand.cxx | 6 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/glyphset.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx index 15615c35410b..4ab1608d53e6 100644 --- a/vcl/source/app/brand.cxx +++ b/vcl/source/app/brand.cxx @@ -48,7 +48,7 @@ namespace { } bool tryLoadPng( std::u16string_view rBaseDir, std::u16string_view rName, BitmapEx& rBitmap ) { - return loadPng( rtl::OUStringConcatenation(OUString::Concat(rBaseDir) + "/" LIBO_ETC_FOLDER + rName), rBitmap); + return loadPng( rtl::Concat2View(OUString::Concat(rBaseDir) + "/" LIBO_ETC_FOLDER + rName), rBitmap); } } @@ -68,11 +68,11 @@ bool Application::LoadBrandBitmap (std::u16string_view pName, BitmapEx &rBitmap) ::std::vector< OUString > aFallbacks( aLanguageTag.getFallbackStrings( true)); for (const OUString & aFallback : aFallbacks) { - if (tryLoadPng( aBaseDir, OUStringConcatenation(aBaseName + "-" + aFallback + aPng), rBitmap)) + if (tryLoadPng( aBaseDir, Concat2View(aBaseName + "-" + aFallback + aPng), rBitmap)) return true; } - return tryLoadPng( aBaseDir, OUStringConcatenation(aBaseName + aPng), rBitmap); + return tryLoadPng( aBaseDir, Concat2View(aBaseName + aPng), rBitmap); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 5dcdeef4fae7..7294d82e74e2 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -495,7 +495,7 @@ void ImplImageTree::createStyle() INetURLObject aUrl(path); OSL_ASSERT(!aUrl.HasError()); - bool ok = aUrl.Append(OUStringConcatenation("images_" + maCurrentStyle), INetURLObject::EncodeMechanism::All); + bool ok = aUrl.Append(Concat2View("images_" + maCurrentStyle), INetURLObject::EncodeMechanism::All); OSL_ASSERT(ok); sThemeUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE) + ".zip"; if (urlExists(sThemeUrl)) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d241d37d77a3..60629222fd3c 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1017,9 +1017,9 @@ bool Dialog::ImplStartExecute() aObject.EventName = "DialogExecute"; xEventBroadcaster->documentEventOccured(aObject); if (bModal) - UITestLogger::getInstance().log(OUStringConcatenation("Open Modal " + get_id())); + UITestLogger::getInstance().log(Concat2View("Open Modal " + get_id())); else - UITestLogger::getInstance().log(OUStringConcatenation("Open Modeless " + get_id())); + UITestLogger::getInstance().log(Concat2View("Open Modeless " + get_id())); bool bTunnelingEnabled = mpDialogImpl->m_bLOKTunneling; if (comphelper::LibreOfficeKit::isActive() && bTunnelingEnabled) diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx index ffba77d2c3f9..e9355fce3d7c 100644 --- a/vcl/unx/generic/print/glyphset.cxx +++ b/vcl/unx/generic/print/glyphset.cxx @@ -268,7 +268,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42 // create the current subset OString aGlyphSetName = GetGlyphSetName(nGlyphSetID); - pTmpFile->WriteOString( OStringConcatenation(OString::Concat("%%BeginResource: font ")+ aGlyphSetName + "\n") ); + pTmpFile->WriteOString( Concat2View(OString::Concat("%%BeginResource: font ")+ aGlyphSetName + "\n") ); CreatePSUploadableFont( pTTFont, pTmpFile, aGlyphSetName.getStr(), glyph.size(), pTTGlyphMapping, pEncoding, bAllowType42 ); pTmpFile->WriteOString("%%EndResource\n" ); diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx index 7d2200b3f099..e578d2a1a271 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx @@ -802,7 +802,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() if ( m_pFilterVector) for (auto const& filter : *m_pFilterVector) { - if( lcl_matchFilter( filter.getFilter(), OUStringConcatenation(OUString::Concat("*.") + sExtension) ) ) + if( lcl_matchFilter( filter.getFilter(), Concat2View(OUString::Concat("*.") + sExtension) ) ) { if( aNewFilter.isEmpty() ) aNewFilter = filter.getTitle(); |