Bugfix for lost formatting
This commit is contained in:
parent
1887103742
commit
8d1cefa979
2 changed files with 5 additions and 33 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 markFDSID
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark2
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -16,10 +16,8 @@ Sub cleanButton
|
|||
doNotTrack
|
||||
statusIndicator.Start("Чистка документа начата, подождите",30)
|
||||
unicodeSymbolsConversion
|
||||
convertFontsToCharStyles
|
||||
saveAndreload()
|
||||
|
||||
cleanFormatting
|
||||
saveAndreload()
|
||||
removeHyperlinks
|
||||
disposeAllBookmarks
|
||||
fixTableWidth
|
||||
|
@ -447,7 +445,7 @@ Private Sub cleanFormatting
|
|||
|
||||
convertFormattingToText
|
||||
|
||||
manualFontsToCharStyle
|
||||
convertFontsToCharStyles
|
||||
|
||||
removeDirectFormatting
|
||||
|
||||
|
@ -490,32 +488,6 @@ Private Sub fixDrawingAnchors()
|
|||
Next
|
||||
End Sub
|
||||
|
||||
Sub manualFontsToCharStyle
|
||||
Dim oDoc
|
||||
oDoc = Thiscomponent
|
||||
Dim srch(0) as new com.sun.star.beans.PropertyValue
|
||||
SDesc = Thiscomponent.createSearchDescriptor()
|
||||
SDesc.SearchAll = true
|
||||
SDesc.ValueSearch = false
|
||||
SDesc.SearchStyles = false
|
||||
SDesc.SearchRegularExpression = false
|
||||
SDesc.SearchString = ""
|
||||
srch(0).Name = "CharFontName"
|
||||
SDesc.SetSearchAttributes(srch())
|
||||
founds = Thiscomponent.findFirst(SDesc)
|
||||
do while not isNull(founds)
|
||||
curFont = founds.CharFontName
|
||||
If curFont <> "IPH Astra Serif" AND curFont <> "" Then
|
||||
If Not DocHasCharStyle(oDoc,curFont) Then
|
||||
oProps() = Array(CreateProperty("CharFontName", curFont))
|
||||
CreateCharacterStyle(curFont, oProps())
|
||||
End If
|
||||
founds.CharStyleNames = Array(curFont)
|
||||
End If
|
||||
founds = Thiscomponent.findNext(founds.getend, SDesc)
|
||||
loop
|
||||
End Sub
|
||||
|
||||
Private Sub replaceBaseWithStandard
|
||||
replaceParaStyle("Базовый","Основной текст")
|
||||
replaceParaStyle("Default Style","Text Body")
|
||||
|
@ -932,4 +904,4 @@ Private Function getStyleNames(oFamily,bLocalized as Boolean, _
|
|||
Endif
|
||||
xArray(iUB) = vNextElement
|
||||
End Sub
|
||||
</script:module>
|
||||
</script:module>
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<identifier value="pro.litvinovg.Redaction" />
|
||||
<version value="0.3.1" />
|
||||
<version value="0.3.2" />
|
||||
<platform value="all" />
|
||||
<display-name>
|
||||
<name lang="en">Redaction for publishing in Institute of philosophy</name>
|
||||
|
|
Loading…
Add table
Reference in a new issue