[Libreoffice-commits] core.git: extensions/source sal/qa sdext/source shell/source vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 27 13:46:12 UTC 2021


 extensions/source/ole/unoconversionutilities.hxx |    2 +-
 extensions/source/ole/unoobjw.cxx                |    2 +-
 sal/qa/osl/security/osl_Security.cxx             |    2 +-
 sdext/source/pdfimport/pdfparse/pdfparse.cxx     |    2 +-
 shell/source/win32/SysShExec.cxx                 |    4 ++--
 vcl/source/opengl/win/WinDeviceInfo.cxx          |    4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 3260edbeb59d87f3f3e5c700cda4b0fd6222df0c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Apr 27 08:44:09 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Apr 27 15:45:27 2021 +0200

    loplugin:stringadd (clang-cl)
    
    Change-Id: Id7c2db4abcf947c4efa0296df29feca2c36d3cf8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114692
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 12a8533201a5..57ded2ce696c 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -1562,7 +1562,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny
                         if (!getType(sName, type))
                         {
                             throw CannotConvertException(
-                                      OUStringLiteral(u"[automation bridge]UnoConversionUtilities<T>::variantToAny \n"
+                                      OUString::Concat("[automation bridge]UnoConversionUtilities<T>::variantToAny \n"
                                       "A UNO type with the name: ") + o3tl::toU(LPCOLESTR(sName)) +
                                 "does not exist!",
                                 nullptr, TypeClass_UNKNOWN, FailReason::TYPE_NOT_SUPPORTED,0);
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 5b47ecc18d31..2d935f8d9583 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -2898,7 +2898,7 @@ HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID dispidMember, unsigned short
             Type type;
             if (!getType(arg.bstrVal, type))
             {
-                writeExcepinfo(pexcepinfo, OUStringLiteral(u"[automation bridge] A UNO type with the name ") +
+                writeExcepinfo(pexcepinfo, OUString::Concat("[automation bridge] A UNO type with the name ") +
                                            o3tl::toU(arg.bstrVal) + " does not exist!");
                 return DISP_E_EXCEPTION;
             }
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index b0b741d6cfe0..34417cd146fd 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -445,7 +445,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
                 // for "JohnSmith" without domain returns domain itself. Try getting the SID of the
                 // user using fully qualified name (the case of user of another domain having name
                 // identical this hostname is not handled).
-                sLookupUserName = o3tl::toU(wszDomainName) + OUStringLiteral(u"\\") + strUserName;
+                sLookupUserName = OUString::Concat(o3tl::toU(wszDomainName)) + u"\\" + strUserName;
                 wszAccName = o3tl::toW(sLookupUserName.getStr());
                 continue;
             }
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index ef0bfaea65f4..b2ffe23f06eb 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -581,7 +581,7 @@ std::unique_ptr<PDFEntry> PDFReader::read( const char* pBuffer, unsigned int nLe
         OString aTmp;
         unsigned int nElem = aGrammar.m_aObjectStack.size();
         for( unsigned int i = 0; i < nElem; i++ )
-            aTmp += OStringLiteral("   ") + typeid( *(aGrammar.m_aObjectStack[i]) ).name();
+            aTmp += OString::Concat("   ") + typeid( *(aGrammar.m_aObjectStack[i]) ).name();
 
         SAL_WARN("sdext.pdfimport.pdfparse", "parse error: " << rError.descriptor << " at buffer pos " << rError.where - pBuffer << ", object stack: " << aTmp);
 #else
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index fa83180705a0..8eec8b52d96f 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -258,7 +258,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
                 if (PathResolve(path, nullptr, PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE) == 0)
                 {
                     throw css::lang::IllegalArgumentException(
-                        OUStringLiteral(u"XSystemShellExecute.execute, PathResolve(") + o3tl::toU(path)
+                        OUString::Concat(u"XSystemShellExecute.execute, PathResolve(") + o3tl::toU(path)
                             + ") failed",
                         {}, 0);
                 }
@@ -271,7 +271,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
                 if (SHGetFileInfoW(path, 0, &info, sizeof info, SHGFI_ATTRIBUTES) == 0)
                 {
                     throw css::lang::IllegalArgumentException(
-                        OUStringLiteral(u"XSystemShellExecute.execute, SHGetFileInfoW(") + o3tl::toU(path) + ") failed", {},
+                        OUString::Concat(u"XSystemShellExecute.execute, SHGetFileInfoW(") + o3tl::toU(path) + ") failed", {},
                         0);
                 }
                 if ((info.dwAttributes & SFGAO_LINK) == 0) {
diff --git a/vcl/source/opengl/win/WinDeviceInfo.cxx b/vcl/source/opengl/win/WinDeviceInfo.cxx
index 2a44987789cf..a43a304d8cb7 100644
--- a/vcl/source/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/source/opengl/win/WinDeviceInfo.cxx
@@ -322,7 +322,7 @@ void WinOpenGLDeviceInfo::GetData()
                         sizeof(value),
                         nullptr))
             {
-                OUString  driverKey(OUStringLiteral(u"System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
+                OUString  driverKey(OUString::Concat("System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
                 result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, o3tl::toW(driverKey.getStr()), 0, KEY_QUERY_VALUE, &key);
                 if (result == ERROR_SUCCESS)
                 {
@@ -409,7 +409,7 @@ void WinOpenGLDeviceInfo::GetData()
                             sizeof(value),
                             nullptr))
                 {
-                    OUString driverKey2(OUStringLiteral(u"System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
+                    OUString driverKey2(OUString::Concat("System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
                     result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, o3tl::toW(driverKey2.getStr()), 0, KEY_QUERY_VALUE, &key);
                     if (result == ERROR_SUCCESS)
                     {


More information about the Libreoffice-commits mailing list