From 8dedb05881578f5ff9e3d24ec62c642da7667c6e Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Wed, 13 May 2020 10:48:05 +0200 Subject: Use convertTwipToMasterUnit instead of hardcoded number Change-Id: Ief34c9f041d491ffdb5efc2d888cf6f77de7b27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94104 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sd/source/filter/eppt/epptso.cxx | 2 +- sd/source/filter/eppt/pptx-epptbase.cxx | 2 +- sd/source/filter/eppt/pptx-stylesheet.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 2b26b9602eb4..2f1b959e00df 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -664,7 +664,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) if ( !pPara->mbFixedLineSpacing && rPortion.mnCharHeight > static_cast( static_cast(-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point nLineSpacing = nNormalSpacing; else - nLineSpacing = static_cast( static_cast(nLineSpacing) / 4.40972 ); + nLineSpacing = static_cast( convertTwipToMasterUnit(nLineSpacing) ); } if ( ( pPara->meLineSpacing == css::beans::PropertyState_DIRECT_VALUE ) || ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, ParaAttr_LineFeed, nLineSpacing ) ) ) diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 13651f0e8f8b..552816e83a14 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -492,7 +492,7 @@ bool PPTWriterBase::GetStyleSheets() aXPropSet( mXModel, UNO_QUERY ); sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, "TabStop" ) ) - ? static_cast( *o3tl::doAccess(mAny) / 4.40972 ) + ? static_cast( convertTwipToMasterUnit(*o3tl::doAccess(mAny)) ) : 1250; maStyleSheetList.emplace_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast(this) ) ); diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index 4057458c8ee3..460768e69034 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -257,7 +257,7 @@ void PPTExParaSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp nLineSpacing = 100; } else - nLineSpacing = static_cast( static_cast(nLineSpacing) / 4.40972 ); + nLineSpacing = static_cast( convertTwipToMasterUnit(nLineSpacing) ); } rLev.mnLineFeed = nLineSpacing; } -- cgit