help.git: CustomTarget_html.mk

2024-05-04 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5873436e54097facb9c435dc00cef6fc7194b108
Author: Christian Lohmaier 
AuthorDate: Sat May 4 14:35:31 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Sat May 4 16:28:15 2024 +0200

makefile simplification: replace $(call 
gb_HelpTranslatePartTarget_get_workdir,foo)

helpcontent2 portion

Change-Id: I2e10bf8bf4cb39fa3a8f9a2c3eb8f22d8632560c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167124
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 9b583f68c7..d105f119ad 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -65,7 +65,7 @@ ifeq ($(HELP_OMINDEX_PAGE),TRUE)
 
 define html_gen_xaptpl_dep
 $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/$(1)/xap_tpl : \
-   $(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+   $(if $(filter 
en-US,$(1)),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$(1))/helpcontent2/source/text/shared/help/browserhelp.xhp
 
 endef

@@ -84,7 +84,7 @@ $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/xap_tpl : \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
-   $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
+   $(if $(filter 
en-US,$*),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$*)/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
)
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
@@ -94,7 +94,7 @@ endif
 
 define html_gen_noscript_dep
 $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/$(1)/noscript.html : \
-   $(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+   $(if $(filter 
en-US,$(1)),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$(1))/helpcontent2/source/text/shared/help/browserhelp.xhp
 
 endef
 
@@ -114,7 +114,7 @@ 
$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/noscript.html : \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
-   $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
+   $(if $(filter 
en-US,$*),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$*)/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
)
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
@@ -126,7 +126,7 @@ 
$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/languages.js : \
 
 define html_gen_langnames_js_dep
 $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/$(1)/langnames.js : \
-   $(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+   $(if $(filter 
en-US,$(1)),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$(1))/helpcontent2/source/text/shared/help/browserhelp.xhp
 
 endef
 
@@ -222,13 +222,13 @@ 
$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/html.text : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Trace_StartRange,$*/$(@F),XSL)
rm -rf $(dir $@)text && mkdir -p $(dir $@)text && cd $(dir $@)text && 
mkdir -p $(sort $(subst helpcontent2/source/text/,,$(dir 
$(gb_html_allhelpfiles \
-   && cd $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*)) \
+   && cd $(if $(filter 
en-US,$*),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$*) \
&& RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(addsuffix 
$(WHITESPACE)dummyIgnoreCRinEOL$(NEWLINE),$(subst 
helpcontent2/source/,,$(gb_html_allhelpfiles \
&& while read xhp dummy; do \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam Language $* \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
-   --stringparam root $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/ \
+   --stringparam root $(if $(filter 
en-US,$*),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$*)/helpcontent2/source/
 \
--stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
--stringparam xapian $(if $(filter TRUE, 
$(HELP_OMINDEX_PAGE)),'yes','no') \
@@ -287,7 +287,7 @@ 
$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/bookmarks.part : \
$(call gb_Output_announce,$(subst 

help.git: CustomTarget_html.mk

2024-04-24 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit f32f607fcfb59c462919261f26f8ae07e1e4707f
Author: Christian Lohmaier 
AuthorDate: Wed Apr 24 15:10:58 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Apr 24 15:32:42 2024 +0200

Revert "win doesn't like (foo || bar) | … construct, suspends xsltproc"

This reverts commit b066c7f1008ce7d433683324dc9ef441478c832c.

Reason for revert: not all xargs versions know -a option (mac)

Change-Id: Ia2a54e1dffe459b058f1e11a35372bb38774044f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166519
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index c8ac9250df..a3a9cec55f 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -278,32 +278,26 @@ html_gen_bookmarks_deps = $(call 
html__gen_bookmarks_deps,$(firstword $(1)),$(la
 
 $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(subst :, ,$(module)
 
-# intermediate responsefile target, make will clear those automatically
-# unless they are explicitly listed as target or non-pattern prerequisite
-# depend on the online_transform.xsl just as a proxy to make sure the 
directory exists
-# is only intermediate because those were used as temp files previously - 
could just
-# as well be plain/explicit targets
-$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%_bookmarks.part.responsefile:|
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/online_transform.xsl
-   $(file > $@,$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$*_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), ))
-
 # strip the helpcontent2/source/text prefix and cd to the corresponding 
directory to maximize
 # the number of files that xargs can squeeze into a single invocation of 
xsltproc
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
 $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
 $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
-$(foreach module,$(html_TREE_MODULES),$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(module)_bookmarks.part.responsefile)
 \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Trace_StartRange,$*/$(@F),XSL)
-   cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
-   && $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter 
WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs -a $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(firstword $(subst /, 
,$*))_bookmarks.part.responsefile) \
+   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), )) \
+   && cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
+   && ( \
+   $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter 
WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
-   | sort -k3b -s >$@
+   <$$RESPONSEFILE || { rm $$RESPONSEFILE; exit 1; } \
+   ) | sort -k3b -s >$@ && rm "$$RESPONSEFILE"
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
 # The various gid_File_Help_*_Zip in scp2 that use 
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG expect


help.git: CustomTarget_html.mk

2024-04-22 Thread Andrea Gelmini (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8e52ea49a05ac9af1f848cdf346e7db3cd98cf3
Author: Andrea Gelmini 
AuthorDate: Mon Apr 22 20:16:36 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Apr 22 22:38:19 2024 +0200

Fix typo

Change-Id: I461574a961a46ba9283324654643eef40dfbf6bd
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166470
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 00808bdf92..c8ac9250df 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -281,7 +281,7 @@ $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(s
 # intermediate responsefile target, make will clear those automatically
 # unless they are explicitly listed as target or non-pattern prerequisite
 # depend on the online_transform.xsl just as a proxy to make sure the 
directory exists
-# is only interemdiate because those were used as temp files previously - 
could just
+# is only intermediate because those were used as temp files previously - 
could just
 # as well be plain/explicit targets
 $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%_bookmarks.part.responsefile:|
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/online_transform.xsl
$(file > $@,$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$*_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), ))


help.git: CustomTarget_html.mk

2024-04-22 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit b066c7f1008ce7d433683324dc9ef441478c832c
Author: Christian Lohmaier 
AuthorDate: Tue Jul 25 13:07:29 2023 +0200
Commit: Christian Lohmaier 
CommitDate: Mon Apr 22 13:38:06 2024 +0200

win doesn't like (foo || bar) | … construct, suspends xsltproc

not always/reproducible but often enough when using git-bash to get
annoying when building with all langs/when that is run in parallel
Splitting this up makes it more reliable (or I just have been lucky)

btw: why is this split-per-app when the final bookmarks.js is a simple
concatenation of all of them?

Change-Id: I629a302237b32da8ba77460e0415f32d50105ae5
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166320
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index a3a9cec55f..00808bdf92 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -278,26 +278,32 @@ html_gen_bookmarks_deps = $(call 
html__gen_bookmarks_deps,$(firstword $(1)),$(la
 
 $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(subst :, ,$(module)
 
+# intermediate responsefile target, make will clear those automatically
+# unless they are explicitly listed as target or non-pattern prerequisite
+# depend on the online_transform.xsl just as a proxy to make sure the 
directory exists
+# is only interemdiate because those were used as temp files previously - 
could just
+# as well be plain/explicit targets
+$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%_bookmarks.part.responsefile:|
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/online_transform.xsl
+   $(file > $@,$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$*_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), ))
+
 # strip the helpcontent2/source/text prefix and cd to the corresponding 
directory to maximize
 # the number of files that xargs can squeeze into a single invocation of 
xsltproc
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
 $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
 $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
+$(foreach module,$(html_TREE_MODULES),$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(module)_bookmarks.part.responsefile)
 \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Trace_StartRange,$*/$(@F),XSL)
-   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), )) \
-   && cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
-   && ( \
-   $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter 
WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs) \
+   cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
+   && $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter 
WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs -a $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(firstword $(subst /, 
,$*))_bookmarks.part.responsefile) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
-   <$$RESPONSEFILE || { rm $$RESPONSEFILE; exit 1; } \
-   ) | sort -k3b -s >$@ && rm "$$RESPONSEFILE"
+   | sort -k3b -s >$@
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
 # The various gid_File_Help_*_Zip in scp2 that use 
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG expect


help.git: CustomTarget_html.mk

2024-03-12 Thread Andras Timar (via logerrit)
 CustomTarget_html.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5dfde9a9192cb30ec373585ff1bfe2121cd6bccf
Author: Andras Timar 
AuthorDate: Thu Feb 8 14:14:22 2024 +0100
Commit: Andras Timar 
CommitDate: Tue Mar 12 16:16:23 2024 +0100

Too big environment on Windows can cause failure with xargs

Change-Id: I5d796dbf6ad4d93dd133583a1dac95a210674ef9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/163117
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index ac3f21956a..a3a9cec55f 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -53,7 +53,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
( \
RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_html_allhelpfiles)$(if $(filter WNT,$(OS)), ))) 
 && \
echo 'var hid2fileMap = {' \
-   && cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
+   && cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,$(if $(filter WNT,$(OS)),env -i 
$(gb_Helper_set_ld_path)) xargs) $< <$$RESPONSEFILE || { rm $$RESPONSEFILE; 
exit 1 ; } \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
) > $@
@@ -289,7 +289,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES))$(if 
$(filter WNT,$(OS)), )) \
&& cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
&& ( \
-   $(call gb_ExternalExecutable_get_command,xsltproc,xargs) \
+   $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter 
WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/help2.js help3xsl/online_transform.xsl help3xsl/tdf_matomo.js Package_html_dynamic.mk

2023-09-26 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk  |6 +++
 Package_html_dynamic.mk   |1 
 help3xsl/help2.js |   79 +-
 help3xsl/online_transform.xsl |3 +
 help3xsl/tdf_matomo.js|   24 
 5 files changed, 67 insertions(+), 46 deletions(-)

New commits:
commit 0c24f409c31e4ca8a85b6a1486e2c6eaf26942d6
Author: Olivier Hallot 
AuthorDate: Mon Sep 25 13:55:57 2023 -0300
Commit: Olivier Hallot 
CommitDate: Tue Sep 26 09:05:22 2023 +0200

tdf#157360 Local help should not phone home

+ Remove call to matomo TDF server instance when help is local
+ Keep when Help is online.
+ refactor javascript

Change-Id: I285b426531c91ff558c01798f803bf3f89720b1f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157255
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e73ea160e0..ac3f21956a 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -27,6 +27,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
languages.js \
default.css \
help2.js \
+   $(if $(HELP_ONLINE),tdf_matomo.js) \
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
@@ -331,4 +332,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/help2.js : \
 $(BUILDDIR)/config_host.mk
sed -e "s/%PRODUCTNAME/$(gb_PRODUCTNAME_JS)/g" $< > $@
 
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/tdf_matomo.js : \
+$(SRCDIR)/helpcontent2/help3xsl/tdf_matomo.js 
+   mkdir -p $(dir $@)
+   cp $(SRCDIR)/helpcontent2/help3xsl/tdf_matomo.js $@
+
 # vim: set noet sw=4 ts=4:
diff --git a/Package_html_dynamic.mk b/Package_html_dynamic.mk
index 6e23cf892e..b7d3e8082f 100644
--- a/Package_html_dynamic.mk
+++ b/Package_html_dynamic.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_Package_add_files,helpcontent2_html_dynamic,$(LIBO_SHARE_HELP_F
 languages.js \
 default.css \
 help2.js \
+$(if $(HELP_ONLINE),tdf_matomo.js) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 8bf2810293..df11cb5210 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -98,20 +98,6 @@ function moduleColor (module) {
 }
 }
 
-// Find spans that need the switch treatment and give it to them
-var spans = document.querySelectorAll("[class^=switch]");
-var n = spans.length;
-for (z = 0; z < n; z++) {
-var id = spans[z].getAttribute("id");
-if (id === null) {
-continue;
-}
-else if (id.startsWith("swlnsys")) {
-setSystemSpan(spans[z]);
-} else {
-setApplSpan(spans[z]);
-}
-}
 /* add = and = to the links in DisplayArea div */
 /* skip for object files */
 function fixURL(module, system) {
@@ -216,33 +202,6 @@ function setupLanguages(page) {
 }
 }
 
-// Test, if we are online
-if (document.body.getElementsByTagName('meta')) {
-var _paq = _paq || [];
-/* tracker methods like "setCustomDimension" should be called before 
"trackPageView" */
-_paq.push(['disableCookies']);
-_paq.push(['trackPageView']);
-_paq.push(['enableLinkTracking']);
-(function() {
-var u="//piwik.documentfoundation.org/";
-_paq.push(['setTrackerUrl', u+'piwik.php']);
-_paq.push(['setSiteId', '68']);
-var d=document, g=d.createElement('script'), 
s=d.getElementsByTagName('script')[0];
-g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; 
s.parentNode.insertBefore(g,s);
-})();
-var system = getParameterByName("System");
-} else {
-var system = getSystem();
-}
-
-var module = getParameterByName("DbPAR");
-fixURL(module,system);
-moduleColor(module);
-var helpID = getParameterByName("HID");
-// only used in xhp pages with  tags
-var missingElement = document.getElementById("bm_HID2");
-if(missingElement != null){missingElement.innerHTML = helpID;}
-
 function debugInfo(dbg) {
 if (dbg == null) return;
 document.getElementById("DEBUG").style.display = "block";
@@ -251,15 +210,43 @@ function debugInfo(dbg) {
 document.getElementById("bm_HID").innerHTML = "HID is: "+helpID;
 }
 
+// Find spans that need the switch treatment and give it to them
+function impl_Switches(){
+
+let spans = document.querySelectorAll("[class^=switch]");
+let n = spans.length;
+for (let z = 0; z < n; z++) {
+let id = spans[z].getAttribute("id");
+if (id === null) {
+continue;
+}
+else if (id.startsWith("swlnsys")) {
+setSystemSpan(spans[z]);
+} else {
+setApplSpan(spans[z]);
+}
+}
+}
+// Main
+let module = getParameterByName("DbPAR");
+let system = getParameterByName("System");
+let helpID = getParameterByName("HID");
+impl_Switches();
+fixURL(module,system);
+moduleColor(module);
+// only used in xhp pages with  tags
+let 

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/online_transform.xsl

2023-08-14 Thread Xisco Fauli (via logerrit)
 CustomTarget_html.mk  |2 --
 help3xsl/online_transform.xsl |4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit ebdeebb9b004df574ec90ead903ffa9c9b1f3235
Author: Xisco Fauli 
AuthorDate: Mon Aug 14 10:12:12 2023 +0200
Commit: Xisco Fauli 
CommitDate: Mon Aug 14 10:18:33 2023 +0200

Revert "tdf#155193 Do not deliver Help files with indexer=exclude"

This reverts commit 539abfa7c3bbc9f0b234402083c743890b965cf7.

Reason for revert: daily builds fail to build with errors like
ERROR: file 
'/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/help/en-US/text/shared/autokorr/0100.html'
 does not exist
See https://ci.libreoffice.org/job/lo_daily_tb_linux_dbg/654/console

Change-Id: I9d00fb2596b280bf09934dfc87db64feb8fe6a80
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/155600
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 3bb5c0a19e..e73ea160e0 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -237,8 +237,6 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
|| exit \
; done <"$$RESPONSEFILE" \
&& rm "$$RESPONSEFILE" \
-   && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type f -empty -delete \
-   && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type d -empty -delete \
&& touch $@
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index d95425a593..856dccbde0 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -118,9 +118,8 @@
 #
 //-->
 
-
+
 
-
 
 
 
@@ -279,7 +278,6 @@
 
 
 
-
 
 
 


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/online_transform.xsl

2023-08-10 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk  |2 ++
 help3xsl/online_transform.xsl |4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 539abfa7c3bbc9f0b234402083c743890b965cf7
Author: Olivier Hallot 
AuthorDate: Wed May 17 12:52:41 2023 -0300
Commit: Olivier Hallot 
CommitDate: Thu Aug 10 12:21:02 2023 +0200

tdf#155193 Do not deliver Help files with indexer=exclude

+ Add condition to skip indexer=exclude files.
+ delete empty files generated by exclude
+ delete empty directories generated by exclude

Change-Id: Id992e6c83086d3cd3911b84890a50b309ad92c3b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/151897
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e73ea160e0..3bb5c0a19e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -237,6 +237,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
|| exit \
; done <"$$RESPONSEFILE" \
&& rm "$$RESPONSEFILE" \
+   && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type f -empty -delete \
+   && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type d -empty -delete \
&& touch $@
$(call gb_Trace_EndRange,$*/$(@F),XSL)
 
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 856dccbde0..d95425a593 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -118,8 +118,9 @@
 #
 //-->
 
-
+
 
+
 
 
 
@@ -278,6 +279,7 @@
 
 
 
+
 
 
 


[Libreoffice-commits] help.git: CustomTarget_html.mk

2023-01-25 Thread Stephan Bergmann (via logerrit)
 CustomTarget_html.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dc89de95c0858af3e6116f2d2b736787c30fe213
Author: Stephan Bergmann 
AuthorDate: Wed Jan 25 16:37:32 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Jan 25 15:42:03 2023 +

Recipe has no dependency on target dir

Seen this fail once at
,

> cp: cannot create regular file 
'/run/build/libreoffice/workdir/CustomTarget/helpcontent2/help3xsl/online_transform.xsl':
 No such file or directory
> make[1]: *** 
[/run/build/libreoffice/helpcontent2/CustomTarget_html.mk:186: 
/run/build/libreoffice/workdir/CustomTarget/helpcontent2/help3xsl/online_transform.xsl]
 Error 1

Change-Id: I8cfa387d1bb2ef488f5f34ff20b9dc975d424751
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146141
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 0e633d7b8d..e73ea160e0 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -191,6 +191,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
 # copy online_transform.xsl to workdir and build links.txt.xsl
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/online_transform.xsl 
: \
$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl
+   mkdir -p $(dir $@)
cp $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl $@
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl : \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-22 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70c46432b1cb4e994de45ca8a1f6bda6e286b1a9
Author: Christian Lohmaier 
AuthorDate: Thu Dec 22 16:08:57 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Dec 22 15:15:54 2022 +

janitor - the announce is not meant to be part of the dependencies

quirk introduced with the change making the xsltproc one an order-only
dependency. The line-continuation wasn't removed with that change
causing the annouce to fire when make is parsing the makefile. Doesn't
hurt anything or affected the build result in any way, but certainly not
as intended :-)

Change-Id: I82069208fff1ff0c01efba00caa2d8fa5279efaf
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144760
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 9a63f2007b..0e633d7b8d 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -103,7 +103,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/noscript.html : \
 $(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
 $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
 $(SRCDIR)/helpcontent2/CustomTarget_html.mk \
-| $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
+| $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),NJS,1)
$(call gb_Trace_StartRange,$*/$(@F),XSL)
$(call gb_Helper_abbreviate_dirs,\


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-22 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9871dc3b0f8eb24793fc797d478db534d92ec5d7
Author: Christian Lohmaier 
AuthorDate: Thu Dec 22 14:21:49 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Dec 22 13:29:28 2022 +

make html.text target make more robust on windows re CR at EOL

some cygwin setups still treat the final CR as part of the filename, so
avoid that problem alltogether by simply appending a dummy entry to each
line on the responsefile to catch any stray EOL/EOF characters

Change-Id: I624eeeca033f72b2845394b44f27b6e32d01eb70
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144758
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index ab67c8d849..9a63f2007b 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -221,8 +221,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
$(call gb_Trace_StartRange,$*/$(@F),XSL)
rm -rf $(dir $@)text && mkdir -p $(dir $@)text && cd $(dir $@)text && 
mkdir -p $(sort $(subst helpcontent2/source/text/,,$(dir 
$(gb_html_allhelpfiles \
&& cd $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*)) \
-   && RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(addsuffix 
$(NEWLINE),$(subst helpcontent2/source/,,$(gb_html_allhelpfiles \
-   && while read xhp; do \
+   && RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(addsuffix 
$(WHITESPACE)dummyIgnoreCRinEOL$(NEWLINE),$(subst 
helpcontent2/source/,,$(gb_html_allhelpfiles \
+   && while read xhp dummy; do \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam Language $* \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-20 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 77757ab8b2e4f6f8df04d5c6eafe73a3d8844ed9
Author: Christian Lohmaier 
AuthorDate: Tue Dec 20 13:10:11 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Dec 20 13:20:43 2022 +

add gbuild trace annotations for targets in CustomTarget_html.mk

at least for those that are not a simple cat, echo/printf or sed call

Change-Id: I81e7682890a011aaea2603ef4c0a2e71d82a8511
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144591
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 564d0893e0..ab67c8d849 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -48,6 +48,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
 $(SRCDIR)/helpcontent2/CustomTarget_html.mk \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Trace_StartRange,$(@F),XSL)
( \
RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_html_allhelpfiles)$(if $(filter WNT,$(OS)), ))) 
 && \
echo 'var hid2fileMap = {' \
@@ -55,6 +56,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
) > $@
+   $(call gb_Trace_EndRange,$(@F),XSL)
 
 
 # Xapian localized templates
@@ -73,6 +75,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
 $(SRCDIR)/helpcontent2/CustomTarget_html.mk \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XAT,1)
+   $(call gb_Trace_StartRange,$*/$(@F),XSL)
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $* \
@@ -82,6 +85,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
$(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
)
+   $(call gb_Trace_EndRange,$*/$(@F),XSL)
 
 endif
 
@@ -101,6 +105,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/noscript.html : \
 $(SRCDIR)/helpcontent2/CustomTarget_html.mk \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),NJS,1)
+   $(call gb_Trace_StartRange,$*/$(@F),XSL)
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $* \
@@ -110,6 +115,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/noscript.html : \
$(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
$(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
)
+   $(call gb_Trace_EndRange,$*/$(@F),XSL)
 
 
 # set of installed languages - has to be language independent
@@ -167,6 +173,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
 $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Trace_StartRange,$*/$(@F),XSL)
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $(LANGUAGE) \
@@ -178,6 +185,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
$(TREE_FILE) \
)
+   $(call gb_Trace_EndRange,$*/$(@F),XSL)
 
 # link txt file for icon replacement table - tdf#128519
 # copy online_transform.xsl to workdir and build links.txt.xsl
@@ -190,7 +198,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl : \
 $(SRCDIR)/icon-themes/colibre/links.txt \
 $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py \
 | $(call gb_ExternalExecutable_get_dependencies,python)
+   $(call gb_Trace_StartRange,$(@F),PY)
$(call gb_ExternalExecutable_get_command,python) 
$(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py 
$(SRCDIR)/icon-themes/colibre/links.txt $@
+   $(call gb_Trace_EndRange,$(@F),PY)
 
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
@@ -208,6 +218,7 @@ $(call 

[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-19 Thread Andrea Gelmini (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b91a0a30115e414982bd4b3f710e0218661b4e18
Author: Andrea Gelmini 
AuthorDate: Mon Dec 19 14:31:38 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Dec 19 16:46:20 2022 +

Fix typo

Change-Id: Iede879decee335d13e50df7244326dbc44728145
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144503
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 9a885b46af..564d0893e0 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -264,7 +264,7 @@ html_gen_bookmarks_deps = $(call 
html__gen_bookmarks_deps,$(firstword $(1)),$(la
 
 $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(subst :, ,$(module)
 
-# strip the helpconent2/source/text prefix and cd to the corresponding 
directory to maximize
+# strip the helpcontent2/source/text prefix and cd to the corresponding 
directory to maximize
 # the number of files that xargs can squeeze into a single invocation of 
xsltproc
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
 $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-19 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 318ec1f0e6248eac2536256bf26e1a183fc59541
Author: Christian Lohmaier 
AuthorDate: Mon Dec 19 12:13:01 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Dec 19 11:17:45 2022 +

janitor: update comment for the bookmarks.part rule

the remarks about the indicator files are obsolete after the rule has
been rewritten to work in batch and not on single files

Change-Id: I8a2509aed7a38b9cff0dacec3d4161bc020fde31
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144468
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 3edcd1df80..9a885b46af 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -264,9 +264,8 @@ html_gen_bookmarks_deps = $(call 
html__gen_bookmarks_deps,$(firstword $(1)),$(la
 
 $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(subst :, ,$(module)
 
-# In the below recipe, the file $@.good is used to communicate failure of 
xsltproc in the pipeline
-# (similar to Bash's `set -o pipefail`; the final `rm $@.good` will fail, and 
fail the whole
-# command, if any xsltproc invocation failed):
+# strip the helpconent2/source/text prefix and cd to the corresponding 
directory to maximize
+# the number of files that xargs can squeeze into a single invocation of 
xsltproc
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
 $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
 $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-17 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   48 +++-
 1 file changed, 23 insertions(+), 25 deletions(-)

New commits:
commit 88c2d7943241daed9cc850e9518555ef9056634b
Author: Christian Lohmaier 
AuthorDate: Sat Dec 17 13:14:38 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Sat Dec 17 21:43:45 2022 +

reduce number of process calls when building html help

For each language times the 2500+ xhp files the build did run
dirname, mkdir, and pwd (twice, and on windows also with additional
cygpath) - replacing those by static values provided my make saves
4-5 minutes on a fast m1 machine and over 25 on windows with
cygwin (despite building with 32 threads...)

Change-Id: Ib3ca9e2ffdea622a4b5f578f2580152eb0b3b674
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144393
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 7ba88de11a..f3ff31ca9e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -14,6 +14,8 @@ html_TREE_MODULES := swriter scalc simpress sdraw sdatabase 
smath schart sbasic
 html_TEXT_MODULES := $(html_TREE_MODULES)
 html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
sdatabase:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
 
+gb_html_allhelpfiles = $(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))
+
 # In case someone has a product name containing quotes, use Unicode
 # code points for ' (27) and " (22) in JS, CSS and entities for HTML.
 gb_PRODUCTNAME_JS := $(subst ',\\\u{27},$(subst ",\\\u{22},$(PRODUCTNAME)))
@@ -47,7 +49,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
( \
-   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))$(if $(filter 
WNT,$(OS)), )))  && \
+   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(gb_html_allhelpfiles)$(if $(filter WNT,$(OS)), ))) 
 && \
echo 'var hid2fileMap = {' \
&& cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
&& rm "$$RESPONSEFILE" \
@@ -208,31 +210,27 @@ endef
 $(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_html_dep,$(lang
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
-   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \
-   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \
+$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
-   $(call gb_Helper_abbreviate_dirs,\
-   cd $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source \
-   && rm -rf $(dir $@)text \
-   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach module,$(html_TEXT_MODULES),$(patsubst 
helpcontent2/source/%,%,$(gb_AllLangHelp_$(module)_HELPFILES \
-   && <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | env 
-i PATH="$$PATH") xargs -n 1 printf '%s\n' \
-   | while read xhp; do \
-   mkdir -p $$(dirname $(dir $@)$$xhp) && \
-   $(call gb_ExternalExecutable_get_command,xsltproc) \
-   --stringparam Language $* \
-   --stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
-   --stringparam root $(if $(filter 
WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/ \
-   --stringparam productname 
"$(gb_PRODUCTNAME_HTML)" \
-   --stringparam productversion 
"$(PRODUCTVERSION)" \
-   --stringparam xapian $(if $(filter TRUE, 
$(HELP_OMINDEX_PAGE)),'yes','no') \
-   -o $(dir $@)$${xhp%.xhp}.html \
-   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) \
-   $(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
-   || exit \
-   ; done \
-   && rm "$$RESPONSEFILE" \
-   && touch $@ \
-   )
+   rm -rf $(dir $@)text && mkdir -p $(dir $@)text && cd $(dir $@)text && 
mkdir -p $(sort $(subst helpcontent2/source/text/,,$(dir 
$(gb_html_allhelpfiles \
+   && cd $(if $(filter 

[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-16 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 53871c4cf5a7703275a2e425b08a4199e9989c46
Author: Christian Lohmaier 
AuthorDate: Fri Dec 16 09:31:01 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Fri Dec 16 09:31:01 2022 +0100

fix missing ) in the if statement.

Change-Id: I6b2a45aeda8969778e902ae71e3fa5e46b82875a

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e8fd4b439d..7ba88de11a 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -47,7 +47,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
( \
-   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))$(if $(filter 
WNT,$(OS), )))  && \
+   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))$(if $(filter 
WNT,$(OS)), )))  && \
echo 'var hid2fileMap = {' \
&& cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
&& rm "$$RESPONSEFILE" \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-15 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5daaa3e440b17505d644273a7305f073d6d5834d
Author: Christian Lohmaier 
AuthorDate: Thu Dec 15 16:35:31 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Dec 15 21:04:03 2022 +

cd to helpcontent2/source/text & drop it from filenames for larger batches

On the Jenkins Windows builder only 40~45 of the ~2500 helpfiles can be
processed at once when not stripping that prefix. With the shortened
filenames the build needs less than half of the xsltproc invocations.

Also prevent a trailing carriage return to be interpreted as part of the
filename on windows and drop the abbreviate_dir wrapper around the
command since there's nothing left to shorten anymore.

Change-Id: Ifaff26f73f262bd1d7cb4f813bf081782661ba17
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144236
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 8db68cf8c1..e8fd4b439d 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -38,21 +38,21 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
) \
 ))
 
+# trailing space for Windows so that xargs doesn't interpret the final CR (that
+# win-make adds as the newline character) as part of the last filename
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
$(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module))) \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
-   $(call gb_Helper_abbreviate_dirs,\
-   ( \
-   RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES)))  && \
-   echo 'var hid2fileMap = {' \
-   && cd $(SRCDIR) && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
-   && rm "$$RESPONSEFILE" \
-   && echo '};' \
-   ) > $@ \
-   )
+   ( \
+   RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))$(if $(filter 
WNT,$(OS), )))  && \
+   echo 'var hid2fileMap = {' \
+   && cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
+   && rm "$$RESPONSEFILE" \
+   && echo '};' \
+   ) > $@
 
 
 # Xapian localized templates


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-14 Thread Stephan Bergmann (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 970907045a2400da7ed6e3d14ef76f7ad3b2d783
Author: Stephan Bergmann 
AuthorDate: Wed Dec 14 09:51:51 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 14 10:42:16 2022 +

Fix prepending xargs to gb_ExternalExecutable_get_command, help part

...as was done in f048f02f505704a76c4f01b4ff3f369e8ed928b5 "hid2file.js
generation: process in batch, not each file one-by-one", causing my build to
fail with

> [XSL] CustomTarget/helpcontent2/help3xsl/hid2file.js
> xargs: 
LD_LIBRARY_PATH=/home/sbergman/gcc/trunk/inst/lib64:/home/sbergman/lo/core/instdir/program:/home/sbergman/lo/core/instdir/program:
 No such file or directory

Change-Id: I94ea42878de55a887e6955b350997425438bb90e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144154
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 46068e82b0..8db68cf8c1 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -48,7 +48,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
( \
RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES)))  && \
echo 'var hid2fileMap = {' \
-   && cd $(SRCDIR) && xargs $(call 
gb_ExternalExecutable_get_command,xsltproc) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
+   && cd $(SRCDIR) && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
) > $@ \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2022-12-13 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk |   13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit f048f02f505704a76c4f01b4ff3f369e8ed928b5
Author: Christian Lohmaier 
AuthorDate: Tue Dec 13 14:35:15 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Dec 13 15:12:01 2022 +

hid2file.js generation: process in batch, not each file one-by-one

xsltproc can happily process many files at once, no need to process them
individually and also no need to surround them with the rm, touch, rm
triplet each time to catch a possible error.
When letting xargs actually run the command, then xargs will report
error if any invocation failed. It will not stop execution commands for
remaining input unless the command exists with status 255 explicitly,
but this doesn't matter, processing the whole batch regardless is still
much faster than processing each file separately.
To maximize the number of files that can be processed in a single
command, don't prefix each file with $(SRCDIR)/, but instead cd to
$(SRCRDIR) before running the command.

Change-Id: I532a54f7298d7011900af5e618d75b37649b0477
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144050
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 7c6ed744da..46068e82b0 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -38,9 +38,6 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
) \
 ))
 
-# In the below recipe, the file $@.good is used to communicate failure of 
xsltproc in the pipeline
-# (similar to Bash's `set -o pipefail`; the final `rm $@.good` will fail, and 
fail the whole
-# command, if the xsltproc invocation failed):
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
@@ -49,15 +46,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
( \
+   RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES)))  && \
echo 'var hid2fileMap = {' \
-   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
-   && <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
-   | while read xhp; do \
-   rm -f $@.good && \
-   { $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp && touch $@.good; } \
-   | $(gb_AWK) 'NF' \
-   && rm $@.good || exit \
-   ; done \
+   && cd $(SRCDIR) && xargs $(call 
gb_ExternalExecutable_get_command,xsltproc) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
) > $@ \


[Libreoffice-commits] help.git: CustomTarget_html.mk CustomTarget_imagelist.mk

2022-12-13 Thread Christian Lohmaier (via logerrit)
 CustomTarget_html.mk  |6 +++---
 CustomTarget_imagelist.mk |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e1cf5179765728ac70b100352ffb09bc1ec3fde5
Author: Christian Lohmaier 
AuthorDate: Sat Dec 10 18:11:29 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Dec 13 15:04:21 2022 +

gb_var2file: remove now unused chunk-size parameter (help repo)

Change-Id: Ie0a310b004d969b62c9ee886fee3e8e50d6e5184
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143935
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index d94b85f2c3..7c6ed744da 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -50,7 +50,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(call gb_Helper_abbreviate_dirs,\
( \
echo 'var hid2fileMap = {' \
-   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
+   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
rm -f $@.good && \
@@ -223,7 +223,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
$(call gb_Helper_abbreviate_dirs,\
cd $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source \
&& rm -rf $(dir $@)text \
-   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(patsubst 
helpcontent2/source/%,%,$(gb_AllLangHelp_$(module)_HELPFILES \
+   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach module,$(html_TEXT_MODULES),$(patsubst 
helpcontent2/source/%,%,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | env 
-i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
mkdir -p $$(dirname $(dir $@)$$xhp) && \
@@ -292,7 +292,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
-   RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(addprefix $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES)))
 \
+   RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(addprefix $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES)))
 \
&& ( \
<"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | 
env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| { rm -f $@.good && while read xhp; do \
diff --git a/CustomTarget_imagelist.mk b/CustomTarget_imagelist.mk
index 86350a530d..c4769b3cd5 100644
--- a/CustomTarget_imagelist.mk
+++ b/CustomTarget_imagelist.mk
@@ -21,7 +21,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/images_helpimg
| $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(call gb_Helper_abbreviate_dirs, \
-   ILSTFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,$(filter 
%.ilst,$^)) && \
+   ILSTFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(filter 
%.ilst,$^)) && \
$(call gb_ExternalExecutable_get_command,python) 
$(SRCDIR)/solenv/bin/pack_images.py \
-g $(helpmedia_DIR) -m $(helpmedia_DIR) -c 
$(helpmedia_DIR) \
-l $${ILSTFILE} \


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/help2.js help3xsl/online_transform.xsl Package_html_dynamic.mk Package_html_static.mk

2022-01-25 Thread Ilmari Lauhakangas (via logerrit)
 CustomTarget_html.mk  |   29 +++--
 Package_html_dynamic.mk   |2 ++
 Package_html_static.mk|2 --
 help3xsl/default.css  |   22 +++---
 help3xsl/help2.js |2 +-
 help3xsl/online_transform.xsl |8 
 6 files changed, 41 insertions(+), 24 deletions(-)

New commits:
commit 919def267b89cfe03f40218baa8c16cf65526448
Author: Ilmari Lauhakangas 
AuthorDate: Tue Jan 18 09:34:15 2022 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Tue Jan 25 16:40:00 2022 +0100

tdf#123318 tdf#129697 Don't hardcode product name in CSS and JS

Change-Id: I0ef315146fed188eb1cf33c416ff5f3e9899bbae
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128524
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 56224a7d9..d94b85f2c 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -14,9 +14,17 @@ html_TREE_MODULES := swriter scalc simpress sdraw sdatabase 
smath schart sbasic
 html_TEXT_MODULES := $(html_TREE_MODULES)
 html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
sdatabase:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
 
+# In case someone has a product name containing quotes, use Unicode
+# code points for ' (27) and " (22) in JS, CSS and entities for HTML.
+gb_PRODUCTNAME_JS := $(subst ',\\\u{27},$(subst ",\\\u{22},$(PRODUCTNAME)))
+gb_PRODUCTNAME_CSS := $(subst ',\\\27,$(subst ",\\\22,$(PRODUCTNAME)))
+gb_PRODUCTNAME_HTML := $(subst ',,$(subst ",,$(PRODUCTNAME)))
+
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
languages.js \
+   default.css \
+   help2.js \
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
@@ -75,7 +83,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $* \
-   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
@@ -103,7 +111,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/noscript.html : \
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $* \
-   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
@@ -120,7 +128,6 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
printf ']);\n' \
) > $@
 
-
 define html_gen_langnames_js_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/langnames.js : \
$(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
@@ -177,7 +184,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
--stringparam lang $(LANGUAGE) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam module $(MODULE) \
-   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
@@ -224,7 +231,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
--stringparam Language $* \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam root $(if $(filter 
WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/ \
-   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productname 
"$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion 
"$(PRODUCTVERSION)" \
--stringparam xapian $(if $(filter TRUE, 
$(HELP_OMINDEX_PAGE)),'yes','no') \
-o $(dir $@)$${xhp%.xhp}.html \
@@ -293,7 +300,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
 

[Libreoffice-commits] help.git: CustomTarget_html.mk CustomTarget_imagelist.mk

2021-11-04 Thread Stephan Bergmann (via logerrit)
 CustomTarget_html.mk  |6 +++---
 CustomTarget_imagelist.mk |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 15deec972f2ea1e2076a74c4d206b49967c68844
Author: Stephan Bergmann 
AuthorDate: Thu Nov 4 12:57:40 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Nov 4 13:00:12 2021 +0100

Adapt helpcontent2 to var2file rename

...in core commit 3829c0c7db8768ca05f148e8f5c271ddb56d5bae "Resolves: 
tdf#97046
ensure build system variables start with gb_"

Change-Id: I2d9f579921843dbfb55efde492ea19abb3c6782e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index f66dd95ca..56224a7d9 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -42,7 +42,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(call gb_Helper_abbreviate_dirs,\
( \
echo 'var hid2fileMap = {' \
-   && RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
+   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
rm -f $@.good && \
@@ -216,7 +216,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
$(call gb_Helper_abbreviate_dirs,\
cd $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source \
&& rm -rf $(dir $@)text \
-   && RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(patsubst 
helpcontent2/source/%,%,$(gb_AllLangHelp_$(module)_HELPFILES \
+   && RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(patsubst 
helpcontent2/source/%,%,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | env 
-i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
mkdir -p $$(dirname $(dir $@)$$xhp) && \
@@ -285,7 +285,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
-   RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(addprefix $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES)))
 \
+   RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),100,$(addprefix $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES)))
 \
&& ( \
<"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | 
env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| { rm -f $@.good && while read xhp; do \
diff --git a/CustomTarget_imagelist.mk b/CustomTarget_imagelist.mk
index 06225f121..86350a530 100644
--- a/CustomTarget_imagelist.mk
+++ b/CustomTarget_imagelist.mk
@@ -21,7 +21,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/images_helpimg
| $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(call gb_Helper_abbreviate_dirs, \
-   ILSTFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(filter 
%.ilst,$^)) && \
+   ILSTFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,$(filter 
%.ilst,$^)) && \
$(call gb_ExternalExecutable_get_command,python) 
$(SRCDIR)/solenv/bin/pack_images.py \
-g $(helpmedia_DIR) -m $(helpmedia_DIR) -c 
$(helpmedia_DIR) \
-l $${ILSTFILE} \


[Libreoffice-commits] help.git: CustomTarget_html.mk

2020-05-29 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 44086795df446ed4a09a57b2682acf6830d98936
Author: Olivier Hallot 
AuthorDate: Thu May 28 21:17:31 2020 -0300
Commit: Olivier Hallot 
CommitDate: Fri May 29 16:18:58 2020 +0200

Restore sort for Index

Generates a sorted bookmark.js file

Change-Id: Iea7a6485aebe504da9f8d66236e3fe600097bafa
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/95091
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index dab539f06..7c04a9249 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -269,7 +269,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$$xhp \
|| exit \
; done && touch $@.good; } \
-   | sort -k3b -t\> -s \
+   | sort -k3b -s \
| awk 'NF' \
&& rm $@.good \
) > $@ \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/online_transform.xsl

2020-05-13 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk  |   18 --
 help3xsl/online_transform.xsl |2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 3e0fb08cce8581d5d10fc5f0e44a26451bf5b794
Author: Olivier Hallot 
AuthorDate: Tue May 12 16:56:00 2020 -0300
Commit: Thorsten Behrens 
CommitDate: Wed May 13 21:21:34 2020 +0200

tdf#128519 Icon replacement table in build time

As explained in tdf#128519, command  in XLST must
have its href= hardcoded. Thus, copy online_transform.xsl and
create links.txtx.xsl in workdir/

Change-Id: I979fd58f16a51ae6f57fc6f87349700eafdefbd7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94082
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index cd53b9c6a..ba0f73102 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -155,8 +155,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(TREE_FILE) \
)
 
-# link txt file for icon replacement table
-$(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \
+# link txt file for icon replacement table - tdf#128519
+# copy online_transform.xsl to workdir and build links.txt.xsl
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) 
: \
+   $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl
+   cp $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl $@
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) : \
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) \
$(SRCDIR)/icon-themes/colibre/links.txt \
$(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py \
$(call gb_ExternalExecutable_get_dependencies,python)
@@ -164,7 +170,7 @@ $(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \
 
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
-   $(SRCDIR)/helpcontent2/helpers/links.txt.xsl \
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \
$(foreach module,$(html_TEXT_MODULES), \
$(if $(filter en-US,$(1)), \
$(call gb_AllLangHelp_get_helpfiles_target,$(module)), \
@@ -175,7 +181,7 @@ endef
 $(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_html_dep,$(lang
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
-   $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
@@ -193,14 +199,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
--stringparam productversion 
"$(PRODUCTVERSION)" \
--stringparam xapian $(if $(filter TRUE, 
$(HELP_OMINDEX_PAGE)),'yes','no') \
-o $(dir $@)$${xhp%.xhp}.html \
-   
$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) \
$(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
|| exit \
; done \
&& rm "$$RESPONSEFILE" \
&& touch $@ \
)
-   
+
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
$(call gb_Helper_abbreviate_dirs,\
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 62e0e976c..573967c19 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -21,7 +21,7 @@
 
 
 
-
+
 

[Libreoffice-commits] help.git: CustomTarget_html.mk helpers/make_icon_link.txt.py

2020-05-12 Thread Stephan Bergmann (via logerrit)
 CustomTarget_html.mk  |6 --
 helpers/make_icon_link.txt.py |8 +++-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e21698f795b4098ecccf3119e23edd3d9e7aac1e
Author: Stephan Bergmann 
AuthorDate: Tue May 12 10:19:02 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 12 11:26:53 2020 +0200

Fix helpers/make_icon_link.txt.py

It contained Python-2--isms that caused errors when /usr/bin/python is 
Python 3
(at least on Fedora 32 with python-unversioned-command-3.8.2-2.fc32.noarch 
and
python3-3.8.2-2.fc32.x86_64):

>   File "helpcontent2/helpers/make_icon_link.txt.py", line 21
> print "There was an error reading", file_icon
>   ^
> SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print("There was an error reading", file_icon)?

and

>   File "helpcontent2/helpers/make_icon_link.txt.py", line 39
> if line.find('png',0, len(line)) <> -1 :
>   ^
> SyntaxError: invalid syntax

So fix helpers/make_icon_link.txt.py to be proper Python 3 and explicitly
execute it with gb_ExternalExecutable_get_command,python instead of via a
/usr/bin/python shebang.

(That file was apparently not executed during the build prior to
ee180ade07e36dd1fb8c7bdca6ecbab44ded9eb8 "tdf#128519 Automate icon repl't 
table
for Help bld", so these issues were not noticied earlier.)

Change-Id: Ia3cff9538ab537076a02b64ad8c1bf56dcfaf30b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94039
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index b9eab167f..cd53b9c6a 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -157,8 +157,10 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
 
 # link txt file for icon replacement table
 $(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \
-   $(SRCDIR)/icon-themes/colibre/links.txt 
-   $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py 
$(SRCDIR)/icon-themes/colibre/links.txt $@
+   $(SRCDIR)/icon-themes/colibre/links.txt \
+   $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py \
+   $(call gb_ExternalExecutable_get_dependencies,python)
+   $(call gb_ExternalExecutable_get_command,python) 
$(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py 
$(SRCDIR)/icon-themes/colibre/links.txt $@
 
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
diff --git a/helpers/make_icon_link.txt.py b/helpers/make_icon_link.txt.py
old mode 100755
new mode 100644
index e5ef3d2ee..573af4050
--- a/helpers/make_icon_link.txt.py
+++ b/helpers/make_icon_link.txt.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
 #
 # This file is part of the LibreOffice project.
 #
@@ -18,14 +16,14 @@ try:
file_icon = open(sys.argv[1], "r")
 
 except IOError:
-   print "There was an error reading", file_icon
+   print("There was an error reading", file_icon)
sys.exit()
 try:
# open file stream
file_xsl = open(sys.argv[2], "w+")
 
 except IOError:
-   print "There was an error writing", file_xsl
+   print("There was an error writing", file_xsl)
sys.exit()
 
 file_xsl.write('\n');
@@ -36,7 +34,7 @@ file_xsl.write('\n')
 
 for line in file_icon:
 if line[0] != "#" :
-if line.find('png',0, len(line)) <> -1 :
+if line.find('png',0, len(line)) != -1 :
 a = "\'" + line.split()[0] + "\'";
 b = line.split()[1].replace(".png",".svg");
 file_xsl.write(''+ b + 
'\n');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/links.txt.xsl help3xsl/online_transform.xsl helpers/make_icon_link.txt.py make_icon_link.txt.py

2020-05-11 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk  |7 
 help3xsl/links.txt.xsl| 2051 --
 help3xsl/online_transform.xsl |2 
 helpers/make_icon_link.txt.py |6 
 4 files changed, 12 insertions(+), 2054 deletions(-)

New commits:
commit ee180ade07e36dd1fb8c7bdca6ecbab44ded9eb8
Author: Olivier Hallot 
AuthorDate: Mon May 4 10:33:44 2020 -0300
Commit: Olivier Hallot 
CommitDate: Mon May 11 17:43:42 2020 +0200

tdf#128519 Automate icon repl't table for Help bld

The solution here is to create links.txt.xsl in the
helpcontent2/helpers/ folder at build time because the 
directive in XSLT of online_transform.xsl must be hardcoded
(compile time) and core/workdir/ is not.

Change-Id: I8c4c8d0b8aed58c10a95c5d42bbd1b8acdb39614
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93436
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 5ee580350..b9eab167f 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -54,6 +54,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
) > $@ \
)
 
+
 # Xapian localized templates
 ifeq ($(HELP_OMINDEX_PAGE),TRUE)
 
@@ -154,8 +155,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(TREE_FILE) \
)
 
+# link txt file for icon replacement table
+$(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \
+   $(SRCDIR)/icon-themes/colibre/links.txt 
+   $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py 
$(SRCDIR)/icon-themes/colibre/links.txt $@
+
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
+   $(SRCDIR)/helpcontent2/helpers/links.txt.xsl \
$(foreach module,$(html_TEXT_MODULES), \
$(if $(filter en-US,$(1)), \
$(call gb_AllLangHelp_get_helpfiles_target,$(module)), \
diff --git a/help3xsl/links.txt.xsl b/help3xsl/links.txt.xsl
deleted file mode 100644
index 80fbba68c..0
--- a/help3xsl/links.txt.xsl
+++ /dev/null
@@ -1,2051 +0,0 @@
-
-http://www.w3.org/1999/XSL/Transform;>
-
-
-
-cmd/sc_open.svg
-cmd/sc_runbasic.svg
-cmd/sc_mediapause.svg
-cmd/sc_basicstop.svg
-cmd/sc_mediarepeat.svg
-cmd/sc_ok.svg
-cmd/sc_mediamute.svg
-cmd/lc_open.svg
-cmd/lc_runbasic.svg
-cmd/lc_mediapause.svg
-cmd/lc_basicstop.svg
-cmd/lc_mediarepeat.svg
-cmd/lc_ok.svg
-cmd/lc_mediamute.svg
-cmd/sc_insertrowsafter.svg
-cmd/sc_insertcolumnsafter.svg
-cmd/sc_deleterows.svg
-cmd/sc_deletecolumns.svg
-cmd/sc_insertcellsright.svg
-cmd/sc_insertcellsdown.svg
-cmd/sc_insertcolumnsafter.svg
-cmd/sc_insertcolumns.svg
-cmd/sc_insertrowsbefore.svg
-chart2/res/net_52x60.svg
-chart2/res/netstack_52x60.svg
-formula/res/refinp1.svg
-cmd/32/toggletitle.svg
-cmd/32/diagramaxisxyz.svg
-cmd/32/diagramaxis.svg
-cmd/32/togglegridhorizontal.svg
-cmd/32/diagramaxis.svg
-cmd/32/togglegridhorizontal.svg
-cmd/32/legend.svg
-cmd/lc_toggletitle.svg
-cmd/lc_diagramaxisxyz.svg
-cmd/lc_diagramaxis.svg
-cmd/lc_togglegridhorizontal.svg
-cmd/lc_diagramaxis.svg
-cmd/lc_togglegridhorizontal.svg
-cmd/lc_legend.svg
-cmd/sc_toggletitle.svg
-cmd/sc_diagramaxisxyz.svg
-cmd/sc_diagramaxis.svg
-cmd/sc_togglegridhorizontal.svg
-cmd/sc_diagramaxis.svg
-cmd/sc_togglegridhorizontal.svg
-cmd/sc_legend.svg
-cmd/32/datefield.svg
-cmd/32/insertplugin.svg
-cmd/32/defineprintarea.svg
-cmd/32/dbnewtable.svg
-cmd/lc_datefield.svg
-cmd/lc_insertplugin.svg
-cmd/lc_defineprintarea.svg
-cmd/lc_dbnewtable.svg
-cmd/sc_datefield.svg
-cmd/sc_insertplugin.svg
-cmd/sc_defineprintarea.svg
-cmd/sc_dbnewtable.svg
-cmd/32/autocorrectdlg.svg
-cmd/32/editannotation.svg
-cmd/32/reload.svg
-cmd/lc_autocorrectdlg.svg
-cmd/lc_editannotation.svg
-cmd/lc_reload.svg
-cmd/sc_autocorrectdlg.svg
-cmd/sc_editannotation.svg
-cmd/sc_reload.svg
-cmd/32/trackchanges.svg
-cmd/32/fontdialog.svg
-cmd/32/addfield.svg
-cmd/32/avmediaplayer.svg
-cmd/32/dbviewaliases.svg
-cmd/32/avmediaplayer.svg
-cmd/32/inserttable.svg
-cmd/32/currencyfield.svg
-cmd/32/datefield.svg
-cmd/32/edit.svg
-cmd/32/addfield.svg
-cmd/32/filecontrol.svg
-cmd/32/filefield.svg
-cmd/32/formattedfield.svg
-cmd/32/checkbox.svg
-cmd/32/combobox.svg
-cmd/32/listbox.svg
-cmd/32/choosecontrols.svg
-cmd/32/radiobutton.svg
-cmd/32/spinbutton.svg
-cmd/32/dbviewfunctions.svg
-cmd/32/scrollbar.svg
-cmd/32/insertframe.svg
-cmd/32/insertframe.svg
-cmd/32/insertgraphic.svg
-cmd/32/listbox.svg
-cmd/32/numberformatstandard.svg
-cmd/32/drawchart.svg
-cmd/32/insertobject.svg
-cmd/32/insertmath.svg
-cmd/32/patternfield.svg
-cmd/32/pushbutton.svg
-cmd/32/insertpagebreak.svg
-cmd/32/insertframe.svg
-cmd/32/timefield.svg
-cmd/32/newdoc.svg
-cmd/32/outlinebullet.svg
-cmd/32/numberformatstandard.svg
-cmd/32/paragraphdialog.svg
-cmd/32/insertdraw.svg
-cmd/32/trackchanges.svg
-cmd/32/showtrackedchanges.svg
-cmd/lc_trackchanges.svg
-cmd/lc_fontdialog.svg

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-12-01 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 9bcd8ffcc1c7749ef0144aab2ca6b5c6ca81c5a5
Author: Olivier Hallot 
AuthorDate: Sun Dec 1 09:19:13 2019 -0300
Commit: Olivier Hallot 
CommitDate: Sun Dec 1 13:24:14 2019 +0100

Add dep's for xapian-omindex build

Change-Id: If3e3efbb04e40c906618aec8da5552560bd0678e
Reviewed-on: https://gerrit.libreoffice.org/84145
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 0a0f39dc1..5ee580350 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -20,12 +20,12 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
-   $(if $(HELP_OMINDEX_PAGE),$(lang)/xap_tpl) \
$(lang)/html.text \
-   $(lang)/langnames.js \
$(foreach 
module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
$(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, 
,$(module)))/$(lang)/bookmarks.part) \
$(foreach 
module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \
+   $(lang)/langnames.js \
+   $(if $(HELP_OMINDEX_PAGE),$(lang)/xap_tpl) \
) \
 ))
 
@@ -57,6 +57,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
 # Xapian localized templates
 ifeq ($(HELP_OMINDEX_PAGE),TRUE)
 
+define html_gen_xaptpl_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/xap_tpl : \
+   $(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+
+endef
+   
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_xaptpl_dep,$(lang
+
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-11-14 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4ad79a357b335ab87b0565ec18b3d17044ab502e
Author: Olivier Hallot 
AuthorDate: Thu Nov 14 13:50:32 2019 -0300
Commit: Olivier Hallot 
CommitDate: Thu Nov 14 21:47:29 2019 +0100

Fix L10N of xapian templates

Change-Id: I23e3adc4a4232e9f9d998fa9f41951f7c530c335
Reviewed-on: https://gerrit.libreoffice.org/82721
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 67ee6db88..0a0f39dc1 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -69,7 +69,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
-   $(SRCDIR)/helpcontent2/source/text/shared/help/browserhelp.xhp \
+   $(if $(filter en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 \
)
 
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/help.js help3xsl/xap_templ_query.xsl

2019-10-14 Thread Olivier Hallot (via logerrit)
 CustomTarget_html.mk |2 
 help3xsl/default.css |3 
 help3xsl/help.js |6 +
 help3xsl/xap_templ_query.xsl |  138 ---
 4 files changed, 138 insertions(+), 11 deletions(-)

New commits:
commit 242a6bbefc4c8561fb4355329a0a043803e515d9
Author: Olivier Hallot 
AuthorDate: Mon Oct 14 09:43:27 2019 -0300
Commit: Olivier Hallot 
CommitDate: Mon Oct 14 21:13:15 2019 +0200

More work on Xapian result page

Added module dropdown fix
TODO: Language

Change-Id: I47012d6280694d87fb5d19e25c6052b8a7ed89c7
Reviewed-on: https://gerrit.libreoffice.org/80771
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e43c17a48..67ee6db88 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -65,6 +65,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $* \
+   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/xap_templ_query.xsl \
$(SRCDIR)/helpcontent2/source/text/shared/help/browserhelp.xhp \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 1710f1e52..33888ccd2 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -347,7 +347,7 @@ h6 {
 grid-area: header;
 position: sticky;
 top: 0px;
-z-index: 1000;
+z-index: 100;
 }
 header {
 color: #fff;
@@ -621,6 +621,7 @@ li.disabled a {
 .modules {
 border-bottom: 2px solid #f3f3f3;
 background-color: #26;
+z-index: 100;
 }
 #modules:after, #langs:after {
 font-size: 30px;
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 1e92f6ef9..75541e674 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -17,7 +17,11 @@ var currentModule = null;
 if(url.indexOf('explorer/database/') !== -1) {
 currentModule = 'BASE';
 } else {
-currentModule = regexArray[1].toUpperCase().substring(1);
+if (null === regexArray){// comes from search or elsewhere, no defined 
module in URL
+currentModule = 'HARED'
+}else{
+currentModule = regexArray[1].toUpperCase().substring(1);
+}
 }
 var results = null;
 var fullLinkified = '';
diff --git a/help3xsl/xap_templ_query.xsl b/help3xsl/xap_templ_query.xsl
index aa15b3f3b..d0eba866a 100644
--- a/help3xsl/xap_templ_query.xsl
+++ b/help3xsl/xap_templ_query.xsl
@@ -15,9 +15,30 @@ xsltproc xap_template_query.xsl 
 -->
 http://www.w3.org/1999/XSL/Transform;>
 
+
+
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
+
+
+
+
+
+$log{query.log}
+
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-04-23 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5c561c2f3744c5697ea6d25357f4223f0dbe977e
Author: himajin10 
AuthorDate: Fri Apr 19 23:16:08 2019 +0900
Commit: Stephan Bergmann 
CommitDate: Tue Apr 23 09:48:06 2019 +0200

fix forgotten LANG->LANGUAGE

Change-Id: Idcfd73213452510f769854062d0916a3c871b548
Reviewed-on: https://gerrit.libreoffice.org/70982
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 42ff2afee..3b2c8982c 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -114,7 +114,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
-   --stringparam lang $(LANG) \
+   --stringparam lang $(LANGUAGE) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam module $(MODULE) \
--stringparam productname "$(PRODUCTNAME)" \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-04-18 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8a21dc1cc51f0363b33e59b5c34c74d5c6737f1e
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 13:57:32 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 15:38:51 2019 +0200

Don't set LANG env var by accident

...as setting a GNU Make LANG var exports it to recipes as an env var, and 
see
e.g. 56bc0b1a376f62570a7287e9bb4193e00360c978 "Don't set locale env vars on
macOS" for potential problems caused by that.

This is the help half of a change spanning the core and help repos.

Change-Id: Ib5faf612e9030db384f7408ecd4fd03e65120f17
Reviewed-on: https://gerrit.libreoffice.org/70930
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 45d3f284b..42ff2afee 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -83,7 +83,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/langnames.js : \
 define html_gen_contents_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
-$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
LANG := $(2)
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
LANGUAGE := $(2)
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
MODULE := $(lastword $(subst :, ,$(filter $(module):%, $(html_BMARK_MODULES
 
 endef
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/links.txt.xsl help3xsl/online_transform.xsl

2019-04-06 Thread Libreoffice Gerrit user
 CustomTarget_html.mk  |   17 
 help3xsl/links.txt.xsl| 1435 ++
 help3xsl/online_transform.xsl |3 
 3 files changed, 1436 insertions(+), 19 deletions(-)

New commits:
commit 2d21ebb74b31546cf7dd133df9f8c4951d325c80
Author: Olivier Hallot 
AuthorDate: Sat Apr 6 20:51:01 2019 +0100
Commit: Olivier Hallot 
CommitDate: Sat Apr 6 21:52:57 2019 +0200

Revert "Create XSLT replacement table for missing icons"

This reverts commit 61f44912beec99f6211399ce567274aa369f817d.

Change-Id: Icd69ccd4f487a82426a00169728ec62bbff6d0b6
Reviewed-on: https://gerrit.libreoffice.org/70350
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 84e142c26..45d3f284b 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -13,7 +13,6 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
 html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
 html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
 html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
shared/explorer/database:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
-ICON_FILE := $(SRCDIR)/icon-themes/colibre/links.txt
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
@@ -109,21 +108,6 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.js :
) > $@ \
)
 
-$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl :
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ICO,2)
-   $(call gb_Helper_abbreviate_dirs,\
-   ( \
-   echo "" \
-   && echo "http://www.w3.org/1999/XSL/Transform\;>" \
-   && echo "" \
-   && echo "" \
-   && echo "" \
-   && grep -v "#" < $(ICON_FILE) | $(gb_AWK) 'NF' | 
$(gb_AWK) -v q=\' '{printf "" 
$$2 "\n"}' \
-   && $(gb_AWK) 'BEGIN {printf 
"\n"}' \
-   && echo 
"\n\n" \
-   ) > $@ \
-   )
-
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
@@ -142,7 +126,6 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
 
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
-   $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl 
\
$(foreach module,$(html_TEXT_MODULES), \
$(if $(filter en-US,$(1)), \
$(call gb_AllLangHelp_get_helpfiles_target,$(module)), \
diff --git a/help3xsl/links.txt.xsl b/help3xsl/links.txt.xsl
new file mode 100644
index 0..797cb6e14
--- /dev/null
+++ b/help3xsl/links.txt.xsl
@@ -0,0 +1,1435 @@
+
+http://www.w3.org/1999/XSL/Transform;>
+
+
+
+cmd/sc_open.png
+cmd/sc_runbasic.png
+cmd/sc_mediapause.png
+cmd/sc_basicstop.png
+cmd/sc_mediarepeat.png
+cmd/sc_ok.png
+cmd/sc_mediamute.png
+cmd/lc_open.png
+cmd/lc_runbasic.png
+cmd/lc_mediapause.png
+cmd/lc_basicstop.png
+cmd/lc_mediarepeat.png
+cmd/lc_ok.png
+cmd/lc_mediamute.png
+cmd/sc_insertrowsafter.png
+cmd/sc_insertcolumnsafter.png
+cmd/sc_deleterows.png
+cmd/sc_deletecolumns.png
+cmd/sc_insertcellsright.png
+cmd/sc_insertcellsdown.png
+cmd/sc_insertcolumnsafter.png
+cmd/sc_insertcolumns.png
+cmd/sc_insertrowsbefore.png
+formula/res/refinp1.png
+cmd/lc_datefield.png
+cmd/lc_insertplugin.png
+cmd/lc_inserttable.png
+cmd/lc_inserttable.png
+cmd/sc_datefield.png
+cmd/sc_insertplugin.png
+cmd/sc_inserttable.png
+cmd/sc_inserttable.png
+cmd/lc_editannotation.png
+cmd/sc_editannotation.png
+cmd/lc_newdoc.png
+cmd/lc_togglesheetgrid.png
+cmd/lc_avmediaplayer.png
+cmd/lc_formattedfield.png
+cmd/lc_datefield.png
+cmd/lc_togglesheetgrid.png
+cmd/lc_dbviewaliases.png
+cmd/lc_edit.png
+cmd/lc_addfield.png
+cmd/lc_inserttable.png
+cmd/lc_open.png
+cmd/lc_formattedfield.png
+cmd/lc_checkbox.png
+cmd/lc_combobox.png
+cmd/lc_listbox.png
+cmd/lc_radiobutton.png
+cmd/lc_spinbutton.png
+cmd/lc_dbviewfunctions.png
+cmd/lc_scrollbar.png
+cmd/lc_insertframe.png
+cmd/lc_insertframe.png
+cmd/lc_drawchart.png
+cmd/lc_numberformatstandard.png
+cmd/lc_numberformatstandard.png
+cmd/lc_listbox.png
+cmd/lc_insertframe.png
+cmd/lc_insertmath.png
+cmd/lc_patternfield.png
+cmd/lc_pushbutton.png
+cmd/lc_insertpagebreak.png
+cmd/lc_togglesheetgrid.png
+cmd/lc_timefield.png
+cmd/sc_newdoc.png
+cmd/sc_togglesheetgrid.png
+cmd/sc_avmediaplayer.png
+cmd/sc_formattedfield.png
+cmd/sc_datefield.png
+cmd/sc_dbviewaliases.png
+cmd/sc_text.png
+cmd/sc_addfield.png
+cmd/sc_inserttable.png
+cmd/sc_open.png
+cmd/sc_formattedfield.png
+cmd/sc_checkbox.png
+cmd/sc_combobox.png

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/links.txt.xsl help3xsl/online_transform.xsl

2019-04-06 Thread Libreoffice Gerrit user
 CustomTarget_html.mk  |   17 
 help3xsl/links.txt.xsl| 1435 --
 help3xsl/online_transform.xsl |3 
 3 files changed, 19 insertions(+), 1436 deletions(-)

New commits:
commit 61f44912beec99f6211399ce567274aa369f817d
Author: Olivier Hallot 
AuthorDate: Mon Apr 1 14:03:26 2019 -0300
Commit: Olivier Hallot 
CommitDate: Sat Apr 6 16:04:33 2019 +0200

Create XSLT replacement table for missing icons

Missing UI icons have a replacement table in
/core/icon-themes/colibre/links.txt

Help must also use this replacement table when Help
pages have missing icons. The previous approach was a manual
creation of a XSLT for the replacement.

The patch moves the replacement table creation inside the
Custom makefile, making it automatic and carrying changes
of the original links.txt source.

Change-Id: I7f834fa03bbd85f329efbec43e5c51cc86d51586
Reviewed-on: https://gerrit.libreoffice.org/70080
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 45d3f284b..84e142c26 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -13,6 +13,7 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
 html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
 html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
 html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
shared/explorer/database:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
+ICON_FILE := $(SRCDIR)/icon-themes/colibre/links.txt
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
@@ -108,6 +109,21 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.js :
) > $@ \
)
 
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl :
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ICO,2)
+   $(call gb_Helper_abbreviate_dirs,\
+   ( \
+   echo "" \
+   && echo "http://www.w3.org/1999/XSL/Transform\;>" \
+   && echo "" \
+   && echo "" \
+   && echo "" \
+   && grep -v "#" < $(ICON_FILE) | $(gb_AWK) 'NF' | 
$(gb_AWK) -v q=\' '{printf "" 
$$2 "\n"}' \
+   && $(gb_AWK) 'BEGIN {printf 
"\n"}' \
+   && echo 
"\n\n" \
+   ) > $@ \
+   )
+
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
@@ -126,6 +142,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
 
 define html_gen_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
+   $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/links.txt.xsl 
\
$(foreach module,$(html_TEXT_MODULES), \
$(if $(filter en-US,$(1)), \
$(call gb_AllLangHelp_get_helpfiles_target,$(module)), \
diff --git a/help3xsl/links.txt.xsl b/help3xsl/links.txt.xsl
deleted file mode 100644
index 797cb6e14..0
--- a/help3xsl/links.txt.xsl
+++ /dev/null
@@ -1,1435 +0,0 @@
-
-http://www.w3.org/1999/XSL/Transform;>
-
-
-
-cmd/sc_open.png
-cmd/sc_runbasic.png
-cmd/sc_mediapause.png
-cmd/sc_basicstop.png
-cmd/sc_mediarepeat.png
-cmd/sc_ok.png
-cmd/sc_mediamute.png
-cmd/lc_open.png
-cmd/lc_runbasic.png
-cmd/lc_mediapause.png
-cmd/lc_basicstop.png
-cmd/lc_mediarepeat.png
-cmd/lc_ok.png
-cmd/lc_mediamute.png
-cmd/sc_insertrowsafter.png
-cmd/sc_insertcolumnsafter.png
-cmd/sc_deleterows.png
-cmd/sc_deletecolumns.png
-cmd/sc_insertcellsright.png
-cmd/sc_insertcellsdown.png
-cmd/sc_insertcolumnsafter.png
-cmd/sc_insertcolumns.png
-cmd/sc_insertrowsbefore.png
-formula/res/refinp1.png
-cmd/lc_datefield.png
-cmd/lc_insertplugin.png
-cmd/lc_inserttable.png
-cmd/lc_inserttable.png
-cmd/sc_datefield.png
-cmd/sc_insertplugin.png
-cmd/sc_inserttable.png
-cmd/sc_inserttable.png
-cmd/lc_editannotation.png
-cmd/sc_editannotation.png
-cmd/lc_newdoc.png
-cmd/lc_togglesheetgrid.png
-cmd/lc_avmediaplayer.png
-cmd/lc_formattedfield.png
-cmd/lc_datefield.png
-cmd/lc_togglesheetgrid.png
-cmd/lc_dbviewaliases.png
-cmd/lc_edit.png
-cmd/lc_addfield.png
-cmd/lc_inserttable.png
-cmd/lc_open.png
-cmd/lc_formattedfield.png
-cmd/lc_checkbox.png
-cmd/lc_combobox.png
-cmd/lc_listbox.png
-cmd/lc_radiobutton.png
-cmd/lc_spinbutton.png
-cmd/lc_dbviewfunctions.png
-cmd/lc_scrollbar.png
-cmd/lc_insertframe.png
-cmd/lc_insertframe.png
-cmd/lc_drawchart.png
-cmd/lc_numberformatstandard.png
-cmd/lc_numberformatstandard.png
-cmd/lc_listbox.png
-cmd/lc_insertframe.png
-cmd/lc_insertmath.png
-cmd/lc_patternfield.png
-cmd/lc_pushbutton.png
-cmd/lc_insertpagebreak.png

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/get_tree.xsl

2019-03-26 Thread Libreoffice Gerrit user
 CustomTarget_html.mk  |2 ++
 help3xsl/get_tree.xsl |3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9b776454d95f5c6bf13c0ca5508c0b2225aa4c1c
Author: Olivier Hallot 
AuthorDate: Mon Mar 25 15:18:41 2019 -0300
Commit: Olivier Hallot 
CommitDate: Tue Mar 26 12:51:58 2019 +0100

Add module name to Contents link URL

Add ?DbPAR= to the contents link URL. .tree does not
have the DbPAR param in the link URLs.

2 possibiltites:
1) Add to the source files *.tree and we are done (triggers retranslation)

2) get module name at build time and add to the resulting tree (this
solution)

Change-Id: I2a3c1edcec7dd824a44bb93f0343ec8cb88cb0c4
Reviewed-on: https://gerrit.libreoffice.org/69714
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 38ca62b10..45d3f284b 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -84,6 +84,7 @@ define html_gen_contents_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
LANG := $(2)
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
MODULE := $(lastword $(subst :, ,$(filter $(module):%, $(html_BMARK_MODULES
 
 endef
 
@@ -115,6 +116,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $(LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
+   --stringparam module $(MODULE) \
--stringparam productname "$(PRODUCTNAME)" \
--stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
diff --git a/help3xsl/get_tree.xsl b/help3xsl/get_tree.xsl
index 749dd4a53..d1cf965e1 100644
--- a/help3xsl/get_tree.xsl
+++ b/help3xsl/get_tree.xsl
@@ -17,6 +17,7 @@ xsltproc get_tree.xsl 
 
 
 
+
 
 

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-02-25 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a72b5e90798aedb8945da175534986791d3d3352
Author: Stephan Bergmann 
AuthorDate: Mon Feb 25 10:45:31 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 25 10:51:15 2019 +0100

Propagate xsltproc failure, part 2

...following up on c3509fb7e6675a38560c7e2764b21861d1e23362 "Propagate 
xsltproc
failure".  The while loops would only have a non-zero exit code if the 
xsltproc
invocation in the last iteration of the loop fails.  (Oddly, adding `set -e`
instead seems to have no effect.)

Change-Id: I9296a59147697595ebe7b0d2b742044f8a8a3f02
Reviewed-on: https://gerrit.libreoffice.org/68309
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index c9ef46cae..38ca62b10 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -46,7 +46,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
rm -f $@.good && \
{ $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp && touch $@.good; } \
| $(gb_AWK) 'NF' \
-   && rm $@.good \
+   && rm $@.good || exit \
; done \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
@@ -153,6 +153,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
-o $(dir $@)$${xhp%.xhp}.html \

$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
$(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
+   || exit \
; done \
&& rm "$$RESPONSEFILE" \
&& touch $@ \
@@ -218,6 +219,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
--stringparam productversion 
"$(PRODUCTVERSION)" \

$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$$xhp \
+   || exit \
; done && touch $@.good; } \
| sort -k3b -t\> -s \
| awk 'NF' \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-02-22 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit c3509fb7e6675a38560c7e2764b21861d1e23362
Author: Stephan Bergmann 
AuthorDate: Fri Feb 22 09:23:17 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 22 09:24:48 2019 +0100

Propagate xsltproc failure

Change-Id: I26516bb718b678718822ef8621bbfb868016d626
Reviewed-on: https://gerrit.libreoffice.org/68192
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index b3c9b4e69..c9ef46cae 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -28,6 +28,9 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
) \
 ))
 
+# In the below recipe, the file $@.good is used to communicate failure of 
xsltproc in the pipeline
+# (similar to Bash's `set -o pipefail`; the final `rm $@.good` will fail, and 
fail the whole
+# command, if the xsltproc invocation failed):
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
@@ -40,8 +43,10 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
&& RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
-   $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp \
+   rm -f $@.good && \
+   { $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp && touch $@.good; } \
| $(gb_AWK) 'NF' \
+   && rm $@.good \
; done \
&& rm "$$RESPONSEFILE" \
&& echo '};' \
@@ -193,6 +198,9 @@ endef
 
 $(eval $(foreach module,$(html_BMARK_MODULES),$(call 
html_gen_bookmarks_deps,$(subst :, ,$(module)
 
+# In the below recipe, the file $@.good is used to communicate failure of 
xsltproc in the pipeline
+# (similar to Bash's `set -o pipefail`; the final `rm $@.good` will fail, and 
fail the whole
+# command, if any xsltproc invocation failed):
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
@@ -201,7 +209,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(addprefix $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES)))
 \
&& ( \
<"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | 
env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
-   | while read xhp; do \
+   | { rm -f $@.good && while read xhp; do \
$(call 
gb_ExternalExecutable_get_command,xsltproc) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
@@ -210,9 +218,10 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
--stringparam productversion 
"$(PRODUCTVERSION)" \

$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$$xhp \
-   ; done \
+   ; done && touch $@.good; } \
| sort -k3b -t\> -s \
| awk 'NF' \
+   && rm $@.good \
) > $@ \
&& rm "$$RESPONSEFILE" \
)   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk

2019-02-15 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8986dec8229cf31ccfadb61e6e90c905f7033ac7
Author: Stephan Bergmann 
AuthorDate: Fri Feb 15 10:14:37 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 15 11:25:38 2019 +0100

tdf#121532 Don't use non-standard `echo -n`

At least the version of echo used to build TDF's LO 6.2.0.3 release 
apparently
doesn't understand that non-standard option and printed out "-n" verbatim,
generating a broken languages.js.  (Though my local macOS 10.14.3 /bin/echo 
does
understand that option.)

Change-Id: I7233fa5c6e7851c5086c428a67aaee71604061e1
Reviewed-on: https://gerrit.libreoffice.org/67858
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 7c5a9ddc8..b3c9b4e69 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -52,9 +52,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
( \
-   echo -n 'var languagesSet = new Set([' ; \
-   for lang in $(gb_HELP_LANGS) ; do echo -n "'$$lang', " ; done | 
sed 's/, $$//' ; \
-   echo ']);' \
+   printf 'var languagesSet = new Set([' ; \
+   for lang in $(gb_HELP_LANGS) ; do printf '%s' "'$$lang', " ; 
done | sed 's/, $$//' ; \
+   printf ']);\n' \
) > $@
 
 define html_gen_langnames_js_dep
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/fuse.js help3xsl/fuzzysort.js help3xsl/get_bookmark.xsl help3xsl/help.js help3xsl/online_transform.xsl help3xsl/pagin

2018-11-09 Thread Libreoffice Gerrit user
 CustomTarget_html.mk|4 
 Package_html_static.mk  |2 
 help3xsl/default.css|9 
 help3xsl/fuse.js|  997 
 help3xsl/fuzzysort.js   |  608 +++
 help3xsl/get_bookmark.xsl   |   52 +
 help3xsl/help.js|   81 +-
 help3xsl/online_transform.xsl   |2 
 help3xsl/paginathing.js |4 
 source/text/shared/help/browserhelp.xhp |2 
 10 files changed, 694 insertions(+), 1067 deletions(-)

New commits:
commit 9fb9990b3568c973cc41d5600492e0791e44d40a
Author: Ilmari Lauhakangas 
AuthorDate: Fri Nov 9 19:46:07 2018 +0200
Commit: Olivier Hallot 
CommitDate: Fri Nov 9 21:14:57 2018 +0100

tdf#119415 change from fuse.js to fuzzysort.js

Tied the index listing to the current module.
Fuzzysort.js is MIT licensed.

Change-Id: I5d95cc1870a1856089217846ed0af572abc882d7
Reviewed-on: https://gerrit.libreoffice.org/63203
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 00c6c7e2e..50fd6aedd 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -157,9 +157,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
$(call gb_Helper_abbreviate_dirs,\
( \
-   echo 'document.getElementsByClassName( "index" 
)[0].innerHTML='"'"'\' \
+   echo 'var bookmarks = [' \
&& cat $(filter %.part,$^) \
-   && echo "'" \
+   && echo '];' \
) > $@ \
)
 
diff --git a/Package_html_static.mk b/Package_html_static.mk
index bab29c9b0..59941b020 100644
--- a/Package_html_static.mk
+++ b/Package_html_static.mk
@@ -18,7 +18,7 @@ $(eval $(call 
gb_Package_add_file,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOL
 
 $(eval $(call 
gb_Package_add_files,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOLDER)$(if 
$(HELP_ONLINE),/$(PRODUCTVERSION)),\
default.css \
-   fuse.js \
+   fuzzysort.js \
help.js \
help2.js \
normalize.css \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index a67a03628..6fee23221 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -287,7 +287,7 @@ h6 {
 .debug {
 border: 1px solid black;
 padding: 3px;
-display: show;
+display: none;
 background-color: #222;
 color: red;
 text-align: left;
@@ -563,13 +563,10 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 .pagination a {
 text-decoration: none;
 }
-.fuseshown {
+.index a {
 display: block;
 }
-.fusehidden {
-display: none;
-}
-.fuseshown.hidden {
+.index .hidden {
 display: none;
 }
 li.active {
diff --git a/help3xsl/fuse.js b/help3xsl/fuse.js
deleted file mode 100644
index b451ec1c0..0
--- a/help3xsl/fuse.js
+++ /dev/null
@@ -1,997 +0,0 @@
-/*!
- * Fuse.js v3.2.0 - Lightweight fuzzy-search (http://fusejs.io)
- * 
- * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
- * All Rights Reserved. Apache Software License 2.0
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- */
-(function webpackUniversalModuleDefinition(root, factory) {
-   if(typeof exports === 'object' && typeof module === 'object')
-   module.exports = factory();
-   else if(typeof define === 'function' && define.amd)
-   define("Fuse", [], factory);
-   else if(typeof exports === 'object')
-   exports["Fuse"] = factory();
-   else
-   root["Fuse"] = factory();
-})(this, function() {
-return /**/ (function(modules) { // webpackBootstrap
-/**/   // The module cache
-/**/   var installedModules = {};
-/**/
-/**/   // The require function
-/**/   function __webpack_require__(moduleId) {
-/**/
-/**/   // Check if module is in cache
-/**/   if(installedModules[moduleId]) {
-/**/   return installedModules[moduleId].exports;
-/**/   }
-/**/   // Create a new module (and put it into the cache)
-/**/   var module = installedModules[moduleId] = {
-/**/   i: moduleId,
-/**/   l: false,
-/**/   exports: {}
-/**/   };
-/**/
-/**/   // Execute the module function
-/**/   modules[moduleId].call(module.exports, module, 
module.exports, __webpack_require__);
-/**/
-/**/   // Flag the module as loaded
-/**/   module.l = true;
-/**/
-/**/   // Return the exports of the module
-/**/   return module.exports;
-/**/   }
-/**/

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/help2.js help3xsl/index2.html Package_html_dynamic.mk

2018-08-16 Thread Libreoffice Gerrit user
 CustomTarget_html.mk|9 +
 Package_html_dynamic.mk |1 +
 help3xsl/help2.js   |   17 +
 help3xsl/index2.html|9 +++--
 4 files changed, 30 insertions(+), 6 deletions(-)

New commits:
commit 73023bcc0dba68f6677bc02cdad75145180e2b11
Author: Jan Holesovsky 
AuthorDate: Tue Aug 14 16:34:25 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 09:13:39 2018 +0200

Limit the online help only to the built languages.

Change-Id: Ib81dbd9a4047d9bb63761a43ef0b183a450b03f1
Reviewed-on: https://gerrit.libreoffice.org/59047
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 58f7b7aaf..ad383a008 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -16,6 +16,7 @@ html_BMARK_MODULES := swriter:WRITER scalc:CALC 
simpress:IMPRESS sdraw:DRAW shar
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
+   languages.js \
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
@@ -46,6 +47,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
) > $@ \
)
 
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
+   $(SRCDIR)/helpcontent2/CustomTarget_html.mk
+   ( \
+   echo -n 'var languagesSet = new Set([' ; \
+   for lang in $(gb_HELP_LANGS) ; do echo -n "'$$lang', " ; done | 
sed 's/, $$//' ; \
+   echo ']);' \
+   ) > $@
+
 define html_gen_contents_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
diff --git a/Package_html_dynamic.mk b/Package_html_dynamic.mk
index 7af53ecb8..8c0c2fe5b 100644
--- a/Package_html_dynamic.mk
+++ b/Package_html_dynamic.mk
@@ -13,6 +13,7 @@ $(eval $(call 
gb_Package_use_customtarget,helpcontent2_html_dynamic,helpcontent2
 
 $(eval $(call 
gb_Package_add_files,helpcontent2_html_dynamic,$(LIBO_SHARE_HELP_FOLDER)$(if 
$(HELP_ONLINE),/$(PRODUCTVERSION)), \
 hid2file.js \
+languages.js \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 0e7b9d332..aed610371 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -120,4 +120,21 @@ function getParameterByName(name, url) {
 }
 return decodeURIComponent(results[2].replace(/\+/g, " "));
 }
+
+function existingLang(lang) {
+if (lang === undefined) {
+return 'en-US';
+}
+
+if (languagesSet.has(lang)) {
+return lang;
+}
+
+lang = lang.replace(/[-_].*/, '');
+if (languagesSet.has(lang)) {
+return lang;
+}
+
+return 'en-US';
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 6a9a1a6c8..ad1232043 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -11,6 +11,7 @@
 
 
 
+
 
 
 
@@ -20,7 +21,7 @@
 // the URL came from LibreOffice help (F1)
 var target = getParameterByName("Target",url);
 var version = getParameterByName("Version",url);
-var lang = getParameterByName("Language",url);
+var lang = existingLang(getParameterByName("Language", url));
 var system  = getParameterByName("System",url);
 var module;
 var defaultFile;
@@ -54,11 +55,7 @@
 window.location.href = newURL;
 } else {
 // URL came from elsewhere, direct access to webroot, we redirect to 
main Help page
-var userLang = navigator.language;
-if (userLang === undefined) {
-userlang="en-US";
-}
-window.location.href = userLang + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+window.location.href = existingLang(navigator.language) + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/index2.html

2018-08-14 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |5 +++--
 help3xsl/index2.html |4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 1c76993a281f99a80c4dcbcf7e2133ef2dd3db69
Author: Jan Holesovsky 
AuthorDate: Tue Aug 14 16:13:34 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Aug 14 16:29:25 2018 +0200

Rename 'map' to 'hid2fileMap'.

Also update dependency, so that the file gets rebuilt when the 'echo'
part of the makefile changes.

Change-Id: I0412f882dd12e265d8261a259ed83c469e261cdf
Reviewed-on: https://gerrit.libreoffice.org/58993
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index a8447e4fe..58f7b7aaf 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -29,11 +29,12 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
-   $(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module)))
+   $(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module))) \
+   $(SRCDIR)/helpcontent2/CustomTarget_html.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
( \
-   echo 'var map={' \
+   echo 'var hid2fileMap = {' \
&& RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
&& <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 4f7c744e2..6a9a1a6c8 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -36,11 +36,11 @@
 default:  
{defaultFile='text/shared/main.html';module="WRITER";break;}
 }
 var bookmark = target.slice(target.indexOf('/') + 1, target.length);
-var file = map[bookmark];
+var file = hid2fileMap[bookmark];
 // check first if a root bookmark @@nowidget@@ can be used
 if (file === undefined) {
 var b2 = bookmark.substring(0, bookmark.lastIndexOf("/")) + 
'/@@nowidget@@';
-file = map[b2];
+file = hid2fileMap[b2];
 }
 // rebuild URL
 if (file === undefined) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/generate_hid2file.xsl help3xsl/get_url.xsl

2018-08-14 Thread Libreoffice Gerrit user
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3eea3745e5ee142962eb509032266e0c5762e943
Author: Jan Holesovsky 
AuthorDate: Tue Aug 14 15:41:43 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Aug 14 16:07:58 2018 +0200

Rename get_url.xsl to generate_hid2file.xsl, because that's what it's doing.

Change-Id: I565ca442281fa8a80a59d1038d29b34d7f9d9f41
Reviewed-on: https://gerrit.libreoffice.org/58989
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index b1f3fd8ec..a8447e4fe 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -27,7 +27,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
 ))
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
-   $(SRCDIR)/helpcontent2/help3xsl/get_url.xsl \
+   $(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc) \
$(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module)))
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
diff --git a/help3xsl/get_url.xsl b/help3xsl/generate_hid2file.xsl
similarity index 100%
rename from help3xsl/get_url.xsl
rename to help3xsl/generate_hid2file.xsl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/get_bookmark.xsl help3xsl/get_tree.xsl help3xsl/get_url.xsl help3xsl/online_transform.xsl

2018-08-09 Thread Libreoffice Gerrit user
 CustomTarget_html.mk  |9 ++---
 help3xsl/get_bookmark.xsl |2 +-
 help3xsl/get_tree.xsl |2 +-
 help3xsl/get_url.xsl  |5 -
 help3xsl/online_transform.xsl |6 ++
 5 files changed, 10 insertions(+), 14 deletions(-)

New commits:
commit dbbcc7c949167f4a88fa91373f3012e67e30d255
Author: Jan Holesovsky 
AuthorDate: Thu Aug 9 19:11:13 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Thu Aug 9 19:34:58 2018 +0200

Use PRODUCTNAME from the configure.

Change-Id: Ibc742e653f44093372bed4e103fedb3a597dfdac
Reviewed-on: https://gerrit.libreoffice.org/58793
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 8f62975fe..b1f3fd8ec 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -80,7 +80,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $(LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
-   --stringparam productversion $(PRODUCTVERSION) \
+   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productversion "$(PRODUCTVERSION)" \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
$(TREE_FILE) \
@@ -112,7 +113,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
--stringparam Language $* \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam root $(if $(filter 
WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/ \
-   --stringparam productversion $(PRODUCTVERSION) \
+   --stringparam productname "$(PRODUCTNAME)" \
+   --stringparam productversion 
"$(PRODUCTVERSION)" \
-o $(dir $@)$${xhp%.xhp}.html \

$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
$(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
@@ -174,7 +176,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
-   --stringparam productversion 
$(PRODUCTVERSION) \
+   --stringparam productname 
"$(PRODUCTNAME)" \
+   --stringparam productversion 
"$(PRODUCTVERSION)" \

$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$$xhp \
; done \
diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl
index 5c0bc8cff..b3e0ab48b 100644
--- a/help3xsl/get_bookmark.xsl
+++ b/help3xsl/get_bookmark.xsl
@@ -18,7 +18,7 @@ xsltproc get_bookmark.xsl 
 
 
 
-
+
 
 
 
diff --git a/help3xsl/get_tree.xsl b/help3xsl/get_tree.xsl
index e20774dd0..749dd4a53 100644
--- a/help3xsl/get_tree.xsl
+++ b/help3xsl/get_tree.xsl
@@ -16,7 +16,7 @@ xsltproc get_tree.xsl 
 
 
 
-
+
 
 
 http://www.w3.org/1999/XSL/Transform;>
 
-
-
-
-
-
 
 
 
 
-
 
 
 
+
+
 
-
 
 
 
 
-
-
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk

2018-06-06 Thread Stephan Bergmann
 CustomTarget_html.mk |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4b66c47d5c27ba8136735b95e4d595d499cb9ec2
Author: Stephan Bergmann 
Date:   Wed Jun 6 15:23:59 2018 +0200

Clean up space/tab mixture

At least Emacs warned about those "suspicious lines".

Change-Id: I587e7d65318a7fdb1634e49f2db761c853e67b05
Reviewed-on: https://gerrit.libreoffice.org/55383
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 0f25d8347..8f62975fe 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -169,9 +169,9 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(addprefix $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/,$(gb_AllLangHelp_$(APPDIR)_HELPFILES)))
 \
&& ( \
<"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | 
env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
-   | while read xhp; do \
-   $(call 
gb_ExternalExecutable_get_command,xsltproc) \
-   --stringparam app $(APP) \
+   | while read xhp; do \
+   $(call 
gb_ExternalExecutable_get_command,xsltproc) \
+   --stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam productversion 
$(PRODUCTVERSION) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk

2018-06-06 Thread Stephan Bergmann
 CustomTarget_html.mk |   30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 5197a6b9def2e1886e3edab75517864272115089
Author: Stephan Bergmann 
Date:   Wed Jun 6 09:45:58 2018 +0200

(Partially) fix --with-help=html dependencies on .xhp files

There are three rules in helpcontent2/CustomTarget_html.mk that process 
(with
XSLT) all or some of the .xhp files in the helpcontent2/source/text/ tree 
(for
en-US; or their translations in the
workdir/HelpTranslatePartTarget/*/helpcontent2/source/text/ trees for other
languages).  Lists of all those .xhp files are defined in
helpcontent2/AllLangHelp_*.mk (with gb_AllLangHelp_add_helpfiles), but the 
code
in helpcontent2/CustomTarget_html.mk used `find` to assemble the relevant 
lists.

That has two issues (at least for the en-US case operating on the 
untranslated
helpcontent2/source/text/ files):  For one, if the content of those .xhp 
files
changes, the relevant XSLT processing is not re-run.  For another, if .xhp 
files
are added to or removed from the lists in helpcontent2/AllLangHelp_*.mk, the
relevant XSLT processeing is not re-run, either.

For the processing of translated .xhp files, there were already 
dependencies on
those translated files in place.  I assume (but have not really proved it) 
that
those dependencies are already sufficient to cover both of the above issues.
That only leaves the en-US case, operating on the untranslated files.

The lists of .xhp files as defined in helpcontent2/AllLangHelp_*.mk (with 
"*"
ranging over the various "modules": sbasic, scalc, schart, etc.) are now 
made
available in gb_AllLangHelp_*_HELPFILES variables.  The contents of those
variables is used instead of `find` to pass the relevant .xhp files to the 
XSLT
processings.  (Needing some RESPONSEFILE and `xargs -n 1` boilerplate to 
feed
individual files to the XSL processing without overflowing maximum command 
line
lengths.  Also, on Windows, var2file apparently writes CRLF line ends but 
the CR
parts need to be filtered out again, and xargs problems must be worked 
around
similar to df9edbcd2883cec2d0596133131cfbc220dee91f "Work around 'xargs:
environment is too large for exec' errors on Windows".)

However, those variables apparently cannot be used to specify dependencies 
for
the three XSLT-processing rules.  Presumably, the variables do not 
necessarily
have their values assigned yet by the time the rules' dependencies are
constructed (depending on the order in which .mk files are read?).  So 
"dummy"
gb_AllLangHelp_get_helpfiles_target targets are introduced, which depend on 
all
the relevant .xhp files (and which get constructed during
gb_AllLangHelp_add_helpfiles, just like the gb_AllLangHelp_*_HELPFILES
variables), and which the XSLT-processing rules in turn depend on.  That 
makes
sure that the XSLT-processing rules are re-run when the content of .xhp 
files
changes or when new .xhp files are added.

However, the above still fails to re-run the XSLT-processing rules when .xhp
files are removed.

This is the helpcontent2 part of a commit spanning core and helpcontent2.

Change-Id: I9a72c0f6837a8e13458a703fdecf7e5b0ef2076f
Reviewed-on: https://gerrit.libreoffice.org/55364
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 1cd42d9a9..0f25d8347 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -28,16 +28,19 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
$(SRCDIR)/helpcontent2/help3xsl/get_url.xsl \
-   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+   $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
+   $(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module)))
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
( \
echo 'var map={' \
-   && find $(SRCDIR)/helpcontent2/source/text -type f 
-name '*.xhp' \
+   && RESPONSEFILE=$(call var2file,$(shell 
$(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix 
$(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES \
+   && <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d 
'\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \
| while read xhp; do \
$(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp \
| $(gb_AWK) 'NF' \
; done \
+   && rm "$$RESPONSEFILE" \
   

[Libreoffice-commits] help.git: CustomTarget_html.mk

2018-05-02 Thread Stephan Bergmann
 CustomTarget_html.mk |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit cb3e183c7fa7bd926e6564e52b5a79b0a0d15262
Author: Stephan Bergmann 
Date:   Wed May 2 10:25:33 2018 +0200

Make --with-help=html work on Windows

Change-Id: Ib8168a6ac770e81a8e5049d8d60e63aa04c7e64b
Reviewed-on: https://gerrit.libreoffice.org/53722
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 8b6325a3e..5d913826c 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -99,14 +99,15 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
&& rm -rf $(dir $@)text \
&& find text -name "*.xhp" \
| while read xhp; do \
+   mkdir -p $$(dirname $(dir $@)$$xhp) && \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam Language $* \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
-   --stringparam root `pwd`/ \
+   --stringparam root $(if $(filter 
WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/ \
--stringparam productversion $(PRODUCTVERSION) \
-o $(dir $@)$${xhp%.xhp}.html \

$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
-   `pwd`/$$xhp \
+   $(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
; done \
&& touch $@ \
)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk GeneratedPackage_html_media.mk GeneratedPackage_html.mk help3xsl/get_bookmark.xsl help3xsl/get_tree.xsl help3xsl/online_transform.xsl Package_html.

2018-03-14 Thread Olivier Hallot
 CustomTarget_html.mk   |2 
 GeneratedPackage_html.mk   |2 
 GeneratedPackage_html_media.mk |8 -
 Package_html.mk|4 
 Package_html_static.mk |4 
 help3xsl/get_bookmark.xsl  |   10 +-
 help3xsl/get_tree.xsl  |   33 +++---
 help3xsl/online_transform.xsl  |  201 +
 8 files changed, 141 insertions(+), 123 deletions(-)

New commits:
commit 770c0c1746b5c0b94dc07d5f1d6c2c04802c8540
Author: Olivier Hallot 
Date:   Mon Mar 12 08:34:35 2018 -0300

tdf#116296 remove produt version from help path

Part two.
Part 1 is in sfx2 module

Remove product version from offline help path but keep
in online help.

Product version is kept for online because a help server can have more
than one helponline version.

Change-Id: I1d4ba12a7d6472defd4210c79349e35ccaf32d8d
Reviewed-on: https://gerrit.libreoffice.org/51126
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index ae56ebd07..8b6325a3e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -75,6 +75,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(call gb_Helper_abbreviate_dirs,\
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam lang $(LANG) \
+   --stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam productversion $(PRODUCTVERSION) \
-o $@ \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
@@ -159,6 +160,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(call 
gb_ExternalExecutable_get_command,xsltproc) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
+   --stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam productversion 
$(PRODUCTVERSION) \

$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$$xhp \
diff --git a/GeneratedPackage_html.mk b/GeneratedPackage_html.mk
index 9f7786e4c..36b4e6edf 100644
--- a/GeneratedPackage_html.mk
+++ b/GeneratedPackage_html.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_GeneratedPackage_GeneratedPackage,helpcontent2_html,$(call gb_C
 $(eval $(call 
gb_GeneratedPackage_use_customtarget,helpcontent2_html,helpcontent2/help3xsl))
 
 $(eval $(foreach lang,$(gb_HELP_LANGS),\
-   $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION)/$(lang)/text,$(lang)/text)
 \
+$(call 
gb_GeneratedPackage_add_dir,helpcontent2_html,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(if
 $(HELP_ONLINE),$(PRODUCTVERSION),)/$(lang)/text,$(lang)/text) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/GeneratedPackage_html_media.mk b/GeneratedPackage_html_media.mk
index bb4075851..cfc526b4e 100644
--- a/GeneratedPackage_html_media.mk
+++ b/GeneratedPackage_html_media.mk
@@ -9,10 +9,10 @@
 #
 $(eval $(call 
gb_GeneratedPackage_GeneratedPackage,helpcontent2_html_media,$(SRCDIR)))
 
-$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION)/media/icon-themes,icon-themes/galaxy))
+$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(if
 $(HELP_ONLINE),$(PRODUCTVERSION),)/media/icon-themes,icon-themes/galaxy))
 
-$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION)/media/helpimg,helpcontent2/source/media/helpimg))
-$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION)/media/navigation,helpcontent2/source/media/navigation))
-$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION)/media/screenshots,helpcontent2/source/media/screenshots))
+$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(if
 
$(HELP_ONLINE),$(PRODUCTVERSION),)/media/helpimg,helpcontent2/source/media/helpimg))
+$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(if
 
$(HELP_ONLINE),$(PRODUCTVERSION),)/media/navigation,helpcontent2/source/media/navigation))
+$(eval $(call 
gb_GeneratedPackage_add_dir,helpcontent2_html_media,$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(if
 
$(HELP_ONLINE),$(PRODUCTVERSION),)/media/screenshots,helpcontent2/source/media/screenshots))
 
 # vim: set noet sw=4 ts=4:
diff 

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/get_bookmark.xsl help3xsl/help.js help3xsl/localized.xsl help3xsl/online_transform.xsl help3xsl/paginathing.js help3x

2018-02-08 Thread Ilmari Lauhakangas
 CustomTarget_html.mk  |2 
 help3xsl/default.css  |  109 ---
 help3xsl/get_bookmark.xsl |6 -
 help3xsl/help.js  |  144 --
 help3xsl/localized.xsl|8 ++
 help3xsl/online_transform.xsl |   87 ++---
 help3xsl/paginathing.js   |   22 +++---
 help3xsl/xhp2html.sh  |2 
 8 files changed, 243 insertions(+), 137 deletions(-)

New commits:
commit b6bc8c1cfecc55bebff8dc64fddb63e3edc109b5
Author: Ilmari Lauhakangas 
Date:   Thu Feb 8 13:18:55 2018 +0200

tdf#115255 and auto-expand contents per subitem

JavaScript stuff moved from online_transform.xsl to help.js.
Simplified bookmarks markup.
Span elements with class "input" and length more than 3 characters
can be copied to clipboard by mouse click.
Bubli's feature request for auto-expanding contents per subitem
is also implemented.
Logic for adding headings to index list was reimplemented.

Change-Id: I87b6f189a040a73a1ab9dda1ec9cd790b06da202
Reviewed-on: https://gerrit.libreoffice.org/49421
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e39c8384e..ae56ebd07 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -114,7 +114,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
$(call gb_Helper_abbreviate_dirs,\
( \
-   echo 'document.getElementsByClassName( "list" 
)[0].innerHTML='"'"'\' \
+   echo 'document.getElementsByClassName( "index" 
)[0].innerHTML='"'"'\' \
&& cat $(filter %.part,$^) \
&& echo "'" \
) > $@ \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index debcf99aa..dc2a19972 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -40,9 +40,49 @@ h6,
 .listitem,
 .listitemintable,
 .tablecontent,
-.tablecontentintable {
+.input {
 font-family: "Segoe UI", Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", 
"Lucida Sans Unicode", "Helvetica Neue", Helvetica, Tahoma, sans-serif;
 }
+.input {
+transition-property: background-color;
+transition-duration: 150ms;
+}
+[data-tooltip]{
+  position:relative;
+}
+[data-tooltip]::before {
+content: "";
+position: absolute;
+top:-6px;
+left:50%;
+transform: translateX(-50%);
+border-width: 4px 6px 0 6px;
+border-style: solid;
+border-color: rgba(0,0,0,0.7) transparent transparent transparent;
+z-index: 100;
+opacity: 0;
+pointer-events: none;
+}
+[data-tooltip]::after {
+content: attr(data-tooltip);
+position: absolute;
+left:50%;
+top:-6px;
+transform: translateX(-50%)   translateY(-100%);
+background: rgba(0,0,0,0.7);
+text-align: center;
+color: #fff;
+padding:4px 2px;
+font-size: 12px;
+min-width: 80px;
+border-radius: 5px;
+opacity: 0;
+pointer-events: none;
+}
+[data-tooltip]:hover:before, [data-tooltip]:hover:after {
+opacity: 1;
+pointer-events: auto;
+}
 body {
 margin: 0;
 line-height: normal;
@@ -108,6 +148,9 @@ h1 {
 border-bottom: 3px solid #18A303;
 padding-bottom: 6px;
 }
+h1 a {
+text-decoration: none;
+}
 h2 {
 font-size: 1.5rem;
 }
@@ -282,41 +325,6 @@ footer {
 footer p {
 font-size: 1rem;
 }
-.breadcrumbs ul {
-list-style-type: none;
-margin: 0;
-padding: 0;
-color: #333;
-}
-.breadcrumbs li {
-display: inline-block;
-position: relative;
-padding-right: 24px;
-margin: 0;
-}
-.breadcrumbs li:after {
-content: '>';
-position: absolute;
-display: inline-block;
-right: 0;
-width: 24px;
-text-align: center;
-}
-.breadcrumbs li:last-child {
-font-weight: bold;
-}
-.breadcrumbs li:last-child:after {
-content: '';
-}
-.breadcrumbs a {
-text-decoration: none;
-display: inline-block;
-color: #333;
-white-space: nowrap;
-}
-.breadcrumbs a:hover {
-text-decoration: underline;
-}
 .gsc-control-cse {
 border-color: transparent !important;
 background-color: transparent !important;
@@ -356,14 +364,13 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 padding-left: 20px;
 margin: 20px 0 0 0;
 }
-#Index {
+#Index, .index {
 margin-top: 10px;
 }
-.list {
+.index {
 padding-left: 15px;
 }
-.list li {
-list-style: none;
+.index a {
 font-size: 16px;
 margin-bottom: 5px;
 }
@@ -375,63 +382,63 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 font-weight: bold;
 color: #18A303;
 }
-#writer::before {
+#WRITER::before {
 content: "WRITER";
 display: block;
 font-size: 22px;
 font-weight: 

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/convert2html.sh help3xsl/default.css help3xsl/fuse.js help3xsl/get_bookmark.xsl help3xsl/get_media.sh help3xsl/jquery-3.1.1.min.js help3xs

2018-01-30 Thread Ilmari Lauhakangas
 CustomTarget_html.mk  |2 
 Package_html_static.mk|4 
 help3xsl/convert2html.sh  |2 
 help3xsl/default.css  |   52 +-
 help3xsl/fuse.js  |  998 ++
 help3xsl/get_bookmark.xsl |2 
 help3xsl/get_media.sh |4 
 help3xsl/jquery-3.1.1.min.js  |4 
 help3xsl/list.min.js  |2 
 help3xsl/online_transform.xsl |  123 ++---
 help3xsl/paginathing.js   |  242 ++
 help3xsl/xhp2html.sh  |6 
 12 files changed, 1343 insertions(+), 98 deletions(-)

New commits:
commit e37c19a9dd3f2d3e5a31f91975ee5a8aac2dc2af
Author: Ilmari Lauhakangas 
Date:   Tue Jan 30 13:27:55 2018 +0200

Switched from list.js to fuse.js and paginathing.js

Fuse.js has Apache License 2.0 and paginathing.js has
Expat License (aka MIT).

Paginathing is a paginating utility and it was originally jQuery,
but due to performance concerns I converted it to pure JavaScript
and rather brutally adapted it to our needs.

Fuse.js gives us fuzzy search with multiple strings. The settings
can be refined, if needed. Settings can be easily tested with the
live demo: http://fusejs.io/

Change-Id: I1cf6a6f7d06adbcac95760db90187ee26be8e908
Reviewed-on: https://gerrit.libreoffice.org/48906
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 479eab889..e39c8384e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -114,7 +114,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
$(call gb_Helper_abbreviate_dirs,\
( \
-   echo 
'document.getElementById("Bookmarks").getElementsByClassName( "list" 
)[0].innerHTML='"'"'\' \
+   echo 'document.getElementsByClassName( "list" 
)[0].innerHTML='"'"'\' \
&& cat $(filter %.part,$^) \
&& echo "'" \
) > $@ \
diff --git a/Package_html_static.mk b/Package_html_static.mk
index 32d4b05fe..40a65b6a7 100644
--- a/Package_html_static.mk
+++ b/Package_html_static.mk
@@ -18,8 +18,8 @@ $(eval $(call 
gb_Package_add_file,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOL
 
 $(eval $(call 
gb_Package_add_files,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION),\
help.js \
-   jquery-3.1.1.min.js \
-   list.min.js \
+   fuse.js \
+   paginathing.js \
normalize.css \
default.css \
 ))
diff --git a/help3xsl/convert2html.sh b/help3xsl/convert2html.sh
index ec49e2562..3cfe860d9 100755
--- a/help3xsl/convert2html.sh
+++ b/help3xsl/convert2html.sh
@@ -284,7 +284,7 @@ echo ''>>$sitemap
 ###
 
 #cp help.html index.html html/
-cp normalize.css default.css help.js jquery-3.1.1.min.js $outDir
+cp normalize.css default.css help.js fuse.js paginathing.js $outDir
 cp -r $enSource/source/media $outDir
 mkdir -p $outDir/media/icon-themes
 #cp -a ../../icon-themes/galaxy/* $outDir/media/icon-themes/
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 9ddb07c36..00187b4fd 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -353,10 +353,10 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 #Index {
 margin-top: 10px;
 }
-#Index ul {
+.list {
 padding-left: 15px;
 }
-#Index ul li {
+.list li {
 list-style: none;
 font-size: 16px;
 margin-bottom: 5px;
@@ -369,72 +369,96 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 font-weight: bold;
 color: #18A303;
 }
-#WRITER::before {
+#writer::before {
 content: "WRITER";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#CALC::before {
+#calc::before {
 content: "CALC";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#IMPRESS::before {
+#impress::before {
 content: "IMPRESS";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#DRAW::before {
+#draw::before {
 content: "DRAW";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#BASE::before {
+#base::before {
 content: "BASE";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#MATH::before {
+#math::before {
 content: "MATH";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#CHART::before {
+#chart::before {
 content: "CHART";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#BASIC::before {
+#basic::before {
 content: "BASIC";
 display: block;
 font-size: 22px;
 

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/online_transform.xsl

2018-01-25 Thread Ilmari Lauhakangas
 CustomTarget_html.mk  |2 +-
 help3xsl/default.css  |   18 +-
 help3xsl/online_transform.xsl |2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 67a993c05d19976f5ed347b16584d29d6866a870
Author: Ilmari Lauhakangas 
Date:   Wed Jan 24 15:27:16 2018 +0200

Module names must stay uppercase due to DbPAR=MODULE

Change-Id: I10cea1b204b20d482abec6a8f66d5cfee6cf6dfe
Reviewed-on: https://gerrit.libreoffice.org/48509
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 0c71db255..479eab889 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
 # HACK!!
 html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
 html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
-html_BMARK_MODULES := swriter:writer scalc:calc simpress:impress sdraw:draw 
shared/explorer/database:base smath:math schart:chart sbasic:basic shared:shared
+html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
shared/explorer/database:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 70af31efb..9ddb07c36 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -369,63 +369,63 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 font-weight: bold;
 color: #18A303;
 }
-#writer::before {
+#WRITER::before {
 content: "WRITER";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#calc::before {
+#CALC::before {
 content: "CALC";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#impress::before {
+#IMPRESS::before {
 content: "IMPRESS";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#draw::before {
+#DRAW::before {
 content: "DRAW";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#base::before {
+#BASE::before {
 content: "BASE";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#math::before {
+#MATH::before {
 content: "MATH";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#chart::before {
+#CHART::before {
 content: "CHART";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#basic::before {
+#BASIC::before {
 content: "BASIC";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#shared::before {
+#SHARED::before {
 content: "GLOBAL";
 display: block;
 font-size: 22px;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index c1764e573..acdc6febb 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -332,7 +332,7 @@
 }
 });
 }
-var modules = [ 'calc', 'writer', 'impress', 'draw', 'base', 'math', 
'chart', 'basic', 'shared' ];
+var modules = [ 'CALC', 'WRITER', 'IMPRESS', 'DRAW', 'BASE', 'MATH', 
'CHART', 'BASIC', 'SHARED' ];
 // options for List.js http://listjs.com/
 var options = {
 valueNames: modules,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/get_bookmark.xsl help3xsl/get_media.sh help3xsl/help.js help3xsl/list.min.js help3xsl/online_transform.xsl help3xsl/x

2018-01-23 Thread Ilmari Lauhakangas
 CustomTarget_html.mk  |   20 ---
 Package_html_static.mk|1 
 help3xsl/default.css  |  115 --
 help3xsl/get_bookmark.xsl |8 +-
 help3xsl/get_media.sh |1 
 help3xsl/help.js  |   33 
 help3xsl/list.min.js  |2 
 help3xsl/online_transform.xsl |  108 +++
 help3xsl/xhp2html.sh  |1 
 9 files changed, 195 insertions(+), 94 deletions(-)

New commits:
commit 995f740adfff22aff1105a7e1b2801dfdab43434
Author: Ilmari Lauhakangas 
Date:   Mon Jan 22 16:48:08 2018 +0200

Use list.js for Index listing and search

List.js - http://listjs.com/ - allows us to paginate the results
so the height does not get out of hand.
Fuzzy search would be cool: http://listjs.com/docs/fuzzysearch/
...but it gives too big of a perf hit with our 5700 items.
Might try to bribe the creator to look into perf.
Thanks a lot to David Tardon for the makefile solution and to
Christian Lohmaier for playing a rubber duck.

Change-Id: I359eed541470ccaa309b0b6ff5d809a796d9befd
Reviewed-on: https://gerrit.libreoffice.org/48335
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 85ae29b2a..0c71db255 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
 # HACK!!
 html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
 html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
-html_BMARK_MODULES := scalc:CALC schart:CHART swriter:WRITER sdraw:DRAW 
simpress:IMPRESS smath:MATH sbasic:BASIC shared:SHARED 
shared/explorer/database:BASE
+html_BMARK_MODULES := swriter:writer scalc:calc simpress:impress sdraw:draw 
shared/explorer/database:base smath:math schart:chart sbasic:basic shared:shared
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
@@ -113,7 +113,11 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
$(call gb_Helper_abbreviate_dirs,\
-   cat $(filter %.part,$^) > $@ \
+   ( \
+   echo 
'document.getElementById("Bookmarks").getElementsByClassName( "list" 
)[0].innerHTML='"'"'\' \
+   && cat $(filter %.part,$^) \
+   && echo "'" \
+   ) > $@ \
)
 
 define html__gen_bookmarks_lang_dep
@@ -150,11 +154,10 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
( \
-   echo 
"document.getElementById(\"bookmark$(APP)\").innerHTML='\\" \
-   && find $(if $(filter 
en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR)
 -name "*.xhp" \
-   | while read xhp; do \
-   $(call 
gb_ExternalExecutable_get_command,xsltproc) \
-   --stringparam app $(APP) \
+   find $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR)
 -name "*.xhp" \
+   | while read xhp; do \
+   $(call 
gb_ExternalExecutable_get_command,xsltproc) \
+   --stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam productversion 
$(PRODUCTVERSION) \

$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
@@ -162,8 +165,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
; done \
| sort -k3b -t\> -s \
| awk 'NF' \
-   && echo "'" \
) > $@ \
-   )
+   )   
 
 # vim: set noet sw=4 ts=4:
diff --git a/Package_html_static.mk b/Package_html_static.mk
index e6767f6a6..32d4b05fe 100644
--- a/Package_html_static.mk
+++ b/Package_html_static.mk
@@ -19,6 +19,7 @@ $(eval $(call 
gb_Package_add_file,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOL
 $(eval $(call 
gb_Package_add_files,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION),\
help.js \
jquery-3.1.1.min.js \
+   list.min.js \
normalize.css \
default.css \
 

[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/online_transform.xsl

2017-12-21 Thread Olivier Hallot
 CustomTarget_html.mk  |1 
 help3xsl/online_transform.xsl |  108 --
 2 files changed, 63 insertions(+), 46 deletions(-)

New commits:
commit 0e5a56e81f63d2705f1083acda4b2d899783fdcd
Author: Olivier Hallot 
Date:   Thu Dec 21 19:22:29 2017 -0200

Relativise  wrt file position

Now  is changed to
https://gerrit.libreoffice.org/46932
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 4c45dc44f..85ae29b2a 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -99,7 +99,6 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
&& find text -name "*.xhp" \
| while read xhp; do \
$(call gb_ExternalExecutable_get_command,xsltproc) \
-   --stringparam fileTree '/' \
--stringparam Language $* \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam root `pwd`/ \
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 649671421..1551a2038 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -30,7 +30,6 @@
 
 
 
-
 
 
 
@@ -59,7 +58,6 @@
 
 
 
-
 
 
 
@@ -113,6 +111,11 @@
 
 
 
+
+
+
+
+
 
 
 
@@ -299,15 +302,14 @@
 
 

[Libreoffice-commits] help.git: CustomTarget_html.mk

2017-12-07 Thread David Tardon
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6dbfefa1bae14ab217abc5847d4a886a5755
Author: David Tardon 
Date:   Thu Dec 7 13:45:16 2017 +0100

allow to build online help too

Change-Id: Ib926dc2cd815a8d7e43c7cdcbccecd6c65f11980

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 4335e9949..4c45dc44f 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -101,7 +101,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam fileTree '/' \
--stringparam Language $* \
-   --stringparam local 'yes' \
+   --stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam root `pwd`/ \
--stringparam productversion $(PRODUCTVERSION) \
-o $(dir $@)$${xhp%.xhp}.html \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk GeneratedPackage_html_media.mk GeneratedPackage_html.mk help3xsl/get_hid2file.sh Module_helpcontent2.mk Package_html.mk Package_html_static.mk

2017-12-07 Thread David Tardon
 CustomTarget_html.mk   |  170 +
 GeneratedPackage_html.mk   |   18 
 GeneratedPackage_html_media.mk |   18 
 Module_helpcontent2.mk |   10 ++
 Package_html.mk|   25 ++
 Package_html_static.mk |   26 ++
 help3xsl/get_hid2file.sh   |3 
 7 files changed, 268 insertions(+), 2 deletions(-)

New commits:
commit ba16363fee2832acf3a33c718fa60cfb5aa67fc8
Author: David Tardon 
Date:   Thu Nov 23 19:39:38 2017 +0100

move generation of HTML help to gbuild

Change-Id: Ic38ee7b9a3ee4a45bede9d494f717d833e53d69f

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
new file mode 100644
index 0..4335e9949
--- /dev/null
+++ b/CustomTarget_html.mk
@@ -0,0 +1,170 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
+
+# HACK!!
+html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
+html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
+html_BMARK_MODULES := scalc:CALC schart:CHART swriter:WRITER sdraw:DRAW 
simpress:IMPRESS smath:MATH sbasic:BASIC shared:SHARED 
shared/explorer/database:BASE
+
+$(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
+   hid2file.js \
+   $(foreach lang,$(gb_HELP_LANGS),\
+   $(lang)/bookmarks.js \
+   $(lang)/contents.js \
+   $(lang)/html.text \
+   $(foreach 
module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
+   $(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, 
,$(module)))/$(lang)/bookmarks.part) \
+   ) \
+))
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
+   $(SRCDIR)/helpcontent2/help3xsl/get_url.xsl \
+   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Helper_abbreviate_dirs,\
+   ( \
+   echo 'var map={' \
+   && find $(SRCDIR)/helpcontent2/source/text -type f 
-name '*.xhp' \
+   | while read xhp; do \
+   $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp \
+   | $(gb_AWK) 'NF' \
+   ; done \
+   && echo '};' \
+   ) > $@ \
+   )
+
+define html_gen_contents_html_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
LANG := $(2)
+
+endef
+
+define html_gen_contents_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.js : \
+   $(foreach module,$(html_TREE_MODULES),\
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(module)/$(1)/contents.part)
+$(foreach module,$(html_TREE_MODULES),$(call 
html_gen_contents_html_dep,$(module)/$(1),$(1),helpcontent2/source/auxiliary/$(module)))
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_contents_dep,$(lang
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.js :
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
+   $(call gb_Helper_abbreviate_dirs,\
+   ( \
+   echo 
"document.getElementById(\"Contents\").innerHTML='\\" \
+   && cat $(filter %.part,$^) | $(gb_AWK) 'NF' \
+   && echo "';" \
+   ) > $@ \
+   )
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
+   $(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
+   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Helper_abbreviate_dirs,\
+   $(call gb_ExternalExecutable_get_command,xsltproc) \
+   --stringparam lang $(LANG) \
+   --stringparam productversion $(PRODUCTVERSION) \
+   -o $@ \
+   $(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
+   $(TREE_FILE) \
+   )
+
+define html_gen_html_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
+   $(foreach module,$(html_TEXT_MODULES),$(call