summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-10-13 20:47:29 -0400
committerHenry Castro <hcastro@collabora.com>2017-10-14 13:39:05 +0200
commit59e9d163345e7a9eb68c1bae273593cd70c61153 (patch)
tree7594848c67904352f635e4fb142a6750ad5e32db /editeng
parent96a0adacab0c07b337b0d3ead69398a1a2a0425b (diff)
sd lok: fix spell checking languages in Impress
Change-Id: I133c9b91521fa7f2b5f7e3a47396f7efa31e1a86 Reviewed-on: https://gerrit.libreoffice.org/43382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit5.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 5ba3549c9360..170bccec2676 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -684,6 +684,7 @@ void ImpEditEngine::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich, bool
void ImpEditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
{
+ bool bCheckLanguage = false;
ContentNode* pNode = aEditDoc.GetObject( nPara );
if ( !pNode )
@@ -704,7 +705,16 @@ void ImpEditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
InsertUndo(new EditUndoSetParaAttribs(pEditEngine, nPara, pNode->GetContentAttribs().GetItems(), rSet));
}
}
+
+ bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SfxItemState::SET ) ||
+ ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SfxItemState::SET ) ||
+ ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SfxItemState::SET );
+
pNode->GetContentAttribs().GetItems().Set( rSet );
+
+ if ( bCheckLanguage && pNode->GetWrongList() )
+ pNode->GetWrongList()->ResetInvalidRange(0, pNode->Len());
+
if ( aStatus.UseCharAttribs() )
pNode->CreateDefFont();