Compare commits

...

3 Commits

Author SHA1 Message Date
bc3461147d fix pptx note slide default 2017-03-03 14:29:18 +03:00
80d4e6057b .. 2017-03-03 13:35:37 +03:00
2dc5c2916a .. 2017-03-03 13:28:16 +03:00
2 changed files with 13 additions and 20 deletions

View File

@ -1090,6 +1090,11 @@ namespace NSBinPptxRW
pTxRun->SetText(_T("")); // enter simple comment here
pShape->txBody = pTxBody;
if (pShape->txBody.IsInit())
{
if (!pShape->txBody->bodyPr.IsInit())
pShape->txBody->bodyPr = new PPTX::Logic::BodyPr;
}
PPTX::Logic::RunElem elm;
pTxBody->Paragrs[0].RunElems.push_back(elm);

View File

@ -161,10 +161,6 @@ namespace PPTX
void toXmlWriterExcel(NSBinPptxRW::CXmlWriter* pWriter) const
{
/*
pWriter->StartNode(_T("c:rich"));
pWriter->EndAttributes();
*/
if (bodyPr.IsInit())
{
bodyPr->m_namespace = _T("a");
@ -194,12 +190,12 @@ namespace PPTX
return result;
}
void Merge(nullable<TxBody>& txBody)const
void Merge(nullable<TxBody>& txBody)
{
if(!txBody.is_init()) return;
if (!bodyPr.IsInit())
bodyPr = new Logic::BodyPr();
if(bodyPr.IsInit())
bodyPr->Merge(txBody->bodyPr);
bodyPr->Merge(txBody->bodyPr);
if(lstStyle.IsInit())
lstStyle->Merge(txBody->lstStyle);
@ -253,9 +249,9 @@ namespace PPTX
pReader->Seek(_end_rec);
if (!bodyPr.IsInit())
bodyPr = new Logic::BodyPr();
}
if (!bodyPr.IsInit())
bodyPr = new Logic::BodyPr();
}
nullable<BodyPr> bodyPr;
nullable<TextListStyle> lstStyle;
@ -277,18 +273,10 @@ namespace PPTX
}
public:
bool IsOneLineParagraphs() const
{
if (!bodyPr.is_init()) return false;
if (!bodyPr->wrap.is_init()) return false;
return (bodyPr->wrap->get() == _T("none"));
}
std::wstring GetDocxTxBoxContent(NSBinPptxRW::CBinaryFileWriter* pWriter, const nullable<PPTX::Logic::ShapeStyle>& shape_style);
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_TXBODY_INCLUDE_H
#endif // PPTX_LOGIC_TXBODY_INCLUDE_H