summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-04-02 08:54:59 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-04-03 09:43:56 +0200
commitb9955b2083ffdc1f99bc8be6b09d806fa3279a16 (patch)
tree8deabb3c56c55833392d8454feac519740caaafd /filter
parent14198f2191f216592f00b72221771704b3ce4636 (diff)
tdf#93173: Remove arbitrary line spacing limit
OASIS Open Document Format for Office Applications (OpenDocument) v.1.2 doesn't limit the value of fo:line-height. But we have arbitrary limits in proportional mode for both minimal (50%) and maximal (200%) values. The implementation uses sal_uInt16 to store the value, so fix places where sal_uInt8 was unreasonably used to set it, change the upper limit to max sal_uInt16 value, and set lower limit to 6% (to match Word's minimal factor of 0.06). Change-Id: I4c2ac5f0acf65d7573328e71bcf36ac9abb5ffd5 Reviewed-on: https://gerrit.libreoffice.org/52252 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ee33fe0192df..fb548d0dda6a 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6263,12 +6263,6 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
if ( bIsHardAttribute )
{
- if ( pPortion && ( nVal2 > 200 ) )
- {
- sal_uInt32 nFontHeight;
- pPortion->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
- nVal2 = -static_cast<sal_Int16>( ( nFontHeight * nVal * 8 ) / 100 );
- }
SdrTextFixedCellHeightItem aHeightItem(true);
aHeightItem.SetWhich(SDRATTR_TEXT_USEFIXEDCELLHEIGHT);
rSet.Put( aHeightItem );
@@ -6279,7 +6273,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
aItem.SetInterLineSpaceRule(SvxInterLineSpaceRule::Off);
} else
{
- sal_uInt8 nPropLineSpace = static_cast<sal_uInt8>(nVal2);
+ sal_uInt16 nPropLineSpace = static_cast<sal_uInt16>(nVal2);
aItem.SetPropLineSpace( nPropLineSpace );
aItem.SetLineSpaceRule( SvxLineSpaceRule::Auto );
}