Kaydet (Commit) a33dbc16 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Related fdo#46808: Fix pre-existing bug identified in previous commit

Assigning to dead xBreakIterator instead of m_xBreakIterator had been introduced
with 9f2fde7a "#i103496#: split svtools; improve
ConfitItems," and just fixing it does not cause any tests to start breaking for
me.

Change-Id: I9a26e8d3924bf15ae948c9c26b70f42f8f0d2f64
üst c0f865c9
......@@ -749,18 +749,13 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
{
// internal method; will always be called with locked mutex
// FIXME! this is a bug, the xBreakIterator var is hiding an issue!
// But if I fix it, the sw/complex tests start failing.
uno::Reference< i18n::XBreakIterator > xBreakIterator;
if (!m_xBreakIterator.is())
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
xBreakIterator = i18n::BreakIterator::create(xContext);
m_xBreakIterator = i18n::BreakIterator::create(xContext);
}
sal_Int32 nTextLen = rText.getLength();
sal_Int32 nEndPosition = nTextLen;
if (m_xBreakIterator.is())
{
sal_Int32 nEndPosition;
sal_Int32 nTmpStartPos = nSentenceStartPos;
do
{
......@@ -775,7 +770,6 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
while (nEndPosition <= nSentenceStartPos && nEndPosition < nTextLen);
if (nEndPosition > nTextLen)
nEndPosition = nTextLen;
}
return nEndPosition;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment