[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sfx2/sdi sfx2/source
Heiko Tietze (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 13 12:57:14 UTC 2021
include/sfx2/sfxsids.hrc | 1
include/sfx2/strings.hrc | 1
include/sfx2/viewfrm.hxx | 1
officecfg/registry/data/org/openoffice/Office/Common.xcu | 3 ++
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 5 ++++
sfx2/sdi/appslots.sdi | 4 +++
sfx2/sdi/sfx.sdi | 15 +++++++++++++
sfx2/source/appl/appserv.cxx | 8 ++++++
sfx2/source/view/viewfrm.cxx | 15 +++++++++++++
9 files changed, 53 insertions(+)
New commits:
commit 14653f89a83982ef36346ebc15f14099fd5cf8f1
Author: Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Thu Jul 1 16:54:39 2021 +0200
Commit: Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Tue Jul 13 14:56:35 2021 +0200
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 at documentfoundation.org>
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 35d9ab895856..94ef74e86107 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -101,6 +101,7 @@ class SvxSearchItem;
#define SID_DONATION (SID_SFX_START + 424)
#define SID_GETINVOLVED (SID_SFX_START + 425)
#define SID_WHATSNEW (SID_SFX_START + 426)
+#define SID_HYPHENATIONMISSING (SID_SFX_START + 427)
#define SID_SHOW_LICENSE (SID_SFX_START + 1683)
#define SID_SHOW_CREDITS (SID_SFX_START + 1711)
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index d8af44e6a2e9..ce05fa4dce27 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -297,6 +297,7 @@
#define STR_SIGNATURE_SHOW NC_("STR_SIGNATURE_SHOW", "Show Signatures")
#define STR_TRACK_CHANGES_BUTTON NC_("STR_TRACK_CHANGES_BUTTON", "Show Toolbar")
#define STR_TRACK_CHANGES_BUTTON_HIDE NC_("STR_TRACK_CHANGES_BUTTON_HIDE", "Hide Toolbar")
+#define STR_HYPHENATION_BUTTON NC_("STR_HYPHENATION_BUTTON", "Learn more")
#define STR_CLOSE_PANE NC_("STR_CLOSE_PANE", "Close Pane")
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 7dd7f0e8553a..1bd0cbca39eb 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -67,6 +67,7 @@ class SFX2_DLLPUBLIC SfxViewFrame final : public SfxShell, public SfxListener
DECL_LINK(SwitchReadOnlyHandler, weld::Button&, void);
DECL_LINK(SignDocumentHandler, weld::Button&, void);
DECL_LINK(HiddenTrackChangesHandler, weld::Button&, void);
+ DECL_LINK(HypenationMissingHandler, weld::Button&, void);
SAL_DLLPRIVATE void KillDispatcher_Impl();
virtual ~SfxViewFrame() override;
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 2277b42bdf74..745ff1244eb6 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -360,6 +360,9 @@
<prop oor:name="ReleaseNotesURL" oor:type="xs:string">
<value>https://hub.libreoffice.org/ReleaseNotes/</value>
</prop>
+ <prop oor:name="HyphenationMissingURL" oor:type="xs:string">
+ <value>https://hub.libreoffice.org/HyphenationMissing/</value>
+ </prop>
<prop oor:name="InstallJavaURL" oor:type="xs:string">
<value>https://hub.libreoffice.org/InstallJava/</value>
</prop>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b5cc8182eb46..d74a9411ca3c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2151,6 +2151,11 @@
<desc>Specifies the URL used with the UNO command WhatsNew (SID_WHATSNEW).</desc>
</info>
</prop>
+ <prop oor:name="HyphenationMissingURL" oor:type="xs:string" oor:nillable="false">
+ <info>
+ <desc>Specifies the URL used with the UNO command HyphenationMissing (SID_HYPHENATIONMISSING).</desc>
+ </info>
+ </prop>
<prop oor:name="InstallJavaURL" oor:type="xs:string" oor:nillable="false">
<info>
<desc>Specifies the URL used for Install Java message box.</desc>
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;
More information about the Libreoffice-commits
mailing list