[Libreoffice-commits] core.git: sd/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 14 08:00:26 UTC 2020
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(-)
New commits:
commit 8dedb05881578f5ff9e3d24ec62c642da7667c6e
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed May 13 10:48:05 2020 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu May 14 09:59:40 2020 +0200
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 at cib.de>
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;
}
More information about the Libreoffice-commits
mailing list