filter/source/msfilter/svdfppt.cxx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
New commits: commit fee2ccddfc228675662e1afe97e41eb66076cb26 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 9 16:27:15 2018 +0000 i <= 5 is nonsense here Change-Id: Id0b378c282446e09c494613e3d8be48859b7309d Reviewed-on: https://gerrit.libreoffice.org/47665 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index f7e3da573eff..5f0b33973bb9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3322,21 +3322,15 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const { sal_uInt16 nDepth = 0, i = 0; rSt.ReadUInt16( nDepth ); - if ( i <= 5 ) + auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos()); + while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) ) { - auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos()); - while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) ) - { - bStyles = true; - ReadPPTExtParaLevel( rSt, aExtParaSheet[ (TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] ); - } -#ifdef DBG_UTIL - if ( rSt.Tell() != aHd.GetRecEndFilePos() ) - OSL_FAIL( "PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" ); -#endif + bStyles = true; + ReadPPTExtParaLevel( rSt, aExtParaSheet[ (TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] ); } #ifdef DBG_UTIL - else OSL_FAIL( "PPTExParaProv::PPTExParaProv - depth is greater than 5 (SJ)" ); + if ( rSt.Tell() != aHd.GetRecEndFilePos() ) + OSL_FAIL( "PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" ); #endif } #ifdef DBG_UTIL
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits