From d3482a3eed1504797544b296564dc28dc9ba02bf Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 8 Dec 2000 11:41:31 +0000 Subject: #81616# OnlineSpelling after language changes --- svx/source/editeng/impedit5.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'svx/source/editeng/impedit5.cxx') diff --git a/svx/source/editeng/impedit5.cxx b/svx/source/editeng/impedit5.cxx index 953220f5fd3c..ce98918012ba 100644 --- a/svx/source/editeng/impedit5.cxx +++ b/svx/source/editeng/impedit5.cxx @@ -2,9 +2,9 @@ * * $RCSfile: impedit5.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mt $ $Date: 2000-11-07 18:25:29 $ + * last change: $Author: mt $ $Date: 2000-12-08 12:41:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -491,6 +491,14 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE InsertUndo( pUndo ); } + BOOL bCheckLanguage = FALSE; + if ( GetStatus().DoOnlineSpelling() ) + { + bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_ON ) || + ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SFX_ITEM_ON ) || + ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SFX_ITEM_ON ); + } + // ueber die Absaetze iterieren... for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) { @@ -563,7 +571,11 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE else if ( bCharAttribFound ) { if ( !pNode->Len() || ( nStartPos != nEndPos ) ) + { pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos ); + if ( bCheckLanguage ) + pNode->GetWrongList()->MarkInvalid( nStartPos, nEndPos ); + } } } } -- cgit