Bugzilla – Attachment 69778 Details for
Bug 56894
FORMATTING: Cell borders drawn using (python) scripts do not draw as expected in all cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
python script to demonstrate the problem
bug56894.py (text/x-python), 1.45 KB, created by
kiaora-paora
on 2012-11-08 22:32:23 UTC
(
hide
)
Description:
python script to demonstrate the problem
Filename:
MIME Type:
Creator:
kiaora-paora
Created:
2012-11-08 22:32:23 UTC
Size:
1.45 KB
patch
obsolete
># -*- coding: utf-8 -*- >import uno > >_pt = 100.0 * 350.0 / 996.0 > >def borderLine(borderType): > unoBorder = uno.createUnoStruct('com.sun.star.table.BorderLine') > unoBorder.Color = 0 # black > unoBorder.LineDistance = (2.0 if borderType == "Double" else 0.0) * _pt > unoBorder.InnerLineWidth = (0.1 if borderType == "Double" else 0.0) * _pt > unoBorder.OuterLineWidth = (0.1 if borderType != "Thick" else 0.5) * _pt > return unoBorder > >def borderSelection(selection,borderType): > unoBorders = selection.TableBorder > > unoBorders.IsLeftLineValid = True > unoBorders.IsTopLineValid = True > unoBorders.IsRightLineValid = True > unoBorders.IsBottomLineValid = True > unoBorders.IsVerticalLineValid = False > unoBorders.IsHorizontalLineValid = False > > unoBorders.LeftLine = borderLine(borderType) > unoBorders.TopLine = borderLine(borderType) > unoBorders.RightLine = borderLine(borderType) > unoBorders.BottomLine = borderLine(borderType) > > selection.TableBorder = unoBorders > >def getSelection(): > ctx = uno.getComponentContext() > desktop = ctx.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",ctx) > return desktop.getCurrentComponent().getCurrentSelection() > >def thinBorder(): > borderSelection(getSelection(),"Thin") > >def thickBorder(): > borderSelection(getSelection(),"Thick") > >def doubleBorder(): > borderSelection(getSelection(),"Double") > >g_exportedScripts = thinBorder, thickBorder, doubleBorder, > ># EOF
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 56894
: 69778