summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-12-15 10:37:03 +0100
committerDavid Tardon <dtardon@redhat.com>2016-12-15 10:40:14 +0100
commit043c1886d559b58cc8948b0543b656a9039c8197 (patch)
treeebc0b3886e82ff45e99a3f5a565b93af38d7f993 /lingucomponent
parent64362ec119a4f38c98d2ff959a5651f4887ff942 (diff)
hunspell defines this for some time now
Change-Id: I5cd3cd11f24bee87266822ec13e64132ee470d6a
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 41e6e8d67be1..c09f7a48b3f9 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -58,7 +58,9 @@ using namespace com::sun::star::linguistic2;
using namespace linguistic;
// XML-header of SPELLML queries
-#define SPELLML_HEADER "<?xml?>"
+#if defined SPELL_XML
+#define SPELL_XML "<?xml?>"
+#endif
// only available in hunspell >= 1.5
#if !defined MAXWORDLEN
@@ -422,7 +424,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
return true;
// return sal_False to process SPELLML requests (they are longer than the header)
- if (rWord.match(SPELLML_HEADER, 0) && (rWord.getLength() > 10)) return false;
+ if (rWord.match(SPELL_XML, 0) && (rWord.getLength() > 10)) return false;
// Get property values to be used.
// These are be the default values set in the SN_LINGU_PROPERTIES
@@ -434,7 +436,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
rHelper.SetTmpPropVals( rProperties );
sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
- if (nFailure != -1 && !rWord.match(SPELLML_HEADER, 0))
+ if (nFailure != -1 && !rWord.match(SPELL_XML, 0))
{
sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored