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 pageStyles As Object
|
||||
Dim pageStyle As Object
|
||||
hasBrokenCharBackTransparent = isBackColorInText(ThisComponent.Text)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(ThisComponent.Text)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
footNotes = ThisComponent.FootNotes
|
||||
For i = 0 to footNotes.getCount - 1
|
||||
hasBrokenCharBackTransparent = isBackColorInText(footNotes.getByIndex(i).Text)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(footNotes.getByIndex(i).Text)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
Next i
|
||||
endNotes = thisComponent.footNotes
|
||||
For i = 0 to footNotes.Count -1
|
||||
hasBrokenCharBackTransparent = isBackColorInText(endNotes.getByIndex(i).Text)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(endNotes.getByIndex(i).Text)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
|
@ -518,49 +518,49 @@ Function hasBrokenCharBackTransparent As Boolean
|
|||
For i = 0 to pageStyles.Count -1
|
||||
pageStyle = pageStyles.getByIndex(i)
|
||||
If Not IsEmpty(pageStyle.FooterText) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterText)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterText)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.FooterTextFirst) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextFirst)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextFirst)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.FooterTextRight) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextRight)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextRight)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.FooterTextLeft) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.FooterTextLeft)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.FooterTextLeft)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.HeaderText) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderText)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderText)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.HeaderTextFirst) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextFirst)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextFirst)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.HeaderTextRight) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextRight)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextRight)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
EndIf
|
||||
If Not IsEmpty(pageStyle.HeaderTextLeft) Then
|
||||
hasBrokenCharBackTransparent = isBackColorInText(pageStyle.HeaderTextLeft)
|
||||
hasBrokenCharBackTransparent = isManualCharBackTransparentInTextParas(pageStyle.HeaderTextLeft)
|
||||
If (hasBrokenCharBackTransparent) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
|
@ -568,9 +568,21 @@ Function hasBrokenCharBackTransparent As Boolean
|
|||
Next i
|
||||
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 isBackColorInText(oText As Object) As Boolean
|
||||
Function isManualCharBackTransparentInTextParas(oText As Object) As Boolean
|
||||
Dim enum1Element As Object
|
||||
Dim enum1 As Object
|
||||
Dim enum2 As Object
|
||||
|
@ -587,8 +599,8 @@ Function isBackColorInText(oText As Object) As Boolean
|
|||
While enum1.hasMoreElements
|
||||
enum1Element = enum1.nextElement
|
||||
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
||||
If enum1Element.CharBackTransparent = false Then
|
||||
isBackColorInText = true
|
||||
If isManualCharBackTransparent(enum1Element) Then
|
||||
isManualCharBackTransparentInTextParas = true
|
||||
Exit Function
|
||||
EndIf
|
||||
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)
|
||||
cell = enum1Element.getCellByName(cellNames(i))
|
||||
cellText = cell.getText()
|
||||
If isBackColorInText(cellText) Then
|
||||
isBackColorInText = true
|
||||
If isManualCharBackTransparentInTextParas(cellText) Then
|
||||
isManualCharBackTransparentInTextParas = true
|
||||
Exit Function
|
||||
EndIf
|
||||
Next i
|
||||
EndIf
|
||||
Wend
|
||||
isBackColorInText = false
|
||||
isManualCharBackTransparentInTextParas = false
|
||||
End Function
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<description xmlns="http://openoffice.org/extensions/update/2006"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<identifier value="pro.litvinovg.Redaction"/>
|
||||
<version value="0.9.36" />
|
||||
<version value="0.9.37" />
|
||||
<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>
|
||||
<release-notes>
|
||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/releasenotes.txt" lang="en" />
|
||||
|
|
Loading…
Add table
Reference in a new issue