[Libreoffice-commits] core.git: desktop/Extension_test-passive.mk desktop/test l10ntools/source
Stephan Bergmann
sbergman at redhat.com
Wed Jun 13 11:32:29 UTC 2018
desktop/Extension_test-passive.mk | 8 ++++
desktop/test/deployment/passive/Addons.xcu | 15 +++++++
desktop/test/deployment/passive/META-INF/manifest.xml | 1
desktop/test/deployment/passive/help/en/help.tree | 16 ++++++++
desktop/test/deployment/passive/help/en/main.xhp | 35 ++++++++++++++++++
l10ntools/source/localize.cxx | 2 +
6 files changed, 77 insertions(+)
New commits:
commit 4a0ca73c31990568bf20a1c3f0906c3a5770a38e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jun 13 10:28:13 2018 +0200
Add some help content to test-passive.oxt
...mainly to test how well/poorly extension help is supported by
--with-help=html, but also as a kind of reference implementation. (There are
also extensions in odk/examples/ that contain help content, namely
odk/examples/DevelopersGuide/Extensions/DialogWithHelp/ containing context-
sensitive help for a dialog, a topic that is not covered here.)
See <https://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/
Help_Content#Integration_into_the_OpenOffice.org_help_system> for the ways an
extension's help content can be integrated into the "classic" (plain
--with-help) help system (citing sub-section headings used in that document):
* Help Viewer Contents page:
The contained help.tree provides a "The test-passive Extension" section with
a "The test-passive Extension" page (main.xhp).
* Help Viewer Index page:
The contained main.xhp provides index entries for "test-passive extension" and
"extensions"-"test-passive", and---only on the index pages of Calc and Writer
---for "test-passive extension in Calc and Writer".
* Help Viewer Find page:
The contained main.xhp is indexer="include", so it should be found by e.g.
searching for "bla bla".
* Context sensitive help and extended tool tips:
The contained Addons.xcu has been extended with a small (floating by default)
toolbar containing a "native" button (doing the same as the "passive - native"
menu entry), and the contained main.xhp provides an extended tooltip of "Show
the test-passive extension's native dialog" for that toolbar button (displayed
when using "Help - What's This?" and hovering over the button).
For context-sensitive help for dialogs, see the mention of
odk/examples/DevelopersGuide/Extensions/DialogWithHelp/ above.
The contained help is only provided in "en" localization, which should thus be
used as fallback regardless for which locale LO is run.
The help-related XML files need to provide identifiers in lots of places, many
of which appear to be unused for the given example uses. I specified those as
empty strings.
The workdir/Extension/test-passive.oxt extension can be built with `make
Extension_test-passive`.
Change-Id: I0e75f35df85683c9fae1d1384fa6afeaeb8a687d
Reviewed-on: https://gerrit.libreoffice.org/55736
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/desktop/Extension_test-passive.mk b/desktop/Extension_test-passive.mk
index 9d235b6f03dd..ef42f3b1b81f 100644
--- a/desktop/Extension_test-passive.mk
+++ b/desktop/Extension_test-passive.mk
@@ -20,6 +20,14 @@ $(eval $(call gb_Extension_add_files,test-passive,, \
$(call gb_Jar_get_target,passive_java) \
))
+$(eval $(call gb_Extension_add_files,test-passive,help/en, \
+ $(SRCDIR)/desktop/test/deployment/passive/help/en/help.tree \
+))
+
+$(eval $(call gb_Extension_add_files,test-passive,help/en/org.openoffice%2Fframework%2Fdesktop%2Ftest%2Fdeployment%2Fpassive, \
+ $(SRCDIR)/desktop/test/deployment/passive/help/en/main.xhp \
+))
+
$(eval $(call gb_Extension_add_libraries,test-passive, \
passive_native \
))
diff --git a/desktop/test/deployment/passive/Addons.xcu b/desktop/test/deployment/passive/Addons.xcu
index efb36487ebf1..3cc7c45ed65d 100644
--- a/desktop/test/deployment/passive/Addons.xcu
+++ b/desktop/test/deployment/passive/Addons.xcu
@@ -54,6 +54,21 @@
</node>
</node>
</node>
+ <node o:name="OfficeToolBar">
+ <node o:name="org.openoffice.test.desktop.deployment.passive" o:op="replace">
+ <node o:name="1" o:op="replace">
+ <prop o:name="URL">
+ <value>vnd.org.openoffice.test.desktop.deployment.passive_native:</value>
+ </prop>
+ <prop o:name="Title" xml:lang="en-US">
+ <value>native</value>
+ </prop>
+ <prop o:name="Context">
+ <value/>
+ </prop>
+ </node>
+ </node>
+ </node>
</node>
</item>
</o:items>
diff --git a/desktop/test/deployment/passive/META-INF/manifest.xml b/desktop/test/deployment/passive/META-INF/manifest.xml
index 1d57a8eb41ae..c387b4be449c 100644
--- a/desktop/test/deployment/passive/META-INF/manifest.xml
+++ b/desktop/test/deployment/passive/META-INF/manifest.xml
@@ -22,6 +22,7 @@
m:full-path="Addons.xcu"/>
<m:file-entry m:media-type="application/vnd.sun.star.configuration-data"
m:full-path="ProtocolHandler.xcu"/>
+ <m:file-entry m:media-type="application/vnd.sun.star.help" m:full-path="help"/>
<m:file-entry
m:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@"
m:full-path="platform.components"/>
diff --git a/desktop/test/deployment/passive/help/en/help.tree b/desktop/test/deployment/passive/help/en/help.tree
new file mode 100644
index 000000000000..76a07991d88d
--- /dev/null
+++ b/desktop/test/deployment/passive/help/en/help.tree
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<tree_view version="10-Aug-2010">
+ <help_section application="OrgOpenofficeFrameworkDesktopTestDeploymentPassive" id=""
+ title="The test-passive Extension">
+ <topic
+ id="OrgOpenofficeFrameworkDesktopTestDeploymentPassive/org.openoffice%2Fframework%2Fdesktop%2Ftest%2Fdeployment%2Fpassive/main.xhp">The test-passive Extension</topic>
+ </help_section>
+</tree_view>
diff --git a/desktop/test/deployment/passive/help/en/main.xhp b/desktop/test/deployment/passive/help/en/main.xhp
new file mode 100644
index 000000000000..ff62c6b68251
--- /dev/null
+++ b/desktop/test/deployment/passive/help/en/main.xhp
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<helpdocument version="1.0">
+ <meta>
+ <topic id="" indexer="include">
+ <title xml-lang="en" id="">The test-passive Extension</title>
+ <filename>/org.openoffice%2Fframework%2Fdesktop%2Ftest%2Fdeployment%2Fpassive/main.xhp</filename>
+ <bookmark branch="index" xml-lang="en" id="">
+ <bookmark_value>test-passive extension</bookmark_value>
+ <bookmark_value>extensions;test-passive</bookmark_value>
+ </bookmark>
+ <bookmark branch="index" xml-lang="en" id="_scalc_swriter">
+ <bookmark_value>test-passive extension in Calc and Writer</bookmark_value>
+ </bookmark>
+ </topic>
+ </meta>
+ <body>
+ <bookmark branch="hid/vnd.org.openoffice.test.desktop.deployment.passive_native:" xml-lang="en"
+ id=""/>
+ <paragraph role="paragraph" id="" xml-lang="en">
+ <ahelp hid="vnd.org.openoffice.test.desktop.deployment.passive_native:" visibility="hidden">
+ Show the test-passive extension's native dialog
+ </ahelp>
+ </paragraph>
+ <paragraph role="heading" level="1" id="" xml-lang="en">The test-passive Extension</paragraph>
+ <paragraph role="paragraph" id="" xml-lang="en">Bla bla bla.</paragraph>
+ </body>
+</helpdocument>
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 98098b775456..31c6e70f0358 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -58,6 +58,8 @@ bool matchList(
bool passesNegativeList(const OUString& rUrl) {
static const OUStringLiteral list[] = {
+ "/desktop/test/deployment/passive/help/en/help.tree",
+ "/desktop/test/deployment/passive/help/en/main.xhp",
"/dictionaries.xcu",
"/dictionaries/da_DK/help/da/help.tree",
("/dictionaries/da_DK/help/da/"
More information about the Libreoffice-commits
mailing list