Added on document load event

This commit is contained in:
Georgy Litvinov 2020-09-08 16:41:08 +02:00
parent 8a99a25f43
commit 9a72d7d7e0
4 changed files with 26 additions and 0 deletions

12
Events.xcu Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Events" oor:package="org.openoffice.Office">
<node oor:name="ApplicationEvents">
<node oor:name="Bindings">
<node oor:name="OnStartApp" oor:op="replace">
<prop oor:name="BindingURL" oor:type="xs:string">
<value>vnd.sun.star.script:Standard.Module1.Main?language=Basic&amp;location=application</value>
</prop>
</node>
</node>
</node>
</oor:component-data>

View file

@ -2,5 +2,6 @@
<manifest:manifest> <manifest:manifest>
<manifest:file-entry manifest:full-path="ePublishing/" manifest:media-type="application/vnd.sun.star.basic-library"/> <manifest:file-entry manifest:full-path="ePublishing/" manifest:media-type="application/vnd.sun.star.basic-library"/>
<manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/> <manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry manifest:full-path="Events.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry manifest:full-path="Office/UI/WriterWindowState.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/> <manifest:file-entry manifest:full-path="Office/UI/WriterWindowState.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
</manifest:manifest> </manifest:manifest>

12
ePublishing/Events.xba Normal file
View file

@ -0,0 +1,12 @@
<?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="Events" script:language="StarBasic" script:moduleType="normal">Sub execOnDocumentLoad
Dim fixCompatibilityOption As Boolean
fixCompatibilityOption = true
If fixCompatibilityOption Then
Dim oDocSettings As Object
oDocSettings = ThisComponent.createInstance( &quot;com.sun.star.document.Settings&quot; )
oDocSettings.setPropertyValue(&quot;AddParaSpacingToTableCells&quot;, false)
EndIf
End Sub
</script:module>

View file

@ -11,4 +11,5 @@
<library:element library:name="MakeUp"/> <library:element library:name="MakeUp"/>
<library:element library:name="PageStyles"/> <library:element library:name="PageStyles"/>
<library:element library:name="Translations"/> <library:element library:name="Translations"/>
<library:element library:name="Events"/>
</library:library> </library:library>