summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-06-06 16:37:49 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-06-06 21:08:42 +0200
commitdc346060164e800c7fed7859b17c19ddd2e027c9 (patch)
treedfec2a35f0508650b83c4b9a6a0419acdc533e2f
parent69ebf09889c551c41aac951d2df97ff0e75d841c (diff)
drop searching for widget extended tips in the offline help
by now these extended tips for the widgets of the general ui appear in the .ui file directly instead as accessibility descriptions instead. In any case, the default build configs of distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeWin64.conf use --with-help=html where these ahelps are not available. So, existing in the classic help only. Change-Id: Ie27736e9140e445c7f8986a741c2002f2efa9ccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168505 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--config_host/config_features.h.in6
-rw-r--r--configure.ac12
-rw-r--r--vcl/source/window/window.cxx24
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx13
4 files changed, 9 insertions, 46 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index e5de91de72d0..0faa67c64dbd 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -137,12 +137,6 @@
*/
#define HAVE_FEATURE_XMLHELP 0
-/* whether we include any local help
- *
- * Can be turned off with --without-help or --with-help=online
- */
-#define HAVE_FEATURE_LOCAL_HELP 0
-
/*
* Whether oosplash calls pagein binaries to speed up library loading.
* Probably not useful nowadays with SSD based systems.
diff --git a/configure.ac b/configure.ac
index b221ab89a713..3f9805e4ff82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5711,7 +5711,7 @@ dnl ===================================================================
ENABLE_HTMLHELP=
HELP_OMINDEX_PAGE=
HELP_ONLINE=
-ENABLE_LOCALHELP=
+WITH_HELPPACKS=
AC_MSG_CHECKING([which help to build])
if test -n "$with_help" -a "$with_help" != "no"; then
@@ -5720,7 +5720,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
case "$with_help" in
"html")
ENABLE_HTMLHELP=TRUE
- ENABLE_LOCALHELP=TRUE
+ WITH_HELPPACKS=TRUE
SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
AC_MSG_RESULT([HTML (local)])
;;
@@ -5730,7 +5730,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
AC_MSG_RESULT([HTML (online)])
;;
yes)
- ENABLE_LOCALHELP=TRUE
+ WITH_HELPPACKS=TRUE
SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
AC_MSG_RESULT([XML (local)])
;;
@@ -5787,7 +5787,7 @@ fi
dnl Test whether to integrate helppacks into the product's installer
AC_MSG_CHECKING([for helppack integration])
-if test -z "$ENABLE_LOCALHELP" -o "$with_helppack_integration" = no; then
+if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
AC_MSG_RESULT([no integration])
else
SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
@@ -5797,9 +5797,7 @@ fi
AC_SUBST([ENABLE_HTMLHELP])
AC_SUBST([HELP_OMINDEX_PAGE])
AC_SUBST([HELP_ONLINE])
-if test "$ENABLE_LOCALHELP" = "TRUE" ; then
- AC_DEFINE(HAVE_FEATURE_LOCAL_HELP)
-fi
+# WITH_HELPPACKS is used only in configure
dnl ===================================================================
dnl Set up a different compiler to produce tools to run on the build
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a58a46f45ec2..d8261ec5acf0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -26,7 +26,6 @@
#include <comphelper/diagnose_ex.hxx>
#include <vcl/salgtype.hxx>
#include <vcl/event.hxx>
-#include <vcl/help.hxx>
#include <vcl/cursor.hxx>
#include <vcl/svapp.hxx>
#include <vcl/transfer.hxx>
@@ -76,7 +75,6 @@
#include <tools/debug.hxx>
#include <tools/json_writer.hxx>
#include <boost/property_tree/ptree.hpp>
-#include <config_features.h>
#include <cassert>
#include <typeinfo>
@@ -3106,29 +3104,15 @@ const Wallpaper& Window::GetDisplayBackground() const
const OUString& Window::GetHelpText() const
{
- OUString aStrHelpId( GetHelpId() );
- bool bStrHelpId = !aStrHelpId.isEmpty();
+ const OUString& rStrHelpId(GetHelpId());
+ const bool bStrHelpId = !rStrHelpId.isEmpty();
- if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
- {
-#if HAVE_FEATURE_LOCAL_HELP
- if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && (mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) )
- {
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- {
- mpWindowImpl->maHelpText = pHelp->GetHelpText(aStrHelpId, this);
- mpWindowImpl->mbHelpTextDynamic = false;
- }
- }
-#endif
- }
- else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId )
+ if (mpWindowImpl->mbHelpTextDynamic && bStrHelpId)
{
static const char* pEnv = getenv( "HELP_DEBUG" );
if( pEnv && *pEnv )
{
- mpWindowImpl->maHelpText = mpWindowImpl->maHelpText + "\n------------------\n" + aStrHelpId;
+ mpWindowImpl->maHelpText = mpWindowImpl->maHelpText + "\n------------------\n" + rStrHelpId;
}
mpWindowImpl->mbHelpTextDynamic = false;
}
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 94963428f305..40da49279579 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -19256,19 +19256,6 @@ gboolean signalTooltipQuery(GtkWidget* pWidget, gint /*x*/, gint /*y*/,
return true;
}
#endif
-
- // fallback to the mechanism which needs help installed
- OUString sHelpId = ::get_help_id(pWidget);
- Help* pHelp = !sHelpId.isEmpty() ? Application::GetHelp() : nullptr;
- if (pHelp)
- {
- OUString sHelpText = pHelp->GetHelpText(sHelpId, static_cast<weld::Widget*>(nullptr));
- if (!sHelpText.isEmpty())
- {
- gtk_tooltip_set_text(tooltip, OUStringToOString(sHelpText, RTL_TEXTENCODING_UTF8).getStr());
- return true;
- }
- }
}
const char* pDesc = gtk_widget_get_tooltip_text(pWidget);