feat: predefined templates provided
This commit is contained in:
parent
65dee0354c
commit
52e00175a2
12 changed files with 200 additions and 54 deletions
|
@ -1,6 +1,6 @@
|
|||
<?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="Clean" script:language="StarBasic">Sub mark83
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark85
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -13,6 +13,9 @@ Sub cleanButton
|
|||
MsgBox(getTranslation("documentIsReadOnly"))
|
||||
Exit Sub
|
||||
EndIf
|
||||
If config.getPropertyValue("predefined_template") = "false" Then
|
||||
configureStyleFileDialog()
|
||||
EndIf
|
||||
If config.getPropertyValue("complexity") = "user" then
|
||||
quietStartDialog()
|
||||
Else
|
||||
|
@ -531,17 +534,17 @@ Private Sub loadArticleStyles
|
|||
Dim dispatcher As Object
|
||||
Dim filePath As String
|
||||
Dim fileTest As Object
|
||||
Dim fileName As String
|
||||
Dim predefined As String
|
||||
Dim aArgs(0) As New com.sun.star.beans.PropertyValue
|
||||
Dim config As Object
|
||||
config = initRedactionConfiguration()
|
||||
fileName = config.getPropertyValue("defaultTemplate")
|
||||
filePath = getTemplatePath() & "/" & fileName
|
||||
predefined = config.getPropertyValue("predefined_template")
|
||||
filePath = getTemplateFile(predefined)
|
||||
fileTest = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
|
||||
If NOT fileTest.exists(filePath) Then
|
||||
noStylesFileDialog()
|
||||
fileName = config.getPropertyValue("defaultTemplate")
|
||||
filePath = getTemplatePath() & "/" & fileName
|
||||
configureStyleFileDialog()
|
||||
predefined = config.getPropertyValue("predefined_template")
|
||||
filePath = getTemplateFile(predefined)
|
||||
If NOT fileTest.exists(filePath) Then
|
||||
'MsgBox "Файл стилей " & fileName & " не добавлен в Мои шаблоны. Не могу загрузить стили в текущий файл."
|
||||
Exit Sub
|
||||
|
@ -2097,4 +2100,4 @@ Function fixColoredBackgroundInDoc() As Boolean
|
|||
EndIf
|
||||
|
||||
End Function
|
||||
</script:module>
|
||||
</script:module>
|
Loading…
Add table
Add a link
Reference in a new issue