Don't save default font as charstyle style

This commit is contained in:
George Litvinov 2019-11-06 12:45:01 +03:00
parent d8567c7c8b
commit d3d319419e
3 changed files with 10 additions and 8 deletions

View file

@ -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 markXXFXKY <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub markFDSID
End Sub End Sub
@ -108,11 +108,13 @@ Private Sub convertFontsToCharStyles
founds = Thiscomponent.findFirst(SDesc) founds = Thiscomponent.findFirst(SDesc)
do while not isNull(founds) do while not isNull(founds)
curFont = founds.CharFontName curFont = founds.CharFontName
If curFont &lt;&gt; &quot;IPH Astra Serif&quot; AND curFont &lt;&gt; &quot;&quot; Then
If Not DocHasCharStyle(oDoc,curFont) Then If Not DocHasCharStyle(oDoc,curFont) Then
oProps() = Array(CreateProperty(&quot;CharFontName&quot;, curFont)) oProps() = Array(CreateProperty(&quot;CharFontName&quot;, curFont))
CreateCharacterStyle(curFont, oProps()) CreateCharacterStyle(curFont, oProps())
End If End If
founds.CharStyleNames = Array(curFont) founds.CharStyleNames = Array(curFont)
EndIf
founds = Thiscomponent.findNext(founds.getend, SDesc) founds = Thiscomponent.findNext(founds.getend, SDesc)
loop loop
End Sub End Sub

View file

@ -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.2.7" /> <version value="0.2.8" />
<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>

Binary file not shown.