config_host/config_features.h.in | 6 ++++++ configure.ac | 12 +++++++----- vcl/source/window/window.cxx | 3 +++ 3 files changed, 16 insertions(+), 5 deletions(-)
New commits: commit cd3a21a57456ffa50f88bf158c6fb2108e8d7fd5 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Jun 6 12:19:59 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Jun 7 08:47:22 2024 +0200 if we don't have local help then Help::GetHelpText will be empty anyway, so we can skip that work on Window::GetHelpText. It might even be that by now all the a11y/extended-tips are in the local .ui files and the whole fallback to local help is redundant and should be removed. But that's not done here. Change-Id: I03b759aba6d1619aff37ded6764fbe3b6ded9555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168447 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in index 0faa67c64dbd..e5de91de72d0 100644 --- a/config_host/config_features.h.in +++ b/config_host/config_features.h.in @@ -137,6 +137,12 @@ */ #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 3bf2b187d67b..40bd3f3fedb1 100644 --- a/configure.ac +++ b/configure.ac @@ -5646,7 +5646,7 @@ dnl =================================================================== ENABLE_HTMLHELP= HELP_OMINDEX_PAGE= HELP_ONLINE= -WITH_HELPPACKS= +ENABLE_LOCALHELP= AC_MSG_CHECKING([which help to build]) if test -n "$with_help" -a "$with_help" != "no"; then @@ -5655,7 +5655,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then case "$with_help" in "html") ENABLE_HTMLHELP=TRUE - WITH_HELPPACKS=TRUE + ENABLE_LOCALHELP=TRUE SCPDEFS="$SCPDEFS -DWITH_HELPPACKS" AC_MSG_RESULT([HTML (local)]) ;; @@ -5665,7 +5665,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then AC_MSG_RESULT([HTML (online)]) ;; yes) - WITH_HELPPACKS=TRUE + ENABLE_LOCALHELP=TRUE SCPDEFS="$SCPDEFS -DWITH_HELPPACKS" AC_MSG_RESULT([XML (local)]) ;; @@ -5722,7 +5722,7 @@ fi dnl Test whether to integrate helppacks into the product's installer AC_MSG_CHECKING([for helppack integration]) -if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then +if test -z "$ENABLE_LOCALHELP" -o "$with_helppack_integration" = no; then AC_MSG_RESULT([no integration]) else SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION" @@ -5732,7 +5732,9 @@ fi AC_SUBST([ENABLE_HTMLHELP]) AC_SUBST([HELP_OMINDEX_PAGE]) AC_SUBST([HELP_ONLINE]) -# WITH_HELPPACKS is used only in configure +if test "$ENABLE_LOCALHELP" = "TRUE" ; then + AC_DEFINE(HAVE_FEATURE_LOCAL_HELP) +fi 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 11386eaa74c9..0db0e6dae9c0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -76,6 +76,7 @@ #include <tools/debug.hxx> #include <tools/json_writer.hxx> #include <boost/property_tree/ptree.hpp> +#include <config_features.h> #include <cassert> #include <typeinfo> @@ -3098,6 +3099,7 @@ const OUString& Window::GetHelpText() const if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId ) { +#if HAVE_FEATURE_LOCAL_HELP if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && (mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) ) { Help* pHelp = Application::GetHelp(); @@ -3107,6 +3109,7 @@ const OUString& Window::GetHelpText() const mpWindowImpl->mbHelpTextDynamic = false; } } +#endif } else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId ) {