Re: about two bugs related with Tables

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

Thanks Simon,

there are two positions for the selection:
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:41 AM, Simon Larochelle
<larochelle.simon.1@gmail.com> wrote:
>
> Well bug 8707 is not really fixed. There is a big mess hidden behind
> these two bugs. The basic issue is that we select a table by defining
> two endpoints: the anchor and the current cursor position. Both of
> these points need to be valid cursor positions in the piece table
> (that is positions in the piece table where text could be inserted).
> Now to select an object (a table, a cell, a frame ...), we should have
> as endpoints the beginning and the end of the object (for example the
> fragment PTX_SectionTable and the fragment PTX_EndTable). This does
> not work because these endpoints are not valid cursor positions. So we
> use instead the nearest valid cursor positions, which causes a series
> of little bugs (for example if the table is at the beginning of the
> header, the endpoint at the beginning of the table is actually before
> the start of the header in the main section. That's the origin of bug
> 8984).
>
> A fix would be to use our multiple selection framework to select
> objects (the selection endpoints and the cursor are different in this
> selection mode, so we could use any point in the piece table as
> selection endpoints). However, the multiple selection framework is
> only partially implemented (that's the cause of the bugs seen when
> applying text formatting commands on a column). Fully implementing
> this feature will require revising every function in FV_View. So
> fixing these bugs is a big project.
>
>
> Simon
>
> On Wed, Apr 10, 2013 at 10:16 PM, Martin Edmund Sevior
> <martines@unimelb.edu.au> wrote:
>>
>>
>> Sorry, Instead of:
>>
>> "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."
>>
>> I should have said:
>>
>> "Bug 8984 is still present. I believe it occurs because the special
>> case code used to handle tables at the beginning of a document doesn't
>> work for headers or footers."
>>
>> Cheers
>>
>> Martin
>>
Received on Sun Apr 14 18:33:26 2013

This archive was generated by hypermail 2.1.8 : Sun Apr 14 2013 - 18:33:26 CEST