Commit 8bb23352 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander Trofimov

конвертация шейпов для wordart из doc в пресеты docx

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63152 954022d7-b5bf-4e40-9824-e11837661b57
parent f31fa21e
......@@ -1613,6 +1613,63 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo
if (!pShape->TextBoxBodyPr.is_init())
pShape->TextBoxBodyPr = new PPTX::Logic::BodyPr();
PPTShapes::ShapeType eShapeType = pPPTShape->m_eType;
if (eShapeType && eShapeType >= 136 && eShapeType<=175 )
{
SimpleTypes::ETextShapeType eTextShapeType;
switch (eShapeType)
{
case PPTShapes::ShapeType::sptCTextPlain: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextNoShape; break;
case PPTShapes::ShapeType::sptCTextArchUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextArchUp; break;
case PPTShapes::ShapeType::sptCTextArchDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextArchDown; break;
case PPTShapes::ShapeType::sptCTextButton: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextButton; break;
case PPTShapes::ShapeType::sptCTextCurveUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCurveUp; break;
case PPTShapes::ShapeType::sptCTextCurveDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCurveDown; break;
case PPTShapes::ShapeType::sptCTextCanUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCanUp; break;
case PPTShapes::ShapeType::sptCTextCanDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCanDown; break;
case PPTShapes::ShapeType::sptCTextWave1: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextWave1; break;
case PPTShapes::ShapeType::sptCTextWave2: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextWave2; break;
case PPTShapes::ShapeType::sptCTextWave3: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDoubleWave1; break;
case PPTShapes::ShapeType::sptCTextWave4: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextWave4; break;
case PPTShapes::ShapeType::sptCTextInflate: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextInflate; break;
case PPTShapes::ShapeType::sptCTextDeflate: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDeflate; break;
case PPTShapes::ShapeType::sptCTextInflateBottom: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextInflateBottom; break;
case PPTShapes::ShapeType::sptCTextDeflateBottom: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDeflateBottom; break;
case PPTShapes::ShapeType::sptCTextInflateTop: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextInflateTop; break;
case PPTShapes::ShapeType::sptCTextDeflateTop: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDeflateTop; break;
case PPTShapes::ShapeType::sptCTextDeflateInflate: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDeflateInflate; break;
case PPTShapes::ShapeType::sptCTextDeflateInflateDeflate: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextDeflateInflateDeflate; break;
case PPTShapes::ShapeType::sptCTextFadeRight: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextFadeRight; break;
case PPTShapes::ShapeType::sptCTextFadeLeft: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextFadeLeft; break;
case PPTShapes::ShapeType::sptCTextFadeUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextFadeUp; break;
case PPTShapes::ShapeType::sptCTextFadeDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextFadeDown; break;
case PPTShapes::ShapeType::sptCTextSlantUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextSlantUp; break;
case PPTShapes::ShapeType::sptCTextSlantDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextSlantDown; break;
case PPTShapes::ShapeType::sptCTextCascadeUp: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCascadeUp; break;
case PPTShapes::ShapeType::sptCTextCascadeDown: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCascadeDown; break;
case PPTShapes::ShapeType::sptCTextButtonPour: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextButtonPour; break;
case PPTShapes::ShapeType::sptCTextStop: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextStop; break;
case PPTShapes::ShapeType::sptCTextTriangle: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextTriangle; break;
case PPTShapes::ShapeType::sptCTextTriangleInverted: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextTriangleInverted; break;
case PPTShapes::ShapeType::sptCTextChevron: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextChevron; break;
case PPTShapes::ShapeType::sptCTextChevronInverted: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextChevronInverted; break;
case PPTShapes::ShapeType::sptCTextRingInside: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextRingInside; break;
case PPTShapes::ShapeType::sptCTextRingOutside: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextRingOutside; break;
case PPTShapes::ShapeType::sptCTextCirclePour: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextCirclePour; break;
case PPTShapes::ShapeType::sptCTextArchUpPour: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextArchUpPour; break;
case PPTShapes::ShapeType::sptCTextArchDownPour: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextArchDownPour; break;
default: eTextShapeType = SimpleTypes::ETextShapeType::textshapetypeTextNoShape; break;
}
SimpleTypes::CTextShapeType<> oTextShapeType;
oTextShapeType.SetValue(eTextShapeType);
CString strPrstTxWarp = _T("<a:prstTxWarp prst=\"") + oTextShapeType.ToString() + _T("\"><a:avLst/></a:prstTxWarp>");
XmlUtils::CXmlNode oPrstTxWarpNode;
oPrstTxWarpNode.FromXmlString(strPrstTxWarp);
pShape->TextBoxBodyPr->prstTxWarp = oPrstTxWarpNode;
}
XmlUtils::CXmlNode oNodeTextBox;
if (oNodeShape.GetNode(_T("v:textbox"), oNodeTextBox))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment