[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - 2 commits - cui/source sfx2/source

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 23 18:26:58 UTC 2021


 cui/source/options/optgdlg.cxx |   17 -------
 cui/source/options/optgdlg.hxx |    1 
 sfx2/source/appl/appserv.cxx   |   27 -----------
 sfx2/source/view/viewfrm.cxx   |   99 -----------------------------------------
 4 files changed, 144 deletions(-)

New commits:
commit 0a8737c61abe41740b390661971f27926f1f7ccb
Author:     Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sat Jan 23 17:04:42 2021 +0100
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Sat Jan 23 17:04:42 2021 +0100

    Also remove donate/involvement info bar code
    
    Follow-up commit to e9e61aa30af25df0e10f726e57fee6d2ba74d2b3 which
    already removed the menu entries.
    
    Change-Id: Ieb029d4fe5d0b986270de68a8a35a0d6aeaa4c26

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f15e39282682..9295718c37ab 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -565,33 +565,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             sfx2::openUriExternally(sURL, false);
             break;
         }
-        case SID_GETINVOLVED:
-        {
-            // Open get involved/join us page based on locales
-            OUString sURL(officecfg::Office::Common::Menus::GetInvolvedURL::get() + //https://hub.libreoffice.org/joinus/
-                "?LOlocale=" + utl::ConfigManager::getUILocale());
-            sfx2::openUriExternally(sURL, false);
-            break;
-        }
-        case SID_DONATION:
-        {
-            // Open donation page based on language + script (BCP47) with language as fall back.
-            OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
-            OUString aBcp47 = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47();
-            OUString sURL(officecfg::Office::Common::Menus::DonationURL::get() + //https://hub.libreoffice.org/donation/
-                "?BCP47=" + aBcp47 + "&LOlang=" + aLang );
-            sfx2::openUriExternally(sURL, false);
-            break;
-        }
-        case SID_WHATSNEW:
-        {
-            // Open release notes depending on version and locale
-            OUString sURL(officecfg::Office::Common::Menus::ReleaseNotesURL::get() + //https://hub.libreoffice.org/ReleaseNotes/
-                "?LOvers=" + utl::ConfigManager::getProductVersion() +
-                "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() );
-            sfx2::openUriExternally(sURL, false);
-            break;
-        }
         case SID_SHOW_LICENSE:
         {
             LicenseDialog aDialog(rReq.GetFrameWeld());
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5a64599e5894..23e318fa761c 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1294,34 +1294,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                         bIsUITest = true;
                 }
 
-                //what's new infobar
-                if (!officecfg::Setup::Product::ooSetupLastVersion::isReadOnly()) //don't show/update when readonly
-                {
-                    OUString sSetupVersion = utl::ConfigManager::getProductVersion();
-                    sal_Int32 iCurrent = sSetupVersion.getToken(0,'.').toInt32() * 10 + sSetupVersion.getToken(1,'.').toInt32();
-                    OUString sLastVersion
-                        = officecfg::Setup::Product::ooSetupLastVersion::get().get_value_or("0.0");
-                    sal_Int32 iLast = sLastVersion.getToken(0,'.').toInt32() * 10 + sLastVersion.getToken(1,'.').toInt32();
-                    if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest)
-                    {
-                        VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", "", SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO);
-                        if (pInfoBar)
-                        {
-                            VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow());
-                            xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON));
-                            xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize());
-                            xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler));
-                            pInfoBar->addButton(xWhatsNewButton);
-
-                            //update lastversion
-                            std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
-                            officecfg::Setup::Product::ooSetupLastVersion::set(
-                                sSetupVersion, batch);
-                            batch->commit();
-                        }
-                    }
-                }
-
                 // show tip-of-the-day dialog
                 const bool bShowTipOfTheDay = officecfg::Office::Common::Misc::ShowTipOfTheDay::get();
                 if (bShowTipOfTheDay && !Application::IsHeadlessModeEnabled() && !bIsUITest) {
@@ -1334,62 +1306,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                     }
                 } //bShowTipOfTheDay
 
-                // inform about the community involvement
-                const sal_Int64 nLastGetInvolvedShown = officecfg::Setup::Product::LastTimeGetInvolvedShown::get();
-                const sal_Int64 nNow = std::chrono::duration_cast<std::chrono::seconds>(t0).count();
-                const sal_Int64 nPeriodSec(60 * 60 * 24 * 180); // 180 days in seconds
-                bool bUpdateLastTimeGetInvolvedShown = false;
-
-                if (nLastGetInvolvedShown == 0)
-                    bUpdateLastTimeGetInvolvedShown = true;
-                else if (nPeriodSec < nNow && nLastGetInvolvedShown < (nNow + nPeriodSec/2) - nPeriodSec) // 90d alternating with donation
-                {
-                    bUpdateLastTimeGetInvolvedShown = true;
-
-                    VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("getinvolved", "", SfxResId(STR_GET_INVOLVED_TEXT), InfobarType::INFO);
-
-                    VclPtrInstance<PushButton> xGetInvolvedButton(&GetWindow());
-                    xGetInvolvedButton->SetText(SfxResId(STR_GET_INVOLVED_BUTTON));
-                    xGetInvolvedButton->SetSizePixel(xGetInvolvedButton->GetOptimalSize());
-                    xGetInvolvedButton->SetClickHdl(LINK(this, SfxViewFrame, GetInvolvedHandler));
-                    pInfoBar->addButton(xGetInvolvedButton);
-                }
-
-                if (bUpdateLastTimeGetInvolvedShown
-                    && !officecfg::Setup::Product::LastTimeGetInvolvedShown::isReadOnly())
-                {
-                    std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
-                    officecfg::Setup::Product::LastTimeGetInvolvedShown::set(nNow, batch);
-                    batch->commit();
-                }
-
-                // inform about donations
-                const sal_Int64 nLastDonateShown = officecfg::Setup::Product::LastTimeDonateShown::get();
-                bool bUpdateLastTimeDonateShown = false;
-
-                if (nLastDonateShown == 0)
-                    bUpdateLastTimeDonateShown = true;
-                else if (nPeriodSec < nNow && nLastDonateShown < nNow - nPeriodSec) // 90d alternating with getinvolved
-                {
-                    bUpdateLastTimeDonateShown = true;
-
-                    VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("donate", "", SfxResId(STR_DONATE_TEXT), InfobarType::INFO);
-
-                    VclPtrInstance<PushButton> xDonateButton(&GetWindow());
-                    xDonateButton->SetText(SfxResId(STR_DONATE_BUTTON));
-                    xDonateButton->SetSizePixel(xDonateButton->GetOptimalSize());
-                    xDonateButton->SetClickHdl(LINK(this, SfxViewFrame, DonationHandler));
-                    pInfoBar->addButton(xDonateButton);
-                }
-
-                if (bUpdateLastTimeDonateShown
-                    && !officecfg::Setup::Product::LastTimeDonateShown::isReadOnly())
-                {
-                    std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
-                    officecfg::Setup::Product::LastTimeDonateShown::set(nNow, batch);
-                    batch->commit();
-                }
-
                 // read-only infobar if necessary
                 const SfxViewShell *pVSh;
                 const SfxShell *pFSh;
@@ -1534,21 +1450,6 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
     }
 }
 
-IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, Button*, void)
-{
-    GetDispatcher()->Execute(SID_WHATSNEW);
-}
-
-IMPL_LINK_NOARG(SfxViewFrame, GetInvolvedHandler, Button*, void)
-{
-    GetDispatcher()->Execute(SID_GETINVOLVED);
-}
-
-IMPL_LINK_NOARG(SfxViewFrame, DonationHandler, Button*, void)
-{
-    GetDispatcher()->Execute(SID_DONATION);
-}
-
 IMPL_LINK(SfxViewFrame, SwitchReadOnlyHandler, Button*, pButton, void)
 {
     if (m_xObjSh.is() && IsSignPDF(m_xObjSh))
commit cb82b341c0ccb7aea3dbde06e9cd1418f0717409
Author:     Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sat Jan 23 16:26:15 2021 +0100
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Sat Jan 23 16:26:15 2021 +0100

    No need for crash reporter option page
    
    With 308cccb962ad5e3367f7e87fb9fe8b9c3230ded7 usage collection GUI
    was removed, so elide all code using that, too.
    
    Change-Id: Ifb57e6d6e58f3dffb9f65b8677fc5118da47a888

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 64da15adad57..d8fe3db283d3 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -240,7 +240,6 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* p
     , m_xYearFrame(m_xBuilder->weld_widget("yearframe"))
     , m_xYearValueField(m_xBuilder->weld_spin_button("year"))
     , m_xToYearFT(m_xBuilder->weld_label("toyear"))
-    , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
     , m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
 #if defined(UNX)
     , m_xQuickLaunchCB(m_xBuilder->weld_check_button("systray"))
@@ -334,14 +333,6 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
         rSet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) );
     }
 
-#if HAVE_FEATURE_BREAKPAD
-    if (m_xCrashReport->get_state_changed_from_saved())
-    {
-        officecfg::Office::Common::Misc::CrashReport::set(m_xCrashReport->get_active(), batch);
-        bModified = true;
-    }
-#endif
-
     batch->commit();
 
     if( m_xQuickLaunchCB->get_state_changed_from_saved())
@@ -381,14 +372,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
     else
         m_xYearFrame->set_sensitive(false);
 
-#if HAVE_FEATURE_BREAKPAD
-    m_xCrashReport->set_active(officecfg::Office::Common::Misc::CrashReport::get() && CrashReporter::IsDumpEnable());
-    m_xCrashReport->set_sensitive(!officecfg::Office::Common::Misc::CrashReport::isReadOnly() && CrashReporter::IsDumpEnable());
-    m_xCrashReport->save_state();
-#else
-    m_xCrashReport->hide();
-#endif
-
     SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem );
     if ( SfxItemState::SET == eState )
         m_xQuickLaunchCB->set_active( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 0da61dd53f1e..28aa7e44aab5 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -50,7 +50,6 @@ private:
     std::unique_ptr<weld::Widget> m_xYearFrame;
     std::unique_ptr<weld::SpinButton> m_xYearValueField;
     std::unique_ptr<weld::Label> m_xToYearFT;
-    std::unique_ptr<weld::CheckButton> m_xCrashReport;
     std::unique_ptr<weld::Widget> m_xQuickStarterFrame;
     std::unique_ptr<weld::CheckButton> m_xQuickLaunchCB;
 


More information about the Libreoffice-commits mailing list