tdf#115524 Some branch bookmarks are not working 1

With .ui dialogs, the Help system sends specific URL
associated to the higlighted widget in the .ui dislog.

Not every help page associated to the dialog has
<bookmark branch="hid/<path to the dialog/widget"/>
for all widgets of the dialog. As consequence, some URLs
were not addressed and the default module entry page
was displayed, instead of the dialog help page.

The solution is to define a dumy bookmark '@@nowidget@@' to the
help page associated to the dialog, and if the widget bookmark
is missing in the help page then use the dummy target,
thus offering a help page with the right contents anyway.

This patch covers help pages for smath.

Change-Id: I40b592271b0c336d4d3bacc33d2f3d19107ae702
Reviewed-on: https://gerrit.libreoffice.org/57393
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
This commit is contained in:
Olivier Hallot
2018-07-13 11:18:15 -03:00
parent 2af2ba2a19
commit e366cf4f20
9 changed files with 16 additions and 14 deletions

View File

@ -37,6 +37,11 @@
}
var bookmark = rest.slice(rest.indexOf('/')+1, rest.indexOf('?'));
var file = map[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];
}
// rebuild URL
if (file === undefined){
var newURL = lang + '/' + defaultFile + '?System=' + system + '&DbPAR=' + module;
@ -58,4 +63,3 @@
</script>
</body>
</html>

View File

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the LibreOffice project.
*
@ -20,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<helpdocument version="1.0">
<helpdocument version="1.0">
<meta>
<topic id="textsharedoptionen01090100xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Settings</title>
@ -41,6 +37,7 @@
<bookmark_value>scaling; printing in $[officename] Math</bookmark_value>
<bookmark_value>fitting to pages;print settings in Math</bookmark_value>
</bookmark><comment>mw inserted "fitting..."</comment>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/smathsettings/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/smathsettings/SmathSettings" id="bm_id3150178" localize="false"/>
<paragraph role="heading" id="hd_id3150713" xml-lang="en-US" level="1">Settings</paragraph>
<paragraph role="paragraph" id="par_id3145090" xml-lang="en-US"><variable id="einst"><ahelp hid="modules/smath/ui/smathsettings/SmathSettings">Defines formula settings that will be valid for all documents.</ahelp>
@ -69,8 +66,5 @@
<bookmark xml-lang="en-US" branch="hid/tobeannounced" id="bm_id34459152" localize="false"/><paragraph role="heading" id="hd_id31567808" xml-lang="en-US" level="3">Embed only used symbols (smaller file size)</paragraph>
<paragraph role="paragraph" id="par_id3789203" xml-lang="en-US"><ahelp hid=".">Saves only those symbols with each formula that are used in that formula.</ahelp> In earlier versions of $[officename], all symbols were saved with each formula.</paragraph>
</body>
</helpdocument>

View File

@ -36,6 +36,7 @@
</bookmark>
<bookmark xml-lang="en-US" branch="hid/.uno:ChangeFont" id="bm_id3153925" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/fonttypedialog/FontsDialog" id="bm_id3153926" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/fonttypedialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<paragraph role="heading" id="hd_id3156261" xml-lang="en-US" level="1">Fonts</paragraph>
<paragraph role="paragraph" id="par_id3153716" xml-lang="en-US"><variable id="schriftartentext"><ahelp hid="modules/smath/ui/fonttypedialog/FontsDialog">Defines the fonts that can be applied to formula elements.</ahelp>
</variable></paragraph>

View File

@ -30,10 +30,9 @@
</history>
</meta>
<body>
<bookmark branch="hid/modules/smath/ui/fontdialog/FontDialog" xml-lang="en-US" id="bm_id3153144" localize="false"/><paragraph role="heading" level="1" id="hd_id3153188" xml-lang="en-US">Fonts</paragraph>
<bookmark branch="hid/modules/smath/ui/fontdialog/@@nowidget@@" xml-lang="en-US" id="bm_@@nowidget@@" localize="false"/>
<bookmark branch="hid/modules/smath/ui/fontdialog/FontDialog" xml-lang="en-US" id="bm_id3153144" localize="false"/>
<paragraph role="heading" level="1" id="hd_id3153188" xml-lang="en-US">Fonts</paragraph>
<paragraph role="paragraph" id="par_id3152598" xml-lang="en-US"><ahelp visibility="visible" hid="modules/smath/ui/fontdialog/FontDialog">Use this dialog to select the font for the respective category in the <emph>Fonts</emph> dialog.</ahelp></paragraph>
<section id="howtoget">
<embed href="text/smath/00/00000004.xhp#fmtssa"/>

View File

@ -32,6 +32,7 @@
<bookmark xml-lang="en-US" branch="index" id="bm_id3153816"><bookmark_value>font sizes; in $[officename] Math</bookmark_value>
<bookmark_value>sizes; of fonts in $[officename] Math</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/fontsizedialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/fontsizedialog/FontSizeDialog" id="bm_id3148867" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/.uno:ChangeFontSize" id="bm_id3148866" localize="false"/><paragraph role="heading" id="hd_id3153816" xml-lang="en-US" level="1">Font Sizes</paragraph>
<paragraph role="paragraph" id="par_id3150213" xml-lang="en-US"><variable id="schriftgroessentext"><ahelp hid="modules/smath/ui/fontsizedialog/FontSizeDialog">Use this dialog to specify the font sizes for your formula. Select a base size and all elements of the formula will be scaled in relation to this base.</ahelp>

View File

@ -33,6 +33,7 @@
<bookmark_value>formulas;element spacing</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/.uno:ChangeDistance" id="bm_id3150346" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/spacingdialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/spacingdialog/SpacingDialog" id="bm_id3150356" localize="false"/>
<paragraph role="heading" id="hd_id3154658" xml-lang="en-US" level="1">Spacing</paragraph>
<paragraph role="paragraph" id="par_id3153818" xml-lang="en-US"><variable id="abstaendetext"><ahelp hid="modules/smath/ui/spacingdialog/SpacingDialog">Use this dialog to determine the spacing between formula elements. The spacing is specified as a percentage in relation to the base size defined under <emph>Format - Font Size</emph>.</ahelp>

View File

@ -27,7 +27,7 @@
</meta>
<body>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/alignmentdialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark branch="index" xml-lang="en-US" id="bm_id3148730"><bookmark_value>aligning; multi-line formulas</bookmark_value><bookmark_value>multi-line formulas; aligning</bookmark_value></bookmark>
<bookmark branch="hid/.uno:ChangeAlignment" xml-lang="en-US" id="bm_id3145596" localize="false"/>
<bookmark branch="hid/modules/smath/ui/alignmentdialog/AlignmentDialog" xml-lang="en-US" id="bm_id31455961" localize="false"/>

View File

@ -39,6 +39,7 @@
</bookmark>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/catalogdialog/CatalogDialog" id="bm_id3147339" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/catalogdialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/.uno:Symbols" id="bm_id3154254" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/.uno:SymbolCatalogue" id="bm_id3155959" localize="false"/>

View File

@ -30,6 +30,7 @@
</history>
</meta>
<body>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/symdefinedialog/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/smath/ui/symdefinedialog/EditSymbols" id="bm_id3149379" localize="false"/>
<bookmark xml-lang="en-US" branch="index" id="bm_id2123477"><bookmark_value>new symbols in %PRODUCTNAME Math</bookmark_value>
<bookmark_value>symbols; adding in %PRODUCTNAME Math</bookmark_value>