Compare commits

...

4 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
5f9631a3c5 .. 2017-03-02 13:14:27 +03:00
6 changed files with 21 additions and 28 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

@ -134,11 +134,11 @@ namespace PPTX
virtual std::wstring GetODString()const
{
std::wstring str = L"<pt x=\"" + x + L"\" y=\"" + y + L"\" />";
return _T("<lnTo>") + str + _T("</lnTo>");
std::wstring str = L"<pt x=\"" + x + L"\" y=\"" + y + L"\" />";
return _T("<lnTo>") + str + _T("</lnTo>");
}
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_LINETO_INCLUDE_H_
#endif // PPTX_LOGIC_LINETO_INCLUDE_H_

View File

@ -132,7 +132,7 @@ namespace PPTX
public:
virtual std::wstring GetODString()const
{
std::wstring str = L"<pt x=\"" + x + L"\" y=\"" + y + L"\" />";
std::wstring str = L"<pt x=\"" + x + L"\" y=\"" + y + L"\" />";
return _T("<moveTo>") + str + _T("</moveTo>");
}
};

View File

@ -161,8 +161,8 @@ namespace PPTX
virtual std::wstring GetODString()const
{
std::wstring str1 = L"<pt x=\"" + x[0] + L"\" y=\"" + y[0] + L"\" />";
std::wstring str2 = L"<pt x=\"" + x[1] + L"\" y=\"" + y[1] + L"\" />";
std::wstring str1 = L"<pt x=\"" + x[0] + L"\" y=\"" + y[0] + L"\" />";
std::wstring str2 = L"<pt x=\"" + x[1] + L"\" y=\"" + y[1] + L"\" />";
return _T("<quadBezTo>") + str1 + str2 + _T("</quadBezTo>");
}
@ -170,4 +170,4 @@ namespace PPTX
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_QUADBEZTO_INCLUDE_H_
#endif // PPTX_LOGIC_QUADBEZTO_INCLUDE_H_

View File

@ -298,7 +298,7 @@ namespace PPTX
SpTreeElem elm;
elm.fromPPTY(pReader);
if (SpTreeElems.back().is_init())
if (elm.is_init())
{
if (elm.getType() == OOX::et_p_ShapeTree)
{

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