summaryrefslogtreecommitdiffstats
path: root/scribus/scpaths.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-05-04 14:26:58 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-05-04 14:26:58 +0000
commit1601800e7d74c192af89ee85c6110bd80a02453a (patch)
treee0c473e40bac26e8e56ce3d5a8e0b5c1dfda623d /scribus/scpaths.cpp
parent551faae07c1a1dc272fd61a93ebffb901e382a07 (diff)
downloadscribus-1601800e7d74c192af89ee85c6110bd80a02453a.tar.gz
scribus-1601800e7d74c192af89ee85c6110bd80a02453a.tar.xz
scribus-1601800e7d74c192af89ee85c6110bd80a02453a.zip
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
Diffstat (limited to 'scribus/scpaths.cpp')
-rw-r--r--scribus/scpaths.cpp31
1 files changed, 28 insertions, 3 deletions
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())