summaryrefslogtreecommitdiff
path: root/editeng/source/items/paraitem.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-28 11:13:44 +0100
committerMichael Stahl <michael.stahl@cib.de>2019-12-07 19:58:33 +0100
commitad86ebb1f86f6347ccb9bbe40b0ca080562cbae8 (patch)
treeb598bad7d2ae57861cc57cd81271bd96b9aa9929 /editeng/source/items/paraitem.cxx
parente000187243b9b90f9c8c9110fcd9a82c01ba0fe7 (diff)
tdf#121658 Add option to not hyphenate words in CAPS
* Add checkbox to pagraph dialog * Store property in paragraph model * Move docx import/export from grabbag to paragraph model * Add ODF import/export * Add ODF unit test * Add layout test Change-Id: Id4e7c5a0ad145c042f862995d227c31ae2aa0abd Reviewed-on: https://gerrit.libreoffice.org/83979 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69) Reviewed-on: https://gerrit.libreoffice.org/84620
Diffstat (limited to 'editeng/source/items/paraitem.cxx')
-rw-r--r--editeng/source/items/paraitem.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 983f210dec3a..ec2839c355b5 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -563,6 +563,7 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const bool bHyph, const sal_uInt16 nId ) :
SfxPoolItem( nId ),
bHyphen(bHyph),
bPageEnd(true),
+ bNoCapsHyphenation(false),
nMinLead(0),
nMinTrail(0),
nMaxHyphens(255)
@@ -587,6 +588,9 @@ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) con
case MID_HYPHEN_MAX_HYPHENS:
rVal <<= static_cast<sal_Int16>(nMaxHyphens);
break;
+ case MID_HYPHEN_NO_CAPS:
+ rVal <<= bNoCapsHyphenation;
+ break;
}
return true;
}
@@ -596,7 +600,7 @@ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nMemberId &= ~CONVERT_TWIPS;
sal_Int16 nNewVal = 0;
- if( nMemberId != MID_IS_HYPHEN )
+ if( nMemberId != MID_IS_HYPHEN && nMemberId != MID_HYPHEN_NO_CAPS )
if(!(rVal >>= nNewVal))
return false;
@@ -614,6 +618,9 @@ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_HYPHEN_MAX_HYPHENS:
nMaxHyphens = static_cast<sal_uInt8>(nNewVal);
break;
+ case MID_HYPHEN_NO_CAPS:
+ bNoCapsHyphenation = Any2Bool(rVal);
+ break;
}
return true;
}
@@ -625,6 +632,7 @@ bool SvxHyphenZoneItem::operator==( const SfxPoolItem& rAttr ) const
const SvxHyphenZoneItem& rItem = static_cast<const SvxHyphenZoneItem&>(rAttr);
return ( rItem.bHyphen == bHyphen
+ && rItem.bNoCapsHyphenation == bNoCapsHyphenation
&& rItem.bPageEnd == bPageEnd
&& rItem.nMinLead == nMinLead
&& rItem.nMinTrail == nMinTrail