summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-07-01 16:54:39 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2021-07-13 14:56:35 +0200
commit14653f89a83982ef36346ebc15f14099fd5cf8f1 (patch)
tree5c14cd9f85d6467ea3ade8d870b296708168aafd /sfx2
parentaa0e31fcbfbd0f143e744788ed97a335354c17f8 (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')
-rw-r--r--sfx2/sdi/appslots.sdi4
-rw-r--r--sfx2/sdi/sfx.sdi15
-rw-r--r--sfx2/source/appl/appserv.cxx8
-rw-r--r--sfx2/source/view/viewfrm.cxx15
4 files changed, 42 insertions, 0 deletions
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 6fd72f84ce85..0a759a45a22f 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -143,6 +143,10 @@ interface Application
[
ExecMethod = MiscExec_Impl ;
]
+ SID_HYPHENATIONMISSING
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
SID_SHOW_LICENSE
[
ExecMethod = MiscExec_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 92add9f2abf0..b3042125a7e5 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5072,6 +5072,21 @@ SfxVoidItem WhatsNew SID_WHATSNEW
MenuConfig = TRUE,
GroupId = SfxGroupId::Application;
]
+SfxVoidItem HyphenationMissing SID_HYPHENATIONMISSING
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ GroupId = SfxGroupId::Application;
+]
SfxVoidItem ShowLicense SID_SHOW_LICENSE
()
[
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;