diff options
Diffstat (limited to 'sw/source/core/text/inftxt.cxx')
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 6f22e920d135..5a794370b6da 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1361,13 +1361,13 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor, static void lcl_InitHyphValues( PropertyValues &rVals, sal_Int16 nMinLeading, sal_Int16 nMinTrailing, - bool bNoCapsHyphenation, bool bNoLastWordHyphenation ) + bool bNoCapsHyphenation, bool bNoLastWordHyphenation, sal_Int16 nMinWordLength ) { sal_Int32 nLen = rVals.getLength(); if (0 == nLen) // yet to be initialized? { - rVals.realloc( 4 ); + rVals.realloc( 5 ); PropertyValue *pVal = rVals.getArray(); pVal[0].Name = UPN_HYPH_MIN_LEADING; @@ -1385,14 +1385,19 @@ static void lcl_InitHyphValues( PropertyValues &rVals, pVal[3].Name = UPN_HYPH_NO_LAST_WORD; pVal[3].Handle = UPH_HYPH_NO_LAST_WORD; pVal[3].Value <<= bNoLastWordHyphenation; + + pVal[4].Name = UPN_HYPH_MIN_WORD_LENGTH; + pVal[4].Handle = UPH_HYPH_MIN_WORD_LENGTH; + pVal[4].Value <<= nMinWordLength; } - else if (4 == nLen) // already initialized once? + else if (5 == nLen) // already initialized once? { PropertyValue *pVal = rVals.getArray(); pVal[0].Value <<= nMinLeading; pVal[1].Value <<= nMinTrailing; pVal[2].Value <<= bNoCapsHyphenation; pVal[3].Value <<= bNoLastWordHyphenation; + pVal[4].Value <<= nMinWordLength; } else { OSL_FAIL( "unexpected size of sequence" ); @@ -1419,10 +1424,11 @@ bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) { const sal_Int16 nMinimalLeading = std::max(rAttr.GetMinLead(), sal_uInt8(2)); const sal_Int16 nMinimalTrailing = rAttr.GetMinTrail(); + const sal_Int16 nMinimalWordLength = rAttr.GetMinWordLength(); const bool bNoCapsHyphenation = rAttr.IsNoCapsHyphenation(); const bool bNoLastWordHyphenation = rAttr.IsNoLastWordHyphenation(); lcl_InitHyphValues( m_aHyphVals, nMinimalLeading, nMinimalTrailing, - bNoCapsHyphenation, bNoLastWordHyphenation ); + bNoCapsHyphenation, bNoLastWordHyphenation, nMinimalWordLength ); } return bAuto; } |