From f0f6054bef3050c796fd5672a39d262f46eafbd4 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sat, 8 Feb 2020 18:16:31 +0100 Subject: [PATCH] Fixes for conversion --- IPHRedaction/Clean.xba | 20 ++++++++++++-------- description.xml | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/IPHRedaction/Clean.xba b/IPHRedaction/Clean.xba index 3c08a68..cb91cc0 100644 --- a/IPHRedaction/Clean.xba +++ b/IPHRedaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark12 +Sub mark13 End Sub @@ -117,14 +117,18 @@ Private Sub unicodeSymbolsConversion 'Basic Latin \u0020-\u007E 'Combining diacritical marks 0301 0304 0323 032e 0331 035f 'General Punctuation \u2000-\u206f + 'Latin Extended A \u0100-\u017f + '\u02bb Modifier Letter Turned Comma is in IPH Astra ' unicodeConversionEverywhere("[\u0020-\u007F]+",RAtts) - unicodeConversionEverywhere("[\u2100-\u214F,\u0020-\u007F,\u0080-\u00FF,\u0400-\u04FF,\u2000-\u206f,\u0301,\u0304,\u0323,\u032e,\u0331,\u035f]+",RAtts) + unicodeConversionEverywhere("[\u2100-\u214f,\u0020-\u007f,\u0080-\u00ff,\u0400-\u04ff,\u2000-\u206f,\u0301,\u0304,\u0323,\u032e,\u0331,\u035f,\u02bb,\u0100-\u017f]+",RAtts) 'Arabic Scheherazade + 'Arabic Presentation Forms-A fb50-fdff + 'Arabic Presentation Forms-B fe70-feff newFontName = "Scheherazade" RAtts(0).Value = newFontName RAtts(1).Value = newFontName RAtts(2).Value = newFontName - unicodeConversionEverywhere("[\u0600-\u06FF]+",RAtts) + unicodeConversionEverywhere("[\u0600-\u06ff,\ufb50-\ufdff,\ufe70-\ufeff]+",RAtts) 'Greek Tinos newFontName = "Tinos" @@ -133,7 +137,7 @@ Private Sub unicodeSymbolsConversion RAtts(2).Value = newFontName 'Greek and Coptic 0370—03FF 'Greek extended 1F00—1FFF - unicodeConversionEverywhere("[\u0370-\u03FF,\u1F00-\u1FFF]+",RAtts) + unicodeConversionEverywhere("[\u0370-\u03ff,\u1f00-\u1fff]+",RAtts) 'DejaVu Sans Mathematical operators @@ -142,7 +146,7 @@ Private Sub unicodeSymbolsConversion RAtts(1).Value = newFontName RAtts(2).Value = newFontName '\u2200-\u22FF Mathematical operators - unicodeConversionEverywhere("[\u2200-\u22FF]+",RAtts) + unicodeConversionEverywhere("[\u2200-\u22ff]+",RAtts) End Sub @@ -468,9 +472,9 @@ Sub setAttributesBySearchPattern(searchPattern As String,ReplAttributes, Optiona EndIf If replace then For i = LBound(ReplAttributes) To Ubound(ReplAttributes) - If oFound.getPropertySetInfo.hasPropertyByName(ReplAttributes(i).Name) Then + 'If oFound.getPropertySetInfo.hasPropertyByName(ReplAttributes(i).Name) Then oFound.SetPropertyValue(ReplAttributes(i).Name, ReplAttributes(i).Value) - EndIf + 'EndIf Next i EndIf oFound = ThisComponent.findNext(oFound.End, oSearch) @@ -1079,4 +1083,4 @@ Function getVersion getVersion=oProduct.getByName("ooSetupVersion") End Function - \ No newline at end of file + diff --git a/description.xml b/description.xml index b869496..5394c4f 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