Commit 383486cb authored by ElenaSubbotina's avatar ElenaSubbotina

fix blip fill in text box with math in xlsx(pptx)

add xfrm for text in smart art
parent d1e9176e
...@@ -133,14 +133,14 @@ namespace PPTX ...@@ -133,14 +133,14 @@ namespace PPTX
BinDocxRW::CDocxSerializer oDocxSerializer; BinDocxRW::CDocxSerializer oDocxSerializer;
NSBinPptxRW::CDrawingConverter oDrawingConverter; NSBinPptxRW::CDrawingConverter oDrawingConverter;
NSBinPptxRW::CBinaryFileWriter* pOldWriter = oDrawingConverter.m_pBinaryWriter; NSBinPptxRW::CBinaryFileWriter* pOldWriter = oDrawingConverter.m_pBinaryWriter;
NSCommon::smart_ptr<PPTX::CCommonRels> pOldRels = *oDrawingConverter.m_pBinaryWriter->m_pCommonRels; //NSCommon::smart_ptr<PPTX::CCommonRels> pOldRels = *oDrawingConverter.m_pBinaryWriter->m_pCommonRels;
oDrawingConverter.m_pBinaryWriter = pWriter; oDrawingConverter.m_pBinaryWriter = pWriter;
DocWrapper::FontProcessor fp; DocWrapper::FontProcessor fp;
BinDocxRW::ParamsWriter oParamsWriter(pWriter, &fp, &oDrawingConverter, NULL); BinDocxRW::ParamsWriter oParamsWriter(pWriter, &fp, &oDrawingConverter, NULL);
oDocxSerializer.m_pParamsWriter = &oParamsWriter; oDocxSerializer.m_pParamsWriter = &oParamsWriter;
oDocxSerializer.getBinaryContentElem(eElemType, pElem, *pWriter, lDataSize); oDocxSerializer.getBinaryContentElem(eElemType, pElem, *pWriter, lDataSize);
*oDrawingConverter.m_pBinaryWriter->m_pCommonRels = pOldRels; //*oDrawingConverter.m_pBinaryWriter->m_pCommonRels = pOldRels;
oDrawingConverter.m_pBinaryWriter = pOldWriter; oDrawingConverter.m_pBinaryWriter = pOldWriter;
} }
......
...@@ -83,6 +83,8 @@ namespace PPTX ...@@ -83,6 +83,8 @@ namespace PPTX
style = oNode; style = oNode;
else if (_T("txBody") == strName) else if (_T("txBody") == strName)
txBody = oNode; txBody = oNode;
else if (_T("txXfrm") == strName)
txXfrm = oNode;
else if (_T("txbx") == strName || _T("textbox") == strName) else if (_T("txbx") == strName || _T("textbox") == strName)
{ {
XmlUtils::CXmlNode _node = oNode.ReadNode(_T("w:txbxContent")); XmlUtils::CXmlNode _node = oNode.ReadNode(_T("w:txbxContent"));
......
...@@ -127,6 +127,8 @@ namespace PPTX ...@@ -127,6 +127,8 @@ namespace PPTX
{ {
pWriter->WriteRecord2(3, txBody); pWriter->WriteRecord2(3, txBody);
} }
pWriter->WriteRecord2(6, txXfrm);
pWriter->EndRecord(); pWriter->EndRecord();
} }
...@@ -317,6 +319,7 @@ namespace PPTX ...@@ -317,6 +319,7 @@ namespace PPTX
SpPr spPr; SpPr spPr;
nullable<ShapeStyle> style; nullable<ShapeStyle> style;
nullable<TxBody> txBody; nullable<TxBody> txBody;
nullable<Xfrm> txXfrm;
nullable_string TextBoxShape; nullable_string TextBoxShape;
nullable<BodyPr> TextBoxBodyPr; nullable<BodyPr> TextBoxBodyPr;
......
...@@ -98,6 +98,8 @@ namespace Diagram ...@@ -98,6 +98,8 @@ namespace Diagram
m_oShapeStyle = oReader; m_oShapeStyle = oReader;
else if (_T("dsp:txBody") == sName) else if (_T("dsp:txBody") == sName)
m_oTxBody = oReader; m_oTxBody = oReader;
else if (_T("dsp:txXfrm") == sName)
m_oTxXfrm = oReader;
} }
} }
...@@ -116,6 +118,7 @@ namespace Diagram ...@@ -116,6 +118,7 @@ namespace Diagram
nullable<OOX::Drawing::CShapeProperties> m_oSpPr; nullable<OOX::Drawing::CShapeProperties> m_oSpPr;
nullable<OOX::Drawing::CShapeStyle> m_oShapeStyle; nullable<OOX::Drawing::CShapeStyle> m_oShapeStyle;
nullable<OOX::Drawing::CTxBody> m_oTxBody; nullable<OOX::Drawing::CTxBody> m_oTxBody;
nullable<OOX::Drawing::CTransform2D> m_oTxXfrm;
//extLst (Extension List) І20.1.2.2.15 //extLst (Extension List) І20.1.2.2.15
......
...@@ -195,6 +195,8 @@ namespace OOX ...@@ -195,6 +195,8 @@ namespace OOX
CString sName = oReader.GetName(); CString sName = oReader.GetName();
if ( _T("a:xfrm") == sName ) if ( _T("a:xfrm") == sName )
m_eType = et_a_xfrm; m_eType = et_a_xfrm;
else if ( _T("dsp:txXfrm") == sName )
m_eType = et_dsp_txXfrm;
else else
return; return;
......
...@@ -331,6 +331,7 @@ namespace OOX ...@@ -331,6 +331,7 @@ namespace OOX
et_dsp_style, // <dsp:style> et_dsp_style, // <dsp:style>
et_dsp_groupSpPr, // <dsp:grpSpPr> et_dsp_groupSpPr, // <dsp:grpSpPr>
et_dsp_cNvPr, et_dsp_cNvPr,
et_dsp_txXfrm,
et_a_p, // <a:p> et_a_p, // <a:p>
et_a_pPr, // <a:pPr> et_a_pPr, // <a:pPr>
......
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