diff options
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/text/guess.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/text/porlay.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/portxt.cxx | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 175c7c088e20..72b633611843 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -44,6 +44,9 @@ const sal_Unicode CH_BREAK = 0x0A; const sal_Unicode CH_TAB = '\t'; // \t const sal_Unicode CH_PAR = 0xB6; // paragraph const sal_Unicode CH_BULLET = 0xB7; // centered dot +const sal_Unicode CH_FULL_BLANK = 0x3000; +const sal_Unicode CH_NB_SPACE = 0xA0; +const sal_Unicode CH_SIX_PER_EM = 0x2006; // six-per-em space sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat, const bool bVertFormatLRBT ); diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 4c0af10e54cb..c28cccfb65bc 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -43,10 +43,7 @@ using namespace ::com::sun::star::linguistic2; namespace{ -const sal_Unicode CH_FULL_BLANK = 0x3000; -const sal_Unicode CH_NB_SPACE = 0xA0; - -bool IsBlank(sal_Unicode ch) { return ch == CH_BLANK || ch == CH_FULL_BLANK || ch == CH_NB_SPACE; } +bool IsBlank(sal_Unicode ch) { return ch == CH_BLANK || ch == CH_FULL_BLANK || ch == CH_NB_SPACE || ch == CH_SIX_PER_EM; } } @@ -98,7 +95,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, sal_Int32(rInf.GetIdx()) <= i; --i) { sal_Unicode cChar = rInf.GetText()[i]; - if ( cChar != CH_BLANK && cChar != CH_FULL_BLANK ) + if ( cChar != CH_BLANK && cChar != CH_FULL_BLANK && cChar != CH_SIX_PER_EM ) break; ++nSpaceCnt; } @@ -473,6 +470,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, while( nX > rInf.GetLineStart() && ( CH_TXTATR_BREAKWORD != cFieldChr || nX > rInf.GetIdx() ) && ( CH_BLANK == rInf.GetChar( --nX ) || + CH_SIX_PER_EM == rInf.GetChar( nX ) || CH_FULL_BLANK == rInf.GetChar( nX ) ) ) nBreakPos = nX; } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 07f8c4b8a608..e16619663f48 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -319,7 +319,7 @@ static bool lcl_HasOnlyBlanks(const OUString& rText, TextFrameIndex nStt, TextFr while ( nStt < nEnd ) { const sal_Unicode cChar = rText[ sal_Int32(nStt++) ]; - if ( ' ' != cChar && 0x3000 != cChar ) + if ( ' ' != cChar && CH_FULL_BLANK != cChar && CH_SIX_PER_EM != cChar ) { bBlankOnly = false; break; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index d5f51c7e054a..f9aed8c08c6c 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -379,7 +379,8 @@ bool SwTextPortion::Format_( SwTextFormatInfo &rInf ) rInf.GetLineStart() + rInf.GetLast()->GetLen() < rInf.GetIdx() && aGuess.BreakPos() == rInf.GetIdx() && CH_BLANK != rInf.GetChar( rInf.GetIdx() ) && - 0x3000 != rInf.GetChar( rInf.GetIdx() ) ) ) + CH_FULL_BLANK != rInf.GetChar( rInf.GetIdx() ) && + CH_SIX_PER_EM != rInf.GetChar( rInf.GetIdx() ) ) ) BreakUnderflow( rInf ); // case B2 else if( rInf.GetIdx() > rInf.GetLineStart() || |