Bug 94059 - HELPAUTHORING the element bascode is not supported
Summary: HELPAUTHORING the element bascode is not supported
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 94057
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-09 14:34 UTC by Regina Henschel
Modified: 2018-07-28 11:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2015-09-09 14:34:07 UTC
The element bascode is used to trigger insertion of items for syntax hightlighting of Basic code in help texts. This inserting is done by the help compiler in BasCodeTagger.cxx.

When a file with such element is opened by the extension and then resaved, the element bascode is not preserved but deleted. Try it with the file \core\helpcontent2\source\text\sbasic\shared\03020104.xhp for example.
Comment 1 Yousuf Philips (jay) (retired) 2015-09-09 20:23:40 UTC
Confirmed. Also noticed that it didnt preserve the white space indentation in the paragraphs, as well as the 'localize="false"' attribute of the <paragraph> tag.
Comment 2 Johnny_M 2016-05-16 11:26:54 UTC
Confirming on 64-bit Linux.

As pointed out by Regina in https://listarchives.libreoffice.org/global/documentation/msg18778.html, the XSL filter files have been updated in the bug 94057 and would need to be taken over to the extension.

An alternative solution, though, could possibly be the following (see https://cgit.freedesktop.org/libreoffice/core/tree/helpcompiler/source/BasCodeTagger.cxx): Instead of retrieving the content of the <bascode> tags, retrieve content of <paragraph> tags with role="bascode" attribute. See the http://www.xmlsoft.org/tutorial/ar01s08.html tutorial of the used LibXML for how attribute values can be retrieved.

Because as is, the BASIC example code currently uses both, the <bascode> tags (for syntax highlighting) as well as role="bascode" attributes of <paragraph> tags (for style), which seems redundant.
Comment 3 Olivier Hallot 2018-07-28 11:35:24 UTC
Helpauthoring extension is deprecated. closing wontfix.