mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-14 01:43:39 +08:00
AddAudioTransition
This commit is contained in:
@ -1312,7 +1312,8 @@ void PPT_FORMAT::CPPTXWriter::WriteTransition(CStringWriter& oWriter, CSlideShow
|
||||
}break;
|
||||
case 23:
|
||||
{
|
||||
type = L"p:alphaFade";
|
||||
type = L"p:fade";
|
||||
// p:alphaFade
|
||||
}break;
|
||||
case 26:
|
||||
{
|
||||
|
||||
@ -402,7 +402,6 @@ void Animation::FillAudio(CRecordClientVisualElementContainer *pCVEC,
|
||||
oAudio.cMediaNode.tgtEl.embed =
|
||||
new OOX::RId(pCVEC->m_oVisualShapeAtom.m_nObjectIdRef);
|
||||
|
||||
// достать массив с текстом rid превратить в мапу
|
||||
std::vector<CRecordSoundContainer*> soundCont;
|
||||
this->m_pSoundContainer->GetRecordsByType(
|
||||
&soundCont, false);
|
||||
|
||||
@ -827,7 +827,7 @@ void CPPTUserInfo::LoadSlide(_UINT32 dwSlideID, CSlide* pSlide)
|
||||
{
|
||||
PPT_FORMAT::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(pAtom->m_nSoundRef);
|
||||
if (NULL != pInfo)
|
||||
AddAudioTransition (dwSlideID, pTransition, pInfo->m_strFilePath);
|
||||
AddAudioTransition (pAtom->m_nSoundRef, pTransition, pInfo->m_strFilePath);
|
||||
}
|
||||
|
||||
// анимации
|
||||
@ -2484,12 +2484,27 @@ void CPPTUserInfo::LoadExAudio(CRecordsContainer* pExObject)
|
||||
// }
|
||||
//}
|
||||
|
||||
void CPPTUserInfo::AddAudioTransition (_UINT32 dwSlideID, CTransition* pTransition, const std::wstring& strFilePath)
|
||||
void CPPTUserInfo::AddAudioTransition (_UINT32 refID, CTransition* pTransition, const std::wstring& strFilePath)
|
||||
{
|
||||
if (NULL==pTransition)
|
||||
return;
|
||||
|
||||
pTransition->m_oAudio.m_strAudioFileName = strFilePath;
|
||||
std::vector<CRecordSoundCollectionContainer*> sound;
|
||||
m_oDocument.GetRecordsByType(&sound, false);
|
||||
if (sound.empty() or sound[0]->m_arRecords.size() < refID)
|
||||
return;
|
||||
|
||||
auto audio = dynamic_cast<CRecordSoundContainer*>(sound[0]->m_arRecords[refID]);
|
||||
if (!audio)
|
||||
return;
|
||||
auto strRecord = dynamic_cast<CRecordCString*>(audio->m_arRecords[0]);
|
||||
|
||||
std::wstring audioName = strRecord->m_strText;
|
||||
;
|
||||
// audioName.erase(audioName.find(L"."), audioName.end()); todo
|
||||
if (strRecord)
|
||||
pTransition->m_oAudio.m_sImageName = audioName;
|
||||
|
||||
// ??? недоделка ???
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user