Do not clean in read only documents
This commit is contained in:
parent
8116838758
commit
c7c164c553
6 changed files with 23 additions and 4 deletions
|
@ -1,12 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!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 mark58
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark59
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub cleanButton
|
Sub cleanButton
|
||||||
Dim config As Object
|
Dim config As Object
|
||||||
config = initRedactionConfiguration()
|
config = initRedactionConfiguration()
|
||||||
|
If ThisComponent.isReadonly Then
|
||||||
|
getTranslation("documentIsReadOnly")
|
||||||
|
Exit Sub
|
||||||
|
EndIf
|
||||||
If config.getPropertyValue("complexity") = "user" then
|
If config.getPropertyValue("complexity") = "user" then
|
||||||
quietStartDialog()
|
quietStartDialog()
|
||||||
Else
|
Else
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!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 = "cleanAndValidate"
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Configuration" script:language="StarBasic" script:moduleType="normal">Public Const redactionExtensionName As String = "cleanAndValidate"
|
||||||
Public Const redactionExtensionVersion = "0.7.17"
|
Public Const redactionExtensionVersion = "0.7.18"
|
||||||
Function initRedactionConfiguration()
|
Function initRedactionConfiguration()
|
||||||
On Error Goto exceptionHandler
|
On Error Goto exceptionHandler
|
||||||
Dim regFactory As Object
|
Dim regFactory As Object
|
||||||
|
|
|
@ -202,6 +202,9 @@ Function getRussian(identifier As String) As String
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "dialogRussianFixesIPH"
|
Case "dialogRussianFixesIPH"
|
||||||
getRussian = "Исправления для текстов на русском"
|
getRussian = "Исправления для текстов на русском"
|
||||||
|
Exit Function
|
||||||
|
Case "documentIsReadOnly"
|
||||||
|
getRussian = "Документ открыт только для чтения. Запуск чистки в данном режиме невозможен."
|
||||||
Exit Function
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getRussian = "Перевод не найден"
|
getRussian = "Перевод не найден"
|
||||||
|
@ -387,6 +390,9 @@ Function getEnglish(identifier As String) As String
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "dialogRussianFixesIPH"
|
Case "dialogRussianFixesIPH"
|
||||||
getEnglish = "Corrections for texts in Russian"
|
getEnglish = "Corrections for texts in Russian"
|
||||||
|
Exit Function
|
||||||
|
Case "documentIsReadOnly"
|
||||||
|
getEnglish = "The document is read-only. Cleaning cannot be started in this mode."
|
||||||
Exit Function
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getEnglish = "No translation"
|
getEnglish = "No translation"
|
||||||
|
@ -572,6 +578,9 @@ Function getCroatian(identifier As String) As String
|
||||||
Case "dialogRussianFixesIPH"
|
Case "dialogRussianFixesIPH"
|
||||||
getCroatian = "Ispravci za tekstove na ruskom"
|
getCroatian = "Ispravci za tekstove na ruskom"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "documentIsReadOnly"
|
||||||
|
getCroatian = "Dokument je samo za čitanje. Čišćenje nije moguće pokrenuti u ovom načinu rada."
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getCroatian = "No translation"
|
getCroatian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -756,6 +765,9 @@ Function getSerbian(identifier As String) As String
|
||||||
Case "dialogRussianFixesIPH"
|
Case "dialogRussianFixesIPH"
|
||||||
getSerbian = "Исправци за текстове на руском"
|
getSerbian = "Исправци за текстове на руском"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "documentIsReadOnly"
|
||||||
|
getSerbian = "Документ је само за читање. Чишћење се не може покренути у овом режиму."
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getSerbian = "No translation"
|
getSerbian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -940,6 +952,9 @@ Function getBosnian(identifier As String) As String
|
||||||
Case "dialogRussianFixesIPH"
|
Case "dialogRussianFixesIPH"
|
||||||
getBosnian = "Ispravci za tekstove na ruskom"
|
getBosnian = "Ispravci za tekstove na ruskom"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "documentIsReadOnly"
|
||||||
|
getBosnian = "Dokument je samo za čitanje. Čišćenje nije moguće pokrenuti u ovom načinu rada."
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getBosnian = "No translation"
|
getBosnian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
def releaseVersion = "0.7.17"
|
def releaseVersion = "0.7.18"
|
||||||
task oxt(type: Zip) {
|
task oxt(type: Zip) {
|
||||||
dependsOn = [ 'setVersion','setVersionInBasicCode' ]
|
dependsOn = [ 'setVersion','setVersionInBasicCode' ]
|
||||||
from './'
|
from './'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="pro.litvinovg.Redaction"/>
|
<identifier value="pro.litvinovg.Redaction"/>
|
||||||
<version value="0.7.17"/>
|
<version value="0.7.18"/>
|
||||||
<platform value="all"/>
|
<platform value="all"/>
|
||||||
<display-name>
|
<display-name>
|
||||||
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
|
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
|
||||||
|
|
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Reference in a new issue