diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-06-24 06:49:21 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-06-24 06:49:21 +0000 |
commit | 7920abc6fe40de4785bb16d2756688287dd6bc26 (patch) | |
tree | 45d529c7fe111ece6f7e9d8495848d1b94b425b6 /linguistic | |
parent | c3d612b8ebbd36121320a5164dd21898876ac762 (diff) |
INTEGRATION: CWS sw017 (1.15.42); FILE MERGED
2003/06/16 13:28:44 tl 1.15.42.1: #i15267# apostroph / typographic apostroph handling fixed
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/hyphdsp.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index a3f0ebbf873a..46ddc482726c 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: hyphdsp.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: tl $ $Date: 2002-09-24 13:59:39 $ + * last change: $Author: vg $ $Date: 2003-06-24 07:49:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,9 @@ #ifndef _ISOLANG_HXX #include <tools/isolang.hxx> #endif +#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX +#include <unotools/localedatawrapper.hxx> +#endif #ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT #include <tools/debug.hxx> #endif @@ -322,6 +325,13 @@ Reference< XHyphenatedWord > SAL_CALL else { OUString aChkWord( rWord ); + + // replace typographical apostroph by ascii apostroph + String aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); + DBG_ASSERT( 1 == aSingleQuote.Len(), "unexpectend length of quotation mark" ); + if (aSingleQuote.Len()) + aChkWord = aChkWord.replace( aSingleQuote.GetChar(0), '\'' ); + bWordModified |= RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) bWordModified |= RemoveControlChars( aChkWord ); @@ -442,6 +452,13 @@ Reference< XHyphenatedWord > SAL_CALL else { OUString aChkWord( rWord ); + + // replace typographical apostroph by ascii apostroph + String aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); + DBG_ASSERT( 1 == aSingleQuote.Len(), "unexpectend length of quotation mark" ); + if (aSingleQuote.Len()) + aChkWord = aChkWord.replace( aSingleQuote.GetChar(0), '\'' ); + bWordModified |= RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) bWordModified |= RemoveControlChars( aChkWord ); @@ -558,6 +575,13 @@ Reference< XPossibleHyphens > SAL_CALL else { OUString aChkWord( rWord ); + + // replace typographical apostroph by ascii apostroph + String aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); + DBG_ASSERT( 1 == aSingleQuote.Len(), "unexpectend length of quotation mark" ); + if (aSingleQuote.Len()) + aChkWord = aChkWord.replace( aSingleQuote.GetChar(0), '\'' ); + RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) RemoveControlChars( aChkWord ); |