summaryrefslogtreecommitdiff
path: root/linguistic/source/hyphdta.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-09-29 14:02:41 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-09-29 14:02:41 +0000
commit96dd2fdff492e53336e24aade70ae74b785077c5 (patch)
tree2a6a535cd8403aa8361ad8576c283b18efeca60d /linguistic/source/hyphdta.cxx
parentb25b8e3d17e0754c90a9852b706697bb3395e19c (diff)
INTEGRATION: CWS geordi2q06 (1.3.92); FILE MERGED
2003/09/29 11:57:58 rt 1.3.92.1: #111934#: join CWS sw7pp1neu
Diffstat (limited to 'linguistic/source/hyphdta.cxx')
-rw-r--r--linguistic/source/hyphdta.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index f59a865e9574..971ab3f8d9fc 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hyphdta.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: tl $ $Date: 2001-07-04 13:27:17 $
+ * last change: $Author: hr $ $Date: 2003-09-29 15:02:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,6 +84,9 @@
#ifndef _SVTOOLS_LNGMISC_HXX_
#include <svtools/lngmisc.hxx>
#endif
+#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
+#include <unotools/localedatawrapper.hxx>
+#endif
//using namespace utl;
using namespace osl;
@@ -107,7 +110,20 @@ HyphenatedWord::HyphenatedWord(const OUString &rWord, INT16 nLang, INT16 nHPos,
nHyphenationPos (nHPos),
nHyphPos (nPos)
{
- bIsAltSpelling = rWord != rHyphWord;
+ String aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() );
+ DBG_ASSERT( 1 == aSingleQuote.Len(), "unexpectend length of quotation mark" );
+ if (aSingleQuote.Len())
+ {
+ // ignore typographical apostrophes (which got replaced in original
+ // word when being checked for hyphenation) in results.
+ OUString aTmpWord( rWord );
+ OUString aTmpHyphWord( rHyphWord );
+ aTmpWord = aTmpWord .replace( aSingleQuote.GetChar(0), '\'' );
+ aTmpHyphWord = aTmpHyphWord.replace( aSingleQuote.GetChar(0), '\'' );
+ bIsAltSpelling = aTmpWord != aTmpHyphWord;
+ }
+ else
+ bIsAltSpelling = rWord != rHyphWord;
}