summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-13 10:48:05 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-14 09:59:40 +0200
commit8dedb05881578f5ff9e3d24ec62c642da7667c6e (patch)
treeabd80e9345f72be6a5ad17381c27af8fad5634b8 /sd
parent9c4048b1883f1dc9fdd621ffa2bb06ff9fe19d14 (diff)
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 <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-stylesheet.cxx2
3 files changed, 3 insertions, 3 deletions
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<sal_uInt16>( static_cast<double>(-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
nLineSpacing = nNormalSpacing;
else
- nLineSpacing = static_cast<sal_Int16>( static_cast<double>(nLineSpacing) / 4.40972 );
+ nLineSpacing = static_cast<sal_Int16>( 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<sal_uInt16>( *o3tl::doAccess<sal_Int32>(mAny) / 4.40972 )
+ ? static_cast<sal_uInt16>( convertTwipToMasterUnit(*o3tl::doAccess<sal_Int32>(mAny)) )
: 1250;
maStyleSheetList.emplace_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast<PPTExBulletProvider*>(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<sal_Int16>( static_cast<double>(nLineSpacing) / 4.40972 );
+ nLineSpacing = static_cast<sal_Int16>( convertTwipToMasterUnit(nLineSpacing) );
}
rLev.mnLineFeed = nLineSpacing;
}