.cspell/ignoreWords.txt                    |   27 ++++++++
 .cspell/libreoffice.txt                    |   94 +++++++++++++++++++++++++++++
 .vscode/vs-code-template.code-workspace.in |   43 ++++++++++++-
 autogen.sh                                 |    2 
 configure.ac                               |   16 ++++
 5 files changed, 181 insertions(+), 1 deletion(-)

New commits:
commit 97cc7d53f5336d2c4c9b1a98e1bae3eca9432a72
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Wed May 28 19:45:14 2025 +0200
Commit:     Christian Lohmaier <[email protected]>
CommitDate: Fri May 30 11:22:32 2025 +0200

    vscode: cSpell support
    
    Change-Id: I6760bea7e6106505399477f87d7c17429e74767d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185979
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>

diff --git a/.cspell/ignoreWords.txt b/.cspell/ignoreWords.txt
new file mode 100644
index 000000000000..04d82a48501e
--- /dev/null
+++ b/.cspell/ignoreWords.txt
@@ -0,0 +1,27 @@
+# helper file to collect words that should be accepted, but not used for 
suggestions
+bluez
+CERTIFICATENAME
+CERTIFICATEPATH
+cpan
+distros
+dpkg
+genbrk
+genccode
+gencmn
+instpath
+lcms
+libfuzzer
+libpq
+lldb
+lxml
+mdds
+midl
+nodeps
+ooenv
+oosplash
+rpmbuild
+soname
+spsupp
+xapian
+zstd
+zxing
diff --git a/.cspell/libreoffice.txt b/.cspell/libreoffice.txt
new file mode 100644
index 000000000000..fa7674986492
--- /dev/null
+++ b/.cspell/libreoffice.txt
@@ -0,0 +1,94 @@
+# custom dictionary words related to LibreOffice
+aclocal
+activex
+allbuild
+allcheck
+atspi
+autogen
+avahi
+avmedia
+breakpad
+buildall
+ccache
+checkall
+clucene
+coinmp
+comphelper
+coredumpctl
+coverity
+cppu
+CPPUHELPER
+dbgutil
+dbus
+dconf
+distro
+documentfoundation
+Emscripten
+forcepoint
+gbuild
+gperf
+gstreamer
+harfbuzz
+helpcontent
+hsqldb
+idlc
+instdir
+instsetoo
+javac
+jfreereport
+lastrun
+libclucene
+libcmis
+libebook
+liblangtag
+LIBO
+librdf
+libserializer
+libwebp
+libwps
+libzxing
+loplugin
+lpsolve
+MAKEFLAGS
+mergelibs
+msgfmt
+msguniq
+MSVC
+MSYSTEM
+myspell
+mythes
+nasm
+odfvalidator
+officecfg
+officeotron
+ONLINEUPDATE
+OSVERSION
+pdfium
+pocheck
+poppler
+PRODUCTNAME
+PTHREAD
+pyuno
+rcfile
+rhbz
+schart
+sdbc
+sdremote
+showdeliverables
+skia
+slowcheck
+soffice
+solenv
+subsequentcheck
+sysui
+ucbhelper
+uicheck
+unoxml
+vclplug
+webdav
+wslpath
+Xinerama
+Xrandr
+Xrender
+xsltproc
+zxcvbn
diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index b485daf31a6d..48cf6ddb4e0a 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -119,7 +119,47 @@
                                }
                        }
                },
-               "terminal.integrated.defaultProfile.windows": "Cygwin"
+               "terminal.integrated.defaultProfile.windows": "Cygwin",
+               "cSpell.customDictionaries": {
+                       "libreoffice-terms": {
+                               "name": "libreoffice",
+                               "path": 
"${workspaceFolder:srcdir}/.cspell/libreoffice.txt",
+                               "description": "spell check dictionary with 
terms related to LibreOffice",
+                               "addWords": true,
+                               "scope": "workspace"
+                       },
+                       // helper-dict to collect ignore words, otherwise 
they'd be added to the workspace file
+                       // when using the quickfix entries
+                       "ignore-words-collecting": {
+                               "name": "ignoreWords",
+                               "path": 
"${workspaceFolder:srcdir}/.cspell/ignoreWords.txt",
+                               "description": "words not flagged, but also not 
used as suggestions",
+                               "addWords": true,
+                               "scope": "workspace"
+                       }
+               },
+               "cSpell.noSuggestDictionaries": ["ignoreWords"],
+               "cSpell.languageSettings": [
+                       {
+                               // check all file types, but only in comments 
and strings (what the regexes consider
+                               // a comment/string)
+                               "languageId": "*",
+                               // turn off compound words, because it is only 
checking strings.
+                               "allowCompoundWords": false,
+                               // Only check comments and strings
+                               "includeRegExpList": [
+                                       "CStyleComment",
+                                       "string"
+                               ],
+                               // Exclude includes, because they are also 
strings.
+                               "ignoreRegExpList": [
+                                       "/#include.*/"
+                               ]
+                       }
+               ],
+               // hide from "Problems" tab, however also makes it less visible 
in the editor, but there are
+               // still too many false positives/words not added to the 
dictionary
+               "cSpell.diagnosticLevel": "Hint"
        },
        "tasks": {
                "version": "2.0.0",
@@ -300,3 +340,4 @@
                "compounds": []
        }
 }
+// cspell:ignore CHERE autolinks cppdbg cpptools cppvsdbg
diff --git a/autogen.sh b/autogen.sh
index 7fe3e05eea0d..6667c87c17f1 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -333,6 +333,8 @@ if (defined $ENV{NOCONFIGURE}) {
     system (@args) && die "Error running configure";
 }
 
+# cspell:ignore Distros PROGRAMFILESX WSLENV emconfigure realpath wslsys
+
 # Local Variables:
 # mode: perl
 # cperl-indent-level: 4
diff --git a/configure.ac b/configure.ac
index 02ad45ba313c..d7b0909ffc21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,15 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; 
fill-column: 100 -*
 dnl configure.ac serves as input for the GNU autoconf package
 dnl in order to create a configure script.
 
+dnl cspell:enableCompoundWords
+dnl cspell:includeRegExp ^\s*#.*$
+dnl cspell:includeRegExp ^\s*dnl.*$
+dnl cspell:includeRegExp /AC_MSG_[A-Z]*\([^)]*\)/
+dnl cspell:ignoreRegExp /[A-Z]{4,}/
+dnl cspell:ignoreRegExp /\${?[A-za-z]*/
+dnl cspell:ignoreRegExp /[ ']-[fglmBWXZ][a-z][^ ]*/
+dnl cspell:ignoreRegExp / -isystem /
+
 # The version number in the second argument to AC_INIT should be four numbers 
separated by
 # periods. Some parts of the code requires the first one to be less than 128 
and the others to be less
 # than 256. The four numbers can optionally be followed by a period and a 
free-form string containing
@@ -16133,4 +16142,11 @@ fi
 # Remove unneeded emconfigure artifacts
 rm -f a.out a.wasm a.out.js a.out.wasm
 
+dnl cspell:ignore Randr Xext alignof altlinuxhyph appex bzlib ccached 
coreutils createmsi cxxabi
+dnl cspell:ignore cygdrive devel devenv dlsym dtrace emconfigure fpch frobozz 
gnucp gpgconf gpgme
+dnl cspell:ignore gpgmepp ifdef ifndef libc libdl libjpipe libstdc longjmp 
memcpy mscoree msicreator
+dnl cspell:ignore msiglobal mspdb msys nmake omindex optimised pagein pkgmk 
qconfig qtbase
+dnl cspell:ignore quadrigraph rbbi rpms sccache strbuf stringop tosvg ucrt 
ustring uuidgen vclplugs
+dnl cspell:ignore vswhere werror wilangid xcent xcrun
+
 dnl vim:set shiftwidth=4 softtabstop=4 expandtab:

Reply via email to