[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - desktop/source framework/source include/desktop vcl/opengl vcl/source vcl/unx vcl/win

Juergen Funk (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 23 14:45:42 UTC 2020


 desktop/source/app/app.cxx            |    2 +-
 desktop/source/app/crashreport.cxx    |    2 +-
 desktop/source/minidump/minidump.cxx  |    4 +++-
 framework/source/services/desktop.cxx |    2 +-
 include/desktop/crashreport.hxx       |    4 ++--
 vcl/opengl/win/WinDeviceInfo.cxx      |    6 +++---
 vcl/opengl/x11/X11DeviceInfo.cxx      |    4 ++--
 vcl/source/opengl/OpenGLHelper.cxx    |    2 +-
 vcl/source/window/builder.cxx         |    2 +-
 vcl/unx/generic/plugadapt/salplug.cxx |    2 +-
 vcl/win/app/salinst.cxx               |    2 +-
 11 files changed, 17 insertions(+), 15 deletions(-)

New commits:
commit 28b7864b3f7d2b46a9b8384c8a14af5c33fc92c2
Author:     Juergen Funk <juergen.funk_ml at cib.de>
AuthorDate: Wed Sep 25 12:09:21 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 23 15:45:24 2020 +0100

    desktop: proper error checking for crashreport ini reading
    
    Reviewed-on: https://gerrit.libreoffice.org/79603
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    Tested-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    (cherry picked from commit 044a683e6c8f864d46fe8ebe3ef5c757cbea30a6)
    
    §§{JNKCMD:NoBuild}§§
    
    Change-Id: I1107304a0e3f482b6a7e6110006c2f26b9cb0778
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87261
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/desktop/source/minidump/minidump.cxx b/desktop/source/minidump/minidump.cxx
index f3eefd023b75..0e83ac98905c 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -23,7 +23,9 @@ std::map<std::string, std::string> readStrings(std::istream& file)
 {
     std::map<std::string, std::string> parameters;
 
-    while (!file.eof())
+    // when file is not readable, the status eof would not be set
+    // better test of state is okay
+    while (file)
     {
         std::string line;
         std::getline(file, line);
commit 2b5659865dc0847eb9626f911606c2c116f4200e
Author:     Juergen Funk <juergen.funk_ml at cib.de>
AuthorDate: Wed Sep 25 11:21:17 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 23 15:45:12 2020 +0100

    crashreport: change addKeyValue to lower-case camel
    
    Reviewed-on: https://gerrit.libreoffice.org/79601
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    Tested-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    (cherry picked from commit b5adb2433de4f376c253a813a632e982c7ac90c5)
    
     Conflicts:
            vcl/opengl/x11/X11DeviceInfo.cxx
            vcl/source/app/salplug.cxx
    
    §§{JNKCMD:NoBuild}§§
    
    Change-Id: Ife5775d3a570da1fc2e4dd627456523705b64e1d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87260
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 8c41c01a09ae..d1b76aa49d3c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2106,7 +2106,7 @@ void Desktop::OpenClients()
 #if HAVE_FEATURE_BREAKPAD
     CrashReporter::writeCommonInfo();
     // write this information here to avoid depending on vcl in the crash reporter lib
-    CrashReporter::AddKeyValue("Language", Application::GetSettings().GetLanguageTag().getBcp47());
+    CrashReporter::addKeyValue("Language", Application::GetSettings().GetLanguageTag().getBcp47());
 #endif
 
     RequestHandler::EnableRequests();
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index 29001367bb91..f19b9f0305b2 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -52,7 +52,7 @@ void writeToStream(std::ofstream& strm, const OUString& rKey, const OUString& rV
 
 }
 
-void CrashReporter::AddKeyValue(const OUString& rKey, const OUString& rValue)
+void CrashReporter::addKeyValue(const OUString& rKey, const OUString& rValue)
 {
     osl::MutexGuard aGuard(maMutex);
     if (mbInit)
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index d88371979f20..3ca73dbb13a4 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -314,7 +314,7 @@ sal_Bool SAL_CALL Desktop::terminate()
         // see dispose() for further information.
         /* SAFE AREA --------------------------------------------------------------------------------------- */
         SolarMutexClearableGuard aWriteLock;
-        CrashReporter::AddKeyValue("ShutDown", OUString::boolean(true));
+        CrashReporter::addKeyValue("ShutDown", OUString::boolean(true));
         m_bIsTerminated = true;
         aWriteLock.clear();
         /* UNSAFE AREA ------------------------------------------------------------------------------------- */
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx
index 6056adbe1d28..e3486bbf0863 100644
--- a/include/desktop/crashreport.hxx
+++ b/include/desktop/crashreport.hxx
@@ -41,7 +41,7 @@ CRASHREPORT_DLLPUBLIC
 /*class*/ CrashReporter
 {
 public:
-    static void AddKeyValue(const OUString& rKey, const OUString& rValue);
+    static void addKeyValue(const OUString& rKey, const OUString& rValue);
 
     static std::string getIniFileName();
 
@@ -69,7 +69,7 @@ private:
 // everywhere we want to log something to the crash report system.
 #if HAVE_FEATURE_BREAKPAD
 #else
-inline void CrashReporter::AddKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/)
+inline void CrashReporter::addKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/)
 {
 }
 #endif
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index ccf87cacb9e8..f82a5e8726a9 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -540,9 +540,9 @@ void writeToLog(SvStream& rStrm, const char* pKey, const OUString & rVal)
 
 bool WinOpenGLDeviceInfo::isDeviceBlocked()
 {
-    CrashReporter::AddKeyValue("OpenGLVendor", maAdapterVendorID);
-    CrashReporter::AddKeyValue("OpenGLDevice", maAdapterDeviceID);
-    CrashReporter::AddKeyValue("OpenGLDriver", maDriverVersion);
+    CrashReporter::addKeyValue("OpenGLVendor", maAdapterVendorID);
+    CrashReporter::addKeyValue("OpenGLDevice", maAdapterDeviceID);
+    CrashReporter::addKeyValue("OpenGLDriver", maDriverVersion);
 
     SAL_INFO("vcl.opengl", maDriverVersion);
     SAL_INFO("vcl.opengl", maDriverDate);
diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx
index 5388f85c0c3d..402f18dde304 100644
--- a/vcl/opengl/x11/X11DeviceInfo.cxx
+++ b/vcl/opengl/x11/X11DeviceInfo.cxx
@@ -282,8 +282,8 @@ bool X11OpenGLDeviceInfo::isDeviceBlocked()
     if (mnGLMajorVersion == 1)
         return true;
 
-    CrashReporter::AddKeyValue("AdapterVendorId", rtl::OStringToOUString(maVendor, RTL_TEXTENCODING_UTF8));
-    CrashReporter::AddKeyValue("AdapterDeviceId", rtl::OStringToOUString(maRenderer, RTL_TEXTENCODING_UTF8));
+    CrashReporter::addKeyValue("AdapterVendorId", rtl::OStringToOUString(maVendor, RTL_TEXTENCODING_UTF8));
+    CrashReporter::addKeyValue("AdapterDeviceId", rtl::OStringToOUString(maRenderer, RTL_TEXTENCODING_UTF8));
 
     SAL_INFO("vcl.opengl", "Vendor: " << maVendor);
     SAL_INFO("vcl.opengl", "Renderer: " << maRenderer);
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 3bad4ea44b87..80a502b50727 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -1044,7 +1044,7 @@ bool OpenGLHelper::isVCLOpenGLEnabled()
         if (!getenv("SAL_DISABLE_GL_WATCHDOG"))
             OpenGLWatchdogThread::start();
     }
-    CrashReporter::AddKeyValue("UseOpenGL", OUString::boolean(bRet));
+    CrashReporter::addKeyValue("UseOpenGL", OUString::boolean(bRet));
 
     return bRet;
 }
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 8aa9d46f876d..a35c87d7ee20 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -361,7 +361,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
     catch (const css::uno::Exception &rExcept)
     {
         DBG_UNHANDLED_EXCEPTION("vcl.layout", "Unable to read .ui file");
-        CrashReporter::AddKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message);
+        CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message);
         throw;
     }
 
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index b7ed29a22f5d..d500cf29e491 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -278,7 +278,7 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore )
         std::fprintf( stderr, "Application Error\n" );
     else
     {
-        CrashReporter::AddKeyValue("AbortMessage", rErrorText);
+        CrashReporter::addKeyValue("AbortMessage", rErrorText);
         std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
     }
     if( bDumpCore )
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 6f504df887c1..5e204a5f7583 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -77,7 +77,7 @@ void SalAbort( const OUString& rErrorText, bool )
     }
     else
     {
-        CrashReporter::AddKeyValue("AbortMessage", rErrorText);
+        CrashReporter::addKeyValue("AbortMessage", rErrorText);
         // make sure crash reporter is triggered
         RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr );
         FatalAppExitW( 0, o3tl::toW(rErrorText.getStr()) );


More information about the Libreoffice-commits mailing list