https://issues.apache.org/ooo/show_bug.cgi?id=121732

--- Comment #4 from Ariel Constenla-Haile <[email protected]> ---
(In reply to comment #0)
> Let SwXTextCursor implement an additional interface that we named
> XMarkingAccess. This new interface provides the invalidateMarking function
> which triggers a re-determination of the smart tags within the range of the
> cursor

The code invalidates much more than the smart tag (grammar checking, spell
checking, word counting,...), wouldn't it be counterproductive for others, like
the spellchecker and the grammar checker?

The XFlatParagraph interface has a more clever way of triggering invalidation
selectively, see
http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/core/unocore/unoflatpara.cxx#142

133void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool
bVal ) throw (uno::RuntimeException)
134{
135    vos::OGuard aGuard(Application::GetSolarMutex());
136
137    if ( mpTxtNode )
138    {
139        if ( text::TextMarkupType::SPELLCHECK == nType )
140            mpTxtNode->SetWrongDirty( !bVal );
141        else if ( text::TextMarkupType::SMARTTAG == nType )
142            mpTxtNode->SetSmartTagDirty( !bVal );
143        else if( text::TextMarkupType::PROOFREADING == nType )
144        {
145            mpTxtNode->SetGrammarCheckDirty( !bVal );
146            if( bVal )
147                ::finishGrammarCheck( *mpTxtNode );
148        }
149    }
150}

A css::text::XTextRangeMarkup with isChecked/setChecked/[check?/]... may be
more appropriated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Reply via email to