Re: GSoC Project: Table Improvements

From: Martin Sevior <msevior_at_gmail.com>
Date: Tue Mar 27 2012 - 00:30:17 CEST

HI Pooja,

Yes, you are very much on the right track with this. I would suggest
you look at simply redrawing the repeated row at the start of each
page. You'll need to shift the start of the rest of the table down the
page by the amount you leave aside for the repeated row Right now
these are hardwired to start at the top of the page. Look at the code
that breaks tables across pages in src/text/fmt/xp/fl_TableLayout.cpp
and src/text/fmt/xp/fp_TableContainer.cpp.

You'all also have to deal with corner cases like if the repeated row
takes up too much space at the top of each page for even one more row
to fit.

Cheers

Martin

On Sun, Mar 25, 2012 at 8:29 AM, pooja narula <pooja.13.narula@gmail.com> wrote:
> Hi All,
>
> I'm a pre-final year student majoring in IT from NSIT, India. I am
> interested to work for Abiword under GSoC. Last year, I worked for
> LimeSurvey under GSoC, here's the link to my project
> http://code.google.com/p/google-summer-of-code-2011-limesurvey/downloads/detail?name=Pooja_Narula.tar.gz.
>
> I am particularly interested in the 'Table Improvements' project idea. I
> have been looking into the code for some time now. It would be really great
> if you could help me in understanding the code better.
>
> Here's my understanding of current working of the code for table insertion:
> When the user clicks the insert label in the table menu, the insertTable
> method of ap_EditMethods class is triggered which generates a dialog view,
> that invokes the user for details like numRows, numColumns. On successful
> submission, ap_Dialog_InsertTable class object stores these details. It then
> calls the cmdInsertTable method that does the following:
> - it determines the position at which the table is to be inserted
> (pointBreak), in various scenarios.
> - the table is inserted cell-wise, i.e., it iterates over each cell and
> inserts it into the document using insertStrux function of pd_Document. In
> terms of the layout, each cell can be seen as a section, which contains a
> block, which then contains the contents of the cell. Note that a cell can
> further contain a table inside it.
> - it also creates a changeRecord for each cell; this is coalesced for the
> table such that an undo operation removes the whole table and not a cell.
>
> Now, to enable the user to specify the header row, which will repeat on the
> top of each page of the table, we can add a check-box in the Insert Table
> dialog box. However before coming up with a solution for the backend part,
> we should keep in mind the following scenarios:
> - Editing the table like inserting/deleting rows/columns, changing text,
> changing the font size, or anything that causes to alter its position,
> should not alter the header row from occurring on the top.
> - Editing the header row like changing text, font or cell size on any page,
> should also perform the change in the header row of the other pages as well.
> Basically, whenever the table is edited, these header rows need to be
> rebuilt.
>
> There can be broadly two approaches to go about this: one would be to
> include the selected row as header on each page in the table structure
> before rendering the layout and updating the table structure whenever the
> table is edited.These changes would be similar to the way editing of table
> is handled currently, say when we add a row, we can skip the header rows
> from shifting their position. Though it seems to me that this would be a bit
> inefficient.
> Another way is to edit the final table layout to append the selected row on
> each page, without actually editing the table structure while creating and
> editing.
>
> These are the initial thoughts I have which would surely groom once I get an
> insight from your feedback.
>
> Thanks very much.
>
> Pooja Narula
Received on Tue Mar 27 00:30:37 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 00:30:37 CEST