summaryrefslogtreecommitdiff
path: root/sw/source/core/text/inftxt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/inftxt.cxx')
-rw-r--r--sw/source/core/text/inftxt.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index c1aacf8c8bf1..133266675553 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1334,13 +1334,13 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
}
static void lcl_InitHyphValues( PropertyValues &rVals,
- sal_Int16 nMinLeading, sal_Int16 nMinTrailing )
+ sal_Int16 nMinLeading, sal_Int16 nMinTrailing, bool bNoCapsHyphenation )
{
sal_Int32 nLen = rVals.getLength();
if (0 == nLen) // yet to be initialized?
{
- rVals.realloc( 2 );
+ rVals.realloc( 3 );
PropertyValue *pVal = rVals.getArray();
pVal[0].Name = UPN_HYPH_MIN_LEADING;
@@ -1350,12 +1350,17 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
pVal[1].Name = UPN_HYPH_MIN_TRAILING;
pVal[1].Handle = UPH_HYPH_MIN_TRAILING;
pVal[1].Value <<= nMinTrailing;
+
+ pVal[2].Name = UPN_HYPH_NO_CAPS;
+ pVal[2].Handle = UPH_HYPH_NO_CAPS;
+ pVal[2].Value <<= bNoCapsHyphenation;
}
- else if (2 == nLen) // already initialized once?
+ else if (3 == nLen) // already initialized once?
{
PropertyValue *pVal = rVals.getArray();
pVal[0].Value <<= nMinLeading;
pVal[1].Value <<= nMinTrailing;
+ pVal[2].Value <<= bNoCapsHyphenation;
}
else {
OSL_FAIL( "unexpected size of sequence" );
@@ -1364,7 +1369,7 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
const PropertyValues & SwTextFormatInfo::GetHyphValues() const
{
- OSL_ENSURE( 2 == m_aHyphVals.getLength(),
+ OSL_ENSURE( 3 == m_aHyphVals.getLength(),
"hyphenation values not yet initialized" );
return m_aHyphVals;
}
@@ -1382,7 +1387,8 @@ bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen )
{
const sal_Int16 nMinimalLeading = std::max(rAttr.GetMinLead(), sal_uInt8(2));
const sal_Int16 nMinimalTrailing = rAttr.GetMinTrail();
- lcl_InitHyphValues( m_aHyphVals, nMinimalLeading, nMinimalTrailing);
+ const bool bNoCapsHyphenation = rAttr.IsNoCapsHyphenation();
+ lcl_InitHyphValues( m_aHyphVals, nMinimalLeading, nMinimalTrailing, bNoCapsHyphenation);
}
return bAuto;
}