From afef3250b1b8813252c3c97c65b88c879e753567 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 17 Apr 2020 20:35:40 +0200 Subject: [PATCH] Bugfix --- Redaction/Clean.xba | 9 ++++++--- cleanandvalidate.update.xml | 4 ++-- description.xml | 2 +- releasenotes.txt | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index 8703d6f..5620b00 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark39 +Sub mark40 End Sub @@ -646,6 +646,8 @@ Private Sub cleanFormatting removeDirectFormatting() + saveAndreload() + convertUserFieldsToFormatting End Sub @@ -1328,9 +1330,10 @@ Private Sub convertFormatToUserFields(identifier As String, styleNames, styleVal If Len(found.String) <> 0 Then insertUserField(found.End,rightField & i,"") insertUserField(found.start,leftField & i,"") + i = i + 1 EndIf found = Thiscomponent.findNext(found.End, SDesc) - i = i + 1 + Loop End Sub @@ -1353,6 +1356,7 @@ Private Sub convertUserFieldsToFormat(identifier As String, styleNames , styleVa leftFieldName = "com.sun.star.text.FieldMaster.User" & "." & "left" & identifier & i rightFieldName = "com.sun.star.text.FieldMaster.User" & "." & "right" & identifier & i If oMasters.hasByName(leftFieldName) AND oMasters.hasByName(rightFieldName) Then + i=i+1 leftFieldMaster = oMasters.getByName(leftFieldName) leftField = leftFieldMaster.DependentTextFields(0) leftAnchor = leftField.getAnchor() @@ -1367,7 +1371,6 @@ Private Sub convertUserFieldsToFormat(identifier As String, styleNames , styleVa leftFieldMaster.dispose() rightField.dispose() rightFieldMaster.dispose() - i=i+1 Else Exit sub EndIf diff --git a/cleanandvalidate.update.xml b/cleanandvalidate.update.xml index a32be5e..25a2c19 100644 --- a/cleanandvalidate.update.xml +++ b/cleanandvalidate.update.xml @@ -2,9 +2,9 @@ - + - + diff --git a/description.xml b/description.xml index e96ac94..6494fc5 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 diff --git a/releasenotes.txt b/releasenotes.txt index 5fbca6f..c89e18a 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -1,3 +1,4 @@ +0.6.4 Bugfix for latest format cleaning with fields 0.6.3 Update configuration added 0.6.2 Remove all macros from document 0.6.1 Cleaning with user fields