Re: about two bugs related with Tables

From: joe joe <joegsoc2013_at_gmail.com>
Date: Sun Apr 14 2013 - 18:32:03 CEST

Thanks Martin,

I dig into the code. when I inserted a Table on the header, I checked
the file, it looks like:
section id="0" listid="0" parentid="0" type="header" xid="1">
<table xid="7">
<cell xid="8" props="bot-attach:1; left-attach:0; right-attach:1; top-attach:0">
<p style="Normal" xid="9"><c></c></p>
</cell>
.....
</cell>
</table>
</section>

Just as you said in previous mail.

Then, I found that the table select menu is defined as following:
src\wp\ap\xp\ap_Menu_ActionSet.cpp:
_s(AP_MENU_ID_TABLE_SELECT_TABLE,0,0,0,0, "selectTable",
ap_GetState_InTable, NULL);

So the action should be:
src\wp\ap\xp\ap_EditMethods.cpp(5452):Defun1(selectTable)

there are two positions:
PT_DocPosition posStartTab,posEndTab;
posStartTab = pDoc->getStruxPosition(tableSDH); //was -1
posEndTab = pDoc->getStruxPosition(endTableSDH)+1; //was +1

So the draw of selection is in:
void FV_View::cmdSelect(PT_DocPosition dpBeg, PT_DocPosition dpEnd)
{
        if(cmdSelectNoNotify(dpBeg, dpEnd))
        {
                _drawSelection();
                notifyListeners(AV_CHG_EMPTYSEL);
        }
}

So the table selection on Header which is unable to select, it failed on:
bool FV_View::cmdSelectNoNotify(PT_DocPosition dpBeg, PT_DocPosition dpEnd)

I will dig into more, thanks

thanks,
Joe

On Thu, Apr 11, 2013 at 10:11 AM, Martin Sevior <msevior@gmail.com> wrote:
> Hi Joe,
>
> Bug 8707 is fixed now. I've marked it as such in bugzilla.
>
> Bug 8984 is still present. I believe it occurs because the special
> case code used to handle bugs at the beginning of a document doesn't
> work for headers or footers.
>
> headers and footers are special sections placed at the end of the
> document. The piecetable structure looks like:
>
> <section type="header"><table><cell><p></cell></table>
>
> Normally the caret can only be placed within a paragraph. This makes
> it impossible to select a table at the beginning of asection. I wrote
> special case code to table this situation.
>
> The special case code handles situations like this:
>
> <section><table><cell><p></cell></table>
>
> I suggest you investigate this special case code and see if it can be
> modified to handle tables at the beginning of headers and footers.
>
> I believe this special case code lives in
>
> src/text/fmt/xp/fv_View_protected.cpp
>
> in the method
>
> FV_View::::_charMotion( , )
> Look in here to try to fix the bug.
>
> In particular you need to set the boolean member parameter:
>
> m_bInsertAtTablePending = true;
>
> So that abiword knows we're in this special condition.
>
> This will be a rather challenging job I think. Also please don't
> assume that my diagnosis of the problem is correct. If this was an
> easy bug to fix it would have been fixed by now :-)
>
> Cheers
>
> Martin
>
>
>
> On 11 April 2013 02:53, joe joe <joegsoc2013@gmail.com> wrote:
>>
>> Hi guys,
>>
>> I am trying to address two bugs related with Tables. These two bugs
>> are related with My interested GSOC project: table improvement.
>> some codes have been finished on branches: tableimprove
>>
>> http://bugzilla.abisource.com/show_bug.cgi?id=8707 Table can't be
>> completely selected
>> http://bugzilla.abisource.com/show_bug.cgi?id=8984 Table selection
>> not drawn in header
>>
>>
>> Anyone have some tips about Table improvement, go ahead to share with me, thanks
>>
>>
>> Joe
Received on Sun Apr 14 18:32:12 2013

This archive was generated by hypermail 2.1.8 : Sun Apr 14 2013 - 18:32:12 CEST