diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-07-01 16:54:39 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-07-13 14:56:35 +0200 |
commit | 14653f89a83982ef36346ebc15f14099fd5cf8f1 (patch) | |
tree | 5c14cd9f85d6467ea3ade8d870b296708168aafd /sfx2/source | |
parent | aa0e31fcbfbd0f143e744788ed97a335354c17f8 (diff) |
Resolves tdf#131233 - UX around "Missing hyphenation"
SID_MISSINGHYPHENATION added and connected to a button
on the infobar opening the wiki page via hub
Change-Id: Id846e45637908abab478ba9b46e79af5d5aa33e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118230
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index fa2ec85a99c3..fe23dd1935f6 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -532,6 +532,14 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false); break; } + case SID_HYPHENATIONMISSING: + { + // Open wiki page about hyphenation + OUString sURL(officecfg::Office::Common::Menus::HyphenationMissingURL::get() + //https://hub.libreoffice.org/HyphenationMissing/ + "?LOlocale=" + utl::ConfigManager::getUILocale()); + 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 844851c53d3f..37b090429425 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1504,6 +1504,15 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) SfxViewFrame, HiddenTrackChangesHandler)); } + // Hyphenation infobar: add a button to get more information + if ( pInfoBar && aInfobarData.msId == "hyphenationmissing" ) + { + weld::Button& rHyphenationButton = pInfoBar->addButton(); + rHyphenationButton.set_label(SfxResId(STR_HYPHENATION_BUTTON)); + rHyphenationButton.connect_clicked(LINK(this, + SfxViewFrame, HypenationMissingHandler)); + } + aPendingInfobars.pop_back(); } @@ -1644,6 +1653,12 @@ IMPL_LINK(SfxViewFrame, HiddenTrackChangesHandler, weld::Button&, rButton, void) } } +IMPL_LINK_NOARG(SfxViewFrame, HypenationMissingHandler, weld::Button&, void) +{ + GetDispatcher()->Execute(SID_HYPHENATIONMISSING); + RemoveInfoBar(u"hyphenationmissing"); +} + void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) { m_pImpl->bResizeInToOut = true; |