| View previous topic :: View next topic |
| Author |
Message |
jelaih OOo Enthusiast


Joined: 23 Feb 2005 Posts: 152
|
Posted: Fri Dec 09, 2005 3:19 am Post subject: table borders |
|
|
Is it a bug on 1.1.4? I have used Danny's function "MakeCellBorderLine" to create my own border
| Code: |
Sub tbl_border_onerow 'blue
Dim oSels,oTables,oCells
oSels = ThisComponent.getCurrentController().getSelection()
oVC = ThisComponent.getCurrentController().getViewCursor()
oVC.cell.BottomBorder = MakeCellBorderLine( RGB(0,0,255), 150, 150, 100)
End sub
Sub tbl_border_halfrow 'red
Dim oSels,oTables,oCells
oSels = ThisComponent.getCurrentController().getSelection()
oVC = ThisComponent.getCurrentController().getViewCursor()
oVC.cell.BottomBorder = MakeCellBorderLine( RGB(255,0,0), 0, 150, 0)
End sub
Function MakeCellBorderLine( nColor, nInnerLineWidth, nOuterLineWidth, nLineDistance ) _
As com.sun.star.table.BorderLine
oBorderLine = createUnoStruct( "com.sun.star.table.BorderLine" )
With oBorderLine
.Color = nColor
.InnerLineWidth = nInnerLineWidth
.OuterLineWidth = nOuterLineWidth
.LineDistance = nLineDistance
End With
MakeCellBorderLine = oBorderLine
End Function
|
"tbl_border_halfrow" works fine, my prob is with "tbl_border_onerow" because whenever I close and open the document again, the double border lines became a single line. Then when I close and re-open it again, its borders finally disappeared. How come it won't work on double borders while it works on a single one? I'm I missing something? Thanks _________________ codebits...  |
|
| Back to top |
|
 |
jelaih OOo Enthusiast


Joined: 23 Feb 2005 Posts: 152
|
Posted: Sun Dec 11, 2005 5:13 pm Post subject: |
|
|
perhaps its a bug, i just can't see anything wrong here... _________________ codebits...  |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Sun Dec 11, 2005 8:25 pm Post subject: |
|
|
Which version are you using? It sounds like you are saying that you are using version 1.1.4. I tested with well, it is at least version 2.0, I might be using a 2.01 release candidate, I do not remember. But... the following seemed to work for me:
| Code: | Sub tbl_border_onerow 'blue
Dim oSels,oTables,oCells
Dim oVC
oSels = ThisComponent.getCurrentController().getSelection()
oVC = ThisComponent.getCurrentController().getViewCursor()
'oVC.cell.BottomBorder = MakeCellBorderLine( RGB(0,0,255), 150, 150, 100)
Dim oBorderLine
oBorderLine = oVC.cell.BottomBorder
With oBorderLine
.Color = RGB(255,0,0)
.InnerLineWidth = 150
.OuterLineWidth = 150
.LineDistance = 0
End With
oVC.cell.BottomBorder = oBorderLine
End sub |
Changing the line distance to 100 and it will fail. I will file a bug report.
http://qa.openoffice.org/issues/show_bug.cgi?id=59222 _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
jelaih OOo Enthusiast


Joined: 23 Feb 2005 Posts: 152
|
Posted: Sun Dec 11, 2005 11:49 pm Post subject: |
|
|
yes, 1.1.4, Thanks, although the double border still disappears and became only one instead of two borders, it is much better than none at all _________________ codebits...  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|