From 1601800e7d74c192af89ee85c6110bd80a02453a Mon Sep 17 00:00:00 2001 From: craig Date: Fri, 4 May 2012 14:26:58 +0000 Subject: Bump hunspell plugin, simplify a little. Allow the LibreOffice dict finder use the dict dirs properly git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17494 11d20701-8431-0410-a711-e3c959e3b870 --- scribus/scpaths.cpp | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'scribus/scpaths.cpp') diff --git a/scribus/scpaths.cpp b/scribus/scpaths.cpp index 40d79ba..d9cc181 100644 --- a/scribus/scpaths.cpp +++ b/scribus/scpaths.cpp @@ -274,16 +274,41 @@ QStringList ScPaths::spellDirs() const if (d.exists()) spellDirs.append(finkPath); d.setPath(osxLibreOfficePath); + if (d.exists()) - spellDirs.append(osxLibreOfficePath); + { + QStringList dictDirFilters; + dictDirFilters << "dict-*"; + QStringList dictDirList(d.entryList(dictDirFilters, QDir::Dirs, QDir::Name)); + QString dir; + foreach (dir, dictDirList) + spellDirs.append(osxLibreOfficePath + "/" + dir + "/"); + } d.setPath(osxUserLibreOfficePath); if (d.exists()) - spellDirs.append(osxUserLibreOfficePath); + { + QStringList dictDirFilters; + dictDirFilters << "dict-*"; + QStringList dictDirList(d.entryList(dictDirFilters, QDir::Dirs, QDir::Name)); + QString dir; + foreach (dir, dictDirList) + spellDirs.append(osxUserLibreOfficePath + "/" + dir + "/"); + } + #elif defined(_WIN32) QString progFiles = getSpecialDir(CSIDL_PROGRAM_FILES); d.setPath(progFiles+windowsLOPath); if (d.exists()) - spellDirs.append(progFiles+windowsLOPath); + { + QStringList dictDirFilters; + dictDirFilters << "dict-*"; + QStringList dictDirList(d.entryList(dictDirFilters, QDir::Dirs, QDir::Name)); + QString dir; + foreach (dir, dictDirList) + spellDirs.append(progFiles+windowsLOPath + "/" + dir + "/"); + } + if (d.exists()) + spellDirs.append(progFiles+windowsLOPath + "/" + dir + "/"); #elif defined(Q_WS_X11) d.setPath(linuxPath); if (d.exists()) -- cgit