diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-07-19 16:40:50 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-07-20 07:02:54 +0200 |
commit | 137a1d5380e310a43d36932c643e1331a94fd70d (patch) | |
tree | 754fe011a965faae3a7921819b5896b29044bcee | |
parent | c5ca46e75e28ba4245d8544ca53c71fea87d1bbd (diff) |
Resolves tdf#143066 - Language set to None for indices
Disables spell-checking on ToC
Change-Id: I6601d8c54974fcc70564292176a71a80d91020e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119222
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r-- | sw/source/core/doc/DocumentStylePoolManager.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index c0a31aa411a5..9238622db126 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -810,7 +810,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, case RES_POOLCOLL_GREETING: // Greeting case RES_POOLCOLL_REGISTER_BASE: // Base indexes case RES_POOLCOLL_SIGNATURE: // Signatures - case RES_POOLCOLL_TABLE: // Tabele content + case RES_POOLCOLL_TABLE: // Table content { SwFormatLineNumber aLN; aLN.SetCountLines( false ); @@ -820,6 +820,14 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, aSet.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) ); aSet.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); } + // tdf#143066 : set language to 'none' to prevent spell checking for indices + if (nId == RES_POOLCOLL_REGISTER_BASE) + { + aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_LANGUAGE ) ); + aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CJK_LANGUAGE ) ); + aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CTL_LANGUAGE ) ); + } + break; } break; @@ -995,7 +1003,6 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, aSet.Put( aLN ); } break; - // User defined indexes: case RES_POOLCOLL_TOX_USERH: // Header lcl_SetRegister( m_rDoc, aSet, 0, true, false ); |