Remove user defined page styles on cleaning
This commit is contained in:
parent
874cbea922
commit
0d8e96286f
2 changed files with 21 additions and 3 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 markXXFXK
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub markXXFXKY
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ Sub cleanButton
|
||||||
fixTableWidth
|
fixTableWidth
|
||||||
fixDrawingAnchors
|
fixDrawingAnchors
|
||||||
fixFrequentMistakes
|
fixFrequentMistakes
|
||||||
|
removeUserPageStyles
|
||||||
loadArticleStyles
|
loadArticleStyles
|
||||||
statusIndicator.end()
|
statusIndicator.end()
|
||||||
saveAndreload()
|
saveAndreload()
|
||||||
|
@ -102,6 +103,23 @@ Private Sub convertFontsToCharStyles
|
||||||
loop
|
loop
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub removeUserPageStyles
|
||||||
|
Dim oStyles As Object
|
||||||
|
Dim oStyle As Object
|
||||||
|
oStyles = ThisComponent.StyleFamilies.getByName("PageStyles")
|
||||||
|
Dim count As Long
|
||||||
|
count = oStyles.count - 1
|
||||||
|
For i = 0 to count
|
||||||
|
oStyle = oStyles.getByIndex(i)
|
||||||
|
If oStyle.isUserDefined Then
|
||||||
|
oStyles.removeByName(oStyle.getName)
|
||||||
|
count = oStyles.count - 1
|
||||||
|
'restart if style removed as sorting is unreliable
|
||||||
|
i = -1
|
||||||
|
EndIf
|
||||||
|
Next i
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub fixFrequentMistakes
|
Private Sub fixFrequentMistakes
|
||||||
Dim NBSP As String
|
Dim NBSP As String
|
||||||
Dim space As String
|
Dim space As String
|
||||||
|
|
|
@ -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.5" />
|
<version value="0.2.6" />
|
||||||
<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