diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 17 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 10 |
4 files changed, 33 insertions, 7 deletions
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 1d8ac05b697d..ee5a731d2063 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -56,6 +56,10 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] + SID_TIPOFTHEDAY // ole(no) api(final/play/rec) + [ + ExecMethod = MiscExec_Impl ; + ] SID_CONFIG // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 87a478d99275..624abe196661 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -1889,6 +1889,23 @@ SfxBoolItem HelpTip SID_HELPTIPS GroupId = SfxGroupId::Application; ] +SfxVoidItem TipOfTheDay SID_TIPOFTHEDAY + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Application; +] SfxVoidItem EmojiControl SID_EMOJI_CONTROL diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 9b5351e5aab9..3fb832faaa0f 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -665,6 +665,15 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) rReq.AppendItem( SfxBoolItem( SID_HELPBALLOONS, bOn) ); break; } + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + case SID_TIPOFTHEDAY: + { + VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTipOfTheDayDialog(rReq.GetFrameWeld())); + pDlg->Execute(); + bDone = true; + break; + } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5214f17ee980..490bd3519831 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1315,13 +1315,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) if (bShowTipOfTheDay && !Application::IsHeadlessModeEnabled() && !bIsUITest) { const sal_Int32 nLastTipOfTheDay = officecfg::Office::Common::Misc::LastTipOfTheDayShown::get(); const sal_Int32 nDay = std::chrono::duration_cast<std::chrono::hours>(t0).count()/24; // days since 1970-01-01 - if (nDay-nLastTipOfTheDay > 0) { //only once per day - VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - ScopedVclPtr<VclAbstractDialog> pDlg( - pFact->CreateTipOfTheDayDialog(GetWindow().GetFrameWeld())); - pDlg->Execute(); - } - } + if (nDay-nLastTipOfTheDay > 0) //only once per day + GetDispatcher()->Execute(SID_TIPOFTHEDAY); + } //bShowTipOfTheDay // inform about the community involvement const sal_Int64 nLastGetInvolvedShown = officecfg::Setup::Product::LastTimeGetInvolvedShown::get(); |