summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-11-24 14:59:09 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-11-28 10:53:20 +0100
commit10793855574782a1d57805883693b6f200cfac3d (patch)
tree9516424a68348b520d339b69d2200c570c15916c
parentdf22ca830ca1e60dc4fb212bb5c7a528d208430b (diff)
tdf#121697 XHP extensions
This is the core part of the bug, and is WIP Extend the XML parser to include new incantations of the <paragraph> tag, namely <h1> to <h6> <note>, <tip> and <warning> Extension to the <item> tag: <menuitem>, <input>, <literal>, <widget> and <keycode> Change-Id: Idaed321cc8756fa6bcf4fbc170982365ff33d4d7 Reviewed-on: https://gerrit.libreoffice.org/63955 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r--l10ntools/source/xmlparse.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index d1380208d263..369d8e6e1562 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -314,6 +314,15 @@ XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created
m_aNodes_localize.emplace( OString("bookmark") , true );
m_aNodes_localize.emplace( OString("variable") , true );
m_aNodes_localize.emplace( OString("paragraph") , true );
+ m_aNodes_localize.emplace( OString("h1") , true );
+ m_aNodes_localize.emplace( OString("h2") , true );
+ m_aNodes_localize.emplace( OString("h3") , true );
+ m_aNodes_localize.emplace( OString("h4") , true );
+ m_aNodes_localize.emplace( OString("h5") , true );
+ m_aNodes_localize.emplace( OString("h6") , true );
+ m_aNodes_localize.emplace( OString("note") , true );
+ m_aNodes_localize.emplace( OString("tip") , true );
+ m_aNodes_localize.emplace( OString("warning") , true );
m_aNodes_localize.emplace( OString("alt") , true );
m_aNodes_localize.emplace( OString("caption") , true );
m_aNodes_localize.emplace( OString("title") , true );
@@ -1055,12 +1064,14 @@ icu::UnicodeString lcl_QuotRange(
bool lcl_isTag( const icu::UnicodeString& rString )
{
- static const int nSize = 15;
+ static const int nSize = 20;
static const icu::UnicodeString vTags[nSize] = {
"ahelp", "link", "item", "emph", "defaultinline",
"switchinline", "caseinline", "variable",
"bookmark_value", "image", "object",
- "embedvar", "alt", "sup", "sub" };
+ "embedvar", "alt", "sup", "sub",
+ "menuitem", "keycode", "input", "literal", "widget"
+ };
for( int nIndex = 0; nIndex < nSize; ++nIndex )
{