Fix for previous commit
This commit is contained in:
parent
e849641e00
commit
3fb6cd1713
1 changed files with 21 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!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 mark7
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark8
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -13,18 +13,29 @@ Sub cleanButton
|
||||||
Exit Sub
|
Exit Sub
|
||||||
EndIf
|
EndIf
|
||||||
saveDocument
|
saveDocument
|
||||||
|
statusIndicator.Start("Чистка документа начата, подождите",100)
|
||||||
doNotTrack
|
doNotTrack
|
||||||
statusIndicator.Start("Чистка документа начата, подождите",30)
|
statusIndicator.SetText("Заменяем шрифты в стилях")
|
||||||
replaceStyleFonts
|
replaceStyleFonts
|
||||||
|
statusIndicator.SetText("Конвертируем символы в целевые шрифты")
|
||||||
unicodeSymbolsConversion
|
unicodeSymbolsConversion
|
||||||
|
statusIndicator.SetText("Чистим ручное форматирование")
|
||||||
cleanFormatting
|
cleanFormatting
|
||||||
|
statusIndicator.SetText("Удаленем гиперссылки")
|
||||||
removeHyperlinks
|
removeHyperlinks
|
||||||
|
statusIndicator.SetText("Удаляем закладки")
|
||||||
disposeAllBookmarks
|
disposeAllBookmarks
|
||||||
|
statusIndicator.SetText("Настраиваем таблицы")
|
||||||
fixTableWidth
|
fixTableWidth
|
||||||
|
statusIndicator.SetText("Настраиваем привязку изображений")
|
||||||
fixDrawingAnchors
|
fixDrawingAnchors
|
||||||
|
statusIndicator.SetText("Исправляем часто встречающиеся ошибки")
|
||||||
fixFrequentMistakes
|
fixFrequentMistakes
|
||||||
|
statusIndicator.SetText("Удаляем разрыв страницы, если он задан в начале документа")
|
||||||
removeFirstElementPageBreak
|
removeFirstElementPageBreak
|
||||||
|
statusIndicator.SetText("Удаляем пользовательские стили страниц")
|
||||||
removeUserPageStyles
|
removeUserPageStyles
|
||||||
|
statusIndicator.SetText("Загружаем стили из шаблона")
|
||||||
loadArticleStyles
|
loadArticleStyles
|
||||||
statusIndicator.end()
|
statusIndicator.end()
|
||||||
saveAndreload()
|
saveAndreload()
|
||||||
|
@ -456,10 +467,8 @@ Sub setAttributesBySearchPattern(searchPattern As String,ReplAttributes, Optiona
|
||||||
EndIf
|
EndIf
|
||||||
If replace then
|
If replace then
|
||||||
For i = LBound(ReplAttributes) To Ubound(ReplAttributes)
|
For i = LBound(ReplAttributes) To Ubound(ReplAttributes)
|
||||||
attrName = ReplAttributes(i).Name
|
If oFound.getPropertySetInfo.hasPropertyByName(ReplAttributes(i).Name) Then
|
||||||
attrValue = ReplAttributes(i).Value
|
oFound.SetPropertyValue(ReplAttributes(i).Name, ReplAttributes(i).Value)
|
||||||
If oFound.getPropertySetInfo.hasPropertyByName(attrName) Then
|
|
||||||
oFound.SetPropertyValue(attrName,attrValue)
|
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -626,8 +635,7 @@ Private Sub removeDirectFormatting
|
||||||
document = ThisComponent.CurrentController.Frame
|
document = ThisComponent.CurrentController.Frame
|
||||||
Dim oViewCursor As Object 'View cursor
|
Dim oViewCursor As Object 'View cursor
|
||||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
|
||||||
' Mri oViewCursor
|
|
||||||
oViewCursor.jumpToFirstPage()
|
oViewCursor.jumpToFirstPage()
|
||||||
oViewCursor.gotoStart(false)
|
oViewCursor.gotoStart(false)
|
||||||
oViewCursor.gotoEnd(true)
|
oViewCursor.gotoEnd(true)
|
||||||
|
@ -984,7 +992,7 @@ Private Sub convertWLLatin2IPHAstra
|
||||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
oSearchString = "(.)\u0331"
|
oSearchString = "(.)\u0331"
|
||||||
'from unicode to remove direct formatting
|
'from unicode to remove direct formatting
|
||||||
searchAndRemoveDirectFormatting(oSearchString)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
|
|
||||||
'Replace dot below
|
'Replace dot below
|
||||||
oSearchString = "(.)\uF0D6"
|
oSearchString = "(.)\uF0D6"
|
||||||
|
@ -993,7 +1001,7 @@ Private Sub convertWLLatin2IPHAstra
|
||||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
'from unicode to remove direct formatting
|
'from unicode to remove direct formatting
|
||||||
oSearchString = "(.)\u0323"
|
oSearchString = "(.)\u0323"
|
||||||
searchAndRemoveDirectFormatting(oSearchString)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
|
|
||||||
'replace macron
|
'replace macron
|
||||||
oSearchString = "(.)\uF0F4"
|
oSearchString = "(.)\uF0F4"
|
||||||
|
@ -1002,7 +1010,7 @@ Private Sub convertWLLatin2IPHAstra
|
||||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
'from unicode to remove direct formatting
|
'from unicode to remove direct formatting
|
||||||
oSearchString = "(.)\u0304"
|
oSearchString = "(.)\u0304"
|
||||||
searchAndRemoveDirectFormatting(oSearchString)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
|
|
||||||
'replace accent
|
'replace accent
|
||||||
oSearchString = "(.)\uF0F1"
|
oSearchString = "(.)\uF0F1"
|
||||||
|
@ -1010,7 +1018,7 @@ Private Sub convertWLLatin2IPHAstra
|
||||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
'from unicode to remove direct formatting
|
'from unicode to remove direct formatting
|
||||||
oSearchString = "(.)\u0341"
|
oSearchString = "(.)\u0341"
|
||||||
searchAndRemoveDirectFormatting(oSearchString)
|
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||||
|
|
||||||
replaceFontsInStyles( "WL LatinAllIn1Goth", newFontName)
|
replaceFontsInStyles( "WL LatinAllIn1Goth", newFontName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
Loading…
Add table
Reference in a new issue