diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index eb66848..c0cb24f 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark43 +Sub mark44 End Sub diff --git a/Redaction/Configuration.xba b/Redaction/Configuration.xba index 1e5cea4..48e0c9c 100644 --- a/Redaction/Configuration.xba +++ b/Redaction/Configuration.xba @@ -71,10 +71,13 @@ Private Sub quietStartDialog Dim buttonNameOk As String Dim buttonNameStop As String Dim buttonNameLoad As String + Dim dialogTitle As String description = getTranslation(lang,"startQuietCleaningDescription") buttonNameOk = getTranslation(lang,"buttonOk") buttonNameStop = getTranslation(lang,"buttonStop") buttonNameLoad = getTranslation(lang,"buttonLoad") + dialogTitle = getTranslation(lang,"quietStartCleaningTitle") + dialog.Title = dialogTitle dialog.getControl("Description").setText(description) dialog.getControl("buttonOk").Label = buttonNameOk dialog.getControl("buttonStop").Label = buttonNameStop @@ -102,14 +105,20 @@ Private Sub noStylesFileDialog lang = GetStarOfficeLocale().Language Dim description As String Dim buttonName As String + Dim dialogTitle As String + Dim buttonTemplateNotFoundSkip As String + dialogTitle = getTranslation(lang,"noStylesFileDialogTitle") description = getTranslation(lang,"noFileWithStylesFound") buttonName = getTranslation(lang,"buttonNameToSelectFileWithStyles") + buttonTemplateNotFoundSkip = getTranslation(lang,"buttonTemplateNotFoundSkip") + dialog.Title = dialogTitle dialog.getControl("Description").setText(description) dialog.getControl("FileSelection").Label = buttonName - dialog.setVisible(true) + dialog.getControl("buttonOk").Label = buttonTemplateNotFoundSkip + dialog.setVisible(true) Select Case dialog.Execute() Case 1 - setDeafultTemplate(selectedTemplate) + setDeafultTemplate() Case 0 End Select @@ -123,9 +132,10 @@ End Sub Sub setDeafultTemplate() Dim selectedTemplate As String selectedTemplate = getFileURLDialog() - If IsEmpty(selectedTemplate) Then - Exit sub - EndIf + oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" ) + If NOT (oSimpleFileAccess.exists( selectedTemplate ) AND NOT oSimpleFileAccess.isFolder( selectedTemplate ) ) Then + Exit sub + End If Dim fileName As String Dim config As Object config = initRedactionConfiguration() diff --git a/Redaction/NoStyleFile.xdl b/Redaction/NoStyleFile.xdl index 49a47f4..c4d6d8e 100644 --- a/Redaction/NoStyleFile.xdl +++ b/Redaction/NoStyleFile.xdl @@ -2,9 +2,9 @@ - + \ No newline at end of file diff --git a/Redaction/StartQuietCleaning.xdl b/Redaction/StartQuietCleaning.xdl index 1534978..b091f5c 100644 --- a/Redaction/StartQuietCleaning.xdl +++ b/Redaction/StartQuietCleaning.xdl @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/Redaction/Translations.xba b/Redaction/Translations.xba index d708934..0c54fed 100644 --- a/Redaction/Translations.xba +++ b/Redaction/Translations.xba @@ -23,6 +23,15 @@ Function getRussian(identifier As String) As String Case "buttonOk" getRussian = "Да" Exit Function + Case "quietStartCleaningTitle" + getRussian = "Подтверждение запуска чистки" + Exit Function + Case "noStylesFileDialogTitle" + getRussian = "Файл со стилями не найден" + Exit Function + Case "buttonTemplateNotFoundSkip" + getRussian = "Продолжить" + Exit Function Case "buttonStop" getRussian = "Нет" Exit Function @@ -46,6 +55,15 @@ Function getEnglish(identifier As String) As String Case "startQuietCleaningDescription" getEnglish = "Do you want to start document cleaning?" & chr(10) & "You can choose template with styles to load them in process of the cleaning." Exit Function + Case "noStylesFileDialogTitle" + getEnglish = "Template file not found" + Exit Function + Case "quietStartCleaningTitle" + getEnglish = "Confirmation" + Exit Function + Case "buttonTemplateNotFoundSkip" + getRussian = "Proceed" + Exit Function Case "buttonOk" getEnglish = "Ok" Exit Function diff --git a/description.xml b/description.xml index 33bce08..64b92d7 100644 --- a/description.xml +++ b/description.xml @@ -3,7 +3,7 @@ xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> - + Cleaning and validation documents for publishing in html and epub with pagination