Commit 857b79ee authored by ElenaSubbotina's avatar ElenaSubbotina

x2t - fix smart art

parent ecba12b2
...@@ -183,8 +183,6 @@ namespace DocFileFormat ...@@ -183,8 +183,6 @@ namespace DocFileFormat
void WordprocessingDocument::SaveDocument() void WordprocessingDocument::SaveDocument()
{ {
std::wstring pathWord = m_strOutputPath + FILE_SEPARATOR_STR + L"word" ; std::wstring pathWord = m_strOutputPath + FILE_SEPARATOR_STR + L"word" ;
//OOX::CPath pathWord = CString(m_strOutputPath) + FILE_SEPARATOR_STR + L"word" );
//FileSystem::Directory::CreateDirectory( pathWord.GetPath() );
NSDirectory::CreateDirectory( pathWord ); NSDirectory::CreateDirectory( pathWord );
WritePackage(); WritePackage();
...@@ -204,8 +202,6 @@ namespace DocFileFormat ...@@ -204,8 +202,6 @@ namespace DocFileFormat
if (!ImagesList.empty()) if (!ImagesList.empty())
{ {
std::wstring pathMedia = pathWord + FILE_SEPARATOR_STR + L"media"; std::wstring pathMedia = pathWord + FILE_SEPARATOR_STR + L"media";
//OOX::CPath pathMedia = pathWord + FILE_SEPARATOR_STR + L"media";
//FileSystem::Directory::CreateDirectory( pathMedia.GetPath() );
NSDirectory::CreateDirectory(pathMedia); NSDirectory::CreateDirectory(pathMedia);
...@@ -237,8 +233,6 @@ namespace DocFileFormat ...@@ -237,8 +233,6 @@ namespace DocFileFormat
if (!OleObjectsList.empty()) if (!OleObjectsList.empty())
{ {
std::wstring pathObjects = pathWord + FILE_SEPARATOR_STR + L"embeddings" ; std::wstring pathObjects = pathWord + FILE_SEPARATOR_STR + L"embeddings" ;
//OOX::CPath pathObjects = pathWord + FILE_SEPARATOR_STR + L"embeddings" ;
//FileSystem::Directory::CreateDirectory( pathObjects.GetPath());
NSDirectory::CreateDirectory( pathObjects ); NSDirectory::CreateDirectory( pathObjects );
int i = 1; int i = 1;
......
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MSC_VER=1800" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
UsePrecompiledHeader="2" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
DebugInformationFormat="4" DebugInformationFormat="4"
...@@ -402,6 +402,58 @@ ...@@ -402,6 +402,58 @@
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
<Filter
Name="oox"
>
<File
RelativePath="..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
>
</File>
<File
RelativePath="..\..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\ChartWriter.cpp"
>
</File>
<File
RelativePath="..\..\XlsxSerializerCom\Common\Common.cpp"
>
</File>
<File
RelativePath="..\..\XlsxSerializerCom\Reader\CommonWriter.cpp"
>
</File>
<File
RelativePath="..\..\XlsxSerializerCom\Reader\CSVReader.cpp"
>
</File>
<File
RelativePath="..\..\XlsxSerializerCom\Writer\CSVWriter.cpp"
>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
</File>
</Filter>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
......
...@@ -1023,10 +1023,8 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p ...@@ -1023,10 +1023,8 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if (!oMainNode.GetNodes(L"*", oNodes)) if (!oMainNode.GetNodes(L"*", oNodes))
return NULL; return NULL;
//ULONG lCurrentPosition = m_pBinaryWriter->GetPosition();
m_pBinaryWriter->StartRecord(0); m_pBinaryWriter->StartRecord(0);
m_pBinaryWriter->ClearCurShapePositionAndSizes();
m_pBinaryWriter->ClearShapeCurSizes();
LONG lCount = oNodes.GetCount(); LONG lCount = oNodes.GetCount();
for (LONG i = 0; i < lCount; ++i) for (LONG i = 0; i < lCount; ++i)
...@@ -1051,10 +1049,14 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p ...@@ -1051,10 +1049,14 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if (oNodeAnchorInline.IsValid()) if (oNodeAnchorInline.IsValid())
{ {
XmlUtils::CXmlNode oNodeExt; XmlUtils::CXmlNode oNodeExt;
m_pBinaryWriter->m_lXCurShape = 0;
m_pBinaryWriter->m_lYCurShape = 0;
if (oNodeAnchorInline.GetNode(L"wp:extent", oNodeExt)) if (oNodeAnchorInline.GetNode(L"wp:extent", oNodeExt))
{ {
m_pBinaryWriter->m_lWidthCurShape = oNodeExt.ReadAttributeInt(L"cx"); m_pBinaryWriter->m_lCxCurShape = oNodeExt.ReadAttributeInt(L"cx");
m_pBinaryWriter->m_lHeightCurShape = oNodeExt.ReadAttributeInt(L"cy"); m_pBinaryWriter->m_lCyCurShape = oNodeExt.ReadAttributeInt(L"cy");
} }
SendMainProps(oNodeAnchorInline.GetXml(), pMainProps); SendMainProps(oNodeAnchorInline.GetXml(), pMainProps);
...@@ -1083,11 +1085,12 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p ...@@ -1083,11 +1085,12 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
else if (L"wpc:wpc" == oNodeContent.GetName()) else if (L"wpc:wpc" == oNodeContent.GetName())
{ {
PPTX::Logic::SpTree* pTree = new PPTX::Logic::SpTree(); PPTX::Logic::SpTree* pTree = new PPTX::Logic::SpTree();
pTree->grpSpPr.xfrm = new PPTX::Logic::Xfrm(); pTree->grpSpPr.xfrm = new PPTX::Logic::Xfrm();
pTree->grpSpPr.xfrm->offX = 0; pTree->grpSpPr.xfrm->offX = m_pBinaryWriter->m_lXCurShape;
pTree->grpSpPr.xfrm->offY = 0; pTree->grpSpPr.xfrm->offY = m_pBinaryWriter->m_lYCurShape;
pTree->grpSpPr.xfrm->extX = m_pBinaryWriter->m_lWidthCurShape; pTree->grpSpPr.xfrm->extX = m_pBinaryWriter->m_lCxCurShape;
pTree->grpSpPr.xfrm->extY = m_pBinaryWriter->m_lHeightCurShape; pTree->grpSpPr.xfrm->extY = m_pBinaryWriter->m_lCyCurShape;
pTree->fromXML(oNodeContent); pTree->fromXML(oNodeContent);
oElem.InitElem(pTree); oElem.InitElem(pTree);
...@@ -1104,7 +1107,7 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p ...@@ -1104,7 +1107,7 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if (!oElem.is_init()) if (!oElem.is_init())
{ {
std::wstring strXFRM = L"<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"" + std::wstring strXFRM = L"<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"" +
std::to_wstring(m_pBinaryWriter->m_lWidthCurShape) + L"\" cy=\"" + std::to_wstring(m_pBinaryWriter->m_lHeightCurShape) + L"\"/></a:xfrm>"; std::to_wstring(m_pBinaryWriter->m_lCxCurShape) + L"\" cy=\"" + std::to_wstring(m_pBinaryWriter->m_lCyCurShape) + L"\"/></a:xfrm>";
std::wstring strUnsupported = L"<wps:wsp \ std::wstring strUnsupported = L"<wps:wsp \
xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \ xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
...@@ -1366,9 +1369,6 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil ...@@ -1366,9 +1369,6 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
pDiagramData = dynamic_cast<OOX::CDiagramData*>(oFileData.operator->()); pDiagramData = dynamic_cast<OOX::CDiagramData*>(oFileData.operator->());
if (pDiagramData) if (pDiagramData)
{ {
m_strCurrentRelsPath = pDiagramData->m_strFilename;
SetCurrentRelsPath();
for (int i = 0; (pDiagramData->m_oExtLst.IsInit()) && i < pDiagramData->m_oExtLst->m_arrExt.size(); i++) for (int i = 0; (pDiagramData->m_oExtLst.IsInit()) && i < pDiagramData->m_oExtLst->m_arrExt.size(); i++)
{ {
if (pDiagramData->m_oExtLst->m_arrExt[i]->m_oDataModelExt.IsInit()) if (pDiagramData->m_oExtLst->m_arrExt[i]->m_oDataModelExt.IsInit())
...@@ -1379,9 +1379,9 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil ...@@ -1379,9 +1379,9 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
} }
} }
} }
if (id_drawing.is_init()) if (id_drawing.is_init())
{ {
oFileDrawing = (*m_pBinaryWriter->m_pCommonRels)->Find(*id_drawing);
pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->()); pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->());
} }
if (!pDiagramDrawing) if (!pDiagramDrawing)
...@@ -1401,7 +1401,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil ...@@ -1401,7 +1401,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
if (pDiagramDrawing) if (pDiagramDrawing)
{ {
result->InitElem(pDiagramDrawing->m_oShapeTree.operator->()); result->InitElem(new PPTX::Logic::SpTree(*pDiagramDrawing->m_oShapeTree));
} }
else else
{//BG-FSC1.docx {//BG-FSC1.docx
...@@ -1414,33 +1414,26 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil ...@@ -1414,33 +1414,26 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
{ {
_pElem.grpSpPr.xfrm = new PPTX::Logic::Xfrm(); _pElem.grpSpPr.xfrm = new PPTX::Logic::Xfrm();
_pElem.grpSpPr.xfrm->offX = (int)0; _pElem.grpSpPr.xfrm->offX = m_pBinaryWriter->m_lXCurShape;
_pElem.grpSpPr.xfrm->offY = (int)0; _pElem.grpSpPr.xfrm->offY = m_pBinaryWriter->m_lYCurShape;
_pElem.grpSpPr.xfrm->extX = m_pBinaryWriter->m_lWidthCurShape; _pElem.grpSpPr.xfrm->extX = m_pBinaryWriter->m_lCxCurShape;
_pElem.grpSpPr.xfrm->extY = m_pBinaryWriter->m_lHeightCurShape; _pElem.grpSpPr.xfrm->extY = m_pBinaryWriter->m_lCyCurShape;
_pElem.grpSpPr.xfrm->chOffX = (int)0; _pElem.grpSpPr.xfrm->chOffX = (int)0;
_pElem.grpSpPr.xfrm->chOffY = (int)0; _pElem.grpSpPr.xfrm->chOffY = (int)0;
_pElem.grpSpPr.xfrm->chExtX = m_pBinaryWriter->m_lWidthCurShape; _pElem.grpSpPr.xfrm->chExtX = m_pBinaryWriter->m_lCxCurShape;
_pElem.grpSpPr.xfrm->chExtY = m_pBinaryWriter->m_lHeightCurShape; _pElem.grpSpPr.xfrm->chExtY = m_pBinaryWriter->m_lCyCurShape;
} }
else else
{ {
if (!_pElem.grpSpPr.xfrm->offX.is_init()) if (!_pElem.grpSpPr.xfrm->offX.is_init()) _pElem.grpSpPr.xfrm->offX = m_pBinaryWriter->m_lXCurShape;
_pElem.grpSpPr.xfrm->offX = (int)0; if (!_pElem.grpSpPr.xfrm->offY.is_init()) _pElem.grpSpPr.xfrm->offY = m_pBinaryWriter->m_lYCurShape;
if (!_pElem.grpSpPr.xfrm->offY.is_init()) if (!_pElem.grpSpPr.xfrm->extX.is_init()) _pElem.grpSpPr.xfrm->extX = m_pBinaryWriter->m_lCxCurShape;
_pElem.grpSpPr.xfrm->offY = (int)0; if (!_pElem.grpSpPr.xfrm->extY.is_init()) _pElem.grpSpPr.xfrm->extY = m_pBinaryWriter->m_lCyCurShape;
if (!_pElem.grpSpPr.xfrm->extX.is_init())
_pElem.grpSpPr.xfrm->extX = m_pBinaryWriter->m_lWidthCurShape; if (!_pElem.grpSpPr.xfrm->chOffX.is_init()) _pElem.grpSpPr.xfrm->chOffX = (int)0;
if (!_pElem.grpSpPr.xfrm->extY.is_init()) if (!_pElem.grpSpPr.xfrm->chOffY.is_init()) _pElem.grpSpPr.xfrm->chOffY = (int)0;
_pElem.grpSpPr.xfrm->extY = m_pBinaryWriter->m_lHeightCurShape; if (!_pElem.grpSpPr.xfrm->chExtX.is_init()) _pElem.grpSpPr.xfrm->chExtX = m_pBinaryWriter->m_lCxCurShape;
if (!_pElem.grpSpPr.xfrm->chOffX.is_init()) if (!_pElem.grpSpPr.xfrm->chExtY.is_init()) _pElem.grpSpPr.xfrm->chExtY = m_pBinaryWriter->m_lCyCurShape;
_pElem.grpSpPr.xfrm->chOffX = (int)0;
if (!_pElem.grpSpPr.xfrm->chOffY.is_init())
_pElem.grpSpPr.xfrm->chOffY = (int)0;
if (!_pElem.grpSpPr.xfrm->chExtX.is_init())
_pElem.grpSpPr.xfrm->chExtX = m_pBinaryWriter->m_lWidthCurShape;
if (!_pElem.grpSpPr.xfrm->chExtY.is_init())
_pElem.grpSpPr.xfrm->chExtY = m_pBinaryWriter->m_lHeightCurShape;
} }
} }
...@@ -2482,8 +2475,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C ...@@ -2482,8 +2475,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
} }
else else
{ {
m_pBinaryWriter->m_lWidthCurShape = 0; m_pBinaryWriter->m_lXCurShape = 0;
m_pBinaryWriter->m_lHeightCurShape = 0; m_pBinaryWriter->m_lYCurShape = 0;
m_pBinaryWriter->m_lCxCurShape = 0;
m_pBinaryWriter->m_lCyCurShape = 0;
pShape->spPr.xfrm = new PPTX::Logic::Xfrm(); pShape->spPr.xfrm = new PPTX::Logic::Xfrm();
pShape->spPr.xfrm->offX = oProps.X; pShape->spPr.xfrm->offX = oProps.X;
...@@ -2894,8 +2890,11 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P ...@@ -2894,8 +2890,11 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
oProps.Width = width; oProps.Width = width;
oProps.Height = height; oProps.Height = height;
m_pBinaryWriter->m_lWidthCurShape = width; m_pBinaryWriter->m_lXCurShape = left;
m_pBinaryWriter->m_lHeightCurShape = height; m_pBinaryWriter->m_lYCurShape = top;
m_pBinaryWriter->m_lCxCurShape = width;
m_pBinaryWriter->m_lCyCurShape = height;
if (bIsInline) if (bIsInline)
{ {
......
...@@ -423,22 +423,33 @@ namespace NSBinPptxRW ...@@ -423,22 +423,33 @@ namespace NSBinPptxRW
m_lPosition += lSize; m_lPosition += lSize;
m_pStreamCur = m_pStreamData + m_lPosition; m_pStreamCur = m_pStreamData + m_lPosition;
} }
double CBinaryFileWriter::GetWidthMM() double CBinaryFileWriter::GetShapeHeight()
{ {
if (m_lWidthCurShape == 0) if (m_lCyCurShape == 0)
return -1; return -1;
return (double)m_lWidthCurShape / 36000; return (double)m_lCyCurShape / 36000; //mm
} }
double CBinaryFileWriter::GetHeightMM() double CBinaryFileWriter::GetShapeWidth()
{ {
if (m_lHeightCurShape == 0) if (m_lCyCurShape == 0)
return -1; return -1;
return (double)m_lHeightCurShape / 36000; return (double)m_lCxCurShape / 36000;
} }
void CBinaryFileWriter::ClearShapeCurSizes() double CBinaryFileWriter::GetShapeY()
{ {
m_lWidthCurShape = 0; return (double)m_lYCurShape / 36000;
m_lHeightCurShape = 0; }
double CBinaryFileWriter::GetShapeX()
{
return (double)m_lXCurShape / 36000; //mm
}
void CBinaryFileWriter::ClearCurShapePositionAndSizes()
{
m_lXCurShape = 0;
m_lYCurShape = 0;
m_lCxCurShape = 0;
m_lCyCurShape = 0;
} }
void CBinaryFileWriter::Clear() void CBinaryFileWriter::Clear()
{ {
...@@ -451,8 +462,11 @@ namespace NSBinPptxRW ...@@ -451,8 +462,11 @@ namespace NSBinPptxRW
m_lStackPosition = 0; m_lStackPosition = 0;
memset(m_arStack, 0, MAX_STACK_SIZE * sizeof(_UINT32)); memset(m_arStack, 0, MAX_STACK_SIZE * sizeof(_UINT32));
m_lWidthCurShape = 0; m_lCxCurShape = 0;
m_lHeightCurShape = 0; m_lCyCurShape = 0;
m_lXCurShape = 0;
m_lYCurShape = 0;
} }
void CBinaryFileWriter::SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc) void CBinaryFileWriter::SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc)
......
...@@ -253,21 +253,24 @@ namespace NSBinPptxRW ...@@ -253,21 +253,24 @@ namespace NSBinPptxRW
std::vector<CSeekTableEntry> m_arMainTables; std::vector<CSeekTableEntry> m_arMainTables;
public: public:
_INT32 m_lWidthCurShape; _INT32 m_lCxCurShape; //emu
_INT32 m_lHeightCurShape; _INT32 m_lCyCurShape;
_INT32 m_lXCurShape;
_INT32 m_lYCurShape;
public:
BYTE* GetBuffer(); BYTE* GetBuffer();
_UINT32 GetPosition(); _UINT32 GetPosition();
void SetPosition(const _UINT32& lPosition); void SetPosition(const _UINT32& lPosition);
void Skip(const _UINT32& lSize); void Skip(const _UINT32& lSize);
double GetWidthMM(); double GetShapeWidth();
double GetHeightMM(); double GetShapeHeight();
void ClearShapeCurSizes(); double GetShapeX();
double GetShapeY();
void ClearCurShapePositionAndSizes();
// -------------------- stream simple types -----------------------
public:
void Clear(); void Clear();
void SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc); void SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc);
...@@ -305,7 +308,6 @@ namespace NSBinPptxRW ...@@ -305,7 +308,6 @@ namespace NSBinPptxRW
void WriteDouble64 (const double& dValue); void WriteDouble64 (const double& dValue);
// -------------------------------------------------------- // --------------------------------------------------------
public:
CBinaryFileWriter(); CBinaryFileWriter();
~CBinaryFileWriter(); ~CBinaryFileWriter();
...@@ -317,8 +319,6 @@ namespace NSBinPptxRW ...@@ -317,8 +319,6 @@ namespace NSBinPptxRW
void WriteMainPart(); void WriteMainPart();
public:
void WriteString1 (int type, const std::wstring& val); void WriteString1 (int type, const std::wstring& val);
void WriteString2 (int type, const NSCommon::nullable_string& val); void WriteString2 (int type, const NSCommon::nullable_string& val);
void WriteString (const std::wstring& val); void WriteString (const std::wstring& val);
......
...@@ -125,16 +125,17 @@ namespace PPTX ...@@ -125,16 +125,17 @@ namespace PPTX
pWriter->EndRecord(); pWriter->EndRecord();
double dX = 0; double dX = pWriter->GetShapeX(); //mm
double dY = 0; double dY = pWriter->GetShapeY();
double dW = pWriter->GetWidthMM();
double dH = pWriter->GetHeightMM(); double dW = pWriter->GetShapeWidth(); //mm
double dH = pWriter->GetShapeHeight();
FileContainer* pRels = NULL; FileContainer* pRels = NULL;
if (pWriter->m_pCommonRels->is_init()) if (pWriter->m_pCommonRels->is_init())
pRels = pWriter->m_pCommonRels->operator ->(); pRels = pWriter->m_pCommonRels->operator ->();
std::wstring olePath; std::wstring olePath;
if(!oleFilepathBin.empty()) if(!oleFilepathBin.empty())
{ {
......
...@@ -54,7 +54,6 @@ namespace PPTX ...@@ -54,7 +54,6 @@ namespace PPTX
explicit GraphicFrame(XmlUtils::CXmlNode& node); explicit GraphicFrame(XmlUtils::CXmlNode& node);
const GraphicFrame& operator =(XmlUtils::CXmlNode& node); const GraphicFrame& operator =(XmlUtils::CXmlNode& node);
public:
virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlNode& node);
virtual std::wstring toXML() const; virtual std::wstring toXML() const;
virtual void GetRect(Aggplus::RECT& pRect)const; virtual void GetRect(Aggplus::RECT& pRect)const;
...@@ -64,10 +63,10 @@ namespace PPTX ...@@ -64,10 +63,10 @@ namespace PPTX
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const; virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader); virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader);
public:
NvGraphicFramePr nvGraphicFramePr; NvGraphicFramePr nvGraphicFramePr;
Xfrm xfrm;
nullable<Xfrm> xfrm;
nullable_string spid; nullable_string spid;
nullable<Table> table; nullable<Table> table;
nullable<SmartArt> smartArt; nullable<SmartArt> smartArt;
......
...@@ -116,7 +116,7 @@ namespace PPTX ...@@ -116,7 +116,7 @@ namespace PPTX
pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->()); pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->());
} }
if (pDiagramDrawing) if ((pDiagramDrawing) && (pDiagramDrawing->m_oShapeTree.IsInit()))
{ {
m_diag = pDiagramDrawing->m_oShapeTree; m_diag = pDiagramDrawing->m_oShapeTree;
m_oCommonRels = smart_ptr<PPTX::CCommonRels>(dynamic_cast<PPTX::CCommonRels*>(pDiagramDrawing)); m_oCommonRels = smart_ptr<PPTX::CCommonRels>(dynamic_cast<PPTX::CCommonRels*>(pDiagramDrawing));
......
<?xml version="1.0" encoding="windows-1251"?> <?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8.00" Version="8,00"
Name="XlsXlsxConverter" Name="XlsXlsxConverter"
ProjectGUID="{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}" ProjectGUID="{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
RootNamespace="XlsXlsxConverter" RootNamespace="XlsXlsxConverter"
......
...@@ -257,7 +257,6 @@ HEADERS += docxformatlib.h \ ...@@ -257,7 +257,6 @@ HEADERS += docxformatlib.h \
../Source/XlsxFormat/Workbook.h \ ../Source/XlsxFormat/Workbook.h \
../Source/XlsxFormat/WritingElement.h \ ../Source/XlsxFormat/WritingElement.h \
../Source/XlsxFormat/Xlsx.h \ ../Source/XlsxFormat/Xlsx.h \
../Source/XML/StringWriter.h \
../Source/XML/Utils.h \ ../Source/XML/Utils.h \
../Source/XML/XmlSimple.h \ ../Source/XML/XmlSimple.h \
../Source/DocxFormat/Drawing/DrawingShapeElements.h \ ../Source/DocxFormat/Drawing/DrawingShapeElements.h \
......
...@@ -216,7 +216,7 @@ namespace OOX ...@@ -216,7 +216,7 @@ namespace OOX
XmlUtils::CXmlNode oNode; XmlUtils::CXmlNode oNode;
if ( oNode.FromXmlFile2( oRelsPath.GetPath() ) && _T("Relationships") == oNode.GetName() ) if ( oNode.FromXmlFile( oRelsPath.GetPath() ) && _T("Relationships") == oNode.GetName() )
{ {
XmlUtils::CXmlNodes oNodes; XmlUtils::CXmlNodes oNodes;
if ( oNode.GetNodes( _T("Relationship"), oNodes ) ) if ( oNode.GetNodes( _T("Relationship"), oNodes ) )
......
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