mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 06:22:44 +08:00
Merge remote-tracking branch 'origin/fix/v7.3-fix-bugs-ppt' into fix/v7.3.0-fix
This commit is contained in:
47
MsBinaryFile/PptFile/Converter/Animation/AnimationParser.cpp
Normal file
47
MsBinaryFile/PptFile/Converter/Animation/AnimationParser.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
#include "AnimationParser.h"
|
||||
#include "../../Records/Drawing/ShapeContainer.h"
|
||||
#include "Timing_1995.h"
|
||||
|
||||
namespace PPT {
|
||||
namespace Intermediate {
|
||||
|
||||
|
||||
CRecordPP10SlideBinaryTagExtension* getPP10SlideBinaryTagExtension(CRecordSlide *pSlide)
|
||||
{
|
||||
CRecordSlideProgTagsContainer* progTag = pSlide->m_pSlideProgTagsContainer;
|
||||
return progTag ? progTag->getPP10SlideBinaryTagExtension() : nullptr;
|
||||
}
|
||||
|
||||
std::vector<SOldAnimation> getOldSlideAnimation(CRecordSlide *pSlide)
|
||||
{
|
||||
std::vector<CRecordShapeContainer*> arrShapeCont;
|
||||
pSlide->GetRecordsByType(&arrShapeCont, true);
|
||||
|
||||
std::vector<SOldAnimation> listOfRawAnimIC;
|
||||
for (auto* pShapeCont : arrShapeCont)
|
||||
{
|
||||
std::vector<CRecordShape* > shape;
|
||||
pShapeCont->GetRecordsByType(&shape, true);
|
||||
std::vector<CRecordAnimationInfoContainer* > anim;
|
||||
pShapeCont->GetRecordsByType(&anim, true);
|
||||
SOldAnimation animIC;
|
||||
if (!anim.empty() && !shape.empty())
|
||||
{
|
||||
animIC.shapeId = shape[0]->m_nID;
|
||||
animIC.anim = anim[0];
|
||||
listOfRawAnimIC.push_back(animIC);
|
||||
}
|
||||
}
|
||||
|
||||
return listOfRawAnimIC;
|
||||
}
|
||||
SlideAnimation ParseSlideAnimation(CRecordSlide *pSlide)
|
||||
{
|
||||
SlideAnimation slideAnim;
|
||||
slideAnim.arrAnim_1995 = getOldSlideAnimation(pSlide);
|
||||
slideAnim.pAnim_2010 = getPP10SlideBinaryTagExtension(pSlide);
|
||||
|
||||
return slideAnim;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user