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"?>
|
||||
<!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
|
||||
|
||||
|
@ -13,18 +13,29 @@ Sub cleanButton
|
|||
Exit Sub
|
||||
EndIf
|
||||
saveDocument
|
||||
statusIndicator.Start("Чистка документа начата, подождите",100)
|
||||
doNotTrack
|
||||
statusIndicator.Start("Чистка документа начата, подождите",30)
|
||||
statusIndicator.SetText("Заменяем шрифты в стилях")
|
||||
replaceStyleFonts
|
||||
unicodeSymbolsConversion
|
||||
statusIndicator.SetText("Конвертируем символы в целевые шрифты")
|
||||
unicodeSymbolsConversion
|
||||
statusIndicator.SetText("Чистим ручное форматирование")
|
||||
cleanFormatting
|
||||
statusIndicator.SetText("Удаленем гиперссылки")
|
||||
removeHyperlinks
|
||||
statusIndicator.SetText("Удаляем закладки")
|
||||
disposeAllBookmarks
|
||||
statusIndicator.SetText("Настраиваем таблицы")
|
||||
fixTableWidth
|
||||
statusIndicator.SetText("Настраиваем привязку изображений")
|
||||
fixDrawingAnchors
|
||||
statusIndicator.SetText("Исправляем часто встречающиеся ошибки")
|
||||
fixFrequentMistakes
|
||||
statusIndicator.SetText("Удаляем разрыв страницы, если он задан в начале документа")
|
||||
removeFirstElementPageBreak
|
||||
statusIndicator.SetText("Удаляем пользовательские стили страниц")
|
||||
removeUserPageStyles
|
||||
statusIndicator.SetText("Загружаем стили из шаблона")
|
||||
loadArticleStyles
|
||||
statusIndicator.end()
|
||||
saveAndreload()
|
||||
|
@ -456,10 +467,8 @@ Sub setAttributesBySearchPattern(searchPattern As String,ReplAttributes, Optiona
|
|||
EndIf
|
||||
If replace then
|
||||
For i = LBound(ReplAttributes) To Ubound(ReplAttributes)
|
||||
attrName = ReplAttributes(i).Name
|
||||
attrValue = ReplAttributes(i).Value
|
||||
If oFound.getPropertySetInfo.hasPropertyByName(attrName) Then
|
||||
oFound.SetPropertyValue(attrName,attrValue)
|
||||
If oFound.getPropertySetInfo.hasPropertyByName(ReplAttributes(i).Name) Then
|
||||
oFound.SetPropertyValue(ReplAttributes(i).Name, ReplAttributes(i).Value)
|
||||
EndIf
|
||||
Next i
|
||||
EndIf
|
||||
|
@ -626,8 +635,7 @@ Private Sub removeDirectFormatting
|
|||
document = ThisComponent.CurrentController.Frame
|
||||
Dim oViewCursor As Object 'View cursor
|
||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||
' Mri oViewCursor
|
||||
|
||||
oViewCursor.jumpToFirstPage()
|
||||
oViewCursor.gotoStart(false)
|
||||
oViewCursor.gotoEnd(true)
|
||||
|
@ -984,7 +992,7 @@ Private Sub convertWLLatin2IPHAstra
|
|||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
oSearchString = "(.)\u0331"
|
||||
'from unicode to remove direct formatting
|
||||
searchAndRemoveDirectFormatting(oSearchString)
|
||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
|
||||
'Replace dot below
|
||||
oSearchString = "(.)\uF0D6"
|
||||
|
@ -993,7 +1001,7 @@ Private Sub convertWLLatin2IPHAstra
|
|||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
'from unicode to remove direct formatting
|
||||
oSearchString = "(.)\u0323"
|
||||
searchAndRemoveDirectFormatting(oSearchString)
|
||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
|
||||
'replace macron
|
||||
oSearchString = "(.)\uF0F4"
|
||||
|
@ -1002,7 +1010,7 @@ Private Sub convertWLLatin2IPHAstra
|
|||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
'from unicode to remove direct formatting
|
||||
oSearchString = "(.)\u0304"
|
||||
searchAndRemoveDirectFormatting(oSearchString)
|
||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
|
||||
'replace accent
|
||||
oSearchString = "(.)\uF0F1"
|
||||
|
@ -1010,7 +1018,7 @@ Private Sub convertWLLatin2IPHAstra
|
|||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
'from unicode to remove direct formatting
|
||||
oSearchString = "(.)\u0341"
|
||||
searchAndRemoveDirectFormatting(oSearchString)
|
||||
ReplaceFormatting(oSearchString,oReplaceString,SrchAttributes,ReplAttributes, false)
|
||||
|
||||
replaceFontsInStyles( "WL LatinAllIn1Goth", newFontName)
|
||||
End Sub
|
||||
|
|
Loading…
Add table
Reference in a new issue