Push new version
This commit is contained in:
parent
17dd694249
commit
d0bba1db42
2 changed files with 32 additions and 20 deletions
|
@ -495,20 +495,20 @@ Function hasBrokenCharBackTransparent As Boolean
|
||||||
Dim oStyles As Object
|
Dim oStyles As Object
|
||||||
Dim pageStyles As Object
|
Dim pageStyles As Object
|
||||||
Dim pageStyle As Object
|
Dim pageStyle As Object
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(ThisComponent.Text)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(ThisComponent.Text)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
footNotes = ThisComponent.FootNotes
|
footNotes = ThisComponent.FootNotes
|
||||||
For i = 0 to footNotes.getCount - 1
|
For i = 0 to footNotes.getCount - 1
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(footNotes.getByIndex(i).Text)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(footNotes.getByIndex(i).Text)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
endNotes = thisComponent.footNotes
|
endNotes = thisComponent.footNotes
|
||||||
For i = 0 to footNotes.Count -1
|
For i = 0 to footNotes.Count -1
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(endNotes.getByIndex(i).Text)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(endNotes.getByIndex(i).Text)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -518,49 +518,49 @@ Function hasBrokenCharBackTransparent As Boolean
|
||||||
For i = 0 to pageStyles.Count -1
|
For i = 0 to pageStyles.Count -1
|
||||||
pageStyle = pageStyles.getByIndex(i)
|
pageStyle = pageStyles.getByIndex(i)
|
||||||
If Not IsEmpty(pageStyle.FooterText) Then
|
If Not IsEmpty(pageStyle.FooterText) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterText)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterText)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.FooterTextFirst) Then
|
If Not IsEmpty(pageStyle.FooterTextFirst) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextFirst)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextFirst)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.FooterTextRight) Then
|
If Not IsEmpty(pageStyle.FooterTextRight) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextRight)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextRight)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.FooterTextLeft) Then
|
If Not IsEmpty(pageStyle.FooterTextLeft) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextLeft)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextLeft)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.HeaderText) Then
|
If Not IsEmpty(pageStyle.HeaderText) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderText)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderText)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.HeaderTextFirst) Then
|
If Not IsEmpty(pageStyle.HeaderTextFirst) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextFirst)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextFirst)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.HeaderTextRight) Then
|
If Not IsEmpty(pageStyle.HeaderTextRight) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextRight)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextRight)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
If Not IsEmpty(pageStyle.HeaderTextLeft) Then
|
If Not IsEmpty(pageStyle.HeaderTextLeft) Then
|
||||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextLeft)
|
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextLeft)
|
||||||
If (hasBrokenCharBackTransparent) Then
|
If (hasBrokenCharBackTransparent) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -568,9 +568,21 @@ Function hasBrokenCharBackTransparent As Boolean
|
||||||
Next i
|
Next i
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function isManualCharBackTransparent(para As Object) As Boolean
|
||||||
|
Dim styleName As String
|
||||||
|
Dim paraStyles As Object
|
||||||
|
isManualCharBackTransparent = false
|
||||||
|
If para.CharBackTransparent = false Then
|
||||||
|
styleName = para.ParaStyleName
|
||||||
|
paraStyles = ThisComponent.StyleFamilies.getByName("ParagraphStyles")
|
||||||
|
paraStyle = paraStyles.GetByName(styleName)
|
||||||
|
If paraStyle.CharBackTransparent = true Then
|
||||||
|
isManualCharBackTransparent = true
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function isManualCharBackTransparentInTextParas(oText As Object) As Boolean
|
||||||
Function isBackColorInText(oText As Object) As Boolean
|
|
||||||
Dim enum1Element As Object
|
Dim enum1Element As Object
|
||||||
Dim enum1 As Object
|
Dim enum1 As Object
|
||||||
Dim enum2 As Object
|
Dim enum2 As Object
|
||||||
|
@ -587,8 +599,8 @@ Function isBackColorInText(oText As Object) As Boolean
|
||||||
While enum1.hasMoreElements
|
While enum1.hasMoreElements
|
||||||
enum1Element = enum1.nextElement
|
enum1Element = enum1.nextElement
|
||||||
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
||||||
If enum1Element.CharBackTransparent = false Then
|
If isManualCharBackTransparent(enum1Element) Then
|
||||||
isBackColorInText = true
|
isManualCharBackTransparentInTextParas = true
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
||||||
|
@ -596,14 +608,14 @@ Function isBackColorInText(oText As Object) As Boolean
|
||||||
For i = LBound(cellNames) To Ubound(cellNames)
|
For i = LBound(cellNames) To Ubound(cellNames)
|
||||||
cell = enum1Element.getCellByName(cellNames(i))
|
cell = enum1Element.getCellByName(cellNames(i))
|
||||||
cellText = cell.getText()
|
cellText = cell.getText()
|
||||||
If isBackColorInText(cellText) Then
|
If isManualCharBackTransparentInTextParas(cellText) Then
|
||||||
isBackColorInText = true
|
isManualCharBackTransparentInTextParas = true
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
EndIf
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
isBackColorInText = false
|
isManualCharBackTransparentInTextParas = false
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<description xmlns="http://openoffice.org/extensions/update/2006"
|
<description xmlns="http://openoffice.org/extensions/update/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.9.36" />
|
<version value="0.9.37" />
|
||||||
<update-download>
|
<update-download>
|
||||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/0c19a72a880013872948c24a73ac6761/cleanAndValidate.oxt" />
|
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/1e0dc8e6899835eca2ba546c22725eba/cleanAndValidate.oxt" />
|
||||||
</update-download>
|
</update-download>
|
||||||
<release-notes>
|
<release-notes>
|
||||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/releasenotes.txt" lang="en" />
|
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/releasenotes.txt" lang="en" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue