summaryrefslogtreecommitdiffstats
path: root/scribus/scpaths.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-17 21:39:33 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-17 21:39:33 +0000
commitfb98f5e1d6e4142ae1b7302ced455d8afb9d2cbb (patch)
tree17500d33db6868ae1e709de8a29cf4ba185bdb71 /scribus/scpaths.cpp
parentf8eca7a98d8f52cbfc8cb9ced9d59ad9cc2622cc (diff)
downloadscribus-fb98f5e1d6e4142ae1b7302ced455d8afb9d2cbb.tar.gz
scribus-fb98f5e1d6e4142ae1b7302ced455d8afb9d2cbb.tar.xz
scribus-fb98f5e1d6e4142ae1b7302ced455d8afb9d2cbb.zip
Another hunspell backup..., works a bit better now
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17455 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/scpaths.cpp')
-rw-r--r--scribus/scpaths.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/scribus/scpaths.cpp b/scribus/scpaths.cpp
index 22b9753..40d79ba 100644
--- a/scribus/scpaths.cpp
+++ b/scribus/scpaths.cpp
@@ -252,6 +252,49 @@ QString ScPaths::dictDir() const
return(m_shareDir + "dicts/");
}
+QStringList ScPaths::spellDirs() const
+{
+ //dictionaryPaths
+ QString macPortsPath("/opt/local/share/hunspell/");
+ QString finkPath("/sw/share/hunspell/");
+ QString osxLibreOfficePath("/Applications/LibreOffice.app/Contents/share/extensions");
+ QString osxUserLibreOfficePath(QDir::homePath()+"/Applications/LibreOffice.app/Contents/share/extensions");
+ QString linuxLocalPath("/usr/local/share/hunspell/");
+ QString linuxPath("/usr/share/hunspell/");
+ QString windowsLOPath("LibreOffice 3.5/share/extensions");
+ QDir d;
+ QStringList spellDirs;
+ spellDirs.append(m_shareDir + "dicts/spelling/");
+#ifdef Q_OS_MAC
+ //spellDirs.append(QDir::homePath() + "/Library/Fonts/");
+ d.setPath(macPortsPath);
+ if (d.exists())
+ spellDirs.append(macPortsPath);
+ d.setPath(finkPath);
+ if (d.exists())
+ spellDirs.append(finkPath);
+ d.setPath(osxLibreOfficePath);
+ if (d.exists())
+ spellDirs.append(osxLibreOfficePath);
+ d.setPath(osxUserLibreOfficePath);
+ if (d.exists())
+ spellDirs.append(osxUserLibreOfficePath);
+#elif defined(_WIN32)
+ QString progFiles = getSpecialDir(CSIDL_PROGRAM_FILES);
+ d.setPath(progFiles+windowsLOPath);
+ if (d.exists())
+ spellDirs.append(progFiles+windowsLOPath);
+#elif defined(Q_WS_X11)
+ d.setPath(linuxPath);
+ if (d.exists())
+ spellDirs.append(linuxPath);
+ d.setPath(linuxLocalPath);
+ if (d.exists())
+ spellDirs.append(linuxLocalPath);
+#endif
+ return spellDirs;
+}
+
QStringList ScPaths::getSystemFontDirs(void)
{
QStringList fontDirs;