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 (<bookmark branch="index">) </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 (<switch>/<switchline>)</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&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&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&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&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( "$[officename]" ) End Sub +Sub InsertSwitchOSParagraph + CR_before + GoUp(1) + SetParaStyle("hlp_aux_switch") + InsertTag("SWITCH_","<SWITCH select=""sys"">","hlp_aux_switch") + CR + + InsertCaseNow("WIN") + InsertCaseNow("UNIX") + InsertCaseNow("MAC") + + SetParaStyle("hlp_aux_switch") + InsertTag("DEFAULT_","<DEFAULT>","hlp_aux_switch") + CR + SetParaStyle("hlp_paragraph") + SetCharStyle("Default Style") + InsertText( "Default" ) + InsertNewParaData + CR + SetParaStyle("hlp_aux_switch") + InsertTag("_DEFAULT","</DEFAULT>","hlp_aux_switch") + CR + + SetParaStyle("hlp_aux_switch") + InsertTag("_SWITCH","</SWITCH>","hlp_aux_switch") + GoDown(1) +End Sub + +Sub InsertSwitchOSInline + InsertTag("SWITCHINLINE_","<SWITCHINLINE select=""sys"">","hlp_aux_switch") + + InsertCaseInlineNow("WIN") + InsertCaseInlineNow("UNIX") + InsertCaseInlineNow("MAC") + + InsertTag("DEFAULTINLINE_","<DEFAULTINLINE>") + SetCharStyle("Default Style") + InsertText( "Default" ) + InsertTag("_DEFAULTINLINE","</DEFAULTINLINE>") + + InsertTag("_SWITCHINLINE","</SWITCHINLINE>") + SetCharStyle("Default Style") + InsertText( " " ) +End Sub + +Sub InsertSwitchAppParagraph + CR_before + GoUp(1) + SetParaStyle("hlp_aux_switch") + InsertTag("SWITCH_","<SWITCH select=""appl"">","hlp_aux_switch") + CR + + InsertCaseNow("WRITER") + InsertCaseNow("CALC") + InsertCaseNow("IMPRESS") + InsertCaseNow("DRAW") + 'InsertCaseNow("MATH") + 'InsertCaseNow("BASIC") + 'InsertCaseNow("CHART") + + SetParaStyle("hlp_aux_switch") + InsertTag("DEFAULT_","<DEFAULT>","hlp_aux_switch") + CR + SetParaStyle("hlp_paragraph") + SetCharStyle("Default Style") + InsertText( "Default" ) + InsertNewParaData + CR + SetParaStyle("hlp_aux_switch") + InsertTag("_DEFAULT","</DEFAULT>","hlp_aux_switch") + CR + + SetParaStyle("hlp_aux_switch") + InsertTag("_SWITCH","</SWITCH>","hlp_aux_switch") + GoDown(1) +End Sub + +Sub InsertSwitchAppInline + InsertTag("SWITCHINLINE_","<SWITCHINLINE select=""appl"">","hlp_aux_switch") + + InsertCaseInlineNow("WRITER") + InsertCaseInlineNow("CALC") + InsertCaseInlineNow("IMPRESS") + InsertCaseInlineNow("DRAW") + 'InsertCaseInlineNow("MATH") + 'InsertCaseInlineNow("BASIC") + 'InsertCaseInlineNow("CHART") + + InsertTag("DEFAULTINLINE_","<DEFAULTINLINE>") + SetCharStyle("Default Style") + InsertText( "Default" ) + InsertTag("_DEFAULTINLINE","</DEFAULTINLINE>") + + InsertTag("_SWITCHINLINE","</SWITCHINLINE>") + SetCharStyle("Default Style") + InsertText( " " ) +End Sub + +Sub InsertCaseNow(sType As String) + SetParaStyle("hlp_aux_switch") + InsertTag("CASE_","<CASE select=""" + sType + """>","hlp_aux_switch") + CR + SetParaStyle("hlp_paragraph") + SetCharStyle("Default Style") + InsertText( sType ) + InsertNewParaData + CR + SetParaStyle("hlp_aux_switch") + InsertTag("_CASE","</CASE>","hlp_aux_switch") + CR +End Sub + +Sub InsertCaseInlineNow(sSelect As String) + InsertTag("CASEINLINE_","<CASEINLINE select="""+sSelect+""">") + SetCharStyle("Default Style") + InsertText( sSelect ) + InsertTag("_CASEINLINE","</CASEINLINE>") +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