[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - cui/source cui/uiconfig desktop/source officecfg/registry

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 18 10:32:45 UTC 2019


 cui/source/options/optgdlg.cxx                             |   18 +++++
 cui/source/options/optgdlg.hxx                             |    1 
 cui/uiconfig/ui/optgeneralpage.ui                          |   41 ++++++++++---
 desktop/source/app/app.cxx                                 |    2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    7 ++
 5 files changed, 61 insertions(+), 8 deletions(-)

New commits:
commit 42af34720f5fb5be34e0b5b757e7b7a69595f91c
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Wed Jul 31 23:54:29 2019 +0200
Commit:     Juergen Funk (CIB) <juergen.funk_ml at cib.de>
CommitDate: Wed Sep 18 12:31:51 2019 +0200

    tdf#107471 Add checkbox to enable/disable sending crash reports to TDF
    
    Also hide it when compiled with --disable-breakpad i.e. most Linux distributions
    
    Reviewed-on: https://gerrit.libreoffice.org/76771
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 5841be069cf9891669b385f62f2e7f8d8e877981)
    
    Change-Id: I5d392e22410614550aa9602d0c30b0b81ec22ea0
    Reviewed-on: https://gerrit.libreoffice.org/79057
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    Tested-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3d0e7ee81be7..05c48787f6b1 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -279,6 +279,8 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
     get(m_pToYearFT, "toyear");
     get(m_pCollectUsageInfo, "collectusageinfo");
     get(m_pQuickStarterFrame, "quickstarter");
+    get(m_xCrashReport, "crashreport");
+
 
 #if defined(UNX)
     get(m_pQuickLaunchCB, "systray");
@@ -376,6 +378,14 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
         bModified = true;
     }
 
+#if HAVE_FEATURE_BREAKPAD
+    if (m_xCrashReport->IsValueChangedFromSaved())
+    {
+        officecfg::Office::Common::Misc::CrashReport::set(m_xCrashReport->IsChecked(), batch);
+        bModified = true;
+    }
+#endif
+
     batch->commit();
 
     if( m_pQuickLaunchCB->IsValueChangedFromSaved())
@@ -416,6 +426,14 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
     m_pCollectUsageInfo->Enable(!officecfg::Office::Common::Misc::CollectUsageInformation::isReadOnly());
     m_pCollectUsageInfo->SaveValue();
 
+#if HAVE_FEATURE_BREAKPAD
+    m_xCrashReport->Check(officecfg::Office::Common::Misc::CrashReport::get());
+    m_xCrashReport->Enable(!officecfg::Office::Common::Misc::CrashReport::isReadOnly());
+    m_xCrashReport->SaveValue();
+#else
+    m_xCrashReport->Disable();
+#endif
+
     SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem );
     if ( SfxItemState::SET == eState )
         m_pQuickLaunchCB->Check( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index f6296ff87679..d4b568c2479b 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -60,6 +60,7 @@ private:
 
     VclPtr<VclContainer> m_pQuickStarterFrame;
     VclPtr<CheckBox>     m_pQuickLaunchCB;
+    VclPtr<CheckBox>     m_xCrashReport;
 
     DECL_LINK( TwoFigureHdl, Edit&, void );
 protected:
diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui
index 022fb620bcdd..1b807b495051 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -287,14 +287,41 @@
             <property name="top_padding">6</property>
             <property name="left_padding">12</property>
             <child>
-              <object class="GtkCheckButton" id="collectusageinfo">
-                <property name="label" translatable="yes" context="optgeneralpage|collectusageinfo">Collect usage data and send it to The Document Foundation</property>
+              <object class="GtkGrid">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkCheckButton" id="collectusageinfo">
+                    <property name="label" translatable="yes" context="optgeneralpage|collectusageinfo">Collect usage data and send it to The Document Foundation</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="margin_top">1</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="crashreport">
+                    <property name="label" translatable="yes" context="optgeneralpage|crashreport">Sen_d crash reports to The Document Foundation</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="use_underline">True</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
               </object>
             </child>
           </object>
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c83d424f8a30..8c41c01a09ae 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2025,7 +2025,7 @@ void Desktop::OpenClients()
 #endif
 
 #if HAVE_FEATURE_BREAKPAD
-    if (crashReportInfoExists())
+    if (officecfg::Office::Common::Misc::CrashReport::get() && crashReportInfoExists())
         handleCrashReport();
 #endif
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index c467cd2c37e7..54af3be74603 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5400,6 +5400,13 @@
         </info>
         <value>false</value>
       </prop>
+      <prop oor:name="CrashReport" oor:type="xs:boolean" oor:nillable="false">
+        <!-- UIHints: Tools - Options - General -->
+        <info>
+          <desc>Enable sending crash reports to The Document Foundation</desc>
+        </info>
+        <value>true</value>
+      </prop>
       <prop oor:name="UseOpenCL" oor:type="xs:boolean" oor:nillable="false">
         <info>
           <desc>Determines whether OpenCL can be used, when available, to speed up


More information about the Libreoffice-commits mailing list