From f37b87ea5c87a683a39758a2875539f6bf59cf93 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 10 Nov 2020 12:23:02 +0200 Subject: This converts to/from mm100s, not twips Change-Id: Ie13e38c78b5e9a65b0dc572628f4fcc93b2c2a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105530 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sd/source/filter/eppt/epptso.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source/filter/eppt/epptso.cxx') diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 3ecac3614608..92ee21a6f5c6 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -665,7 +665,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( convertTwipToMasterUnit(nLineSpacing) ); + nLineSpacing = static_cast( convertMm100ToMasterUnit(nLineSpacing) ); } if ( ( pPara->meLineSpacing == css::beans::PropertyState_DIRECT_VALUE ) || ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, ParaAttr_LineFeed, nLineSpacing ) ) ) @@ -1210,7 +1210,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u const sal_uInt32 nDefaultTabSize = MapSize( awt::Size( nDefaultTabSizeSrc, 1 ) ).Width; sal_uInt32 nDefaultTabs = std::abs( maRect.GetWidth() ) / nDefaultTabSize; if ( nTabs ) - nDefaultTabs -= static_cast( convertTwipToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); + nDefaultTabs -= static_cast( convertMm100ToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); if ( static_cast(nDefaultTabs) < 0 ) nDefaultTabs = 0; @@ -1239,7 +1239,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u pRuleOut->WriteUInt16( nTabCount ); for ( const css::style::TabStop& rTabStop : rTabStops ) { - sal_uInt16 nPosition = static_cast( convertTwipToMasterUnit(rTabStop.Position) ); + sal_uInt16 nPosition = static_cast( convertMm100ToMasterUnit(rTabStop.Position) ); sal_uInt16 nType; switch ( rTabStop.Alignment ) { @@ -1256,7 +1256,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u sal_uInt32 nWidth = 1; if ( nTabs ) - nWidth += static_cast( convertTwipToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); + nWidth += static_cast( convertMm100ToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); nWidth *= nDefaultTabSize; for ( i = 0; i < nDefaultTabs; i++, nWidth += nDefaultTabSize ) pRuleOut->WriteUInt32( nWidth ); -- cgit