helpauthoring/Addons.xcu                      |   40 ++++++++
 helpauthoring/HelpAuthoring/OtherElements.xba |  119 ++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 1 deletion(-)

New commits:
commit 01ef2e43cc66ad43b5fa06bc22eb9981b60de0fb
Author: Yousuf Philips <philip...@hotmail.com>
Date:   Fri Sep 11 10:24:26 2015 +0400

    Insert switch and switchinline tags
    
    Change-Id: I7b79721c02856902a6ceb8313726d6b3f19d3dc1
    Reviewed-on: https://gerrit.libreoffice.org/18486
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/helpauthoring/Addons.xcu b/helpauthoring/Addons.xcu
index fb092ce..6974509 100644
--- a/helpauthoring/Addons.xcu
+++ b/helpauthoring/Addons.xcu
@@ -264,7 +264,45 @@
                             <value xml:lang="en-US">Insert Index Entry 
(&lt;bookmark branch=&quot;index&quot;&gt;) </value>
                         </prop>
                     </node>
-                    <!-- Switch entry should go here -->
+                    <node oor:name="m35" oor:op="replace">
+                        <prop oor:name="Title" oor:type="xs:string">
+                            <value xml:lang="en-US">Insert Switch 
(&lt;switch&gt;/&lt;switchline&gt;)</value>
+                        </prop>
+                        <node oor:name="Submenu">
+                            <node oor:name="m00" oor:op="replace">
+                                <prop oor:name="URL" oor:type="xs:string">
+                                    
<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSwitchOSParagraph?language=Basic&amp;location=application</value>
+                                </prop>
+                                <prop oor:name="Title" oor:type="xs:string">
+                                    <value xml:lang="en-US">Insert Switch OS 
Paragraph</value>
+                                </prop>
+                            </node>
+                            <node oor:name="m01" oor:op="replace">
+                                <prop oor:name="URL" oor:type="xs:string">
+                                    
<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSwitchOSInline?language=Basic&amp;location=application</value>
+                                </prop>
+                                <prop oor:name="Title" oor:type="xs:string">
+                                    <value xml:lang="en-US">Insert Switch OS 
Inline</value>
+                                </prop>
+                            </node>
+                            <node oor:name="m02" oor:op="replace">
+                                <prop oor:name="URL" oor:type="xs:string">
+                                    
<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSwitchAppParagraph?language=Basic&amp;location=application</value>
+                                </prop>
+                                <prop oor:name="Title" oor:type="xs:string">
+                                    <value xml:lang="en-US">Insert Switch App 
Paragraph</value>
+                                </prop>
+                            </node>
+                            <node oor:name="m03" oor:op="replace">
+                                <prop oor:name="URL" oor:type="xs:string">
+                                    
<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSwitchAppInline?language=Basic&amp;location=application</value>
+                                </prop>
+                                <prop oor:name="Title" oor:type="xs:string">
+                                    <value xml:lang="en-US">Insert Switch App 
Inline</value>
+                                </prop>
+                            </node>
+                        </node>
+                    </node>
 
                     <!-- Insert visible objects/elements -->
                     <node oor:name="m50" oor:op="replace">
diff --git a/helpauthoring/HelpAuthoring/OtherElements.xba 
b/helpauthoring/HelpAuthoring/OtherElements.xba
index 866a3ce..e718ac2 100644
--- a/helpauthoring/HelpAuthoring/OtherElements.xba
+++ b/helpauthoring/HelpAuthoring/OtherElements.xba
@@ -61,6 +61,125 @@ Sub InsertOfficeName
        InsertText( &quot;$[officename]&quot; )
 End Sub
 
+Sub InsertSwitchOSParagraph
+       CR_before
+       GoUp(1)
+       SetParaStyle(&quot;hlp_aux_switch&quot;)
+       InsertTag(&quot;SWITCH_&quot;,&quot;&lt;SWITCH 
select=&quot;&quot;sys&quot;&quot;&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+
+       InsertCaseNow(&quot;WIN&quot;)
+       InsertCaseNow(&quot;UNIX&quot;)
+       InsertCaseNow(&quot;MAC&quot;)
+
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;DEFAULT_&quot;,&quot;&lt;DEFAULT&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+       SetParaStyle(&quot;hlp_paragraph&quot;)
+       SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot;Default&quot; )
+    InsertNewParaData
+    CR
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;_DEFAULT&quot;,&quot;&lt;/DEFAULT&gt;&quot;,&quot;hlp_aux_switch&quot;)
+    CR
+
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;_SWITCH&quot;,&quot;&lt;/SWITCH&gt;&quot;,&quot;hlp_aux_switch&quot;)
+    GoDown(1)
+End Sub
+
+Sub InsertSwitchOSInline
+       InsertTag(&quot;SWITCHINLINE_&quot;,&quot;&lt;SWITCHINLINE 
select=&quot;&quot;sys&quot;&quot;&gt;&quot;,&quot;hlp_aux_switch&quot;)
+
+       InsertCaseInlineNow(&quot;WIN&quot;)
+       InsertCaseInlineNow(&quot;UNIX&quot;)
+       InsertCaseInlineNow(&quot;MAC&quot;)
+
+    InsertTag(&quot;DEFAULTINLINE_&quot;,&quot;&lt;DEFAULTINLINE&gt;&quot;)
+    SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot;Default&quot; )
+    InsertTag(&quot;_DEFAULTINLINE&quot;,&quot;&lt;/DEFAULTINLINE&gt;&quot;)
+
+    InsertTag(&quot;_SWITCHINLINE&quot;,&quot;&lt;/SWITCHINLINE&gt;&quot;)
+    SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot; &quot; )
+End Sub
+
+Sub InsertSwitchAppParagraph
+       CR_before
+       GoUp(1)
+       SetParaStyle(&quot;hlp_aux_switch&quot;)
+       InsertTag(&quot;SWITCH_&quot;,&quot;&lt;SWITCH 
select=&quot;&quot;appl&quot;&quot;&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+
+       InsertCaseNow(&quot;WRITER&quot;)
+       InsertCaseNow(&quot;CALC&quot;)
+       InsertCaseNow(&quot;IMPRESS&quot;)
+       InsertCaseNow(&quot;DRAW&quot;)
+       &apos;InsertCaseNow(&quot;MATH&quot;)
+       &apos;InsertCaseNow(&quot;BASIC&quot;)
+       &apos;InsertCaseNow(&quot;CHART&quot;)
+
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;DEFAULT_&quot;,&quot;&lt;DEFAULT&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+       SetParaStyle(&quot;hlp_paragraph&quot;)
+       SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot;Default&quot; )
+    InsertNewParaData
+    CR
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;_DEFAULT&quot;,&quot;&lt;/DEFAULT&gt;&quot;,&quot;hlp_aux_switch&quot;)
+    CR
+
+    SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;_SWITCH&quot;,&quot;&lt;/SWITCH&gt;&quot;,&quot;hlp_aux_switch&quot;)
+    GoDown(1)
+End Sub
+
+Sub InsertSwitchAppInline
+       InsertTag(&quot;SWITCHINLINE_&quot;,&quot;&lt;SWITCHINLINE 
select=&quot;&quot;appl&quot;&quot;&gt;&quot;,&quot;hlp_aux_switch&quot;)
+
+       InsertCaseInlineNow(&quot;WRITER&quot;)
+       InsertCaseInlineNow(&quot;CALC&quot;)
+       InsertCaseInlineNow(&quot;IMPRESS&quot;)
+       InsertCaseInlineNow(&quot;DRAW&quot;)
+       &apos;InsertCaseInlineNow(&quot;MATH&quot;)
+       &apos;InsertCaseInlineNow(&quot;BASIC&quot;)
+       &apos;InsertCaseInlineNow(&quot;CHART&quot;)
+
+    InsertTag(&quot;DEFAULTINLINE_&quot;,&quot;&lt;DEFAULTINLINE&gt;&quot;)
+    SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot;Default&quot; )
+    InsertTag(&quot;_DEFAULTINLINE&quot;,&quot;&lt;/DEFAULTINLINE&gt;&quot;)
+
+    InsertTag(&quot;_SWITCHINLINE&quot;,&quot;&lt;/SWITCHINLINE&gt;&quot;)
+    SetCharStyle(&quot;Default Style&quot;)
+    InsertText( &quot; &quot; )
+End Sub
+
+Sub InsertCaseNow(sType As String)
+       SetParaStyle(&quot;hlp_aux_switch&quot;)
+       InsertTag(&quot;CASE_&quot;,&quot;&lt;CASE select=&quot;&quot;&quot; + 
sType + &quot;&quot;&quot;&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+       SetParaStyle(&quot;hlp_paragraph&quot;)
+       SetCharStyle(&quot;Default Style&quot;)
+    InsertText( sType )
+    InsertNewParaData
+    CR
+       SetParaStyle(&quot;hlp_aux_switch&quot;)
+    
InsertTag(&quot;_CASE&quot;,&quot;&lt;/CASE&gt;&quot;,&quot;hlp_aux_switch&quot;)
+       CR
+End Sub
+
+Sub InsertCaseInlineNow(sSelect As String)
+       InsertTag(&quot;CASEINLINE_&quot;,&quot;&lt;CASEINLINE 
select=&quot;&quot;&quot;+sSelect+&quot;&quot;&quot;&gt;&quot;)
+       SetCharStyle(&quot;Default Style&quot;)
+       InsertText( sSelect )
+    InsertTag(&quot;_CASEINLINE&quot;,&quot;&lt;/CASEINLINE&gt;&quot;)
+End Sub
+
 Sub InsertInlineGraphic
     If not IsHelpFile Then
         msgbox(strErr_NoHelpFile)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to