summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkash Deshpande <fastakash@gmail.com>2016-08-13 12:28:45 -0400
committerjan iversen <jani@documentfoundation.org>2016-08-17 06:47:20 +0000
commit2e141341684eb610834db92693d715f3fd01d0dd (patch)
treee0f352ed7ebf9bb6ea7660d7259c633390e79562
parent053c67aeb4049a175eda8dc4a1910516f58ce7b4 (diff)
tdf#94553 fix nested lists in wikihelp
The problem was that only the first element in a nested list was getting the extra '#' character Added a re.sub statment to ensure all elements inside a nested list have this to ensure proper display Also backing out temporary/FIXME changes in the xhp files. The run is now free of warnings with the desired changes showing up for 'Using Gluepoints' page, which has a nested list Change-Id: I4009408ee11e191cbd5e1560ca1d08f3e7b5c630 Reviewed-on: https://gerrit.libreoffice.org/28107 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
-rw-r--r--source/text/scalc/01/05120000.xhp2
-rw-r--r--source/text/simpress/guide/gluepoints.xhp4
-rw-r--r--source/text/swriter/librelogo/LibreLogo.xhp4
-rwxr-xr-xto-wiki/wikiconv2.py7
4 files changed, 10 insertions, 7 deletions
diff --git a/source/text/scalc/01/05120000.xhp b/source/text/scalc/01/05120000.xhp
index 59a3b35d26..49faa3ab41 100644
--- a/source/text/scalc/01/05120000.xhp
+++ b/source/text/scalc/01/05120000.xhp
@@ -49,7 +49,6 @@
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id31494134" role="listitem">If you select <emph>Cell value is</emph>:</paragraph>
- <switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
<list type="unordered">
<listitem>
<paragraph xml-lang="en-US" id="par_id31494135" role="listitem">Select a condition in the drop down list for the format to be applied to the selected cells and enter the value.</paragraph>
@@ -64,7 +63,6 @@
<paragraph xml-lang="en-US" id="par_id31494138" role="listitem">In the <emph>Range</emph> field, define the range of cells concerned by the conditional formatting. Click on the <emph>Shrink</emph> button to minimize the dialog box. Click again on the button to come back to the dialog box once the range is selected.</paragraph>
</listitem>
</list>
- </default></switch>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id31494139" role="listitem">If you select <emph>Formula is</emph> as a reference, enter a cell reference.
diff --git a/source/text/simpress/guide/gluepoints.xhp b/source/text/simpress/guide/gluepoints.xhp
index 49975d3214..695e2a3a65 100644
--- a/source/text/simpress/guide/gluepoints.xhp
+++ b/source/text/simpress/guide/gluepoints.xhp
@@ -37,7 +37,7 @@
<listitem>
<paragraph role="paragraph" id="par_id091920080304108" xml-lang="en-US" l10n="NEW">Do one of the following to get existing glue points visible for all elements:</paragraph>
</listitem>
-<listitem><switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
+<listitem>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id0919200803041082" xml-lang="en-US" l10n="NEW">Click the <emph>Glue Point</emph> icon on the Drawing toolbar.</paragraph>
@@ -46,7 +46,7 @@
<paragraph role="paragraph" id="par_id0919200803041186" xml-lang="en-US" l10n="NEW">Choose <item type="menuitem">Edit - Glue Points</item>.</paragraph>
</listitem>
</list>
-</default></switch></listitem>
+</listitem>
<listitem>
<paragraph role="paragraph" id="par_id0919200803041160" xml-lang="en-US" l10n="NEW">Click the <emph>Insert Glue Point</emph> icon on the Gluepoints toolbar.</paragraph>
</listitem>
diff --git a/source/text/swriter/librelogo/LibreLogo.xhp b/source/text/swriter/librelogo/LibreLogo.xhp
index a81766e6a6..e131f0017c 100644
--- a/source/text/swriter/librelogo/LibreLogo.xhp
+++ b/source/text/swriter/librelogo/LibreLogo.xhp
@@ -59,7 +59,7 @@
<listitem>
<paragraph role="listitem" xml-lang="en-US" id="par_490">Program blocks and lists are different</paragraph>
</listitem>
- <listitem><switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
+ <listitem>
<list type="unordered">
<listitem>
<paragraph role="listitem" xml-lang="en-US" id="par_500">Program blocks need space or new line at parenthesization: REPEAT 10 [ FORWARD 10 LEFT 36 ]</paragraph>
@@ -68,7 +68,7 @@
<paragraph role="listitem" xml-lang="en-US" id="par_510">Lists need close parenthesization: POSITION [0, 0], and not POSITION [ 0, 0 ]</paragraph>
</listitem>
</list>
- </default></switch></listitem>
+ </listitem>
<listitem>
<paragraph role="listitem" xml-lang="en-US" id="par_520">1-line function declarations are not supported (TO and END need new lines).</paragraph>
</listitem>
diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 5796ffa51e..f6569b85e2 100755
--- a/to-wiki/wikiconv2.py
+++ b/to-wiki/wikiconv2.py
@@ -673,7 +673,12 @@ class ListItem(ElementBase):
for i in self.objects:
if linebreak:
text = text + '<br/>'
- text = text + i.get_all()
+ ti = i.get_all()
+ # when the object is another list (i.e. nested lists), only the first item
+ # gets the '#' sign in the front by the previous statement
+ # the below re.sub inserts the extra '#' for all additional items of the list
+ ti = re.sub(r'\n\s*#', '\n##', ti)
+ text = text + ti
linebreak = True
return text + postfix