Description
The borders of tables are generated by the style sheet only.
I have to transfer wiki pages to open office documents. I use "cut'n'paste" of the print view. As this seems to ignore the style sheet settings the tables have no border in open office.
It is arguable if this is a bug in wiki. A not-really-knowing-what-I-do fix for this is, to patch formatter/txt_html.py (it's is against an old version (1.5.X) and has to be adjusted for newer versions)
Index: formatter/text_html.py =================================================================== RCS file: /cvs/TPS/moin/MoinMoin/formatter/text_html.py,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 text_html.py --- formatter/text_html.py 10 Dec 2006 11:46:45 -0000 1.1.1.4 +++ formatter/text_html.py 14 Jan 2009 14:00:47 -0000 @@ -1229,7 +1285,8 @@ # Tables ############################################################# _allowed_table_attrs = { - 'table': ['class', 'id', 'style'], + # enable border on cut'n'paste + 'table': ['class', 'id', 'style', 'border', 'cellspacing'], 'row': ['class', 'id', 'style'], '': ['colspan', 'rowspan', 'class', 'id', 'style'], } @@ -1301,7 +1358,8 @@ # Open table if not attrs: - attrs = {} + # enable border on cut'n'paste + attrs = {'border':'1','cellspacing':'0'} else: attrs = self._checkTableAttr(attrs, 'table') result.append(self._open('table', newline=1, attr=attrs,
Steps to reproduce
- Choose a page with a table.
- Look at the print view. The table will have a border.
- Cut'n'paste into open office.
- Look at print view in open office. The table will have no border.
Example
Component selection
- general
Details
MoinMoin Version |
1.8.x (this Wiki) |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
I made a test with this page/wiki (copy/paste from firefox 3 to openoffice 3) test-copypaste.odt and everything worked! so more a problem related to a) your browser/openoffice or b) you use some custom moinmoin theme.... -- MarcelHäfner 2009-01-15 09:05:30
I looked at your test with openoffice 3 (windows) and had no borders around the table starting with "MoinMoin Version"... -- TobiasPolzin 2009-01-15 11:35:49
- ok; sorry I didn't saw this; just thought that the lines are borders... but I should have take a look at the openoffice print preview... well you right, tables are without borders. bye Marcel
Plan
- Priority:
- Assigned to:
- Status: