Moved doi check to extended cleaning

This commit is contained in:
Georgy Litvinov 2020-12-09 12:00:05 +01:00
parent b73e2b2caf
commit 9a412e73b9
5 changed files with 64 additions and 16 deletions

View file

@ -1,6 +1,6 @@
<?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="Validation" script:language="StarBasic">Sub markval20
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval21
End Sub
@ -73,7 +73,7 @@ Sub validateButton
If sectionsReport &lt;&gt; &quot;&quot; Then
MsgBox sectionsReport
EndIf
If isInDoc(&quot;[\uE000-\uF8FF]&quot;) Or isInDoc(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[ХOО]{1,5}&quot;) Then
If isInDoc(&quot;[\uE000-\uF8FF]&quot;) Then
badText = true
EndIf
@ -145,13 +145,25 @@ End Function
Private Sub removeBadCharacters
StartTracking
AskAndReplace(&quot;[\uE000-\uF8FF]+&quot;,&quot;&quot;)
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[Х]{1,5}&quot;,&quot;X&quot;)
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[OО]{1,5}&quot;,&quot;0&quot;)
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[‒–—−]{1,5}&quot;,&quot;-&quot;)
StopTracking
showTrackedChanges
End Sub
Private Sub fixDOI
StartTracking
replaceCharsInDOI
StopTracking
showTrackedChanges
End Sub
Sub replaceCharsInDOI
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[Х]{1,5}&quot;,&quot;X&quot;)
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[OО]{1,5}&quot;,&quot;0&quot;)
AskAndReplace(&quot;(?&lt;=DOI[0-9. /XVI:ХOО?-]{1,50})[‒–—−]{1,5}&quot;,&quot;-&quot;)
End sub
Private Function noteSingsCheck() As String
Dim footnotes As Object
Dim footnote As Object