diff options
author | Jürgen Schmidt <jsc@apache.org> | 2013-03-20 14:17:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-23 11:55:26 +0100 |
commit | c5b604b9527d0dc32066e17dc3ce7f7370a78fe1 (patch) | |
tree | b00c084f1ad200d345aa25e656b4ae0caade166b /sw/source/core | |
parent | 5e059c1ee53b6be058f66a7c43af0e75f3cadfa1 (diff) |
Resolves: #i121732# add new interface XMarkingAccess
Patch by: Kai Labusch
Review by: arielch, jsc
(cherry picked from commit c1fb6ce135ad39299164aeecebfa746db210d0e3)
Conflicts:
offapi/com/sun/star/text/makefile.mk
sw/inc/unotextcursor.hxx
sw/source/core/unocore/unoobj.cxx
Change-Id: I68029b28908a57c4ed39d798269b5a8786972be0
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 1771cdc1d3e3..caa45670573e 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -85,6 +85,7 @@ #include <fmtftn.hxx> #include <com/sun/star/text/WrapTextMode.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> +#include <com/sun/star/text/TextMarkupType.hpp> #include <com/sun/star/style/PageStyleLayout.hpp> #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> @@ -2572,6 +2573,46 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, return aRet; } +void SAL_CALL SwXTextCursor::invalidateMarkings(::sal_Int32 nType) +throw (uno::RuntimeException) +{ + SolarMutexGuard aGuard; + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwNode* node = rUnoCursor.GetNode(); + + if (node == 0) return; + + SwTxtNode* txtNode = node->GetTxtNode(); + + if (txtNode == 0) return; + + if ( text::TextMarkupType::SPELLCHECK == nType ) + { + txtNode->SetWrongDirty(true); + txtNode->SetWrong(0, true); + } + else if( text::TextMarkupType::PROOFREADING == nType ) + { + txtNode->SetGrammarCheckDirty(true); + txtNode->SetGrammarCheck(0,true); + } + else if ( text::TextMarkupType::SMARTTAG == nType ) + { + txtNode->SetSmartTagDirty(true); + txtNode->SetSmartTags (0, true); + } + else return; + + SwFmtColl* fmtColl=txtNode->GetFmtColl(); + + if (fmtColl == 0) return; + + SwFmtChg aNew( fmtColl ); + txtNode->NotifyClients( 0, &aNew ); +} + void SAL_CALL SwXTextCursor::makeRedline( const OUString& rRedlineType, |