Fix template path option

This commit is contained in:
Georgy Litvinov 2021-01-14 12:09:53 +01:00
parent 34b8e0ade3
commit feb2f7e5b9

View file

@ -1,7 +1,7 @@
<?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="Configuration" script:language="StarBasic" script:moduleType="normal">Public Const redactionExtensionName As String = &quot;cleanAndValidate&quot;
Public Const redactionExtensionVersion = &quot;0.9.21&quot;
Public Const redactionExtensionVersion = &quot;0.9.22&quot;
Function initRedactionConfiguration()
On Error Goto exceptionHandler
Dim regFactory As Object
@ -22,7 +22,7 @@ Function initRedactionConfiguration()
exceptionHandler:
Resume Next
On Error Goto exceptionHandler2
If Not propSetInfo.hasPropertyByName(&quot;complexity&quot;) Then
If Not propSetInfo.hasPropertyByName(&quot;defaultTemplate&quot;) Then
redactionProps.addProperty(&quot;defaultTemplate&quot;, 128, &quot;Статья.ott&quot;)
EndIf
exceptionHandler2:
@ -165,6 +165,7 @@ Sub setDeafultTemplate()
config.setPropertyValue(&quot;defaultTemplate&quot;,fileName)
Dim templatePath As String
templatePath = getTemplatePath()
MkDir(templatePath)
FileCopy(selectedTemplate, templatePath &amp; &quot;/&quot; &amp; fileName)
End Sub