Compare commits

..

160 commits

Author SHA1 Message Date
1d95cee96c
chore: push new version 2021-12-19 17:11:47 +01:00
4d70244041 chore: new version 2021-12-19 17:10:35 +01:00
5e9a36bbfd
fix: improved template 2021-12-19 17:10:18 +01:00
7e8fd76cb3 Fix diacritic characters combination 2021-10-29 00:51:03 +02:00
3123de95c8 Fix for prev commit 2021-10-28 23:38:03 +02:00
8bef4474ae Fix diacritic characters 2021-10-28 20:54:54 +02:00
907c483775 Push new version 2021-10-25 21:08:07 +02:00
6100d5d40e chore: push new version 2021-10-25 16:14:18 +02:00
535e91d860 feat: added elenph article template 2021-10-20 15:50:37 +02:00
c0ecae410c Push new version 2021-10-05 14:02:45 +02:00
0736f72257 Configured article templates 2021-10-04 15:31:10 +02:00
2fa3ce3c86 feat: new template 2021-09-13 19:51:34 +02:00
fd074a02ab new release 2021-09-13 19:51:11 +02:00
c1d12fb739 fix: regexps for requent mistakes 2021-09-13 19:12:25 +02:00
bbe0157ea2 fix: missed configuration for prev commit 2021-08-29 17:05:55 +02:00
4c4b9221df feat: more templates added 2021-08-29 17:01:22 +02:00
d5b3b4c9e8 fix: Mistake in english license text 2021-08-03 21:08:25 +02:00
9e5a5efa59 fix: fixed expert cleaning dialog wrong variable 2021-08-03 21:05:24 +02:00
003e1d4033 feat: Added selected template info on cleaning dialogs 2021-08-02 12:27:23 +02:00
c98848aae4 feat: improved icons 2021-08-02 11:39:37 +02:00
0433a8423f fix: Configured dialogs, improved translations for prev commit 2021-07-29 12:23:25 +02:00
52e00175a2 feat: predefined templates provided 2021-07-29 11:43:13 +02:00
65dee0354c feat: added journal article tempates 2021-07-26 15:33:33 +02:00
d0bba1db42 Push new version 2021-07-26 12:58:33 +02:00
17dd694249 Fixed typo 2021-06-13 11:30:56 +02:00
e06f55036f Added info to release notes 2021-06-09 11:44:47 +02:00
4fb5b3ccee new version 2021-06-09 11:43:14 +02:00
c06cdfc25b Added option to remove all colored text backgrounds 2021-06-09 11:42:55 +02:00
6a0bc8412e Push new version 2021-06-09 10:28:20 +02:00
ce738866ec Replaced some reports with navigatable problems 2021-06-07 15:41:18 +02:00
cd9266e83d Replaced graphics report with navigator 2021-06-07 14:27:39 +02:00
962a6fe83f New version 2021-06-07 12:06:53 +02:00
7e77039620 Replaces footnote signs report with navigated report 2021-06-07 12:06:27 +02:00
42682e4331 Use arrays as input for navigator dialog 2021-06-07 01:49:50 +02:00
3d07310e8a Show bad characters not one by one, but in excerpts 2021-06-06 22:26:53 +02:00
b7774aecfe new version 2021-06-06 21:52:28 +02:00
015a1ff42c Replace tracking chages view for bad symbols with navigator 2021-06-06 21:51:13 +02:00
7c5aadcaad Added check and clean strategy for broken paragraph setting charBackTransparent 2021-06-06 13:15:27 +02:00
07ae3e7d9c New version 2021-06-04 22:34:55 +02:00
d7924af005 New version 2021-06-04 22:28:41 +02:00
fae0f0b494 Added check for colored text areas 2021-06-04 22:28:27 +02:00
9846e2933c Added navigator dialog 2021-06-04 20:42:13 +02:00
2395f816e6 Push new version 2021-05-29 14:36:11 +02:00
48b81a64d2 Fixed numberings validation 2021-05-29 14:32:18 +02:00
32518cec1e Push new version 2021-05-20 16:11:04 +02:00
a488a9b019 Set Standard for all headings' numeration character styles 2021-05-06 16:08:21 +02:00
c7c25f84c0 New version 2021-04-30 14:36:41 +02:00
69f18b24c1 Added option for fonts to char styles conversion 2021-04-30 14:13:32 +02:00
717eccdc4a Convert arabic,greek and chinese fonts with punctuation and spaces 2021-04-30 13:55:27 +02:00
90740a0da2 Push new version 2021-02-05 11:31:51 +01:00
68d163faf3 New version 2021-02-01 11:35:58 +01:00
4245038966 Fix for prev commit 2021-02-01 11:35:27 +01:00
af0c775dd2 Added hyphen replacement in cleaning advanced mode 2021-02-01 10:30:08 +01:00
d9b458210a Added line length limit to subscript and superscript for cleaning 2021-01-23 20:36:09 +01:00
7694a8911a New version 2021-01-15 20:11:22 +01:00
31ae769470 Wait for 1 sec after document load as events doesn't work well. 2021-01-15 20:03:04 +01:00
e929de14f0 Added trigrams conversion to Dejavu Sans 2021-01-15 14:13:20 +01:00
f9b1298719 New version 2021-01-14 12:35:13 +01:00
8e2ff1245d New version 2021-01-14 12:10:55 +01:00
feb2f7e5b9 Fix template path option 2021-01-14 12:09:53 +01:00
34b8e0ade3 Push new version 2021-01-14 11:50:50 +01:00
c2fcc618e9 Push new version 2021-01-12 01:14:27 +01:00
0829f73593 Added info about release changes 2021-01-12 01:11:47 +01:00
6fc788ea7d New version 2021-01-12 01:08:27 +01:00
87fcbbbdef Reset chapters numbering settings 2021-01-12 01:07:00 +01:00
857267ba75 Push updates 2020-12-15 13:15:54 +01:00
72d576dd79 Do not remove space before Left Single Quotation Mark 2020-12-15 13:14:28 +01:00
f032af4b27 push updates 2020-12-14 18:28:06 +01:00
df5f2d6a43 New version 2020-12-14 18:26:56 +01:00
c0af554240 Fixes for WL conversion 2020-12-14 18:26:35 +01:00
3452ffd219 New version 2020-12-14 18:24:50 +01:00
bd840a6499 Fixed status indicator on cleaning and disabled fixing hyphen between numbers 2020-12-14 12:39:13 +01:00
54aea6994a Push new version 2020-12-09 12:01:57 +01:00
c127f19dbb New version 2020-12-09 12:00:32 +01:00
9a412e73b9 Moved doi check to extended cleaning 2020-12-09 12:00:05 +01:00
b73e2b2caf push new version 2020-12-08 20:55:39 +01:00
7e2f176657 New version 2020-12-08 20:54:05 +01:00
ed5c725e46 Replace DOI with correct characters 2020-12-08 20:53:12 +01:00
a868571c52 Push new version 2020-12-08 15:54:07 +01:00
920a855605 Removed ? from DOI bad characters check 2020-12-08 15:52:27 +01:00
9d543cec75 Push new version 2020-12-08 15:07:09 +01:00
209fe2ecae New version 2020-12-08 15:05:55 +01:00
400ee669ef Search case sensitive at validation. Related to DOI search 2020-12-08 15:05:37 +01:00
393116fbf6 Version's changes 2020-12-08 14:54:38 +01:00
b5b4fde2a7 Push version 2020-12-08 14:54:24 +01:00
b5e319b5b3 Added check for bad characters in DOI 2020-12-08 14:51:19 +01:00
84dfebf3f6 Removed version from build config 2020-12-08 13:41:47 +01:00
c33463e801 Added version file 2020-12-08 13:41:21 +01:00
553740f31c New version 2020-12-08 13:41:08 +01:00
a1ae7e6e19 Checks to skip DOI 2020-12-08 13:35:23 +01:00
9906a06f31 New version 2020-11-30 11:51:09 +01:00
cc17c0f88b New version 2020-11-08 15:09:11 +01:00
d8c615a421 New version 2020-11-08 15:08:56 +01:00
09cb1f1d90 Check extension properties on config initialization 2020-11-08 15:08:22 +01:00
da680a506d Added minus sign to frequent mistakes regexps 2020-11-08 15:06:54 +01:00
9171e2e850 Fixed encoding on Windows 2020-11-07 22:25:12 +01:00
99d3a237d8 New version 2020-11-07 21:27:02 +01:00
90352a2110 Added more info about cleaning environment 2020-11-07 21:20:08 +01:00
876008a5c5 Fix conversion to hex in ODG report macro 2020-11-07 20:27:10 +01:00
ef1fdec3ac New version 2020-11-05 09:37:23 +01:00
42ed0a21ee Added two Symbol conversion chars and fixed reload macro 2020-11-05 09:37:01 +01:00
12f7f4ab34 Modified release notes 2020-10-26 12:54:04 +01:00
57ca505119 New version vars 2020-09-24 10:41:41 +02:00
9b7982da1a push new version 2020-09-24 10:40:52 +02:00
11f2eb17b8 Added checks for grouped draw elements 2020-07-26 12:48:34 +02:00
1449c9d450 Check for grouped elements for font reports 2020-07-26 12:46:10 +02:00
ba5fc11a2e Push 0.9.3 2020-07-26 11:23:26 +02:00
b5cc51f320 New version 2020-07-26 11:22:00 +02:00
291674982b Fix font report 2020-07-26 11:21:47 +02:00
435d010536 Push new version 2020-07-16 11:39:48 +02:00
c1253d1c86 Report icon added 2020-07-12 17:04:08 +02:00
7ab49f99e3 Font symbols report 2020-07-12 16:34:42 +02:00
81ea41e5c9 Font report button added 2020-07-12 15:09:38 +02:00
558859da3e Analyze PDF 2020-07-12 14:55:40 +02:00
82e7e7df9a Save cleaned version 2020-07-12 14:54:28 +02:00
120328a506 push version 2020-07-06 17:43:57 +02:00
a1d7e02b3c New version 2020-07-06 12:15:53 +02:00
a681c88c11 Added translation 2020-07-06 12:15:06 +02:00
dccb789c16 Added new info to release notes 2020-07-06 11:49:57 +02:00
9dd59609c1 validation status indicator 2020-07-06 11:49:35 +02:00
e5244b8259 Added check for headings in tables 2020-07-06 11:39:01 +02:00
15a5bd6f0d Added check for headings in footers and headers 2020-07-06 11:06:41 +02:00
6059460ced Added check for sections in tables 2020-07-06 09:43:46 +02:00
6c42e2b6b3 push version 2020-07-03 17:02:40 +02:00
b97ea1e6a1 Fix for previous commit 2020-07-03 16:58:00 +02:00
75f84f2078 New version 2020-07-03 16:49:13 +02:00
ed6bb42085 Added validation for headings in footnotes and endnotes. 2020-07-03 16:48:29 +02:00
4a9611ce1a Added translations for endnotes check 2020-07-03 16:13:34 +02:00
17c5b58f7d Check for bad symbols in endnote signs 2020-07-03 15:47:47 +02:00
067119da14 push version 2020-07-02 18:01:59 +02:00
9f6f5f3ee2 Message for cleaning in read only mode 2020-07-02 17:59:56 +02:00
5c4bef472b New version 2020-07-02 17:56:10 +02:00
c7c164c553 Do not clean in read only documents 2020-07-02 17:54:23 +02:00
8116838758 new version 2020-07-02 15:41:41 +02:00
002212624b saved 2020-07-02 15:41:24 +02:00
4f151a7e5e Fix 2020-07-02 15:40:01 +02:00
3b8e0826e9 Timestamp added 2020-07-01 18:45:11 +02:00
665895dd9c Added timestamp 2020-07-01 18:41:01 +02:00
adefad19df Added gradle plugin for version building 2020-07-01 17:19:39 +02:00
8acf77c143 Added gradle build file 2020-07-01 17:06:58 +02:00
98fc5dab6f New version 2020-06-25 12:44:41 +02:00
f4b6801a94 Search for formatting in text with styles 2020-06-25 11:50:45 +02:00
6c8186d552 Push updates 2020-06-18 15:34:41 +02:00
805815e2ae Added filter for bad default paragraph styles settings 2020-06-18 15:26:48 +02:00
a8f91c44c4 Update version, translation fixes 2020-05-18 17:16:20 +02:00
ba938c7ef4 Release notes updated 2020-05-12 20:49:20 +02:00
af74ee88c0 Updates 2020-05-12 20:48:41 +02:00
845664ffa3 new version 2020-05-12 20:42:13 +02:00
Svetlana Rastegina
f10439e66b Added new translations. 2020-05-12 18:27:06 +02:00
Svetlana Rastegina
565bf5bb30 Added translations. 2020-05-12 18:23:05 +02:00
9ff8fb761f New version 2020-05-12 12:04:20 +02:00
759760da42 Added translations 2020-05-12 12:03:55 +02:00
b51960e4ef Added translations 2020-05-08 16:31:07 +02:00
853a1954c8 Updates 2020-05-04 17:20:10 +02:00
ba475dabbb New version 2020-05-04 16:43:53 +02:00
1d23b91b11 More translations 2020-05-04 16:43:15 +02:00
fce72b8a2d Translated validation 2020-05-04 15:52:04 +02:00
c8634a88fe More translation fixes 2020-05-04 15:02:31 +02:00
a4ca08b952 Translations 2020-05-04 14:28:39 +02:00
597df6dab5 Added translation file 2020-05-04 14:26:59 +02:00
47 changed files with 7049 additions and 379 deletions

View file

@ -4,8 +4,11 @@
<node oor:name="OfficeToolBar">
<node oor:name="pro.litvinovg.Redaction.panel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Redactor's panel</value>
<value xml:lang="ru-RU">Панель редактора</value>
<value xml:lang="en">Redactor's panel</value>
<value xml:lang="ru">Панель редактора</value>
<value xml:lang="sr">Уреднички панел</value>
<value xml:lang="hr">Okno uređivača</value>
<value xml:lang="bs">Panel uređivača</value>
</prop>
<prop oor:name="Docked" oor:op="fuse"><value>true</value></prop>
<prop oor:name="HideFromToolbarMenu" oor:op="fuse"><value>false</value></prop>
@ -16,7 +19,11 @@
<value>com.sun.star.text.GlobalDocument,com.sun.star.text.TextDocument,com.sun.star.text.WebDocument</value>
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en">Redactor's panel</value>
<value xml:lang="ru">Панель редактора</value>
<value xml:lang="sr">Уреднички панел</value>
<value xml:lang="hr">Okno uređivača</value>
<value xml:lang="bs">Panel uređivača</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>macro:///Redaction.Validation.validateButton</value>
@ -30,7 +37,11 @@
<value>com.sun.star.text.GlobalDocument,com.sun.star.text.TextDocument,com.sun.star.text.WebDocument</value>
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="ru">Панель редактора</value>
<value xml:lang="ru">Панель редактора</value>
<value xml:lang="en">Redactor's panel</value>
<value xml:lang="sr">Уреднички панел</value>
<value xml:lang="hr">Okno uređivača</value>
<value xml:lang="bs">Panel uređivača</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>macro:///Redaction.Clean.cleanButton</value>
@ -46,6 +57,9 @@
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="ru">Проверка</value>
<value xml:lang="sr">Провера</value>
<value xml:lang="hr">Provjera</value>
<value xml:lang="bs">Provjera</value>
<value xml:lang="en">Validation</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
@ -61,6 +75,9 @@
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="ru">Чистка</value>
<value xml:lang="sr">Чишћење</value>
<value xml:lang="hr">Čišćenje</value>
<value xml:lang="bs">Čišćenje</value>
<value xml:lang="en">Cleaning</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
@ -70,6 +87,25 @@
<value>_self</value>
</prop>
</node>
<node oor:name="fontReport" oor:op="replace">
<prop oor:name="Context" oor:type="xs:string">
<value>com.sun.star.drawing.DrawingDocument</value>
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="ru">Отчёт о символах в шрифте</value>
<value xml:lang="sr">Извештај о знаковима фонта</value>
<value xml:lang="hr">Izvještaj o znakovima fonta</value>
<value xml:lang="bs">Izvještaj o znakovima fonta</value>
<value xml:lang="en">Font character report</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>macro:///Redaction.Validation.fontReportButton</value>
</prop>
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
</node>
</node>
</node>
<node oor:name="Images">
@ -79,7 +115,7 @@
</prop>
<node oor:name="UserDefinedImages">
<prop oor:name="ImageBigURL">
<value>%origin%/icons/clean.png</value>
<value>%origin%/icons/clean.svg</value>
</prop>
</node>
</node>
@ -89,10 +125,21 @@
</prop>
<node oor:name="UserDefinedImages">
<prop oor:name="ImageBigURL">
<value>%origin%/icons/validate.png</value>
<value>%origin%/icons/validate.svg</value>
</prop>
</node>
</node>
<node oor:name="image-report-button" oor:op="replace">
<prop oor:name="URL" oor:type="xs:string">
<value>macro:///Redaction.Validation.fontReportButton</value>
</prop>
<node oor:name="UserDefinedImages">
<prop oor:name="ImageBigURL">
<value>%origin%/icons/report.svg</value>
</prop>
</node>
</node>
</node>
</node>
</oor:component-data>

View file

@ -2,5 +2,6 @@
<manifest:manifest>
<manifest:file-entry manifest:full-path="Redaction/" manifest:media-type="application/vnd.sun.star.basic-library"/>
<manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry manifest:full-path="Templates.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry manifest:full-path="WriterWindowState.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
</manifest:manifest>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ChooseFontname" dlg:left="154" dlg:top="60" dlg:width="229" dlg:height="190" dlg:closeable="true" dlg:moveable="true">
<dlg:bulletinboard>
<dlg:menulist dlg:id="fontList" dlg:tab-index="0" dlg:left="2" dlg:top="32" dlg:width="225" dlg:height="156">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Validation.onSelectFont?language=Basic&amp;location=application" script:language="Script"/>
</dlg:menulist>
<dlg:text dlg:id="description" dlg:tab-index="1" dlg:left="2" dlg:top="4" dlg:width="225" dlg:height="24" dlg:value="dialog description"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -1,12 +1,21 @@
<?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 mark47
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark96
End Sub
Dim DocumentLoaded as Boolean
Sub cleanButton
Dim config As Object
config = initRedactionConfiguration()
If ThisComponent.isReadonly Then
MsgBox(getTranslation(&quot;documentIsReadOnly&quot;))
Exit Sub
EndIf
If config.getPropertyValue(&quot;predefined_template&quot;) = &quot;false&quot; Then
configureStyleFileDialog()
EndIf
If config.getPropertyValue(&quot;complexity&quot;) = &quot;user&quot; then
quietStartDialog()
Else
@ -14,76 +23,128 @@ Sub cleanButton
EndIf
End Sub
Dim advancedCleaningDialog As Object
Private Sub makerUpMenu
Dim dialog As Object
DialogLibraries.LoadLibrary(&quot;Redaction&quot;)
dialog = CreateUnoDialog(DialogLibraries.Redaction.CleaningDialog)
dialog.setVisible(true)
Select Case dialog.Execute()
advancedCleaningDialog = CreateUnoDialog(DialogLibraries.Redaction.CleaningDialog)
advancedCleaningDialog.getControl(&quot;fontsInStyles&quot;).Label = getTranslation(&quot;advancedMenuReplaceFontsInStyles&quot;)
advancedCleaningDialog.getControl(&quot;symbolsConversion&quot;).Label = getTranslation(&quot;advancedMenuSymbolsConversion&quot;)
advancedCleaningDialog.getControl(&quot;cleanFormatting&quot;).Label = getTranslation(&quot;advancedMenuCleanFormatting&quot;)
advancedCleaningDialog.getControl(&quot;replaceWhiteBackground&quot;).Label = getTranslation(&quot;advancedMenuReplaceWhiteBackground&quot;)
advancedCleaningDialog.getControl(&quot;removeUnusedStyles&quot;).Label = getTranslation(&quot;advancedMenuRemoveUnusedStyles&quot;)
advancedCleaningDialog.getControl(&quot;removeLinks&quot;).Label = getTranslation(&quot;advancedMenuRemoveLinks&quot;)
advancedCleaningDialog.getControl(&quot;removeAllFields&quot;).Label = getTranslation(&quot;advancedMenuRemoveAllFields&quot;)
advancedCleaningDialog.getControl(&quot;removeBookmarks&quot;).Label = getTranslation(&quot;advancedMenuRemoveBookmarks&quot;)
advancedCleaningDialog.getControl(&quot;configTables&quot;).Label = getTranslation(&quot;advancedMenuConfigTables&quot;)
advancedCleaningDialog.getControl(&quot;configAnchors&quot;).Label = getTranslation(&quot;advancedMenuConfigAnchors&quot;)
advancedCleaningDialog.getControl(&quot;fixMistakes&quot;).Label = getTranslation(&quot;advancedMenuFixMistakes&quot;)
advancedCleaningDialog.getControl(&quot;fixDOI&quot;).Label = getTranslation(&quot;advancedMenuFixDOI&quot;)
advancedCleaningDialog.getControl(&quot;replaceNumHyphen&quot;).Label = getTranslation(&quot;replaceNumHyphen&quot;)
advancedCleaningDialog.getControl(&quot;removeInitPageBreak&quot;).Label = getTranslation(&quot;advancedMenuRemoveInitPageBreak&quot;)
advancedCleaningDialog.getControl(&quot;removePageStyles&quot;).Label = getTranslation(&quot;advancedMenuRemovePageStyles&quot;)
advancedCleaningDialog.getControl(&quot;loadStandardStyles&quot;).Label = getTranslation(&quot;advancedMenuLoadStandardStyles&quot;)
advancedCleaningDialog.getControl(&quot;removeManualPageBreaks&quot;).Label = getTranslation(&quot;advancedMenuRemoveManualPageBreaks&quot;)
advancedCleaningDialog.getControl(&quot;removeBasic&quot;).Label = getTranslation(&quot;advancedMenuRemoveBasic&quot;)
advancedCleaningDialog.getControl(&quot;resetChapterNumberingRules&quot;).Label = getTranslation(&quot;advancedMenuResetChapterNumberingRules&quot;)
advancedCleaningDialog.getControl(&quot;convertFontsToCharStyles&quot;).Label = getTranslation(&quot;advancedMenuconvertFontsToCharStyles&quot;)
advancedCleaningDialog.getControl(&quot;fixBrokenCharBackTransparent&quot;).Label = getTranslation(&quot;fixBrokenCharBackTransparentMenuItem&quot;)
advancedCleaningDialog.getControl(&quot;removeNotTransparentBackgrounds&quot;).Label = getTranslation(&quot;removeNotTransparentBackgrounds&quot;)
advancedCleaningDialog.getControl(&quot;fixDiacriticKerning&quot;).Label = getTranslation(&quot;fixDiacriticKerning&quot;)
advancedCleaningDialog.getControl(&quot;Cancel&quot;).Label = getTranslation(&quot;buttonCancel&quot;)
advancedCleaningDialog.getControl(&quot;OK&quot;).Label = getTranslation(&quot;buttonOK&quot;)
advancedCleaningDialog.getControl(&quot;buttonLoad&quot;).Label = getTranslation(&quot;buttonLoad&quot;)
advancedCleaningDialog.Title = getTranslation(&quot;advancedMenuDialogTitle&quot;)
setAdvancedDialogDescription()
advancedCleaningDialog.setVisible(true)
Select Case advancedCleaningDialog.Execute()
Case 1
cleanAccordingTo(dialog)
cleanAccordingTo(advancedCleaningDialog)
Case 0
End Select
dialog.dispose()
advancedCleaningDialog.dispose()
Exit sub
End Sub
Private Sub cleanAccordingTo(dialog As Object)
Dim statusIndicator as Object
statusIndicator = ThisComponent.getCurrentController.statusIndicator
Dim openTrackChanges As Boolean
openTrackChanges = false
dialog.setVisible(false)
saveDocument
statusIndicator.Start(&quot;Чистка документа начата, подождите&quot;,100)
statusIndicator = ThisComponent.getCurrentController.statusIndicator
statusIndicator.Start(getTranslation(&quot;statusStarted&quot;),100)
doNotTrack
If dialog.getControl(&quot;loadStandardStyles&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;resaving&quot;),100)
saveAsDocAndBackToODT
EndIf
If dialog.getControl(&quot;fontsInStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Заменяем шрифты в стилях&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusReplaceFontsInStyles&quot;),100)
replaceStyleFonts
EndIf
If dialog.getControl(&quot;symbolsConversion&quot;).state = 1 Then
statusIndicator.Start(&quot;Конвертируем символы в целевые шрифты&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConvertSymbolsInTargetFonts&quot;),100)
unicodeSymbolsConversion
EndIf
If dialog.getControl(&quot;cleanFormatting&quot;).state = 1 Then
statusIndicator.Start(&quot;Чистим ручное форматирование&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusCleaningManualFormatting&quot;),100)
cleanFormatting
EndIf
If dialog.getControl(&quot;replaceWhiteBackground&quot;).state = 1 Then
statusIndicator.Start(&quot;Заменяем белый фон на прозрачный&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusReplaceWhiteBackground&quot;),100)
replaceWhiteBackgroundWithTransparent
EndIf
If dialog.getControl(&quot;removeUnusedStyles&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusRemovedUnusedStyles&quot;),100)
removeUnusedStyles
EndIf
If dialog.getControl(&quot;removeLinks&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем гиперссылки&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveLinks&quot;),100)
removeHyperlinks
EndIf
If dialog.getControl(&quot;removeAllFields&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusRemoveAllFields&quot;),100)
removeAllFields
EndIf
If dialog.getControl(&quot;removeBookmarks&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем закладки&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveBookmarks&quot;),100)
disposeAllBookmarks
EndIf
If dialog.getControl(&quot;configTables&quot;).state = 1 Then
statusIndicator.Start(&quot;Настраиваем таблицы&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConfigureTables&quot;),100)
fixTableWidth
EndIf
If dialog.getControl(&quot;configAnchors&quot;).state = 1 Then
statusIndicator.Start(&quot;Настраиваем привязку изображений&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConfigureImagesAnchors&quot;),100)
fixDrawingAnchors
EndIf
If dialog.getControl(&quot;fixMistakes&quot;).state = 1 Then
statusIndicator.Start(&quot;Исправляем часто встречающиеся ошибки&quot;,100)
saveAndreload()
statusIndicator = ThisComponent.getCurrentController.statusIndicator
statusIndicator.Start(getTranslation(&quot;statusFixFrequentMistakes&quot;),100)
fixFrequentMistakes
EndIf
If dialog.getControl(&quot;fixDOI&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusFixingDOI&quot;),100)
openTrackChanges = true
fixDOI
EndIf
If dialog.getControl(&quot;replaceNumHyphen&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;replaceNumHyphenStatus&quot;),100)
openTrackChanges = true
replaceNumHyphen
EndIf
If dialog.getControl(&quot;removeInitPageBreak&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем разрыв страницы, если он задан в начале документа&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemovePageBreakAtStart&quot;),100)
removeFirstElementPageBreak
EndIf
If dialog.getControl(&quot;removePageStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем пользовательские стили страниц&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveCustomPageStyles&quot;),100)
removeUserPageStyles
EndIf
If dialog.getControl(&quot;loadStandardStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Загружаем стили из шаблона&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100)
loadArticleStyles
EndIf
If dialog.getControl(&quot;removeManualPageBreaks&quot;).state = 1 Then
@ -92,10 +153,28 @@ Private Sub cleanAccordingTo(dialog As Object)
If dialog.getControl(&quot;removeBasic&quot;).state = 1 Then
removeLibs
EndIf
If dialog.getControl(&quot;resetChapterNumberingRules&quot;).state = 1 Then
resetChapterNumberingRules
EndIf
If dialog.getControl(&quot;convertFontsToCharStyles&quot;).state = 1 Then
convertFontsToCharStyles()
EndIf
If dialog.getControl(&quot;fixBrokenCharBackTransparent&quot;).state = 1 Then
fixBrokenCharBackTransparent()
EndIf
If dialog.getControl(&quot;removeNotTransparentBackgrounds&quot;).state = 1 Then
fixColoredBackgroundInDoc()
EndIf
If dialog.getControl(&quot;fixDiacriticKerning&quot;).state = 1 Then
fixDiacriticKerning()
EndIf
statusIndicator.end()
saveAndreload()
MsgBox getTranslation(lang,&quot;cleaningFinished&quot;)
MsgBox getTranslation(&quot;cleaningFinished&quot;)
If openTrackChanges Then
showTrackedChanges
Endif
End Sub
@ -115,39 +194,67 @@ End Sub
Private Sub quietCleaning
Dim description As String
Dim statusIndicator As Object
statusIndicator = ThisComponent.getCurrentController.statusIndicator
DocumentLoaded = false
saveDocument
statusIndicator.Start(&quot;Чистка документа начата, подождите&quot;,100)
saveAsDocAndBackToODT
statusIndicator = ThisComponent.getCurrentController.statusIndicator
statusIndicator.Start(getTranslation(&quot;statusStarted&quot;),100)
doNotTrack
statusIndicator.Start(&quot;Заменяем шрифты в стилях&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusReplaceFontsInStyles&quot;),100)
replaceStyleFonts
statusIndicator.Start(&quot;Конвертируем символы в целевые шрифты&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConvertSymbolsInTargetFonts&quot;),100)
saveAndreload()
statusIndicator = ThisComponent.getCurrentController.statusIndicator
unicodeSymbolsConversion
statusIndicator.Start(&quot;Чистим ручное форматирование&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusFixingDiacriticCharactersKerning&quot;),100)
fixDiacriticKerning
statusIndicator.Start(getTranslation(&quot;statusCleaningManualFormatting&quot;),100)
cleanFormatting
statusIndicator.Start(getTranslation(&quot;statusReplaceWhiteBackground&quot;),100)
replaceWhiteBackgroundWithTransparent
statusIndicator.Start(getTranslation(&quot;statusRemovedUnusedStyles&quot;),100)
removeUnusedStyles
statusIndicator.Start(&quot;Удаляем гиперссылки&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveLinks&quot;),100)
removeHyperlinks
statusIndicator.Start(&quot;Удаляем закладки&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveBookmarks&quot;),100)
disposeAllBookmarks
statusIndicator.Start(&quot;Настраиваем таблицы&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConfigureTables&quot;),100)
fixTableWidth
statusIndicator.Start(&quot;Настраиваем привязку изображений&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusConfigureImagesAnchors&quot;),100)
fixDrawingAnchors
statusIndicator.Start(&quot;Исправляем часто встречающиеся ошибки&quot;,100)
saveAndreload()
statusIndicator = ThisComponent.getCurrentController.statusIndicator
statusIndicator.Start(getTranslation(&quot;statusFixFrequentMistakes&quot;),100)
fixFrequentMistakes
statusIndicator.Start(&quot;Удаляем разрыв страницы, если он задан в начале документа&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemovePageBreakAtStart&quot;),100)
removeFirstElementPageBreak
statusIndicator.Start(&quot;Удаляем пользовательские стили страниц&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusRemoveCustomPageStyles&quot;),100)
removeUserPageStyles
statusIndicator.Start(&quot;Загружаем стили из шаблона&quot;,100)
statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100)
loadArticleStyles
removeLibs
resetChapterNumberingRules
addTimeStampToProperties
saveCleanedVersion(&quot;Standard cleaning&quot;)
statusIndicator.end()
saveAndreload()
MsgBox getTranslation(lang,&quot;cleaningFinished&quot;)
MsgBox getTranslation(&quot;cleaningFinished&quot;)
End Sub
&apos;Sub RegisterListener (ThisComponent)
&apos; oListener = CreateUnoListener( &quot;DocumentListener_&quot;,&quot;com.sun.star.document.XEventListener&quot; )
&apos; ThisComponent.com_sun_star_document_XEventBroadcaster_addEventListener( oListener )
&apos;End Sub
&apos;Sub DocumentListener_notifyEvent( o as object )
&apos; If o.EventName = &quot;OnLoad&quot; Then
&apos; DocumentLoaded = true
&apos; EndIf
&apos;end sub
&apos;Sub DocumentListener_disposing()
&apos;End Sub
Private Sub removeFirstElementPageBreak
Dim enum1 As Object
Dim enum1Element As Object
@ -209,7 +316,9 @@ End Sub
Private Sub unicodeSymbolsConversion
convertWLLatin2IPHAstra
convertSymbol
Dim sharedMarksRegExp As String
sharedMarksRegExp = &quot;([\u0020-\u002f\u003a\u003b\u00A0\u2010\u2013\u2014]+)?&quot;
Dim newFontName As String
newFontName = &quot;IPH Astra Serif&quot;
Dim RAtts(2) as new com.sun.star.beans.PropertyValue
@ -225,12 +334,18 @@ Private Sub unicodeSymbolsConversion
&apos;Extended latin-1 0080—00FF
&apos;Cyrillic unicode block range \u0400-\u04FF
&apos;Basic Latin \u0020-\u007E
&apos;Combining diacritical marks 0301 0304 0323 032e 0331 035f
&apos;Combining diacritical marks 0301 0304 0303 0323 032e 0331 035f
combiningDiacritic_Astra = &quot;\u0301\u0303\u0304\u0308\u0323\u032e\u0331\u0341\u035f&quot;
Dim extendedLatinA_Astra As String
extendedLatinA_Astra = &quot;\u1e15\u1e17\u1e53\u0129\u0169&quot;
&apos;
&apos;
&apos;
&apos;General Punctuation \u2000-\u206f
&apos;Latin Extended A \u0100-\u017f
&apos;\u02bb Modifier Letter Turned Comma is in IPH Astra
&apos; unicodeConversionEverywhere(&quot;[\u0020-\u007F]+&quot;,RAtts)
unicodeConversionEverywhere(&quot;[\u0020-\u007f\u0080-\u00ff\u0400-\u04ff\u2000-\u206f\u2100-\u214f\u0301\u0304\u0323\u032e\u0331\u0341\u035f\u02bb\u0100-\u017f]+&quot;,RAtts)
unicodeConversionEverywhere(&quot;[\u0020-\u007f\u0080-\u00ff\u0400-\u04ff\u2000-\u206f\u2100-\u214f\u02bb\u0100-\u017f&quot; &amp; combiningDiacritic_Astra &amp; extendedLatinA_Astra &amp;&quot;]+&quot;,RAtts)
&apos;Arabic Scheherazade
&apos;Arabic Presentation Forms-A fb50-fdff
&apos;Arabic Presentation Forms-B fe70-feff
@ -238,7 +353,7 @@ Private Sub unicodeSymbolsConversion
RAtts(0).Value = newFontName
RAtts(1).Value = newFontName
RAtts(2).Value = newFontName
unicodeConversionEverywhere(&quot;[\u0600-\u06ff\ufb50-\ufdff\ufe70-\ufeff]+&quot;,RAtts)
unicodeConversionEverywhere(sharedMarksRegExp &amp; &quot;[\u0600-\u06ff\ufb50-\ufdff\ufe70-\ufeff]+&quot; &amp; sharedMarksRegExp ,RAtts)
&apos;Greek Tinos
newFontName = &quot;Tinos&quot;
@ -247,7 +362,7 @@ Private Sub unicodeSymbolsConversion
RAtts(2).Value = newFontName
&apos;Greek and Coptic 0370—03FF
&apos;Greek extended 1F00—1FFF
unicodeConversionEverywhere(&quot;[\u0370-\u03ff\u1f00-\u1fff]+&quot;,RAtts)
unicodeConversionEverywhere(sharedMarksRegExp &amp; &quot;[\u0370-\u03ff\u1f00-\u1fff]+&quot; &amp; sharedMarksRegExp,RAtts)
&apos;DejaVu Sans Mathematical operators
@ -256,16 +371,19 @@ Private Sub unicodeSymbolsConversion
RAtts(1).Value = newFontName
RAtts(2).Value = newFontName
&apos;\u2200-\u22FF Mathematical operators
unicodeConversionEverywhere(&quot;[\u2200-\u22ff]+&quot;,RAtts)
&apos;\u2630-\u2637 Trigrams
&apos;\u4DC0-\u4DFF Trigrams
unicodeConversionEverywhere(&quot;[\u2200-\u22ff\u2630-\u2637\u4DC0-\u4DFF]+&quot;,RAtts)
newFontName = &quot;Noto Serif CJK JP&quot;
RAtts(0).Value = newFontName
RAtts(1).Value = newFontName
RAtts(2).Value = newFontName
&apos;\u2200-\u22FF CJK Unified Ideographs
&apos;\u21d2 двойная стрелка вправо
&apos;3000—303F Символы и пунктуация ККЯ
unicodeConversionEverywhere(&quot;[\u302b\uff00-\uffef]+&quot;,RAtts)
unicodeConversionEverywhere(sharedMarksRegExp &amp; &quot;[\u21d2\u302b\uff00-\uffef]+&quot; &amp; sharedMarksRegExp,RAtts)
newFontName = &quot;Noto Serif CJK SC&quot;
RAtts(0).Value = newFontName
@ -275,7 +393,7 @@ Private Sub unicodeSymbolsConversion
&apos;\u4e00—\u9fff Унифицированные идеограммы ККЯ
&apos;\u3400-\u4db7\u4e00—\u9ff1 Найдены в Noto Sans CJK SC
&apos;\u3000-\u302a\u302c-\u303f В Noto Sans CJK SC
unicodeConversionEverywhere(&quot;[\u3000-\u302a\u302c-\u303f\u3400-\u4db7\u4e00-\u9ff1]+&quot;,RAtts)
unicodeConversionEverywhere(sharedMarksRegExp &amp; &quot;[\u3000-\u302a\u302c-\u303f\u3400-\u4db7\u4e00-\u9ff1]+&quot; &amp; sharedMarksRegExp,RAtts)
End Sub
@ -342,9 +460,34 @@ Private Sub removeUserPageStyles
Next i
End Sub
Sub removeAllFields()
Dim fields As Object
Dim fieldEnum As Object
Dim field As Object
fields = ThisComponent.getTextFields()
fieldEnum = fields.createEnumeration()
While fieldEnum.hasMoreElements
field = fieldEnum.nextElement()
field.dispose()
Wend
End Sub
Public Const RX_Greek_letters = &quot;\u0388-\u03ce&quot;
Public Const RX_Latin_up_alphabet = &quot;\u0041-\u005a&quot;
Public Const RX_Latin_low_alphabet = &quot;\u0061-\u007a&quot;
Public Const RX_Cyrillic_alphabet = &quot;\u0410-\u044f&quot;
Public Const RX_Comma = &quot;\u002c&quot;
Public Const RX_Digits = &quot;\u0030-\u0039&quot;
Public Const RX_Roman_numbers = &quot;MDCLXVI&quot;
Public Const RX_Letters_Dash = &quot;[&quot; &amp; RX_Latin_up_alphabet &amp; RX_Latin_low_alphabet &amp; RX_Cyrillic_alphabet &amp; RX_Greek_letters &amp; &quot;]&quot;
Public Const RX_Letters = &quot;[&quot; &amp; RX_Latin_up_alphabet &amp; RX_Latin_low_alphabet &amp; RX_Cyrillic_alphabet &amp; RX_Greek_letters &amp; &quot;]&quot;
Private Sub fixFrequentMistakes
Dim config As Object
config = initRedactionConfiguration()
Dim NBSP As String
Dim space As String
NBSP = &quot; &quot;
space = &quot; &quot;
&apos;Не должно быть символов табуляции
@ -358,66 +501,73 @@ Private Sub fixFrequentMistakes
&apos;Не должно быть пустых абзацев
AskAndReplace(&quot;^$&quot;,&quot;&quot;)
&apos;Не должно быть пробелов перед знаками пунктуации .,;:?!)]}»¡¿”‘’
AskAndReplace(&quot;[:space:]+(?=[\.,;:?!\)\]\}»¡¿”‘’])&quot;,&quot;&quot;)
&apos;Между словом том и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[тТ](ом|\.))\ (?=[:digit:])&quot;,NBSP)
&apos;Между словом серия и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[сС](ерия|\.))\ +(?=[:digit:])&quot;,NBSP)
&apos;Между словом часть и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[чЧ](асть|\.))\ +(?=[:digit:])&quot;,NBSP)
&apos;Между числом и &quot;г.&quot; должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=[0-9])[:space:]*г(?=\.)&quot;,NBSP &amp; &quot;г&quot;)
&apos;Между инициалами и Фамилией должен быть неразрывный пробел, а не обычный
&apos;А.[м/б пробел]А.Иванов -&gt; А.[м/б пробел]А. Иванов
AskAndReplace(&quot;(?&lt;=[:upper:]\.[:space:]?[:upper:])\.[:space:]?(?=[:upper:][:lower:]{1,30})&quot;,&quot;.&quot; &amp; NBSP)
&apos; А.[пробел]А.Иванов -&gt; А.А. Иванов
AskAndReplace(&quot;(?&lt;=[:upper:])\.[:space:](?=[:upper:]\.[:space:][:upper:][:lower:]{1,30})&quot;,&quot;.&quot;)
&apos;Между Фамилией и инициалами должен быть неразрывный пробел, а не обычный
&apos;Иванов А.[м/б пробел]А. -&gt; Иванов А.А.
AskAndReplace(&quot;(?&lt;=[:upper:][:lower:]{1,30}[:space:][:upper:])\.[:space:]?(?=[:upper:]\.)&quot;,&quot;.&quot;)
&apos;Не должно быть пробелов после скобок [({ и кавычек «„
AskAndReplace(&quot;[:space:]+(?=[\.,;:?!\)\]\}»¡¿”’])&quot;,&quot;&quot;)
&apos;Не должно быть пробелов после скобок [({ и кавычек «„
AskAndReplace(&quot;(?&lt;=[\(\[\{«„])[:space:]&quot;,&quot;&quot;)
&apos;Между &quot;и&quot; и &quot;т.&quot; должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\bи)\ (?=т\.)&quot;,NBSP)
&apos;Между &quot;т.&quot; и &quot;е./н./д./п./к.&quot; не должно быть пробела
AskAndReplace(&quot;(?&lt;=\bт)\.[:space:]?(?=[ендпк]\.)&quot;,&quot;.&quot;)
&apos;Между буквами среднее тире должно обрамляться пробелами
AskAndReplace(&quot;(?&lt;=[:alpha:])(?=[:alpha:])&quot;,NBSP &amp; &quot;&quot; &amp; NBSP)
&apos;Между буквами дефис-минус, цифровое тире и длинное тире заменяется на среднее тире
AskAndReplace(&quot;(?&lt;=[:alpha:][:space:])[-‒—](?=[:space:][:alpha:])&quot;,&quot;&quot;)
&apos;Между двумя цифрами и тире между ними не долнжо быть пробелов. А также тире должно быть цифровым
AskAndReplace(&quot;(?&lt;=[:digit:])(?:[:space:])?[-‒–—](?:[:space:])?(?=[:digit:])&quot;,&quot;&quot;)
&apos;Между буквами среднее или длинное тире должно быть замененено на среднее и обрамлено пробелами
AskAndReplace(&quot;(?&lt;=&quot; &amp; RX_Letters_Dash &amp; &quot;)[—–]+(?=.)&quot;,NBSP &amp; &quot;&quot; &amp; NBSP)
AskAndReplace(&quot;(?&lt;=.)[—–]+(?=&quot; &amp; RX_Letters_Dash &amp; &quot;)&quot;,NBSP &amp; &quot;&quot; &amp; NBSP)
&apos;Между буквами дефисы-минусы, цифровые тире, средние тире и длинные тире заменяются на одно среднее тире
AskAndReplace(&quot;(?&lt;=&quot; &amp; RX_Letters_Dash &amp; &quot;[:space:])[-‒—−–]+(?=[:space:].)&quot;,&quot;&quot;)
AskAndReplace(&quot;(?&lt;=.[:space:])[-‒—−–]+(?=[:space:]&quot; &amp; RX_Letters_Dash &amp; &quot;)&quot;,&quot;&quot;)
&apos;Между двумя цифрами и тире не долнжо быть пробелов. А также тире должно быть цифровым.
&apos;Также проверяем, что перед искомым тире нет DOI
&apos;&apos;&apos;&apos;&apos;AskAndReplace(&quot;(?&lt;!DOI[0-9. /XVI:-‒–—−-]{1,50})(?&lt;=[:digit:])(?:[:space:])?[-‒–—−](?:[:space:])?(?=[:digit:])&quot;,&quot;&quot;)
&apos;Между двумя римскими цифрами и тире между ними не долнжо быть пробелов. А также тире должно быть средним
AskAndReplace(&quot;(?&lt;=[MDCLXVI])(?:[:space:])?[-‒–—](?:[:space:])?(?=[MDCLXVI])&quot;,&quot;&quot;)
AskAndReplace(&quot;(?&lt;=[&quot; &amp; RX_Roman_numbers &amp; &quot;])(?:[:space:])?[-‒–—−]+(?:[:space:])?(?=[&quot; &amp; RX_Roman_numbers &amp; &quot;])&quot;,&quot;&quot;)
&apos;Между буквой и угловой открывающейся скобкой должен быть пробел
AskAndReplace(&quot;(?&lt;=[:alpha:])&lt;(?=…&gt;)&quot;,space &amp; &quot;&lt;&quot;)
AskAndReplace(&quot;(?&lt;=&quot; &amp; RX_Letters &amp; &quot;)&lt;(?=…&gt;)&quot;,space &amp; &quot;&lt;&quot;)
&apos;Между угловой закрывающейся скобкой и буквой должен быть пробел
AskAndReplace(&quot;(?&lt;=&lt;…)&gt;(?=[:alpha:])&quot;,&quot;&gt;&quot; &amp; space)
AskAndReplace(&quot;[ий][\u0306]+&quot;,&quot;й&quot;)
AskAndReplace(&quot;[ИЙ][\u0306]+&quot;,&quot;Й&quot;)
AskAndReplace(&quot;[её][\u0308]+&quot;,&quot;ё&quot;)
AskAndReplace(&quot;[ЕЁ][\u0308]+&quot;,&quot;Ё&quot;)
AskAndReplace(&quot;(?&lt;=&lt;…)&gt;(?=&quot; &amp; RX_Letters &amp; &quot;)&quot;,&quot;&gt;&quot; &amp; space)
If config.getPropertyValue(&quot;fixes_russian_iph&quot;) = &quot;true&quot; Then
&apos;между N. Y. не должно быть пробела
AskAndReplace(&quot;(?&lt;=N\.)[:space:](?=Y\.)&quot;,&quot;&quot;)
&apos;Между словом том и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[тТ](ом|\.))\ (?=[:digit:])&quot;,NBSP)
&apos;Между словом серия и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[сС](ерия|\.))\ +(?=[:digit:])&quot;,NBSP)
&apos;Между словом часть и цифрой должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\b[чЧ](асть|\.))\ +(?=[:digit:])&quot;,NBSP)
&apos;Между числом и &quot;г.&quot; должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=[0-9])[:space:]*г(?=\.)&quot;,NBSP &amp; &quot;г&quot;)
&apos;Между инициалами и Фамилией должен быть неразрывный пробел, а не обычный
&apos;А.[м/б пробел]А.Иванов -&gt; А.[м/б пробел]А. Иванов
AskAndReplace(&quot;(?&lt;=[:upper:]\.[:space:]?[:upper:])\.[:space:]?(?=[:upper:][:lower:]{1,30})&quot;,&quot;.&quot; &amp; NBSP)
&apos; А.[пробел]А.Иванов -&gt; А.А. Иванов
AskAndReplace(&quot;(?&lt;=[:upper:])\.[:space:](?=[:upper:]\.[:space:][:upper:][:lower:]{1,30})&quot;,&quot;.&quot;)
&apos;Между Фамилией и инициалами должен быть неразрывный пробел, а не обычный
&apos;Иванов А.[м/б пробел]А. -&gt; Иванов А.А.
AskAndReplace(&quot;(?&lt;=[:upper:][:lower:]{1,30}[:space:][:upper:])\.[:space:]?(?=[:upper:]\.)&quot;,&quot;.&quot;)
&apos;Между &quot;и&quot; и &quot;т.&quot; должен быть неразрывный пробел, а не обычный
AskAndReplace(&quot;(?&lt;=\bи)\ (?=т\.)&quot;,NBSP)
&apos;Между &quot;т.&quot; и &quot;е./н./д./п./к.&quot; не должно быть пробела
AskAndReplace(&quot;(?&lt;=\bт)\.[:space:]?(?=[ендпк]\.)&quot;,&quot;.&quot;)
AskAndReplace(&quot;[ий][\u0306]+&quot;,&quot;й&quot;)
AskAndReplace(&quot;[ИЙ][\u0306]+&quot;,&quot;Й&quot;)
AskAndReplace(&quot;[её][\u0308]+&quot;,&quot;ё&quot;)
AskAndReplace(&quot;[ЕЁ][\u0308]+&quot;,&quot;Ё&quot;)
EndIf
End Sub
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(&quot;defaultTemplate&quot;)
filePath = getTemplatePath() &amp; &quot;/&quot; &amp; fileName
predefined = config.getPropertyValue(&quot;predefined_template&quot;)
filePath = getTemplateFile(predefined)
fileTest = CreateUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
If NOT fileTest.exists(filePath) Then
noStylesFileDialog()
fileName = config.getPropertyValue(&quot;defaultTemplate&quot;)
filePath = getTemplatePath() &amp; &quot;/&quot; &amp; fileName
configureStyleFileDialog()
predefined = config.getPropertyValue(&quot;predefined_template&quot;)
filePath = getTemplateFile(predefined)
If NOT fileTest.exists(filePath) Then
&apos;MsgBox &quot;Файл стилей &quot; &amp; fileName &amp; &quot; не добавлен в Мои шаблоны. Не могу загрузить стили в текущий файл.&quot;
Exit Sub
@ -492,13 +642,13 @@ End Function
Private Sub removeHyperlinks()
Dim aNote As Object
Dim i As Long
Dim x As Long
removeHLInText(ThisComponent.Text)
For i = 0 to ThisComponent.FootNotes.Count -1
For x = 0 to ThisComponent.FootNotes.Count -1
aNote = ThisComponent.FootNotes.getByIndex(x)
removeHLInText(aNote.Text)
Next
For i = 0 to ThisComponent.EndNotes.Count -1
For x = 0 to ThisComponent.EndNotes.Count -1
aNote = ThisComponent.EndNotes.getByIndex(x)
removeHLInText(aNote.Text)
Next
@ -635,10 +785,24 @@ End Sub
Private Sub saveAndreload()
Dim document As Object
Dim dispatcher As Object
&apos;Dim timeOut As Long
&apos;timeOut = 0
&apos;DocumentLoaded = false
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
dispatcher.executeDispatch(document, &quot;.uno:Save&quot;, &quot;&quot;, 0, Array())
dispatcher.executeDispatch(document, &quot;.uno:Reload&quot;, &quot;&quot;, 0, Array())
Wait 1000
&apos;RegisterListener (ThisComponent)
&apos;Do while DocumentLoaded = false
&apos; Wait 300
&apos; timeOut = timeOut + 300
&apos; If timeOut &gt; 30000 Then
&apos; MsgBox &quot;Time out&quot;
&apos; Exit sub
&apos; EndIf
&apos;Loop
&apos;DocumentLoaded = false
End Sub
@ -979,6 +1143,7 @@ Private Sub convertEnclosuresToFormat(identifier As String, styleNames, styleVal
Dim rightEnclosure As String
Dim SDesc As Object
Dim found As Object
leftEnclosure = compileLeftEnclosure(identifier)
rightEnclosure = compileRightEnclosure(identifier)
SDesc = Thiscomponent.createSearchDescriptor()
@ -1270,6 +1435,29 @@ Private Sub replaceWhiteBackgroundWithTransparent
statusIndicator.end()
End Sub
Sub convertSymbol
Dim newFontName As String
Dim oSearchString As String
Dim oReplaceString As String
&apos;newFontName = &quot;IPH Astra Serif&quot;
Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue
Dim ReplAttributes(0) as new com.sun.star.beans.PropertyValue
SrchAttributes(0).Name = &quot;CharFontName&quot;
SrchAttributes(0).Value = &quot;Symbol&quot;
ReplAttributes(0).Name = &quot;CharFontName&quot;
ReplAttributes(0).Value = &quot;Noto Serif CJK JP&quot;
oSearchString = &quot;\uF0DE&quot;
oReplaceString = &quot;⇒&quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
oSearchString = &quot;\uF0DB&quot;
oReplaceString = &quot;⇔&quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;replaceFontsInStyles( &quot;WL LatinAllIn1Goth&quot;, newFontName)
End Sub
Private Sub convertWLLatin2IPHAstra
Dim newFontName As String
Dim oSearchString As String
@ -1285,7 +1473,7 @@ Private Sub convertWLLatin2IPHAstra
SrchAttributes(0).Value = Empty
ReplAttributes(0).Value = Empty
&apos;Replace macron below
oSearchString = &quot;(.)\uF0D4&quot;
oSearchString = &quot;(.)(\uF0D4)+&quot;
oReplaceString = &quot;$1̱&quot;
&apos;from WL
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
@ -1294,7 +1482,7 @@ Private Sub convertWLLatin2IPHAstra
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;Replace dot below
oSearchString = &quot;(.)\uF0D6&quot;
oSearchString = &quot;(.)(\uF0D6)+&quot;
oReplaceString = &quot;$1̣&quot;
&apos;from WL
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
@ -1303,16 +1491,25 @@ Private Sub convertWLLatin2IPHAstra
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;replace macron
oSearchString = &quot;(.)\uF0F4&quot;
oSearchString = &quot;(.)(\uF0F4)+&quot;
oReplaceString = &quot;$1̄&quot;
&apos;from WL
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;from unicode to remove direct formatting
oSearchString = &quot;(.)\u0304&quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;replace space
oSearchString = &quot;\uF020&quot;
oReplaceString = &quot; &quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;replace comma
oSearchString = &quot;\uF02C&quot;
oReplaceString = &quot;,&quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;replace accent
oSearchString = &quot;(.)\uF0F1&quot;
oSearchString = &quot;(.)(\uF0F1)+&quot;
oReplaceString = &quot;$1́&quot;
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
&apos;from unicode to remove direct formatting
@ -1329,12 +1526,22 @@ Function getVersion As String
getVersion=oProduct.getByName(&quot;ooSetupVersion&quot;)
End Function
Function getFullVersion As String
GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
Dim oProduct As Object
oProduct=GetRegistryKeyContent(&quot;org.openoffice.Setup/Product&quot;)
getFullVersion=oProduct.getByName(&quot;ooSetupVersionAboutBox&quot;)
End Function
Private Sub convertFormatToUserFields(identifier As String, styleNames, styleValues)
Dim maxLength As Integer
maxLength = getMaxLength(identifier)
Dim leftField As String
Dim rightField As String
Dim i As Integer
Dim found As Object
leftField = &quot;left&quot; &amp; identifier
rightField = &quot;right&quot; &amp; identifier
Dim SrchAttributes(Ubound(styleNames)) as new com.sun.star.beans.PropertyValue
@ -1348,21 +1555,37 @@ Private Sub convertFormatToUserFields(identifier As String, styleNames, styleVal
SDesc.SearchAll = true
SDesc.SearchRegularExpression = true
SDesc.SearchString = &quot;&quot;
SDesc.searchStyles = false
SDesc.searchStyles = true
SDesc.SetSearchAttributes(SrchAttributes)
found = Thiscomponent.findFirst(SDesc)
i = 0
Do While not isNull(found)
If Len(found.String) &lt;&gt; 0 Then
If Len(found.String) &lt;&gt; 0 AND NOT IsNull(found.Text) Then
If maxLength &lt; 0 Or Len(found.String) &lt; maxLength Then
insertUserField(found.End,rightField &amp; i,&quot;&quot;)
insertUserField(found.start,leftField &amp; i,&quot;&quot;)
i = i + 1
EndIf
EndIf
found = Thiscomponent.findNext(found.End, SDesc)
Loop
End Sub
Function getMaxLength(identifier As String) As Integer
Dim config As Object
config = initRedactionConfiguration()
If identifier = &quot;SubScript&quot; Then
getMaxLength = CInt(config.getPropertyValue(&quot;subscript_max_length&quot;))
Exit Function
EndIf
If identifier = &quot;SuperScript&quot; Then
getMaxLength = CInt(config.getPropertyValue(&quot;superscript_max_length&quot;))
Exit Function
EndIf
getMaxLength = -1
End Function
Private Sub convertUserFieldsToFormat(identifier As String, styleNames , styleValues)
Dim oTextCursor As Object
Dim oMasters As Object
@ -1681,4 +1904,286 @@ Private Function insertUserField(cursor As Object,fieldName As String,fieldValue
cursor.Text.insertTextContent(cursor, oField, False)
oField.IsVisible = false
End Function
sub saveAsDocAndBackToODT
dim document as object
dim dispatcher as object
Dim path As String
Dim tmpName As String
Dim oldName As String
&apos;Dim timeOut As Long
&apos;timeOut = 0
&apos;DocumentLoaded = false
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
oldName = ThisComponent.getURL()
tmpName = oldName &amp; &quot;--tmp&quot; &amp; &quot;.doc&quot;
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = &quot;URL&quot;
args1(0).Value = tmpName
args1(1).Name = &quot;FilterName&quot;
args1(1).Value = &quot;MS Word 97&quot;
dispatcher.executeDispatch(document, &quot;.uno:SaveAs&quot;, &quot;&quot;, 0, args1())
dispatcher.executeDispatch(document, &quot;.uno:Reload&quot;, &quot;&quot;, 0, Array())
args1(0).Value = oldName
args1(1).Value = &quot;writer8&quot;
dispatcher.executeDispatch(document, &quot;.uno:SaveAs&quot;, &quot;&quot;, 0, args1())
dispatcher.executeDispatch(document, &quot;.uno:Reload&quot;, &quot;&quot;, 0, Array())
&apos;RegisterListener (ThisComponent)
&apos;Do while DocumentLoaded = false
&apos; Wait 300
&apos; timeOut = timeOut + 300
&apos; If timeOut &gt; 30000 Then
&apos; MsgBox &quot;Time out&quot;
&apos; Exit sub
&apos; EndIf
&apos;Loop
&apos;DocumentLoaded = false
If FileExists(tmpName) Then
Kill(tmpName)
End If
end Sub
Sub addTimeStampToProperties
Dim docProps As Object
Dim userProps As Object
Dim curTime As String
On Error Goto exceptionHandlerProps
curTime = Now()
docProps = ThisComponent.getDocumentProperties()
userProps = docProps.UserDefinedProperties()
userProps.addProperty(curTime ,128,&quot;Cleaned by&quot; &amp; getUserName() &amp; &quot; with &quot; &amp; redactionExtensionVersion &amp; &quot; LO &quot; &amp; getFullVersion() )
exceptionHandlerProps:
Resume Next
End Sub
Function getUserName() As String
Dim oCP As Object
Dim oCUA As Object
Dim aProps(0) As New com.sun.star.beans.PropertyValue
oCP = GetProcessServiceManager().createInstance( &quot;com.sun.star.configuration.ConfigurationProvider&quot; )
aProps(0).Name = &quot;nodepath&quot;
aProps(0).Value = &quot;/org.openoffice.UserProfile/Data&quot;
oCUA = oCP.createInstanceWithArguments( &quot;com.sun.star.configuration.ConfigurationUpdateAccess&quot;, aProps )
getUserName = &quot; &quot; &amp; oCUA.getByName(&quot;givenname&quot;) &amp; &quot; &quot; &amp; oCUA.getByName(&quot;sn&quot;)
End Function
sub saveCleanedVersion(comment)
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = &quot;VersionComment&quot;
args1(0).Value = comment
dispatcher.executeDispatch(document, &quot;.uno:Save&quot;, &quot;&quot;, 0, args1())
end Sub
Sub resetChapterNumberingRules
Dim chapNumRules As Object
Dim numRulesProps As Variant
Dim numRuleProperty As Variant
Dim i As Integer
chapNumRules = ThisComponent.ChapterNumberingRules
For i = 0 To chapNumRules.Count - 1
numRulesProps = chapNumRules.getByIndex(i)
For n = LBound(numRulesProps) To UBound(numRulesProps)
numRuleProperty = numRulesProps(n)
If (numRuleProperty.Name = &quot;Prefix&quot;) Then
numRuleProperty.Value = &quot;&quot;
End If
If (numRuleProperty.Name = &quot;Suffix&quot;) Then
numRuleProperty.Value = &quot;&quot;
End If
If (numRuleProperty.Name = &quot;CharStyleName&quot;) Then
numRuleProperty.Value = &quot;Standard&quot;
End If
numRulesProps(n) = numRuleProperty
Next n
chapNumRules.replaceByIndex(i,numRulesProps)
Next i
End Sub
Private Sub replaceNumHyphen
StartTracking
replaceNumHyphenRegExp
StopTracking
End Sub
Sub replaceNumHyphenRegExp
AskAndReplace(&quot;(?&lt;!DOI[0-9. /XVI:-‒–—−-]{1,50})(?&lt;=[:digit:])(?:[:space:])?[-‒–—−](?:[:space:])?(?=[:digit:])&quot;,&quot;&quot;)
End sub
Sub fixBrokenCharBackTransparent
Dim footNotes As Object
Dim endNotes As Object
Dim i As Integer
Dim oStyles As Object
Dim pageStyles As Object
Dim pageStyle As Object
footNotes = thisComponent.footNotes
For i = 0 to footNotes.Count -1
setDefaultBackColorInText(footNotes.getByIndex(i).Text)
Next i
endNotes = thisComponent.footNotes
For i = 0 to footNotes.Count -1
setDefaultBackColorInText(endNotes.getByIndex(i).Text)
Next i
oStyles = ThisComponent.StyleFamilies
pageStyles = oStyles.getByName(oStyles.elementNames(2))
For i = 0 to pageStyles.Count -1
pageStyle = pageStyles.getByIndex(i)
If Not IsEmpty(pageStyle.FooterText) Then
setDefaultBackColorInText(pageStyle.FooterText)
EndIf
If Not IsEmpty(pageStyle.FooterTextFirst) Then
setDefaultBackColorInText(pageStyle.FooterTextFirst)
EndIf
If Not IsEmpty(pageStyle.FooterTextRight) Then
setDefaultBackColorInText(pageStyle.FooterTextRight)
EndIf
If Not IsEmpty(pageStyle.FooterTextLeft) Then
setDefaultBackColorInText(pageStyle.FooterTextLeft)
EndIf
If Not IsEmpty(pageStyle.HeaderText) Then
setDefaultBackColorInText(pageStyle.HeaderText)
EndIf
If Not IsEmpty(pageStyle.HeaderTextFirst) Then
setDefaultBackColorInText(pageStyle.HeaderTextFirst)
EndIf
If Not IsEmpty(pageStyle.HeaderTextRight) Then
setDefaultBackColorInText(pageStyle.HeaderTextRight)
EndIf
If Not IsEmpty(pageStyle.HeaderTextLeft) Then
setDefaultBackColorInText(pageStyle.HeaderTextLeft)
EndIf
Next i
setDefaultBackColorInText(ThisComponent.Text)
End Sub
Sub setDefaultBackColorInText(oText As Object)
If IsMissing(oText) Then
Exit sub
End If
Dim enum1Element As Object
Dim enum1 As Object
Dim enum2 As Object
Dim thisPortion As Object
Dim footnoteText As Object
Dim label As String
Dim labelNum As Integer
Dim i As Integer
Dim count As Integer
Dim cell As Object
Dim cellText As Object
enum1 = oText.Text.createEnumeration
While enum1.hasMoreElements
enum1Element = enum1.nextElement
If enum1Element.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
If enum1Element.CharBackTransparent = false Then
enum1Element.setPropertyToDefault(&quot;CharBackTransparent&quot;)
EndIf
ElseIf enum1Element.supportsService(&quot;com.sun.star.text.TextTable&quot;) Then
cellNames = enum1Element.cellNames
For i = LBound(cellNames) To Ubound(cellNames)
cell = enum1Element.getCellByName(cellNames(i))
cellText = cell.getText()
setDefaultBackColorInText(cellText)
Next i
EndIf
Wend
End Sub
Function fixColoredBackgroundInDoc() As Boolean
Dim founds As Object
Dim sDesc As Object
Dim i As Long
Dim foundObjects() As Object
Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue
SrchAttributes(0).Name = &quot;CharBackTransparent&quot;
SrchAttributes(0).Value = False
sDesc = Thiscomponent.createSearchDescriptor()
sDesc.SearchAll = true
sDesc.ValueSearch = false
sDesc.SearchRegularExpression = true
sDesc.searchStyles = true
sDesc.SetSearchAttributes(SrchAttributes())
founds = Thiscomponent.findAll(sDesc)
If founds.count &lt;&gt; 0 Then
foundObjects = convertXIndexAccessToArray(founds)
For i = LBound(foundObjects) To UBound(foundObjects)
foundObjects(i).CharBackTransparent = false
foundObjects(i).CharBackColor = -1
Next i
EndIf
End Function
Sub fixDiacriticKerning
Dim oSearch As Object
Dim oFound As Object
Dim oPara As Object
oSearch = ThisComponent.createSearchDescriptor()
oSearch.SearchString = &quot;[\u0300-\u036F]&quot;
oSearch.SearchRegularExpression=True
oSearch.searchAll=True
oFound = ThisComponent.findFirst(oSearch)
Do While Not IsNull(oFound)
oPara = oFound.TextParagraph
fixDiacriticKerningInPara(oPara)
oFound = ThisComponent.findNext(oFound.End, oSearch)
Loop
End Sub
Sub fixDiacriticKerningInPara(oPara As Object)
Dim paraEnum As Object
Dim portion As Object
Dim prevPortion As Object
paraEnum = oPara.createEnumeration
If paraEnum.hasMoreElements Then
prevPortion = paraEnum.nextElement
While paraEnum.hasMoreElements
portion = paraEnum.nextElement
While isFirstCharDiacritic(portion)
moveFirstCharacter(portion, prevPortion)
Wend
prevPortion = portion
Wend
EndIf
End Sub
Function isFirstCharDiacritic(portion As Object) As Boolean
isFirstCharDiacritic = false
Dim portionText As String
Dim diaLowBound As Long
Dim diaHighBound As Long
Dim charNum As Long
diaLowBound = 768
diaHighBound = 879
portionText = portion.String
If Len(portionText) = 0 Then
Exit Function
EndIf
charNum = Asc(portionText)
If charNum &gt;= diaLowBound And charNum &lt;= diaHighBound Then
isFirstCharDiacritic = true
EndIf
End Function
Sub moveFirstCharacter(portion As Object, prevPortion As Object)
Dim prevEnd As Object
Dim nextStart As Object
prevEnd = prevPortion.getEnd()
prevEnd.String = Left(portion.String,1)
nextStart = portion.Text.createTextCursorByRange(portion.Start)
nextStart.goRight(1,true)
nextStart.setString(&quot;&quot;)
End Sub
</script:module>

View file

@ -1,24 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="CleaningDialog" dlg:left="107" dlg:top="22" dlg:width="237" dlg:height="186" dlg:help-text="&amp;21.CleaningDialog.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;22.CleaningDialog.Title">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="CleaningDialog" dlg:left="107" dlg:top="22" dlg:width="237" dlg:height="285" dlg:help-text="&amp;21.CleaningDialog.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;22.CleaningDialog.Title">
<dlg:bulletinboard>
<dlg:button dlg:id="Cancel" dlg:tab-index="0" dlg:left="67" dlg:top="171" dlg:width="40" dlg:height="12" dlg:value="Отмена" dlg:button-type="cancel"/>
<dlg:button dlg:id="CommandButton1" dlg:tab-index="1" dlg:left="43" dlg:top="170" dlg:width="2" dlg:height="0" dlg:value="CommandButton1"/>
<dlg:button dlg:id="OK" dlg:tab-index="2" dlg:left="131" dlg:top="171" dlg:width="40" dlg:height="12" dlg:value="OK" dlg:button-type="ok"/>
<dlg:checkbox dlg:id="fontsInStyles" dlg:tab-index="3" dlg:left="11" dlg:top="11" dlg:width="218" dlg:height="7" dlg:value="Заменить названия шрифтов в стилях" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeLinks" dlg:tab-index="6" dlg:left="11" dlg:top="51" dlg:width="218" dlg:height="7" dlg:value="Удалить гиперссылки" dlg:checked="false"/>
<dlg:checkbox dlg:id="cleanFormatting" dlg:tab-index="5" dlg:left="11" dlg:top="32" dlg:width="218" dlg:height="7" dlg:value="Очистить форматирование" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeBookmarks" dlg:tab-index="7" dlg:left="11" dlg:top="59" dlg:width="218" dlg:height="7" dlg:value="Удалить закладки" dlg:checked="false"/>
<dlg:checkbox dlg:id="configTables" dlg:tab-index="8" dlg:left="11" dlg:top="70" dlg:width="218" dlg:height="7" dlg:value="Настроить свойства таблиц" dlg:checked="false"/>
<dlg:checkbox dlg:id="configAnchors" dlg:tab-index="9" dlg:left="11" dlg:top="79" dlg:width="218" dlg:height="7" dlg:value="Настроить привязки изображений" dlg:checked="false"/>
<dlg:checkbox dlg:id="fixMistakes" dlg:tab-index="10" dlg:left="11" dlg:top="90" dlg:width="218" dlg:height="7" dlg:value="Исправить часто встречающиеся ошибки набора" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeInitPageBreak" dlg:tab-index="11" dlg:left="11" dlg:top="101" dlg:width="218" dlg:height="7" dlg:value="Удалить разрыв страницы в начале документа" dlg:checked="false"/>
<dlg:checkbox dlg:id="removePageStyles" dlg:tab-index="12" dlg:left="11" dlg:top="111" dlg:width="218" dlg:height="7" dlg:value="Удалить пользовательские стили страниц" dlg:checked="false"/>
<dlg:checkbox dlg:id="loadStandardStyles" dlg:tab-index="13" dlg:left="11" dlg:top="123" dlg:width="218" dlg:height="7" dlg:value="Загрузить стили страниц из шаблона Статья.ott" dlg:checked="false"/>
<dlg:checkbox dlg:id="symbolsConversion" dlg:tab-index="4" dlg:left="11" dlg:top="22" dlg:width="218" dlg:height="7" dlg:value="Произвести конвертацию символов" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeUnusedStyles" dlg:tab-index="14" dlg:left="11" dlg:top="133" dlg:width="218" dlg:height="7" dlg:value="Удалить неиспользуемые стили" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeManualPageBreaks" dlg:tab-index="15" dlg:left="11" dlg:top="143" dlg:width="218" dlg:height="7" dlg:value="Удалить все разрывы страниц" dlg:checked="false"/>
<dlg:checkbox dlg:id="replaceWhiteBackground" dlg:tab-index="16" dlg:left="11" dlg:top="41" dlg:width="218" dlg:height="7" dlg:value="Заменить белый фон символов на прозрачный" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeBasic" dlg:tab-index="17" dlg:left="11" dlg:top="154" dlg:width="218" dlg:height="7" dlg:value="Удалить макросы" dlg:checked="false"/>
<dlg:button dlg:id="Cancel" dlg:tab-index="0" dlg:left="28" dlg:top="271" dlg:width="40" dlg:height="12" dlg:value="Отмена" dlg:button-type="cancel"/>
<dlg:button dlg:id="CommandButton1" dlg:tab-index="1" dlg:left="24" dlg:top="180" dlg:width="2" dlg:height="0" dlg:value="CommandButton1"/>
<dlg:button dlg:id="OK" dlg:tab-index="2" dlg:left="92" dlg:top="271" dlg:width="40" dlg:height="12" dlg:value="OK" dlg:button-type="ok"/>
<dlg:checkbox dlg:id="fontsInStyles" dlg:tab-index="3" dlg:left="11" dlg:top="10" dlg:width="218" dlg:height="7" dlg:value="Заменить названия шрифтов в стилях" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeLinks" dlg:tab-index="6" dlg:left="11" dlg:top="60" dlg:width="218" dlg:height="7" dlg:value="Удалить гиперссылки" dlg:checked="false"/>
<dlg:checkbox dlg:id="cleanFormatting" dlg:tab-index="5" dlg:left="11" dlg:top="30" dlg:width="218" dlg:height="7" dlg:value="Очистить форматирование" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeBookmarks" dlg:tab-index="7" dlg:left="11" dlg:top="70" dlg:width="218" dlg:height="7" dlg:value="Удалить закладки" dlg:checked="false"/>
<dlg:checkbox dlg:id="configTables" dlg:tab-index="8" dlg:left="11" dlg:top="80" dlg:width="218" dlg:height="7" dlg:value="Настроить свойства таблиц" dlg:checked="false"/>
<dlg:checkbox dlg:id="configAnchors" dlg:tab-index="9" dlg:left="11" dlg:top="90" dlg:width="218" dlg:height="7" dlg:value="Настроить привязки изображений" dlg:checked="false"/>
<dlg:checkbox dlg:id="fixMistakes" dlg:tab-index="10" dlg:left="11" dlg:top="100" dlg:width="218" dlg:height="7" dlg:value="Исправить часто встречающиеся ошибки набора" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeInitPageBreak" dlg:tab-index="11" dlg:left="11" dlg:top="120" dlg:width="218" dlg:height="7" dlg:value="Удалить разрыв страницы в начале документа" dlg:checked="false"/>
<dlg:checkbox dlg:id="removePageStyles" dlg:tab-index="12" dlg:left="11" dlg:top="130" dlg:width="218" dlg:height="7" dlg:value="Удалить пользовательские стили страниц" dlg:checked="false"/>
<dlg:checkbox dlg:id="loadStandardStyles" dlg:tab-index="13" dlg:left="11" dlg:top="140" dlg:width="218" dlg:height="7" dlg:value="Загрузить стили страниц из шаблона Статья.ott" dlg:checked="false"/>
<dlg:checkbox dlg:id="symbolsConversion" dlg:tab-index="4" dlg:left="11" dlg:top="20" dlg:width="218" dlg:height="7" dlg:value="Произвести конвертацию символов" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeUnusedStyles" dlg:tab-index="14" dlg:left="11" dlg:top="150" dlg:width="218" dlg:height="7" dlg:value="Удалить неиспользуемые стили" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeManualPageBreaks" dlg:tab-index="15" dlg:left="11" dlg:top="160" dlg:width="218" dlg:height="7" dlg:value="Удалить все разрывы страниц" dlg:checked="false"/>
<dlg:checkbox dlg:id="replaceWhiteBackground" dlg:tab-index="16" dlg:left="11" dlg:top="40" dlg:width="218" dlg:height="7" dlg:value="Заменить белый фон символов на прозрачный" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeBasic" dlg:tab-index="17" dlg:left="11" dlg:top="170" dlg:width="218" dlg:height="7" dlg:value="Удалить макросы" dlg:checked="false"/>
<dlg:button dlg:id="buttonLoad" dlg:tab-index="18" dlg:left="158" dlg:top="271" dlg:width="65" dlg:height="12" dlg:value="loadTemplate">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.configureStyleFileDialog?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
<dlg:checkbox dlg:id="removeAllFields" dlg:tab-index="19" dlg:left="11" dlg:top="180" dlg:width="218" dlg:height="7" dlg:value="Удалить все поля" dlg:checked="false"/>
<dlg:checkbox dlg:id="fixDOI" dlg:tab-index="20" dlg:left="11" dlg:top="110" dlg:width="218" dlg:height="7" dlg:value="Исправить DOI" dlg:checked="false"/>
<dlg:checkbox dlg:id="resetChapterNumberingRules" dlg:tab-index="21" dlg:left="11" dlg:top="190" dlg:width="218" dlg:height="7" dlg:value="Сбросить настройки нумерации глав" dlg:checked="false"/>
<dlg:checkbox dlg:id="replaceNumHyphen" dlg:tab-index="22" dlg:left="11" dlg:top="200" dlg:width="218" dlg:height="7" dlg:value="Исправить тире между цифрами" dlg:checked="false"/>
<dlg:checkbox dlg:id="convertFontsToCharStyles" dlg:tab-index="23" dlg:left="11" dlg:top="210" dlg:width="218" dlg:height="7" dlg:value="Конвертировать шрифты в стили символов" dlg:checked="false"/>
<dlg:checkbox dlg:id="fixBrokenCharBackTransparent" dlg:tab-index="24" dlg:left="11" dlg:top="220" dlg:width="218" dlg:height="7" dlg:value="fixBrokenCharBackTransparent" dlg:checked="false"/>
<dlg:checkbox dlg:id="removeNotTransparentBackgrounds" dlg:tab-index="25" dlg:left="11" dlg:top="50" dlg:width="218" dlg:height="7" dlg:value="Удалить непрозрачные фоны в тексте" dlg:checked="false"/>
<dlg:text dlg:id="description" dlg:tab-index="26" dlg:left="11" dlg:top="251" dlg:width="217" dlg:height="16" dlg:value="Label1" dlg:multiline="true"/>
<dlg:checkbox dlg:id="fixDiacriticKerning" dlg:tab-index="27" dlg:left="11" dlg:top="230" dlg:width="218" dlg:height="7" dlg:value="Fix diacritic kerning" dlg:checked="false"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ConfigDialog" dlg:left="196" dlg:top="109" dlg:width="157" dlg:height="64" dlg:help-text="&amp;23.ConfigDialog.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;24.ConfigDialog.Title">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ConfigDialog" dlg:left="196" dlg:top="109" dlg:width="157" dlg:height="103" dlg:help-text="&amp;23.ConfigDialog.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;24.ConfigDialog.Title">
<dlg:bulletinboard>
<dlg:checkbox dlg:id="CB_complexity" dlg:tab-index="0" dlg:left="5" dlg:top="13" dlg:width="150" dlg:height="19" dlg:value="Включить режим эксперта" dlg:checked="false"/>
<dlg:button dlg:id="OK" dlg:tab-index="1" dlg:left="9" dlg:top="45" dlg:width="59" dlg:height="13" dlg:value="Сохранить" dlg:button-type="ok"/>
<dlg:checkbox dlg:id="CB_complexity" dlg:tab-index="0" dlg:left="5" dlg:top="13" dlg:width="150" dlg:height="11" dlg:value="Включить режим эксперта" dlg:checked="false"/>
<dlg:button dlg:id="OK" dlg:tab-index="1" dlg:left="15" dlg:top="85" dlg:width="59" dlg:height="13" dlg:value="Сохранить" dlg:button-type="ok"/>
<dlg:button dlg:id="CommandButton1" dlg:tab-index="2" dlg:left="-132" dlg:top="41" dlg:width="2" dlg:height="0" dlg:value="CommandButton1"/>
<dlg:button dlg:id="CANCEL" dlg:tab-index="3" dlg:left="77" dlg:top="45" dlg:width="59" dlg:height="13" dlg:value="Отмена" dlg:button-type="cancel"/>
<dlg:button dlg:id="CANCEL" dlg:tab-index="3" dlg:left="83" dlg:top="85" dlg:width="59" dlg:height="13" dlg:value="Отмена" dlg:button-type="cancel"/>
<dlg:checkbox dlg:id="cb_russian_fixes_iph" dlg:tab-index="4" dlg:left="5" dlg:top="26" dlg:width="150" dlg:height="11" dlg:value="Исправления для института философии" dlg:checked="true"/>
<dlg:textfield dlg:id="tf_max_subscript" dlg:tab-index="7" dlg:left="5" dlg:top="52" dlg:width="24" dlg:height="12" dlg:value="10000"/>
<dlg:text dlg:id="label_max_subscript" dlg:tab-index="8" dlg:left="32" dlg:top="52" dlg:width="123" dlg:height="11" dlg:value="Label1"/>
<dlg:text dlg:id="label_max_superscript" dlg:tab-index="6" dlg:left="32" dlg:top="39" dlg:width="123" dlg:height="11" dlg:value="Label1"/>
<dlg:textfield dlg:id="tf_max_superscript" dlg:tab-index="5" dlg:left="5" dlg:top="38" dlg:width="24" dlg:height="12" dlg:value="10000"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -1,6 +1,22 @@
<?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="Configuration" script:language="StarBasic" script:moduleType="normal">Public Const redactionExtensionName As String = &quot;cleanAndValidate&quot;
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Configuration" script:language="StarBasic" script:moduleType="normal">Public Const redactionExtensionName = &quot;cleanAndValidate&quot;
Public Const redactionExtensionVersion = &quot;0.10.11&quot;
Public Const template_name_monography = &quot;Монография&quot;
Public Const template_name_pj = &quot;Философский журнал&quot;
Public Const template_name_pq = &quot;Вопросы философии&quot;
Public Const template_name_hp = &quot;История философии&quot;
Public Const template_name_hpe = &quot;Историко-философский ежегодник&quot;
Public Const template_name_pr = &quot;Философия религии&quot;
Public Const template_name_fnit = &quot;Философия науки и техники&quot;
Public Const template_name_pa = &quot;Философская антропология&quot;
Public Const template_name_pcr = &quot;Проблемы цивилизационного развития&quot;
Public Const template_name_eifn = &quot;Эпистемология и философия науки&quot;
Public Const template_name_et = &quot;Этическая мысль&quot;
Public Const template_name_ephe = &quot;Электронная философская энциклопедия&quot;
Public Const template_name_iph_big = &quot;Большой формат издания&quot;
Public Const template_manual = &quot;custom_selected_template&quot;
Public Const articles_path = &quot;/templates/articles/&quot;
Function initRedactionConfiguration()
On Error Goto exceptionHandler
@ -8,16 +24,35 @@ Function initRedactionConfiguration()
Dim reg As Object
Dim redactionProps As Object
Dim props(2) As New com.sun.star.beans.PropertyValue
Dim propSetInfo As Object
regFactory = CreateUnoService(&quot;com.sun.star.ucb.Store&quot;)
reg = regFactory.createPropertySetRegistry(redactionExtensionName)
redactionProps = reg.openPropertySet(redactionExtensionName, TRUE)
redactionProps.addProperty(&quot;complexity&quot;, 128, &quot;user&quot;)
propSetInfo = redactionProps.getPropertySetInfo()
If Not propSetInfo.hasPropertyByName(&quot;superscript_max_length&quot;) Then
redactionProps.addProperty(&quot;superscript_max_length&quot;, 128, &quot;10&quot;)
EndIf
If Not propSetInfo.hasPropertyByName(&quot;subscript_max_length&quot;) Then
redactionProps.addProperty(&quot;subscript_max_length&quot;, 128, &quot;10&quot;)
EndIf
If Not propSetInfo.hasPropertyByName(&quot;fixes_russian_iph&quot;) Then
redactionProps.addProperty(&quot;fixes_russian_iph&quot;, 128, &quot;true&quot;)
EndIf
If Not propSetInfo.hasPropertyByName(&quot;predefined_template&quot;) Then
redactionProps.addProperty(&quot;predefined_template&quot;, 128, &quot;false&quot;)
EndIf
If Not propSetInfo.hasPropertyByName(&quot;complexity&quot;) Then
redactionProps.addProperty(&quot;complexity&quot;, 128, &quot;user&quot;)
EndIf
exceptionHandler:
Resume Next
On Error Goto exceptionHandler2
redactionProps.addProperty(&quot;defaultTemplate&quot;, 128, &quot;Статья.ott&quot;)
If Not propSetInfo.hasPropertyByName(&quot;defaultTemplate&quot;) Then
redactionProps.addProperty(&quot;defaultTemplate&quot;, 128, &quot;Статья.ott&quot;)
EndIf
If Not propSetInfo.hasPropertyByName(&quot;predefined_template&quot;) Then
redactionProps.addProperty(&quot;predefined_template&quot;, 128, &quot;false&quot;)
EndIf
exceptionHandler2:
Resume Next
initRedactionConfiguration = redactionProps
@ -26,11 +61,22 @@ End Function
Private Sub setConfigFromDialog(dialog As Object)
Dim config As Object
config = initRedactionConfiguration()
If dialog.getControl(&quot;CB_complexity&quot;).state = 1 Then
config.setPropertyValue(&quot;complexity&quot;, &quot;makerUp&quot;)
Else
config.setPropertyValue(&quot;complexity&quot;, &quot;user&quot;)
EndIf
If dialog.getControl(&quot;cb_russian_fixes_iph&quot;).state = 1 Then
config.setPropertyValue(&quot;fixes_russian_iph&quot;, &quot;true&quot;)
Else
config.setPropertyValue(&quot;fixes_russian_iph&quot;, &quot;false&quot;)
EndIf
config.setPropertyValue(&quot;superscript_max_length&quot;, dialog.getControl(&quot;tf_max_superscript&quot;).getText())
config.setPropertyValue(&quot;subscript_max_length&quot;, dialog.getControl(&quot;tf_max_subscript&quot;).getText())
End Sub
Private Sub loadConfigToDialog(dialog As Object)
@ -41,6 +87,17 @@ Private Sub loadConfigToDialog(dialog As Object)
Else
dialog.getControl(&quot;CB_complexity&quot;).state = 0
EndIf
If config.getPropertyValue(&quot;fixes_russian_iph&quot;) = &quot;true&quot; Then
dialog.getControl(&quot;cb_russian_fixes_iph&quot;).state = 1
Else
dialog.getControl(&quot;cb_russian_fixes_iph&quot;).state = 0
EndIf
dialog.getControl(&quot;tf_max_superscript&quot;).setText(config.getPropertyValue(&quot;superscript_max_length&quot;))
dialog.getControl(&quot;tf_max_subscript&quot;).setText(config.getPropertyValue(&quot;subscript_max_length&quot;))
End Sub
@ -48,7 +105,16 @@ Private Sub configurationDialog
Dim dialog As Object
DialogLibraries.LoadLibrary(&quot;Redaction&quot;)
dialog = CreateUnoDialog(DialogLibraries.Redaction.ConfigDialog)
loadConfigToDialog(dialog)
loadConfigToDialog(dialog)
dialog.getControl(&quot;CB_complexity&quot;).Label = getTranslation(&quot;dialogConfigComplexity&quot;)
dialog.getControl(&quot;cb_russian_fixes_iph&quot;).Label = getTranslation(&quot;dialogRussianFixesIPH&quot;)
dialog.getControl(&quot;label_max_superscript&quot;).setText(getTranslation(&quot;dialogConfigMaxSuperscript&quot;))
dialog.getControl(&quot;label_max_subscript&quot;).setText(getTranslation(&quot;dialogConfigMaxSubscript&quot;))
dialog.Title = getTranslation(&quot;dialogConfigTitle&quot;)
dialog.getControl(&quot;OK&quot;).Label = getTranslation(&quot;buttonYes&quot;)
dialog.getControl(&quot;CANCEL&quot;).Label = getTranslation(&quot;buttonStop&quot;)
dialog.setVisible(true)
Select Case dialog.Execute()
Case 1
@ -60,76 +126,152 @@ Private Sub configurationDialog
Exit sub
End Sub
Dim queitCleaningDialog As Object
Private Sub quietStartDialog
Globalscope.BasicLibraries.LoadLibrary( &quot;Tools&quot; )
Dim dialog As Object
DialogLibraries.LoadLibrary(&quot;Redaction&quot;)
dialog = CreateUnoDialog(DialogLibraries.Redaction.StartQuietCleaning)
Dim lang As String
lang = GetStarOfficeLocale().Language
Dim description As String
queitCleaningDialog = CreateUnoDialog(DialogLibraries.Redaction.StartQuietCleaning)
Dim buttonNameOk As String
Dim buttonNameStop As String
Dim buttonNameLoad As String
Dim dialogTitle As String
description = getTranslation(lang,&quot;startQuietCleaningDescription&quot;)
buttonNameOk = getTranslation(lang,&quot;buttonOk&quot;)
buttonNameStop = getTranslation(lang,&quot;buttonStop&quot;)
buttonNameLoad = getTranslation(lang,&quot;buttonLoad&quot;)
dialogTitle = getTranslation(lang,&quot;quietStartCleaningTitle&quot;)
dialog.Title = dialogTitle
dialog.getControl(&quot;Description&quot;).setText(description)
dialog.getControl(&quot;buttonOk&quot;).Label = buttonNameOk
dialog.getControl(&quot;buttonStop&quot;).Label = buttonNameStop
dialog.getControl(&quot;buttonLoad&quot;).Label = buttonNameLoad
dialog.setVisible(true)
Select Case dialog.Execute()
buttonNameOk = getTranslation(&quot;buttonYes&quot;)
buttonNameStop = getTranslation(&quot;buttonStop&quot;)
buttonNameLoad = getTranslation(&quot;buttonLoad&quot;)
dialogTitle = getTranslation(&quot;quietStartCleaningTitle&quot;)
queitCleaningDialog.Title = dialogTitle
setQuietDialogDescription()
queitCleaningDialog.getControl(&quot;buttonOk&quot;).Label = buttonNameOk
queitCleaningDialog.getControl(&quot;buttonStop&quot;).Label = buttonNameStop
queitCleaningDialog.getControl(&quot;buttonLoad&quot;).Label = buttonNameLoad
queitCleaningDialog.setVisible(true)
Select Case queitCleaningDialog.Execute()
Case 1
dialog.setVisible(false)
dialog.dispose()
queitCleaningDialog.setVisible(false)
queitCleaningDialog.dispose()
quietCleaning
Case 0
dialog.setVisible(false)
dialog.dispose()
queitCleaningDialog.setVisible(false)
queitCleaningDialog.dispose()
End Select
Exit sub
End Sub
Private Sub noStylesFileDialog
Function setAdvancedDialogDescription()
If IsNull(advancedCleaningDialog) Then
Exit Function
EndIf
Dim config As Object
Dim description As String
Dim predefined As String
Dim customFile As String
config = initRedactionConfiguration()
predefined = config.getPropertyValue(&quot;predefined_template&quot;)
customFile = config.getPropertyValue(&quot;defaultTemplate&quot;)
If predefined = &quot;false&quot; Then
description = getTranslation(&quot;templateNotSelected&quot;)
ElseIf predefined = template_manual Then
description = getTranslation(&quot;templateChosen&quot;) &amp; &quot; «&quot; &amp; customFile &amp; &quot;»&quot;
Else
description = getTranslation(&quot;templateChosen&quot;) &amp; &quot; «&quot; &amp; predefined &amp; &quot;»&quot;
EndIf
advancedCleaningDialog.getControl(&quot;description&quot;).setText(description)
End Function
Function setQuietDialogDescription()
If IsNull(queitCleaningDialog) Then
Exit Function
EndIf
Dim config As Object
Dim description As String
Dim predefined As String
Dim customFile As String
config = initRedactionConfiguration()
predefined = config.getPropertyValue(&quot;predefined_template&quot;)
customFile = config.getPropertyValue(&quot;defaultTemplate&quot;)
If predefined = &quot;false&quot; Then
description = getTranslation(&quot;startQuietCleaningDescription1&quot;) &amp; &quot; &quot; &amp; getTranslation(&quot;startQuietCleaningDescription2&quot;)
ElseIf predefined = template_manual Then
description = getTranslation(&quot;startQuietCleaningDescription1&quot;) &amp; &quot; «&quot; &amp; customFile &amp; &quot;» &quot; &amp; getTranslation(&quot;startQuietCleaningDescription2&quot;)
Else
description = getTranslation(&quot;startQuietCleaningDescription1&quot;) &amp; &quot; «&quot; &amp; predefined &amp; &quot;» &quot; &amp; getTranslation(&quot;startQuietCleaningDescription2&quot;)
EndIf
queitCleaningDialog.getControl(&quot;Description&quot;).setText(description)
End Function
Dim styleFileDialog As Object
Private Sub configureStyleFileDialog
&apos;Globalscope.BasicLibraries.LoadLibrary( &quot;MRILib&quot; )
Dim config As Object
Dim dialog As Object
Dim predefined As String
Dim description As String
Dim customFile As String
DialogLibraries.LoadLibrary(&quot;Redaction&quot;)
styleFileDialog = CreateUnoDialog(DialogLibraries.Redaction.NoStyleFile)
config = initRedactionConfiguration()
predefined = config.getPropertyValue(&quot;predefined_template&quot;)
customFile = config.getPropertyValue(&quot;defaultTemplate&quot;)
If predefined = &quot;false&quot; Then
description = getTranslation(&quot;noFileWithStylesFound&quot;)
ElseIf predefined = template_manual Then
description = getTranslation(&quot;manualStyleFileSet&quot;) &amp; &quot; «&quot; &amp; customFile &amp; &quot;»&quot;
Else
description = getTranslation(&quot;predefiendTemplateSelected&quot;) &amp; &quot; «&quot; &amp; predefined &amp; &quot;»&quot;
EndIf
styleFileDialog.Title = getTranslation(&quot;noStylesFileDialogTitle&quot;)
styleFileDialog.getControl(&quot;Description&quot;).setText(description)
styleFileDialog.getControl(&quot;FileSelection&quot;).Label = getTranslation(&quot;buttonNameToSelectFileWithStyles&quot;)
styleFileDialog.getControl(&quot;buttonOk&quot;).Label = getTranslation(&quot;buttonTemplateNotFoundSkip&quot;)
styleFileDialog.setVisible(true)
Select Case styleFileDialog.Execute()
Case 0
End Select
setQuietDialogDescription()
setAdvancedDialogDescription()
styleFileDialog.setVisible(false)
styleFileDialog.dispose()
End Sub
Sub selectTemplateDialog()
Dim config As Object
Dim description As String
Dim templateName As String
Dim templateNames() As String
Dim i As Integer
Dim listComponent As Object
config = initRedactionConfiguration()
Dim dialog As Object
DialogLibraries.LoadLibrary(&quot;Redaction&quot;)
dialog = CreateUnoDialog(DialogLibraries.Redaction.NoStyleFile)
Dim lang As String
lang = GetStarOfficeLocale().Language
Dim description As String
Dim buttonName As String
Dim dialogTitle As String
Dim buttonTemplateNotFoundSkip As String
dialogTitle = getTranslation(lang,&quot;noStylesFileDialogTitle&quot;)
description = getTranslation(lang,&quot;noFileWithStylesFound&quot;)
buttonName = getTranslation(lang,&quot;buttonNameToSelectFileWithStyles&quot;)
buttonTemplateNotFoundSkip = getTranslation(lang,&quot;buttonTemplateNotFoundSkip&quot;)
dialog.Title = dialogTitle
dialog.getControl(&quot;Description&quot;).setText(description)
dialog.getControl(&quot;FileSelection&quot;).Label = buttonName
dialog.getControl(&quot;buttonOk&quot;).Label = buttonTemplateNotFoundSkip
dialog.setVisible(true)
dialog = CreateUnoDialog(DialogLibraries.Redaction.SelectTemplate)
listComponent = dialog.getControl(&quot;ListBox&quot;)
dialog.getControl(&quot;buttonOk&quot;).Label = getTranslation(&quot;buttonYes&quot;)
dialog.getControl(&quot;buttonStop&quot;).Label = getTranslation(&quot;buttonStop&quot;)
dialog.Title = getTranslation(&quot;selectTemplateDialogTitle&quot;)
templateNames = getTemplateNames()
listComponent.addItems(templateNames , 0)
dialog.setVisible(true)
Select Case dialog.Execute()
Case 1
setDeafultTemplate()
Case 1
templateName = listComponent.SelectedItem
If NOT (templateName=&quot;0&quot; or templateName=&quot;&quot;) Then
config.setPropertyValue(&quot;predefined_template&quot;, templateName)
description = getTranslation(&quot;predefiendTemplateSelected&quot;) &amp; &quot; «&quot; &amp; templateName &amp; &quot;»&quot;
styleFileDialog.getControl(&quot;Description&quot;).setText(description)
EndIf
Case 0
End Select
dialog.setVisible(false)
dialog.dispose()
Exit sub
dialog.dispose()
End Sub
Sub setDeafultTemplate()
Sub setManualTemplate()
Dim description As String
Dim selectedTemplate As String
selectedTemplate = getFileURLDialog()
oSimpleFileAccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
@ -141,12 +283,16 @@ Sub setDeafultTemplate()
config = initRedactionConfiguration()
fileName = Dir(selectedTemplate)
config.setPropertyValue(&quot;defaultTemplate&quot;,fileName)
config.setPropertyValue(&quot;predefined_template&quot;, template_manual)
Dim templatePath As String
templatePath = getTemplatePath()
FileCopy(selectedTemplate, templatePath &amp; &quot;/&quot; &amp; fileName)
MkDir(templatePath)
FileCopy(selectedTemplate, templatePath &amp; &quot;/&quot; &amp; fileName)
description = getTranslation(&quot;manualStyleFileSet&quot;) &amp; &quot; «&quot; &amp; fileName &amp; &quot;»&quot;
styleFileDialog.getControl(&quot;Description&quot;).setText(description)
End Sub
Function getFileURLDialog() As String
Function getFileURLDialog() As String
Dim oFilePicker As Object, oSimpleFileAccess As Object
Dim oSettings As Object, oPathSettings As Object
Dim oTextField As Object, oTextFieldModel As Object
@ -175,5 +321,81 @@ End Sub
End If
End If
getFileURLDialog = &quot;&quot;
End Function
End Function
Function getTemplateNames() As Variant
Dim names() As String
&apos; AddToArray(names, template_name_monography)
AddToArray(names, template_name_pq)
AddToArray(names, template_name_hp)
AddToArray(names, template_name_hpe)
AddToArray(names, template_name_pr)
AddToArray(names, template_name_fnit)
AddToArray(names, template_name_pa)
AddToArray(names, template_name_pj)
AddToArray(names, template_name_pcr)
AddToArray(names, template_name_eifn)
AddToArray(names, template_name_et)
AddToArray(names, template_name_ephe)
AddToArray(names, template_name_iph_big)
getTemplateNames = names
End Function
Function extensionPath() As String
Dim oPackageInfoProvider As Object
oPackageInfoProvider = GetDefaultContext.getByName(&quot;/singletons/com.sun.star.deployment.PackageInformationProvider&quot;)
extensionPath = oPackageInfoProvider.getPackageLocation(&quot;pro.litvinovg.Redaction&quot;)
End Function
Function getTemplateFile(templateName As String) As String
Dim config As Object
Dim fileName As String
Select Case templateName
Case template_manual
config = initRedactionConfiguration()
fileName = config.getPropertyValue(&quot;defaultTemplate&quot;)
getTemplateFile = getTemplatePath() &amp; &quot;/&quot; &amp; fileName
Exit Function
Case template_name_eifn
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_эифн.ott&quot;
Exit Function
Case template_name_fnit
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_фнит.ott&quot;
Exit Function
Case template_name_pa
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_фа.ott&quot;
Exit Function
Case template_name_pj
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_фж.ott&quot;
Exit Function
Case template_name_et
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_эм.ott&quot;
Exit Function
Case template_name_pq
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_вф.ott&quot;
Exit Function
Case template_name_pr
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_фр.ott&quot;
Exit Function
Case template_name_pcr
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_пцр.ott&quot;
Exit Function
Case template_name_hp
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_иф.ott&quot;
Exit Function
Case template_name_hpe
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_ифе.ott&quot;
Exit Function
Case template_name_ephe
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья_эфэ.ott&quot;
Exit Function
Case template_name_iph_big
getTemplateFile = extensionPath() &amp; &quot;/templates/books/большой_формат_для_архива.ott&quot;
Exit Function
Case Else
getTemplateFile = extensionPath() &amp; articles_path &amp; &quot;статья.ott&quot;
Exit Function
End Select
End Function
</script:module>

12
Redaction/Navigator.xdl Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Navigator" dlg:left="0" dlg:top="50" dlg:width="100" dlg:height="123" dlg:closeable="true" dlg:moveable="true">
<dlg:bulletinboard>
<dlg:text dlg:id="description" dlg:tab-index="1" dlg:left="2" dlg:top="5" dlg:width="96" dlg:height="47" dlg:value="описание объектов для навигации" dlg:align="center" dlg:multiline="true"/>
<dlg:button dlg:id="close" dlg:tab-index="2" dlg:left="2" dlg:top="105" dlg:width="96" dlg:height="15" dlg:value="Закрыть навигатор" dlg:toggled="1"/>
<dlg:button dlg:id="next" dlg:tab-index="0" dlg:left="67" dlg:top="70" dlg:width="30" dlg:height="30" dlg:toggled="1"/>
<dlg:text dlg:id="current" dlg:tab-index="4" dlg:left="36" dlg:top="81" dlg:width="28" dlg:height="15" dlg:value="current" dlg:align="center"/>
<dlg:text dlg:id="found" dlg:tab-index="5" dlg:left="2" dlg:top="55" dlg:width="96" dlg:height="12" dlg:value="Всего найдено" dlg:align="center"/>
<dlg:button dlg:id="prev" dlg:tab-index="3" dlg:left="3" dlg:top="70" dlg:width="30" dlg:height="30" dlg:valign="center" dlg:toggled="1"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="NoStyleFile" dlg:left="140" dlg:top="101" dlg:width="239" dlg:height="98" dlg:help-text="&amp;5.NoStyleFile.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;6.NoStyleFile.Title">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="NoStyleFile" dlg:left="140" dlg:top="101" dlg:width="243" dlg:height="98" dlg:help-text="&amp;5.NoStyleFile.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;6.NoStyleFile.Title">
<dlg:bulletinboard>
<dlg:button dlg:id="CommandButton2" dlg:tab-index="1" dlg:left="167" dlg:top="139" dlg:width="1" dlg:height="0" dlg:help-text="&amp;15.NoStyleFile.CommandButton2.HelpText" dlg:value="&amp;16.NoStyleFile.CommandButton2.Label"/>
<dlg:button dlg:id="FileSelection" dlg:tab-index="2" dlg:left="46" dlg:top="75" dlg:width="60" dlg:height="13" dlg:help-text="&amp;19.NoStyleFile.FileSelection.HelpText" dlg:value="&amp;20.NoStyleFile.FileSelection.Label" dlg:button-type="ok"/>
<dlg:text dlg:id="Description" dlg:tab-index="3" dlg:left="23" dlg:top="13" dlg:width="192" dlg:height="52" dlg:help-text="&amp;27.NoStyleFile.Description.HelpText" dlg:value="&amp;28.NoStyleFile.Description.Label"/>
<dlg:button dlg:id="buttonOk" dlg:tab-index="0" dlg:left="138" dlg:top="75" dlg:width="60" dlg:height="13" dlg:help-text="&amp;13.NoStyleFile.CommandButton1.HelpText" dlg:value="ok" dlg:button-type="cancel"/>
<dlg:button dlg:id="CommandButton2" dlg:tab-index="2" dlg:left="167" dlg:top="139" dlg:width="1" dlg:height="0" dlg:help-text="&amp;15.NoStyleFile.CommandButton2.HelpText" dlg:value="&amp;16.NoStyleFile.CommandButton2.Label"/>
<dlg:button dlg:id="FileSelection" dlg:tab-index="3" dlg:left="12" dlg:top="75" dlg:width="65" dlg:height="13" dlg:help-text="&amp;19.NoStyleFile.FileSelection.HelpText" dlg:value="&amp;20.NoStyleFile.FileSelection.Label">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.setManualTemplate?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
<dlg:text dlg:id="Description" dlg:tab-index="4" dlg:left="12" dlg:top="13" dlg:width="219" dlg:height="52" dlg:help-text="&amp;27.NoStyleFile.Description.HelpText" dlg:value="&amp;28.NoStyleFile.Description.Label" dlg:multiline="true"/>
<dlg:button dlg:id="buttonOk" dlg:tab-index="0" dlg:left="166" dlg:top="75" dlg:width="65" dlg:height="13" dlg:help-text="&amp;13.NoStyleFile.CommandButton1.HelpText" dlg:value="ok" dlg:button-type="cancel"/>
<dlg:button dlg:id="ListSelection" dlg:tab-index="1" dlg:left="89" dlg:top="75" dlg:width="65" dlg:height="13" dlg:help-text="&amp;19.NoStyleFile.FileSelection.HelpText" dlg:value="Выбрать из списка">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.selectTemplateDialog?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
</dlg:bulletinboard>
</dlg:window>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="SelectTemplate" dlg:left="146" dlg:top="89" dlg:width="220" dlg:height="202" dlg:closeable="true" dlg:moveable="true" dlg:title="Choose template with styles">
<dlg:bulletinboard>
<dlg:menulist dlg:id="ListBox" dlg:tab-index="0" dlg:left="1" dlg:top="3" dlg:width="218" dlg:height="175"/>
<dlg:button dlg:id="buttonOk" dlg:tab-index="1" dlg:left="26" dlg:top="185" dlg:width="65" dlg:height="13" dlg:value="Ok" dlg:button-type="ok"/>
<dlg:button dlg:id="buttonStop" dlg:tab-index="2" dlg:left="126" dlg:top="185" dlg:width="65" dlg:height="13" dlg:value="Cancel" dlg:button-type="cancel"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -2,11 +2,11 @@
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="StartQuietCleaning" dlg:left="124" dlg:top="101" dlg:width="222" dlg:height="96" dlg:help-text="&amp;29.StartQuietCleaning.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;30.StartQuietCleaning.Title">
<dlg:bulletinboard>
<dlg:text dlg:id="Description" dlg:tab-index="0" dlg:left="15" dlg:top="18" dlg:width="194" dlg:height="40" dlg:help-text="&amp;33.StartQuietCleaning.Description.HelpText" dlg:value="&amp;34.StartQuietCleaning.Description.Label"/>
<dlg:button dlg:id="buttonOk" dlg:tab-index="1" dlg:left="15" dlg:top="71" dlg:width="52" dlg:height="17" dlg:help-text="&amp;55.StartQuietCleaning.buttonOk.HelpText" dlg:value="&amp;56.StartQuietCleaning.buttonOk.Label" dlg:button-type="ok"/>
<dlg:button dlg:id="buttonStop" dlg:tab-index="3" dlg:left="84" dlg:top="71" dlg:width="52" dlg:height="17" dlg:help-text="&amp;57.StartQuietCleaning.buttonStop.HelpText" dlg:value="&amp;58.StartQuietCleaning.buttonStop.Label" dlg:button-type="cancel"/>
<dlg:button dlg:id="buttonLoad" dlg:tab-index="2" dlg:left="156" dlg:top="71" dlg:width="52" dlg:height="17" dlg:help-text="&amp;59.StartQuietCleaning.buttonLoad.HelpText" dlg:value="&amp;60.StartQuietCleaning.buttonLoad.Label">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.setDeafultTemplate?language=Basic&amp;location=application" script:language="Script"/>
<dlg:text dlg:id="Description" dlg:tab-index="1" dlg:left="15" dlg:top="8" dlg:width="194" dlg:height="56" dlg:help-text="&amp;33.StartQuietCleaning.Description.HelpText" dlg:value="&amp;34.StartQuietCleaning.Description.Label" dlg:multiline="true"/>
<dlg:button dlg:id="buttonOk" dlg:tab-index="0" dlg:left="15" dlg:top="71" dlg:width="60" dlg:height="17" dlg:help-text="&amp;55.StartQuietCleaning.buttonOk.HelpText" dlg:value="&amp;56.StartQuietCleaning.buttonOk.Label" dlg:button-type="ok"/>
<dlg:button dlg:id="buttonStop" dlg:tab-index="3" dlg:left="83" dlg:top="71" dlg:width="60" dlg:height="17" dlg:help-text="&amp;57.StartQuietCleaning.buttonStop.HelpText" dlg:value="&amp;58.StartQuietCleaning.buttonStop.Label" dlg:button-type="cancel"/>
<dlg:button dlg:id="buttonLoad" dlg:tab-index="2" dlg:left="149" dlg:top="71" dlg:width="60" dlg:height="17" dlg:help-text="&amp;59.StartQuietCleaning.buttonLoad.HelpText" dlg:value="&amp;60.StartQuietCleaning.buttonLoad.Label">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.configureStyleFileDialog?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
</dlg:bulletinboard>
</dlg:window>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,4 +5,7 @@
<library:element library:name="CleaningDialog"/>
<library:element library:name="NoStyleFile"/>
<library:element library:name="StartQuietCleaning"/>
<library:element library:name="ChooseFontname"/>
<library:element library:name="Navigator"/>
<library:element library:name="SelectTemplate"/>
</library:library>

12
Templates.xcu Normal file
View file

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data oor:package="org.openoffice.Office" oor:name="Paths" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="Paths">
<node oor:name="Template" oor:op="fuse">
<node oor:name="InternalPaths">
<node oor:name="%origin%/templates" oor:op="fuse"/>
</node>
</node>
</node>
</oor:component-data>

31
build.gradle Normal file
View file

@ -0,0 +1,31 @@
apply plugin: 'java'
task oxt(type: Zip) {
dependsOn = [ 'setVersion','setVersionInBasicCode' ]
archiveFileName = 'cleanAndValidate.oxt'
destinationDirectory = file("./")
from './'
include '*'
include '*/*'
include '*/*/*'
include '*/*/*/*'
exclude 'cleanAndValidate.oxt'
exclude '.*'
exclude 'build.gradle'
exclude 'translations.ods'
exclude 'build'
exclude 'buildPlugins'
exclude 'cleanandvalidate.update.xml'
exclude 'cleanAndValidate.ox2'
}
task setVersion(){
ant.taskdef(name: 'xmltask', classpath: 'buildPlugins/xmltask.jar', classname: 'com.oopsconsultancy.xmltask.ant.XmlTask')
ant.xmltask(source: 'description.xml', dest: 'description.xml', report:'true') {
replace(path: "//*[local-name()='version']/@value", withText: "${project.version}")
}
}
task setVersionInBasicCode {
ant.replaceregexp(match:'redactionExtensionVersion = &quot;.*&quot;', replace:"redactionExtensionVersion = &quot;${project.version}&quot;", flags:'g', byline:true) {
fileset(dir: 'Redaction', includes: 'Configuration.xba')
}
}

BIN
buildPlugins/xmltask.jar Normal file

Binary file not shown.

View file

@ -2,9 +2,9 @@
<description xmlns="http://openoffice.org/extensions/update/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction"/>
<version value="0.7.6" />
<version value="0.10.11" />
<update-download>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/28326283520db2d96c00aa4b5bfd6ccc/cleanAndValidate.oxt" />
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/330066acb026243a8a0eab002de1a1f3/cleanAndValidate.oxt" />
</update-download>
<release-notes>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/releasenotes.txt" lang="en" />

View file

@ -1,40 +1,377 @@
<?xml version="1.0" encoding="UTF-8"?>
<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" />
<version value="0.7.6" />
<platform value="all" />
<display-name>
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
<name lang="ru">Чистка и проверка документов для издания в html и epub с сохранением пагинации</name>
</display-name>
<registration>
<simple-license accept-by="admin" suppress-on-update="true" suppress-if-required="true" >
<license-text xlink:href="license_en.txt" lang="en" />
<license-text xlink:href="license_ru.txt" lang="ru" />
</simple-license>
</registration>
<dependencies>
<OpenOffice.org-minimal-version value="4.1" dep:name="OpenOffice.org, LibreOffice 4.1 or later" />
</dependencies>
<update-information>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/cleanandvalidate.update.xml" />
</update-information>
<publisher>
<name xlink:href="mailto:public@litvinovg.pro" lang="en">Georgy Litvinov</name>
</publisher>
<release-notes>
<src xlink:href="releasenotes.txt" lang="en" />
</release-notes>
<extension-description>
<src xlink:href="description/description_ru.txt" lang="ru" />
<src xlink:href="description/description_en.txt" lang="en" />
</extension-description>
<?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">
<identifier value="pro.litvinovg.Redaction"/>
<version value="0.10.11"/>
<platform value="all"/>
<display-name>
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
<name lang="ru">Чистка и проверка документов для издания в html и epub с сохранением пагинации</name>
</display-name>
<registration>
<simple-license accept-by="admin" suppress-if-required="true" suppress-on-update="true">
<license-text lang="en" xlink:href="license_en.txt"/>
<license-text lang="ru" xlink:href="license_ru.txt"/>
</simple-license>
</registration>
<dependencies>
<OpenOffice.org-minimal-version dep:name="OpenOffice.org, LibreOffice 4.1 or later" value="4.1"/>
</dependencies>
<update-information>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/cleanandvalidate.update.xml"/>
</update-information>
<publisher>
<name lang="en" xlink:href="mailto:public@litvinovg.pro">Georgy Litvinov</name>
</publisher>
<release-notes>
<src lang="en" xlink:href="releasenotes.txt"/>
</release-notes>
<extension-description>
<src lang="ru" xlink:href="description/description_ru.txt"/>
<src lang="en" xlink:href="description/description_en.txt"/>
</extension-description>
<icon>
<default xlink:href="icons/addon_icon.png" />
<high-contrast xlink:href="icons/addon_icon.png" />
</icon>
</description>
<icon>
<default xlink:href="icons/addon_icon.svg"/>
<high-contrast xlink:href="icons/addon_icon.svg"/>
</icon>
</description>

1
gradle.properties Normal file
View file

@ -0,0 +1 @@
version=0.10.11

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

218
icons/addon_icon.svg Normal file
View file

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="67.73333mm"
height="67.73333mm"
viewBox="0 0 67.73333 67.73333"
version="1.1"
id="svg2491"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
sodipodi:docname="addon_icon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview2493"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.7097423"
inkscape:cx="46.498235"
inkscape:cy="81.883685"
inkscape:window-width="1920"
inkscape:window-height="992"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:snap-bbox="true" />
<defs
id="defs2488" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-124.58785,-103.92953)">
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:none;fill-opacity:1;stroke:none;stroke-width:1.256;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect982-6-3"
width="67.73333"
height="67.73333"
x="124.58785"
y="103.92953" />
<path
id="rect847-2-7"
style="fill:none;stroke:#000000;stroke-width:2.3;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke markers fill;stop-color:#000000"
d="m 174.05313,111.06933 h 3.30422 c 1.64718,0 2.97325,1.32607 2.97325,2.97325 v 52.56149 c 0,1.64718 -1.32607,2.97325 -2.97325,2.97325 h -39.79621 c -1.64718,0 -2.97325,-1.32607 -2.97325,-2.97325 v -52.56149 c 0,-1.64718 1.32607,-2.97325 2.97325,-2.97325 h 3.40135"
sodipodi:nodetypes="cssssssssc" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.15297;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 143.595,108.66362 c 0,0 8.43592,-0.0564 9.54623,-0.0201 0.98089,0.032 -0.31228,-1.88491 0.52045,-2.93611 0.83273,-1.05121 7.02607,-0.84307 7.82409,0.20813 0.79803,1.05121 -0.59786,2.79113 0.83273,2.79113 1.56136,0 9.23834,-0.0144 9.23834,-0.0144 0,0 7.11288,5.6185 4.75349,5.58225 -2.3594,-0.0362 -34.61591,0.12319 -37.35696,0.12319 -2.74106,0 4.64163,-5.73404 4.64163,-5.73404 z"
id="path849-4-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cszzsczzc" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.955;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-8-9"
width="25.510099"
height="1.667425"
x="150.37207"
y="122.91363" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
y="126.75371"
x="150.33884"
height="1.667425"
width="23.316961"
id="rect851-8-3-8-3-3-30-4"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.91277;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
y="134.61259"
x="150.4086"
height="1.667425"
width="23.055033"
id="rect851-8-3-8-3-38-1-2"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.908;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.875376;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-3-0-78-9"
width="21.445341"
height="1.667425"
x="150.37537"
y="138.45267" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.907172;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-38-4-9-3"
width="23.031563"
height="1.667425"
x="150.27731"
y="146.49648" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
y="158.23125"
x="150.21875"
height="1.667425"
width="20.915848"
id="rect851-8-3-8-3-38-4-6-5-2"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.864499;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.870552;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-3-0-7-8-4-4"
width="21.209816"
height="1.667425"
x="150.27002"
y="162.0713" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0"
id="path1299-5"
d="m 138.85426,125.48045 2.40288,3.17924 5.00275,-6.17076"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
id="path1339-4"
fill="#455A64"
d="m 188.68913,118.31403 -5.08071,-2.32201 -14.12346,43.13492 -0.0211,0.0643 5.10355,1.9512 13.24168,-40.44187 0.85059,0.3252 -5.41705,16.5444 0.54964,1.24433 5.71801,-17.46354 c 0.33224,-1.01472 -0.0359,-2.3748 -0.82118,-3.03698 z"
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke-width:0.937911" />
<polygon
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
transform="matrix(0.85059099,0.3251984,-0.3009474,0.91913342,148.53775,97.412814)"
id="polygon1341-3"
points="43,52 49,52 46,61 "
fill="#455A64"
style="fill:#000000;fill-opacity:1" />
<polygon
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
transform="matrix(0.85059099,0.3251984,-0.3009474,0.91913342,148.53775,97.412814)"
id="polygon1343-2"
points="44,52 45,52 46,61 "
fill="#999999" />
<rect
y="150.20065"
x="150.27731"
height="1.667425"
width="23.031563"
id="rect851-8-3-8-3-38-4-9-3-0"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.907172;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="96.000008"
inkscape:export-ydpi="96.000008" />
<polygon
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
transform="matrix(0.85059099,0.3251984,-0.3009474,0.91913342,148.53775,97.412814)"
id="polygon1345-2"
points="49,52 49,28 49,8 49,5.34 43,4 43,51.93 43,52 "
fill="#ff7043" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 139.14199,160.1588 2.40288,3.17925 5.00277,-6.17076"
id="path1299-8-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0"
id="path1299-8-1-1"
d="m 138.93861,136.75912 2.40288,3.17925 5.00277,-6.17077"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#00a319;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#00a319;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 139.05033,149.51085 2.40288,3.17925 5.00277,-6.17076"
id="path1299-8-1-9-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<polygon
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
transform="matrix(0.85059099,0.3251984,-0.3009474,0.91913342,148.53775,97.412814)"
id="polygon1347-4"
points="45,52 45,4.447 44,4.223 44,52 "
fill="#ff8a65" />
<rect
inkscape:export-ydpi="96.000008"
inkscape:export-xdpi="96.000008"
transform="matrix(0.93406194,0.35711104,-0.31116989,0.9503543,0,0)"
id="rect1349-7"
y="62.168976"
x="210.8367"
width="5.4638195"
height="0.96714818"
fill="#455A64"
style="fill:#000000;fill-opacity:1;stroke-width:0.938467" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

113
icons/clean.svg Normal file
View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="67.73333mm"
height="67.73333mm"
viewBox="0 0 67.73333 67.73333"
version="1.1"
id="svg2491"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
sodipodi:docname="clean.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview2493"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="2.4172662"
inkscape:cx="91.21875"
inkscape:cy="129.07143"
inkscape:window-width="1920"
inkscape:window-height="992"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2488" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-120.95491,-106.68899)">
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
y="106.68899"
x="120.95491"
height="67.73333"
width="67.73333"
id="rect982-3"
style="fill:none;fill-opacity:1;stroke:none;stroke-width:1.256;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000" />
<path
id="rect847-0-1-7"
style="fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke markers fill;stop-color:#000000"
d="m 168.8468,113.40557 h 3.593 c 1.60065,0 2.88926,1.28861 2.88926,2.88926 v 29.05344 m -22.83699,24.91257 h -23.15672 c -1.60066,0 -2.88927,-1.28861 -2.88927,-2.88926 v -51.07675 c 0,-1.60065 1.28861,-2.88926 2.88927,-2.88926 h 3.79406"
sodipodi:nodetypes="cssccssssc" />
<rect
y="135.81468"
x="131.28925"
height="5.8349214"
width="38.979149"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-68"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.20769;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
<path
sodipodi:nodetypes="cszzsczzc"
inkscape:connector-curvature="0"
id="path849-6-6-9"
d="m 135.63756,111.55797 c 0,0 9.22154,-0.0555 10.43524,-0.0198 1.07225,0.0315 -0.34135,-1.85587 0.56893,-2.89087 0.91027,-1.03501 7.68039,-0.83008 8.55274,0.20492 0.87235,1.03501 -0.65354,2.74812 0.91028,2.74812 1.70677,0 10.0987,-0.0142 10.0987,-0.0142 0,0 7.77528,5.53192 5.19616,5.49623 -2.57912,-0.0357 -37.83963,0.1213 -40.83596,0.1213 -2.99634,0 5.07391,-5.64568 5.07391,-5.64568 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.20769;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6-9"
width="38.979149"
height="5.8349214"
x="131.18256"
y="147.67714" />
<path
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6-4-7"
style="stroke-width:2.20769;paint-order:stroke markers fill;stop-color:#000000"
d="m 131.14584,159.24664 23.89289,0 -1.22168,5.83492 -22.67121,0 z"
sodipodi:nodetypes="ccccc" />
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.20769;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-5"
width="38.979149"
height="5.8349214"
x="131.21593"
y="124.478" />
<path
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
sodipodi:nodetypes="ccccccccccccczcc"
inkscape:connector-curvature="0"
id="path1016-3"
d="m 156.84912,152.8902 c 0,0 -4.64317,17.25076 -4.79965,17.91698 0.22379,1.03041 2.12987,1.1969 3.07746,-0.0513 0.99308,1.70103 2.66154,0.69791 3.02532,0 0.5362,1.22214 2.35102,1.3643 3.02531,0.10249 0.20864,1.33245 1.92993,1.3837 2.86882,0 0.29334,1.4372 2.27544,0.85843 2.50371,-0.0513 1.64759,1.8746 2.72183,0.29919 2.97315,0.15374 0.15648,0.92247 2.13858,1.33245 2.71234,-0.20499 0.76572,1.46441 2.15627,1.27169 2.81667,0.20499 1.4556,1.48105 2.64821,0.56314 2.92099,-0.10249 1.52216,1.64931 2.74807,0.56617 2.86883,-0.20499 0.64839,1.35445 2.56158,1.63022 2.76451,-0.0513 0.15648,0.46123 2.87947,1.96442 2.81666,-0.0512 -0.0628,-2.01568 -4.26345,-17.38961 -4.26345,-17.38961 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
sodipodi:nodetypes="czzccccccc"
inkscape:connector-curvature="0"
id="path1014-4"
d="m 167.27385,140.09677 c 0,0 -0.11785,-4.0209 -0.0124,-8.12606 0.10542,-4.10517 4.92663,-3.61493 4.7746,0.104 -0.15202,3.71893 -0.0937,7.91956 -0.0937,7.91956 1.94457,0.4322 2.04458,2.83951 2.85658,5.80684 4.0456,1.51275 6.03838,2.73984 7.21754,7.17762 l -25.00864,-0.10637 c 1.11511,-2.50829 1.69674,-5.41689 7.35684,-7.16064 0.52807,-1.53828 0.50796,-5.49057 2.90923,-5.61495 z"
style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

101
icons/report.svg Normal file
View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="67.73333mm"
height="67.73333mm"
viewBox="0 0 67.73333 67.73333"
version="1.1"
id="svg2491"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
sodipodi:docname="report.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview2493"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.436055"
inkscape:cx="80.428674"
inkscape:cy="68.242512"
inkscape:window-width="1920"
inkscape:window-height="992"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2488" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-120.95491,-106.68899)">
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
y="106.68899"
x="120.95491"
height="67.73333"
width="67.73333"
id="rect982-3"
style="fill:none;fill-opacity:1;stroke:none;stroke-width:1.256;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000" />
<path
id="rect847-0-1-3"
style="fill:none;stroke:#000000;stroke-width:2.48942;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke markers fill;stop-color:#000000"
d="m 173.02817,114.19 h 3.71042 c 1.63134,0 2.94465,1.30222 2.94465,2.91977 v 51.61604 c 0,1.61756 -1.31331,2.91977 -2.94465,2.91977 h -42.99368 c -1.63133,0 -2.94465,-1.30221 -2.94465,-2.91977 v -51.61604 c 0,-1.61755 1.31332,-2.91977 2.94465,-2.91977 h 3.25326"
sodipodi:nodetypes="cssssssssc" />
<rect
y="136.53908"
x="135.34975"
height="5.9467759"
width="39.835781"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-8"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.25311;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="95.562637"
inkscape:export-ydpi="95.562637" />
<path
sodipodi:nodetypes="cszzsczzc"
inkscape:connector-curvature="0"
id="path849-6-6-5"
d="m 139.99174,112.01511 c 0,0 9.22154,-0.0566 10.43524,-0.0202 1.07225,0.0321 -0.34135,-1.89145 0.56892,-2.9463 0.91028,-1.05484 7.6804,-0.84598 8.55275,0.20886 0.87235,1.05485 -0.65354,2.8008 0.91028,2.8008 1.70677,0 10.09869,-0.0145 10.09869,-0.0145 0,0 7.77529,5.63796 5.19617,5.60158 -2.57912,-0.0364 -37.83963,0.12362 -40.83596,0.12362 -2.99633,0 5.07391,-5.7539 5.07391,-5.7539 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-xdpi="95.562637"
inkscape:export-ydpi="95.562637" />
<rect
inkscape:export-ydpi="95.562637"
inkscape:export-xdpi="95.562637"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.25311;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6-2"
width="39.835781"
height="5.9467759"
x="135.24069"
y="148.62894" />
<rect
y="160.42023"
x="135.2032"
height="5.9467759"
width="39.835781"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6-4-22"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.25311;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="95.562637"
inkscape:export-ydpi="95.562637" />
<rect
inkscape:export-ydpi="95.562637"
inkscape:export-xdpi="95.562637"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.25311;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-70"
width="39.835785"
height="5.9467759"
x="135.27483"
y="124.98509" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

125
icons/validate.svg Normal file
View file

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="67.73333mm"
height="67.73333mm"
viewBox="0 0 67.73333 67.73333"
version="1.1"
id="svg2491"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
sodipodi:docname="validate.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview2493"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.7180275"
inkscape:cx="244.41961"
inkscape:cy="206.12024"
inkscape:window-width="1920"
inkscape:window-height="992"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2488" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-124.61893,-103.22372)">
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:none;fill-opacity:1;stroke:none;stroke-width:1.256;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect982-9-8"
width="67.73333"
height="67.73333"
x="124.61893"
y="103.22372" />
<path
id="rect847-0-1"
style="fill:none;stroke:#000000;stroke-width:2.5;paint-order:stroke markers fill;stop-color:#000000"
d="m 169.66551,109.92162 h 4.14995 c 1.63133,0 2.94465,1.31332 2.94465,2.94465 v 52.05588 c 0,1.63133 -1.31332,2.94465 -2.94465,2.94465 h -42.99368 c -1.63134,0 -2.94465,-1.31332 -2.94465,-2.94465 v -52.05588 c 0,-1.63133 1.31331,-2.94465 2.94465,-2.94465 h 4.52474"
sodipodi:nodetypes="cssssssssc" />
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.23676;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7"
width="39.25959"
height="5.9467759"
x="133.00279"
y="132.7603" />
<path
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 137.06861,108.33894 c 0,0 9.22153,-0.0566 10.43524,-0.0202 1.07224,0.0321 -0.34136,-1.89145 0.56892,-2.94629 0.91028,-1.05485 7.6804,-0.84599 8.55275,0.20886 0.87235,1.05484 -0.65354,2.80079 0.91028,2.80079 1.70677,0 10.09869,-0.0145 10.09869,-0.0145 0,0 7.77529,5.63797 5.19617,5.60159 -2.57912,-0.0364 -37.83964,0.12363 -40.83597,0.12363 -2.99633,-1e-5 5.07392,-5.75391 5.07392,-5.75391 z"
id="path849-6-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cszzsczzc" />
<rect
y="144.85016"
x="132.89534"
height="5.9467759"
width="39.25959"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.23676;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
<rect
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.23676;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5-7-6-4"
width="39.25959"
height="5.9467759"
x="132.85837"
y="156.64145" />
<rect
y="121.20631"
x="132.92896"
height="5.9467759"
width="39.259594"
id="rect851-8-3-8-3-37-8-1-4-7-8-1-9-2-3-5"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.23676;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
<path
id="rect1186-4"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.889025;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
d="m 160.26757,134.88947 h 22.27055 c 3.42763,0 6.18706,2.54612 6.18706,5.70879 v 20.67999 c 0,3.16267 0.40717,5.62643 -4.07613,5.63922 l -24.38148,0.0696 c -3.42761,0.01 -6.18705,-2.54612 -6.18705,-5.70879 V 140.5983 c 0,-3.16267 2.75943,-5.70879 6.18705,-5.70879 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
<path
inkscape:export-ydpi="96.000015"
inkscape:export-xdpi="96.000015"
sodipodi:nodetypes="cssssssc"
id="path1170-7"
d="m 188.50413,149.14281 v 14.92431 c 0,2.08279 -1.68738,3.77123 -3.76888,3.77123 h -26.38209 c -2.08149,0 -3.76887,-1.68844 -3.76887,-3.77123 v -26.39859 c 0,-2.08279 1.68738,-3.77122 3.76887,-3.77122 h 23.60203"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:2.68422;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" />
<path
id="polyline1168-0"
style="fill:none;stroke:#099c00;stroke-width:7.24438;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 162.58302,150.28058 8.58283,7.04191 15.43985,-17.93997"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc"
inkscape:export-xdpi="96.000015"
inkscape:export-ydpi="96.000015" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

1175
images/left-navigator.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 64 KiB

1175
images/right-navigator.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -1,8 +1,6 @@
The author of this extension is:
Georgy Litvinov (public@litvinovg.pro)
Copyright 2019.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License.
Copyright 2021 redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

View file

@ -1,6 +1,6 @@
Автор расширения:
Георгий Литвинов (public@litvinovg.pro)
Copyright 2019.
Copyright 2021.
Это расширение является свободным программным обеспечением, вы можете распространять и/или модифицировать его в соответствии с лицензией GNU Lesser General Public License версии 3.0, опубликованной Free Software Foundation.

View file

@ -1,3 +1,20 @@
0.9.36 Added option to remove all colored text backgrounds in expert mode
0.9.35 Validation reports improved
0.9.21 Added option to reset chapters numbering. Enabled by default.
0.9.5 "Remove fields" option added to advanced mode
0.9.4 Added check for grouped draw elements in font report function
0.9.3 Fix for font report function
0.9.2 Font report in Draw added
0.8.6 Validation status indicator added
0.8.4 Added check for headings in footers and headers
0.8.3 Added check for sections in tables
0.7.19 Do not try to clean in read only mode
0.7.16 Added timestamp to document properties after cleaning
0.7.14 Search for formatting in styles
0.7.13 Added conversion to doc and back to odt to filter broken default paragraph style settings
0.7.12 Transaltions update, fix for mistakes added
0.7.11 Serbian, Croatian, Bosnian translations added
0.7.9 Translations improved
0.7.5 Small fix for frequent mistakes macro
0.7.4 Bugfixes
0.7.2 Dialog for loading template added

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<groupuinames:template-group-list xmlns:groupuinames="http://openoffice.org/2006/groupuinames">
<groupuinames:template-group groupuinames:name="articles" groupuinames:default-ui-name="Articles" />
</groupuinames:template-group-list>

BIN
translations.ods Normal file

Binary file not shown.