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"?>
|
<?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 markFDSID
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark2
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -16,10 +16,8 @@ Sub cleanButton
|
||||||
doNotTrack
|
doNotTrack
|
||||||
statusIndicator.Start("Чистка документа начата, подождите",30)
|
statusIndicator.Start("Чистка документа начата, подождите",30)
|
||||||
unicodeSymbolsConversion
|
unicodeSymbolsConversion
|
||||||
convertFontsToCharStyles
|
|
||||||
saveAndreload()
|
|
||||||
cleanFormatting
|
cleanFormatting
|
||||||
saveAndreload()
|
|
||||||
removeHyperlinks
|
removeHyperlinks
|
||||||
disposeAllBookmarks
|
disposeAllBookmarks
|
||||||
fixTableWidth
|
fixTableWidth
|
||||||
|
@ -447,7 +445,7 @@ Private Sub cleanFormatting
|
||||||
|
|
||||||
convertFormattingToText
|
convertFormattingToText
|
||||||
|
|
||||||
manualFontsToCharStyle
|
convertFontsToCharStyles
|
||||||
|
|
||||||
removeDirectFormatting
|
removeDirectFormatting
|
||||||
|
|
||||||
|
@ -490,32 +488,6 @@ Private Sub fixDrawingAnchors()
|
||||||
Next
|
Next
|
||||||
End Sub
|
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
|
Private Sub replaceBaseWithStandard
|
||||||
replaceParaStyle("Базовый","Основной текст")
|
replaceParaStyle("Базовый","Основной текст")
|
||||||
replaceParaStyle("Default Style","Text Body")
|
replaceParaStyle("Default Style","Text Body")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="pro.litvinovg.Redaction" />
|
<identifier value="pro.litvinovg.Redaction" />
|
||||||
<version value="0.3.1" />
|
<version value="0.3.2" />
|
||||||
<platform value="all" />
|
<platform value="all" />
|
||||||
<display-name>
|
<display-name>
|
||||||
<name lang="en">Redaction for publishing in Institute of philosophy</name>
|
<name lang="en">Redaction for publishing in Institute of philosophy</name>
|
||||||
|
|
Loading…
Add table
Reference in a new issue