summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-07-19 16:40:50 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2021-07-23 07:04:10 +0200
commit4b5dd477bbe1647c6c60374da2e4cabcf5b6b58b (patch)
treea7da1d23199978077add5ec0be3fb10bbf0cabe9 /sw
parenta42061523737e8d49778303c787af25cb29c9d6e (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> (cherry picked from commit 137a1d5380e310a43d36932c643e1331a94fd70d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119265 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index ff0657aaff48..1971b15e509e 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 );