diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 12:23:02 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 15:43:19 +0100 |
commit | f37b87ea5c87a683a39758a2875539f6bf59cf93 (patch) | |
tree | b9f2313b2eca445a46c14eedea24f017e8b8f5dd /sd | |
parent | afbbfb3b55beb937555a972d9edbb47ede91001a (diff) |
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptbase.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-stylesheet.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
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<sal_uInt16>( static_cast<double>(-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point nLineSpacing = nNormalSpacing; else - nLineSpacing = static_cast<sal_Int16>( convertTwipToMasterUnit(nLineSpacing) ); + nLineSpacing = static_cast<sal_Int16>( 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<sal_Int32>( convertTwipToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); + nDefaultTabs -= static_cast<sal_Int32>( convertMm100ToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); if ( static_cast<sal_Int32>(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<sal_uInt16>( convertTwipToMasterUnit(rTabStop.Position) ); + sal_uInt16 nPosition = static_cast<sal_uInt16>( 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<sal_Int32>( convertTwipToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); + nWidth += static_cast<sal_Int32>( convertMm100ToMasterUnit(rTabStops[ nTabs - 1 ].Position) / nDefaultTabSize ); nWidth *= nDefaultTabSize; for ( i = 0; i < nDefaultTabs; i++, nWidth += nDefaultTabSize ) pRuleOut->WriteUInt32( nWidth ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 38015a654e09..27870ec4bb43 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -491,7 +491,7 @@ bool PPTWriterBase::GetStyleSheets() aXPropSet( mXModel, UNO_QUERY ); sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, "TabStop" ) ) - ? static_cast<sal_uInt16>( convertTwipToMasterUnit(*o3tl::doAccess<sal_Int32>(mAny)) ) + ? static_cast<sal_uInt16>( convertMm100ToMasterUnit(*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 6a015ebfa143..6acf110c50b2 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -258,7 +258,7 @@ void PPTExParaSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp nLineSpacing = 100; } else - nLineSpacing = static_cast<sal_Int16>( convertTwipToMasterUnit(nLineSpacing) ); + nLineSpacing = static_cast<sal_Int16>(convertMm100ToMasterUnit(nLineSpacing)); } rLev.mnLineFeed = nLineSpacing; } |