Issue 114005 - Last paragraph can not apply bullet or numbering when selecting "backwards"
Summary: Last paragraph can not apply bullet or numbering when selecting "backwards"
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.2
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 07:53 UTC by liujianli
Modified: 2017-05-20 11:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description liujianli 2010-08-20 07:53:37 UTC
1. Start one writer, type four paragraphs.
2. Select the first paragraph, push "Ctrl" and then select last two paragraphs
from down to up.
3. Open "Bullets and Numbering" dialog, select any bullet in "Bullets" tab and
then click "OK" button.

The last paragraph does not apply bullet.
Comment 1 michael.ruess 2010-08-20 08:19:18 UTC
MRU->OD: when making a selection "backwards", the last paragraph of the
selection cannot get a list attribute. Do a selection as described above to see
problem.
Comment 2 liujianli 2010-08-23 08:40:41 UTC
Liujianli->OD:
Hi OD,
I am interested in this issue and I have been working on it.
I found the aPam was miscalculated in the SwEditShell::SetCurNumRule method in
the (sw\source\core\edit)ednumber.cxx

Before second time call SwDoc::SetNumRule method in the "For cycle", the aPam 's
both member m_pMark and m_pPoint were same。 so I am focus on the
SwPamRanges::SetPam method, but it just to get PamRange( rTmp's member nStart
and nEnd were same, but the selection was last two paragaraph, this is the point
) and assign the value to the Pam's m_pMark and m_pPoint.

I think the issue happen when was doing SwPamRanges constructor. Obviously the
main point was SwPamRanges::Insert method. First two times aRg was not made any
change but inserted into the _SwPamRanges, but the third time aRg.nStart >
aRg.nEnd so that the two variables was exchanged and then the following code
will be executed and made aRg.nEnd changed, but I don't konw why aRg.nEnd and
aRg.nStart will be exchanged when aRg.nStart > aRg.nEnd.

Wound you like give me some suggestion to fix this issue?

code:

if( Count() && Seek_Entry( aRg, &nPos ))  // suche Insert Position
{
    // ist der im Array stehende kleiner ??
    if( ( pTmp = GetData()+ nPos )->nEnd < aRg.nEnd )
    {
        aRg.nEnd = pTmp->nEnd;
        Remove( nPos, 1 );  // zusammenfassen
    }
    else
        return;  // ende, weil schon alle zusammengefasst waren
}
Comment 3 Oliver-Rainer Wittmann 2010-08-23 08:55:16 UTC
od->liujianli:
Great, that you are working on this issue.
Unfortunately, I am currently busy with my preparation for the OOoCon 2010.
I will have a look at your work when I am back from the OOoCon 2010.
Comment 4 liujianli 2010-08-23 09:01:55 UTC
liujianli->od:Ok, thank you.
Have a good OOoCon2010.
Comment 5 Marcus 2017-05-20 11:21:59 UTC
Reset assigne to the default "issues@openoffice.apache.org".