Re: About Table header

From: Simon Larochelle <larochelle.simon.1_at_gmail.com>
Date: Wed May 29 2013 - 22:52:14 CEST

Hi Joe,

I merged Kousik branch with trunk in my local git repository and
checked the conflicts. It seems that they won't be too difficult to
resolve. First of all you only need to worry about changes in
fp_TableContainer.[ĥ,cpp] and fl_TableLayout.[h,cpp]. The changes to
other files in Kousik branch are from patches already in trunk.
Merging fl_TableLayout.h, fl_TableLayout.cpp and fp_TableContainer.h
should be easy. For fp_TableContainer.cpp, the automatic merge seems
to fail on several functionsm but by looking at what Kousik added, you
should be able to resolve without much problems the conflicts in all
functions except for those in fp_TableContainer::VBreakAt. After
resolving these conflicts, you will also need to modify
fb_ColumnBreaker::_checkVBreakableContainer

Let me give you some information about how Kousik and I planned on
adding repeating table headers.
In order to break a table between two text columns (most often between
two pages), we create a broken table (which is an object of class
fp_TableContainer) and add it in a linked list after the master table
(also an object of class fp_TableContainer). The two types of tables
(broken and master) differ in which member variables get assigned
meaningful values. For adding headers, we planned on adding a third
type of fp_TableContainer object, this time using a derived class
fp_TableHeader and basically inserting a header table between the
other tables in the linked list. We would thus have

master_table -> header -> broken_table_2 -> header -> broken_table_3 -> ...

This would then allow fb_ColumnBreaker::_break to add a table header
at the good place at the top of each page.

Coming back to the two functions I mentionned in the first paragraph,

fp_TableContainer::VBreakAt - This function needs to be modified to
                       1) create a header table and initialize it
                       2) add the header table in the linked list
between "this" and pBroke
This is what Kousik added to the function. I will make a commit to the
SVN server that removes some duplicate code in the segment of the
function dealing with the linked list. You will probably be better off
ignoring Kousik changes and restarting from the current function.

fb_ColumnBreaker::_checkVBreakableContainer - This function checks if
there is enough space to add the table in the current text column and
calls fp_TableContainer::VBreakAt to break the table if necessary. The
function is implemented to make sure that only a single segment of a
table is inserted in each column. You will need to modify the function
to allow for a table header. The segment of code is at the beginning
of the function (if(

On Wed, May 29, 2013 at 8:56 AM, joe joe <joegsoc2013@gmail.com> wrote:
> Hi Martin,
>
> Thanks for your advice. I will double check the commit logs and code
> diff from Kousik's branch.
>
> And try to do it one by one:
> 1. go though the commit code one by one
> 2. find out what Kousik have done and the way how he get the problem solved
> 3. try to merge the branch's code piece by piece.
> 4. thinking for missing works.
>
>
> BTW, thanks very much for giving me the chance to work on Abiword this summer,
> thanks
>
> Joe
>
> On Wed, May 29, 2013 at 2:15 PM, Martin Sevior <msevior@gmail.com> wrote:
>> Hi Joe,
>>
>> The changes committed by Simon were extensive but mostly involved the
>> internal layout of the cells within the table. We may be able able to
>> isolate code written to reposition table rows broken across pages to
>> take account of the space provided by the repeated rows.
>>
>> If not it might be easier to simply rewrite the table breaking code
>> developed by Kuosik to make it fit within the developments made by
>> Simon.
>>
>> So in other words: I'd try a two step approach.
>>
>> 1. See if you can do a direct patch against current SVN from Kousik's code.
>>
>> If that appears hopeless, then make a diff between Kuosiks code and
>> abiword svn at the beginning of 2012.
>>
>> Use the diff to see what needs to change in current abiword svn to
>> incorporate repeated rows on tables broken across pages.
>>
>> Joe, I will mentor you in 2013 so feel free to send me private emails
>> with the diff's so I can advise. Simon, it would be great to get your
>> insight as well.
>>
>> Cheers
>>
>> Martin
>>
>>
>> On 28 May 2013 23:25, joe joe <joegsoc2013@gmail.com> wrote:
>>> Hi Simon,
>>>
>>> Thanks for all mentors for giving me the chance to work for Abiword on
>>> this GSOC.
>>>
>>> Can you share with me some information about your big changes to the
>>> table code? That would be great help to me to dig into the code.
>>>
>>> I also try to merge the branch's code firstly.thanks
>>> http://www.abisource.com/viewvc/abiword/branches/gsoc2012table_headers/
>>>
>>>
>>> Joe
>>>
>>> On Thu, May 16, 2013 at 11:12 PM, joe joe <joegsoc2013@gmail.com> wrote:
>>>> Hi Simon,
>>>>
>>>> Yes, you are right. the right branch is
>>>> http://www.abisource.com/viewvc/abiword/branches/gsoc2012table_headers/
>>>>
>>>> Can you share with me some information about your big changes to the
>>>> table code? That would be great help to me to dig into the code (
>>>> Whether I can be selected by GSOC or not, it is a good opportunity for
>>>> me to learning coding, thanks)
>>>>
>>>>
>>>> Joe
>>>>
>>>> On Thu, May 16, 2013 at 9:38 PM, Simon Larochelle
>>>> <larochelle.simon.1@gmail.com> wrote:
>>>>> Hi Joe,
>>>>>
>>>>> The gsoc2010tableimprov branch is mostly about implementing a general
>>>>> selection mechanism for cells inside a table. Kousik code is in the
>>>>> branch gsoc2012table_headers. Note that merging Kousik branch with the
>>>>> current trunk may not be easy because I made extensive changes to the
>>>>> table code during the last year. I can give you a few pointers on what
>>>>> you will need to modify if you are selected for GSOC.
>>>>>
>>>>> Simon
>>>>>
>>>>>
>>>>> On Thu, May 16, 2013 at 2:24 AM, joe joe <joegsoc2013@gmail.com> wrote:
>>>>>>
>>>>>> HI Kousik,
>>>>>>
>>>>>> I am trying to merge the code of Branch gsoc2010tableimprov:
>>>>>> http://www.abisource.com/viewvc/abiword/branches/gsoc2010tableimprov/
>>>>>>
>>>>>> I know that the frontend works and some of the backend works are still
>>>>>> left. Can you give me a simple introduction about what you have done
>>>>>> on the branch.
>>>>>>
>>>>>> I saw some words on Abiword GSOC 2013 idea list TWIKI page, but I want
>>>>>> to get more information before merge. thanks
>>>>>> That will be great help for me to dig into the code
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Joe
>>>>>>
>>>>>> On Fri, Apr 19, 2013 at 11:04 PM, Kousik Kumar <kousikkumar771@gmail.com> wrote:
>>>>>>> This is actually the function, from where the call to the backend should be
>>>>>>> made. ap_EditMethods.cpp dispatches the UI calls. Nope, it is not yet
>>>>>>> implemented. But in order to test the 2012 branch, you can modify the abw
>>>>>>> file(specifically the table tag).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 17, 2013 at 8:49 AM, joe joe <joegsoc2013@gmail.com> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>>
>>>>>>>> About the Table improvement idea, It said that '"biWord's table
>>>>>>>> support currently lacks the ability to make a selected row repeat at
>>>>>>>> the top of every page the table is broken over. This useful for big
>>>>>>>> tables with a heading above each column. Repeated rows allow the
>>>>>>>> headings to be visible at the top of every page. This project would
>>>>>>>> implement that."
>>>>>>>>
>>>>>>>>
>>>>>>>> I found that the feature should be implemented on:
>>>>>>>> abiword\src\wp\ap\xp\ap_EditMethods.cpp(16325):
>>>>>>>> Defun0(repeatThisRow)
>>>>>>>> {
>>>>>>>> CHECK_FRAME;
>>>>>>>> // ABIWORD_VIEW;
>>>>>>>> return true;
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> Currently it is empty. Someone mentioned that some of the feature is
>>>>>>>> implemented on branch gsoc2010tableimprov
>>>>>>>>
>>>>>>>> http://www.abisource.com/viewvc/abiword/branches/gsoc2010tableimprov/src/wp/ap/xp/ap_EditMethods.cpp?view=markup
>>>>>>>>
>>>>>>>> But it is also empty on Defun0(repeatThisRow).
>>>>>>>>
>>>>>>>> I think no one cover this feature, right?
>>>>>>>>
>>>>>>>>
>>>>>>>> Joe
>>>>>>>
>>>>>>>
Received on Wed May 29 22:52:28 2013

This archive was generated by hypermail 2.1.8 : Wed May 29 2013 - 22:52:28 CEST