HI Folks,
        Well a bit later than promised but here it is. Zeroth order table
support. AbiWord can load a table from an *.abw file. Try the attached
file after this rebuilding from the commit.

For a screen shot see:

http://www.ph.unimelb.edu.au/~msevior/abiword/abi_tables0.png

Many, many things don't work yet but at least we now have a proof of
principle that the layout code works :-)

The next big job will be to make a table break across multiple pages.

The table shown has a column spanning two rows and two rows spanning two
columns.

After tomorrow I'll be away from the internet for a while but I will have
my trusty laptop so I expect to make lots of progress on this.

Cheers!

Martin

PS If filter maintainers want to start attempting to load tables from
their favourite word processor, look at the *.abw file to see what is
expected.

You have to provide the span of the cells in the cell properties and
ternimate cells and tables with a PTX_EndCell and PTX_EndTable struxes.

See the abiword importer.

CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS:    src/text/fmt/xp/fl_BlockLayout.cpp
CVS:    src/text/fmt/xp/fl_ContainerLayout.cpp
CVS:    src/text/fmt/xp/fl_ContainerLayout.h
CVS:    src/text/fmt/xp/fl_DocListener.cpp
CVS:    src/text/fmt/xp/fl_SectionLayout.cpp
CVS:    src/text/fmt/xp/fl_TableLayout.cpp
CVS:    src/text/fmt/xp/fl_TableLayout.h
CVS:    src/text/fmt/xp/fl_TestRoutines.cpp
CVS:    src/text/fmt/xp/fp_Column.cpp src/text/fmt/xp/fp_Column.h
CVS:    src/text/fmt/xp/fp_ContainerObject.h
CVS:    src/text/fmt/xp/fp_Line.cpp
CVS:    src/text/fmt/xp/fp_TableContainer.cpp
CVS:    src/text/fmt/xp/fp_TableContainer.h
CVS:    src/text/ptbl/xp/pt_PT_InsertStrux.cpp
CVS:    src/wp/impexp/xp/ie_imp_AbiWord_1.cpp
CVS:    src/wp/impexp/xp/ie_imp_XML.cpp
CVS: ----------------------------------------------------------------------
Zeroth order table suport! Can load a table from a file.


<?xml version="1.0"?>
<!DOCTYPE abiword PUBLIC "-//ABISOURCE//DTD AWML 1.0 Strict//EN" 
"http://www.abisource.com/awml.dtd";>
<abiword template="true" styles="unlocked" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:svg="http://www.w3.org/2000/svg"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; fileformat="1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:awml="http://www.abisource.com/awml.dtd"; 
xmlns="http://www.abisource.com/awml.dtd"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
version="0.99.2">
<!-- =====================================================================  -->
<!-- This file is an AbiWord document.                                      -->
<!-- AbiWord is a free, Open Source word processor.                         -->
<!-- You may obtain more information about AbiWord at www.abisource.com     -->
<!-- You should not edit this file by hand.                                 -->
<!-- =====================================================================  -->

<metadata>
<m key="dc.format">application/x-abiword</m>
<m key="abiword.generator">AbiWord</m>
<m key="abiword.date_last_changed">Mon Jun  3 20:32:51 2002</m>
</metadata>
<styles>
<s type="P" name="Normal" basedon="" followedby="Current Settings" 
props="font-family:Times New Roman; dom-dir:ltr; font-style:normal; margin-left:0pt; 
text-indent:0in; margin-top:0pt; text-position:normal; font-weight:normal; 
font-variant:normal; color:000000; text-decoration:none; line-height:1.000000; 
margin-bottom:0pt; text-align:left; margin-right:0pt; bgcolor:transparent; 
font-size:12pt; widows:2; font-stretch:normal"/>
</styles>
<pagesize pagetype="A4" orientation="portrait" width="210.000000" height="297.000000" 
units="mm" page-scale="1.000000"/>
<section props="page-margin-footer:0.5in; page-margin-header:0.5in">
<p style="Normal"><c props="lang:en-US">This is Martin Sevior's first revision with a 
table. </c><c props="lang:en-US"></c>This is Martin Sevior's first revision with a 
table. This is Martin Sevior's first revision with a table.This is Martin Sevior's 
first revision with a table. This is Martin Sevior's first revision with a table.</p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US"> This is Martin 
Sevior's first revision with a table.This is Martin Sevior's first revision with a 
table. This is Martin Sevior's first revision with a table. This is Martin Sevior's 
first revision with a table.</c></p>
<p style="Normal"><c props="lang:en-US">This is Martin Sevior's first revision with a 
table. This is Martin Sevior's first revision with a table. This is Martin Sevior's 
first revision with a table.This is Martin Sevior's first revision with a table. This 
is Martin Sevior's first revision with a table. This is Martin Sevior's first revision 
with a table.</c><c props="lang:en-US"></c></p>
<table>

<cell props="left-attach:0;right-attach:1;top-attach:0;bot-attach:1"><p 
style="Normal"><c props="lang:en-US">One One One One One One One One One One One One 
One One One One  </c><c props="lang:en-US">On One One One One One OnOne One.</c></p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US">One One One One. 
</c><c props="lang:en-US">One One One One One One One One One One One One One One One 
One</c></p></cell>
<endcell></endcell>
<cell props="left-attach:1;right-attach:2;top-attach:0;bot-attach:1"><p 
style="Normal"><c props="lang:en-US">Two Two Two Two Two Two Two Two Two Two Two Two 
Two Two Two Two  </c><c props="lang:en-US">Two Two.</c></p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US">Two Two Two Two. 
</c><c props="lang:en-US">Two Two Two</c></p></cell>
<endcell></endcell>
<cell props="left-attach:2;right-attach:3;top-attach:0;bot-attach:1"><p 
style="Normal"><c props="lang:en-US">This is Martin Sevior's second cell same row 
revision with a table. </c><c props="lang:en-US"></c>This is Martin Sevior's first 
revision with a table. This is Column 2 row 1.</p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US"> This is Martin 
Sevior's first revision with a table. This is Column 2 row 1.</c></p>
</cell><endcell></endcell><cell 
props="left-attach:0;right-attach:1;top-attach:1;bot-attach:3"><p style="Normal"><c 
props="lang:en-US">Three Three Three Three Three Three Three Three Three Three Three 
Three Three Three Three Three Three Three Three Three Three Three Three Three Three 
Three Three Three Three.
 </c><c props="lang:en-US">Three Three Three Three Three Three Three Three 
Three.</c></p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US">Three Three Three 
Three Three Three Three Three Three . </c><c props="lang:en-US">
Three Three Three Three Three Three Three Three Three Three Three </c></p></cell>
<endcell></endcell>
<cell props="left-attach:1;right-attach:3;top-attach:1;bot-attach:2"><p 
style="Normal"><c props="lang:en-US">This is Martin Sevior's second row.
Spans two columns. Spans two columns. Spans two columns. 
Second row revision with a table. </c><c props="lang:en-US"></c>
Second row column 2 revision with a table.</p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US"> 
This is Martin Sevior's first revision with a table. 
Second column row 2 Second column row 2.This is Martin Sevior's first revision with a 
table. 
This is Martin Sevior's first revision with a table.</c></p>
</cell><endcell></endcell>
<cell props="left-attach:1;right-attach:3;top-attach:2;bot-attach:3"><p 
style="Normal"><c props="lang:en-US">four four four four four four four four four four 
 four  four  four  four </c><c props="lang:en-US"></c>
 four  four  four  four  four  four  four  four </p>
<p style="Normal"><c props="lang:en-US"></c><c props="lang:en-US"> 
This is spans two columns next row. This is spans two columns next row. This is spans 
two columns next row. This is spans two columns next row. This is spanns two columns 
next row. This is spans two columns. This is spanns two columns. This is spanns two 
columns. 
This is Martin Sevior's first revision with a table.</c></p>
</cell><endcell></endcell></table><endtable></endtable>
<p style="Normal"><c props="lang:en-US"></c></p>
</section>
</abiword>




Reply via email to