From 96dd2fdff492e53336e24aade70ae74b785077c5 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 29 Sep 2003 14:02:41 +0000 Subject: [PATCH] INTEGRATION: CWS geordi2q06 (1.3.92); FILE MERGED 2003/09/29 11:57:58 rt 1.3.92.1: #111934#: join CWS sw7pp1neu --- linguistic/source/hyphdta.cxx | 22 +++++++++++++++++++--- 1 file 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 #endif +#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX +#include +#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; }