summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-04-13 05:14:13 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-04-16 11:06:29 +0200
commit8bf8808c066704b55d518e807b645b7df11f1b5f (patch)
tree4c98cee1c043608670e0e6ed37dcea031bd36a81 /sd
parented31c669b44a9bf6da69499ce05cf36ab1fd26b0 (diff)
tdf#131193: MSO PP complains about an ODP saved as PPT
pPara was supposed to be the first paragraph, as before the below commit. Regression from d458adeed0c34fae26fe7f3d6ecc9b75b431922f Change-Id: I50b993ff8f37fd5572d60fe5d103c3cf5e636a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92105 Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins (cherry picked from commit b267650fd097f16d1b31c87a11a497294ad4ee42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92287 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/epptso.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index e03db4c9ddd3..952a8275cbe8 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1180,9 +1180,9 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
pPara = aTextObj.GetParagraph(0);
sal_uInt32 nParaFlags = 0x1f;
sal_Int16 nMask, nNumberingRule[ 10 ];
- sal_uInt32 nTextOfs = pPara->nTextOfs;
- sal_uInt32 nTabs = pPara->maTabStop.getLength();
- const css::style::TabStop* pTabStop = pPara->maTabStop.getConstArray();
+ const sal_uInt32 nTextOfs = pPara->nTextOfs;
+ const sal_uInt32 nTabs = pPara->maTabStop.getLength();
+ const auto& rTabStops = pPara->maTabStop;
for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i )
{
@@ -1219,7 +1219,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>( ( ( pTabStop[ nTabs - 1 ].Position / 4.40972 ) + nTextOfs ) / nDefaultTabSize );
+ nDefaultTabs -= static_cast<sal_Int32>( ( ( rTabStops[ nTabs - 1 ].Position / 4.40972 ) + nTextOfs ) / nDefaultTabSize );
if ( static_cast<sal_Int32>(nDefaultTabs) < 0 )
nDefaultTabs = 0;
@@ -1246,7 +1246,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
if ( nTextRulerAtomFlags & 4 )
{
pRuleOut->WriteUInt16( nTabCount );
- for ( const css::style::TabStop& rTabStop : std::as_const(pPara->maTabStop) )
+ for ( const css::style::TabStop& rTabStop : rTabStops )
{
sal_uInt16 nPosition = static_cast<sal_uInt16>( ( rTabStop.Position / 4.40972 ) + nTextOfs );
sal_uInt16 nType;
@@ -1265,7 +1265,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
sal_uInt32 nWidth = 1;
if ( nTabs )
- nWidth += static_cast<sal_Int32>( ( pTabStop[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize );
+ nWidth += static_cast<sal_Int32>( ( rTabStops[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize );
nWidth *= nDefaultTabSize;
for ( i = 0; i < nDefaultTabs; i++, nWidth += nDefaultTabSize )
pRuleOut->WriteUInt32( nWidth );