Fixed status indicator on cleaning and disabled fixing hyphen between numbers
This commit is contained in:
parent
54aea6994a
commit
bd840a6499
1 changed files with 9 additions and 4 deletions
|
@ -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="Clean" script:language="StarBasic">Sub mark69
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark70
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -56,9 +56,9 @@ End Sub
|
|||
|
||||
Private Sub cleanAccordingTo(dialog As Object)
|
||||
Dim statusIndicator as Object
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
dialog.setVisible(false)
|
||||
saveDocument
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
statusIndicator.Start(getTranslation("statusStarted"),100)
|
||||
doNotTrack
|
||||
If dialog.getControl("loadStandardStyles").state = 1 Then
|
||||
|
@ -106,6 +106,8 @@ Private Sub cleanAccordingTo(dialog As Object)
|
|||
fixDrawingAnchors
|
||||
EndIf
|
||||
If dialog.getControl("fixMistakes").state = 1 Then
|
||||
saveAndreload()
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
statusIndicator.Start(getTranslation("statusFixFrequentMistakes"),100)
|
||||
fixFrequentMistakes
|
||||
EndIf
|
||||
|
@ -154,9 +156,10 @@ End Sub
|
|||
Private Sub quietCleaning
|
||||
Dim description As String
|
||||
Dim statusIndicator As Object
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
|
||||
saveDocument
|
||||
saveAsDocAndBackToODT
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
statusIndicator.Start(getTranslation("statusStarted"),100)
|
||||
doNotTrack
|
||||
statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100)
|
||||
|
@ -177,6 +180,8 @@ Private Sub quietCleaning
|
|||
fixTableWidth
|
||||
statusIndicator.Start(getTranslation("statusConfigureImagesAnchors"),100)
|
||||
fixDrawingAnchors
|
||||
saveAndreload()
|
||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||
statusIndicator.Start(getTranslation("statusFixFrequentMistakes"),100)
|
||||
fixFrequentMistakes
|
||||
statusIndicator.Start(getTranslation("statusRemovePageBreakAtStart"),100)
|
||||
|
@ -428,7 +433,7 @@ Private Sub fixFrequentMistakes
|
|||
AskAndReplace("(?<=[:alpha:][:space:])[-‒—−](?=[:space:][:alpha:])","–")
|
||||
'Между двумя цифрами и тире не долнжо быть пробелов. А также тире должно быть цифровым.
|
||||
'Также проверяем, что перед искомым тире нет DOI
|
||||
AskAndReplace("(?<!DOI[0-9. /XVI:-‒–—−-]{1,50})(?<=[:digit:])(?:[:space:])?[-‒–—−](?:[:space:])?(?=[:digit:])","‒")
|
||||
'''''AskAndReplace("(?<!DOI[0-9. /XVI:-‒–—−-]{1,50})(?<=[:digit:])(?:[:space:])?[-‒–—−](?:[:space:])?(?=[:digit:])","‒")
|
||||
'Между двумя римскими цифрами и тире между ними не долнжо быть пробелов. А также тире должно быть средним
|
||||
AskAndReplace("(?<=[MDCLXVI])(?:[:space:])?[-‒–—−](?:[:space:])?(?=[MDCLXVI])","–")
|
||||
'Между буквой и угловой открывающейся скобкой должен быть пробел
|
||||
|
|
Loading…
Add table
Reference in a new issue