Skip to content

Commit

Permalink
Prepare pre-release v1.1.0
Browse files Browse the repository at this point in the history
Make the help function os independent.

TODO: Create help texts; update the documentation, and provide sample template documents.
  • Loading branch information
peter88213 committed Apr 6, 2021
1 parent c201039 commit 4d082e2
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 411 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/src/__pycache__/
/tools/__pycache__/
/test/wd/
*.pyc
Binary file renamed StyleSwitcher-0.1.6.oxt → StyleSwitcher-1.1.0.oxt
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions StyleSwitcher-A.update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
xmlns:dep="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<identifier value="org.peter88213.StyleSwitcher" />
<version value="0.1.6" />
<version value="1.1.0" />
<dependencies>
<OpenOffice.org-minimal-version value="4.0" dep:name="Apache OpenOffice 4.0 minimum, or more recent" />
</dependencies>
<update-download>
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-A-0.1.6.oxt" />
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-A-1.1.0.oxt" />
</update-download>
<publisher>
<name lang="en" xlink:href="https://github.com/peter88213">Peter Triesberger</name>
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions StyleSwitcher-L.update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
xmlns:l="http://libreoffice.org/extensions/description/2011"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<identifier value="org.peter88213.StyleSwitcher" />
<version value="0.1.6" />
<version value="1.1.0" />
<dependencies>
<l:LibreOffice-minimal-version value="5.0" dep:name="LibreOffice 5.0 minimum, or more recent" />
</dependencies>
<update-download>
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-L-0.1.6.oxt" />
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-L-1.1.0.oxt" />
</update-download>
<publisher>
<name lang="en" xlink:href="https://github.com/peter88213">Peter Triesberger</name>
Expand Down
4 changes: 2 additions & 2 deletions StyleSwitcher.update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
xmlns:dep="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<identifier value="org.peter88213.StyleSwitcher" />
<version value="0.1.6" />
<version value="1.1.0" />
<dependencies>
<OpenOffice.org-minimal-version value="3.1" dep:name="OpenOffice.org 3.1 minimum, or more recent" />
</dependencies>
<update-download>
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-0.1.6.oxt" />
<src xlink:href="https://raw.githubusercontent.com/peter88213/StyleSwitcher/master/StyleSwitcher-1.1.0.oxt" />
</update-download>
<publisher>
<name lang="en" xlink:href="https://github.com/peter88213">Peter Triesberger</name>
Expand Down
Binary file modified oxt/StyleSwitcher.odt
Binary file not shown.
47 changes: 18 additions & 29 deletions oxt/StyleSwitcher/help.xba
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="help" script:language="StarBasic">REM ***** BASIC *****

Sub show_help
Dim file_no As Integer
Dim script_dir, batch_file, help_file As String

oPackageInfoProvider = GetDefaultContext.getByName(&quot;/singletons/com.sun.star.deployment.PackageInformationProvider&quot;)
sPackageLocation = oPackageInfoProvider.getPackageLocation(&quot;org.peter88213.StyleSwitcher&quot;)
script_dir = ConvertFromURL(sPackageLocation)
batch_file = script_dir + &quot;\help\help.bat&quot;

If NOT FileExists(batch_file) Then
help_file = ConvertFromURL(sPackageLocation + &quot;/help/help-en.html&quot;)
file_no = FreeFile
Open batch_file For Output As #file_no
Print #file_no, &quot;cd &quot; + script_dir + &quot;\help&quot;
Print #file_no, help_file
Close #file_no
End If

batch_file = ConvertToURL(batch_file)

shell(batch_file, 2, &quot;&quot;, false)

End Sub


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="help" script:language="StarBasic">REM ***** BASIC *****

&apos; Thanks to Bernard Marcelly for his instruction how to open a web page
&apos; See: https://forum.openoffice.org/en/forum/viewtopic.php?f=20&amp;t=70721

Sub show_help
Dim launcher As Object
Dim aWebPage As String
oPackageInfoProvider = GetDefaultContext.getByName(&quot;/singletons/com.sun.star.deployment.PackageInformationProvider&quot;)
sPackageLocation = oPackageInfoProvider.getPackageLocation(&quot;org.peter88213.StyleSwitcher&quot;)
launcher = CreateUnoService(&quot;com.sun.star.system.SystemShellExecute&quot;)
aWebPage = sPackageLocation + &quot;/help/help-en.html&quot;
launcher.execute(aWebPage, &quot;&quot;, 0)
End Sub


</script:module>
133 changes: 0 additions & 133 deletions tools/Install.bat

This file was deleted.

134 changes: 0 additions & 134 deletions tools/Uninstall.bat

This file was deleted.

4 changes: 2 additions & 2 deletions tools/build.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="build" basedir=".">
<target name="collect setup">
<target name="publish">
<exec executable="cmd">
<arg value="/c"/>
<arg value="cs.bat"/>
<arg value="publish.bat"/>
</exec>
</target>
</project>
Loading

0 comments on commit 4d082e2

Please sign in to comment.