[Grammar checker] Undocumented change in the API for LO 4

Caolán McNamara caolanm at redhat.com
Mon Mar 4 06:48:35 PST 2013


On Sat, 2013-03-02 at 04:09 -0800, Olivier R. wrote:
> I bibisected from scratch again, on Linux Mint. I got no crash at all.

Looking at the log, (but without testing anything myself) the likely
relevant changes are...

c0f865c9b5a34b272c9e0b22d18969554265914a on
linguistic/source/gciterator.cxx where noelg noticed that
GrammarCheckingIterator::GetSuggestedEndOfSentence set xBreakIterator
but used m_xBreakIterator so that m_xBreakIterator was always unset.

The follow up commit of a33dbc169037d985f104c83d01d5efd9982413de by
Stephen then fixed the code to use the correct m_xBreakIterator like it
used to do back before 9f2fde7ab5de20926bb25a6b298b4e5dffb66eb2
accidentally broke it initially.

So, to test that theory if you change
GrammarCheckingIterator::GetSuggestedEndOfSentence to be just...

sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
    const OUString &rText,
    sal_Int32 /*nSentenceStartPos*/,
    const lang::Locale &/*rLocale*/ )
{
    return rText.getLength();
}

do you get the pre LO 4 behaviour ?

Assuming that you do, then it appears to me that the current LO4
behaviour is the original programmer intent and that the intermediate
behaviour was a bug (from the programmer intent perspective anyway) in
whatever versions got released between
9f2fde7ab5de20926bb25a6b298b4e5dffb66eb2 and LO4

C.



More information about the LibreOffice mailing list