[Libreoffice-commits] dev-tools.git: helpauthoring/Addons.xcu helpauthoring/HelpAuthoring
Yousuf Philips
philipz85 at hotmail.com
Thu Sep 10 01:19:07 PDT 2015
helpauthoring/Addons.xcu | 15 +++++++++------
helpauthoring/HelpAuthoring/_Main.xba | 15 +++++++++++++++
2 files changed, 24 insertions(+), 6 deletions(-)
New commits:
commit ab66694f39a4e550bf8d4e4e1d4ae635c9ea00ea
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Thu Sep 10 01:54:19 2015 +0400
Add ability to reload the active help document
Change-Id: I931478ba7f0ea78a312bb13c0a48679f3b45d96f
Reviewed-on: https://gerrit.libreoffice.org/18452
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/helpauthoring/Addons.xcu b/helpauthoring/Addons.xcu
index 13ee45e..07679f3 100644
--- a/helpauthoring/Addons.xcu
+++ b/helpauthoring/Addons.xcu
@@ -47,6 +47,15 @@
<value xml:lang="en-US">Open Help File</value>
</prop>
</node>
+ <node oor:name="m02" oor:op="replace">
+ <prop oor:name="URL" oor:type="xs:string">
+ <value>vnd.sun.star.script:HelpAuthoring._Main.ReloadXHP?language=Basic&location=application</value>
+ </prop>
+ <prop oor:name="Title" oor:type="xs:string">
+ <value/>
+ <value xml:lang="en-US">Reload File</value>
+ </prop>
+ </node>
<node oor:name="m05" oor:op="replace">
<prop oor:name="URL" oor:type="xs:string">
@@ -54,9 +63,6 @@
</prop>
</node>
<node oor:name="m06" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Paragraph Styles</value>
</prop>
@@ -112,9 +118,6 @@
</node>
</node>
<node oor:name="m07" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Character Styles</value>
</prop>
diff --git a/helpauthoring/HelpAuthoring/_Main.xba b/helpauthoring/HelpAuthoring/_Main.xba
index e12e9a2..9746c02 100644
--- a/helpauthoring/HelpAuthoring/_Main.xba
+++ b/helpauthoring/HelpAuthoring/_Main.xba
@@ -214,4 +214,19 @@ Dim FileProperties(1) As New com.sun.star.beans.PropertyValue
oFileDialog.Dispose()
End Sub
+Sub ReloadXHP
+ If not IsHelpFile Then
+ msgbox( strErr_NoHelpFile )
+ Exit Sub
+ End If
+
+ document = StarDesktop.CurrentComponent
+ Dim FileProperties(1) As New com.sun.star.beans.PropertyValue
+ FileProperties(0).Name = "FilterName"
+ FileProperties(0).Value ="XHP_Help"
+
+ path = document.URL
+ document.close(-1)
+ oDoc = StarDesktop.loadComponentFromURL(path, path, 0, FileProperties())
+End Sub
</script:module>
More information about the Libreoffice-commits
mailing list