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>
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 35d9ab8..94ef74e 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 d8af44e..ce05fa4 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 7dd7f0e..1bd0cbc 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 2277b42..745ff12 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 b5cc818..d74a941 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 6fd72f8..0a759a4 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 92add9f..b3042125 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 fa2ec85..fe23dd1 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 844851c..37b0904 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;