Translations:Macros/Writer/003/25/en

From The Document Foundation Wiki
Jump to navigation Jump to search

def AddBordersToAllCells():

   """Add double-borders to all cells in the currently selected table"""
   desktop = XSCRIPTCONTEXT.getDesktop()
   model = desktop.getCurrentComponent()
   view_cursor = model.getCurrentController()
   cursor = view_cursor.getViewCursor()
   line = BorderLine2()
   no_line = BorderLine2()
   border_distances = TableBorderDistances()
   if cursor.TextTable is None:
       _msgbox("The cursor is not inside a table.", "Warning from AddBordersToAllCells()")
   else:
       line.Color = 0
       line.InnerLineWidth = 10
       line.LineDistance = 60
       line.LineStyle = DOUBLE
       line.LineWidth = 5
       line.OuterLineWidth = 10