Commit d22fb105 authored by ElenaSubbotina's avatar ElenaSubbotina

OoxFormat - vbaProject, ...

parent 89aba918
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="C:\_WORK\trunk\ServerComponents\Common\DocxFormat\Source\XML\libxml2\XML\include" AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" PreprocessorDefinitions="_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories="../include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;;../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="" AdditionalIncludeDirectories="../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/xml/build/vs2005"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../../../ASCOfficeOdfFile/include;../../../ASCOfficeOdfFile/src/odf/datatypes;&quot;../../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories="../../../ASCOfficeOdfFile/include;../../../ASCOfficeOdfFile/src/odf/datatypes;../../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions="_DEBUG;_LIB;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="_DEBUG;_LIB;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;../../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;../../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_" PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#pragma once #pragma once
#include "Path.h" #include "Path.h"
#include "../../../Common/DocxFormat/Source/Common/SimpleTypes_Base.h" #include "../../../../../Common/DocxFormat/Source/Common/SimpleTypes_Base.h"
namespace NSPresentationEditor namespace NSPresentationEditor
{ {
......
...@@ -31,10 +31,7 @@ ...@@ -31,10 +31,7 @@
*/ */
#include "FileFactory.h" #include "FileFactory.h"
#include "FileMap.h"
#include "../../Common/DocxFormat/Source/DocxFormat/File.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Rels.h"
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
#include "FileTypes.h" #include "FileTypes.h"
#include "App.h" #include "App.h"
...@@ -54,6 +51,8 @@ ...@@ -54,6 +51,8 @@
#include "NotesMaster.h" #include "NotesMaster.h"
#include "LegacyDiagramText.h" #include "LegacyDiagramText.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Rels.h"
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
#include "../../Common/DocxFormat/Source/XlsxFormat/Chart/Chart.h" #include "../../Common/DocxFormat/Source/XlsxFormat/Chart/Chart.h"
#include "../../Common/DocxFormat/Source/DocxFormat/VmlDrawing.h" #include "../../Common/DocxFormat/Source/DocxFormat/VmlDrawing.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h" #include "../../Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h"
...@@ -69,8 +68,7 @@ ...@@ -69,8 +68,7 @@
#include "../../Common/DocxFormat/Source/DocxFormat/External/ExternalAudio.h" #include "../../Common/DocxFormat/Source/DocxFormat/External/ExternalAudio.h"
#include "../../Common/DocxFormat/Source/DocxFormat/External/ExternalVideo.h" #include "../../Common/DocxFormat/Source/DocxFormat/External/ExternalVideo.h"
#include "../../Common/DocxFormat/Source/DocxFormat/UnknowTypeFile.h" #include "../../Common/DocxFormat/Source/DocxFormat/UnknowTypeFile.h"
//
#include "FileMap.h"
namespace PPTX namespace PPTX
......
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
* *
*/ */
#pragma once #pragma once
#ifndef PPTX_FILEFACTORY_PPTX_INCLUDE_H_
#define PPTX_FILEFACTORY_PPTX_INCLUDE_H_
#include "../../Common/DocxFormat/Source/DocxFormat/File.h" #include "../../Common/DocxFormat/Source/DocxFormat/File.h"
namespace OOX {namespace Rels {class CRelationShip;}} namespace OOX {namespace Rels {class CRelationShip;}}
...@@ -44,3 +48,4 @@ namespace PPTX ...@@ -44,3 +48,4 @@ namespace PPTX
static const smart_ptr<OOX::File> CreateFilePPTX(const OOX::CPath& path, OOX::Rels::CRelationShip& relation, FileMap& map); static const smart_ptr<OOX::File> CreateFilePPTX(const OOX::CPath& path, OOX::Rels::CRelationShip& relation, FileMap& map);
}; };
} // namespace PPTX } // namespace PPTX
#endif // PPTX_FILEFACTORY_PPTX_INCLUDE_H_
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#pragma once #pragma once
#include "../../../../Common/DocxFormat/Source/DocxFormat/File.h" #include "../../../../Common/DocxFormat/Source/DocxFormat/File.h"
#include "../../../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../../../Common/DocxFormat/Source/Base/Types_32.h" #include "../../../../Common/DocxFormat/Source/Base/Types_32.h"
#include "Logic/TextParagraphPr.h" #include "Logic/TextParagraphPr.h"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\Common\ASCDocxFormat\Source\Utility;..\..\Common\ASCDocxFormat\Source\XML;..\..\Common\ASCDocxFormat\Source\;.\;..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories="&quot;../../DesktopEditor/freetype-2.5.2/include&quot;;../../DesktopEditor/xml/build/vs2005"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;..\..\DesktopEditor\freetype-2.5.2\include&quot;" AdditionalIncludeDirectories="&quot;..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#include "OOXMathReader.h" #include "OOXMathReader.h"
#include "OOXParagraphReader.h" #include "OOXParagraphReader.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/Math/OMath.h" #include "../../../../Common/DocxFormat/Source/DocxFormat/Math/OMath.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h" #include "../../../../Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/Math/oMathBottomNodes.h" #include "../../../../Common/DocxFormat/Source/DocxFormat/Math/oMathBottomNodes.h"
bool OOXMathReader::ParseElement(ReaderParameter oParam , OOX::WritingElement * ooxMath, RtfMathPtr & rtfMath) bool OOXMathReader::ParseElement(ReaderParameter oParam , OOX::WritingElement * ooxMath, RtfMathPtr & rtfMath)
{ {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "../RtfMath.h" #include "../RtfMath.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/WritingElement.h" #include "../../../../Common/DocxFormat/Source/DocxFormat/WritingElement.h"
class OOXMathReader class OOXMathReader
{ {
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#include "OOXShapeReader.h" #include "OOXShapeReader.h"
#include "OOXTextItemReader.h" #include "OOXTextItemReader.h"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/Shape.h" #include "../../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/Shape.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpTree.h" #include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpTree.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h" #include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.h" #include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.h"
#include "../../../ASCOfficeOdfFile/src/odf/svg_parser.h" #include "../../../../ASCOfficeOdfFile/src/odf/svg_parser.h"
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#ifndef RGB #ifndef RGB
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="D:\WORK\AVS\Sources\TeamlabOffice\branches\Docx2DoctConverter\ServerComponents\Common\DocxFormat\Source\DocxFormat;&quot;D:\WORK\AVS\Sources\TeamlabOffice\branches\Docx2DoctConverter\ServerComponents\DesktopEditor\freetype-2.5.2\include&quot;" AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="D:\WORK\AVS\Sources\TeamlabOffice\branches\Docx2DoctConverter\ServerComponents\Common\DocxFormat\Source\DocxFormat;&quot;D:\WORK\AVS\Sources\TeamlabOffice\branches\Docx2DoctConverter\ServerComponents\DesktopEditor\freetype-2.5.2\include&quot;" AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\..\Source\XML\libxml2\XML\include;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;..\..\..\..\..\Redist;..\..\..\..\..\..\ASCOfficeOdtFile\Source\OfficeSvmFile;.\..\Source\Base;.\..\Source\SystemUtility" AdditionalIncludeDirectories=""
PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\..\Source\XML\libxml2\XML\include" AdditionalIncludeDirectories=""
PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#define OOX_FILE_INCLUDE_H_ #define OOX_FILE_INCLUDE_H_
#include "../XML/XmlSimple.h" #include "../XML/XmlSimple.h"
#include "../SystemUtility/SystemUtility.h"
#include "FileType.h" #include "FileType.h"
#include "ContentTypes.h" #include "ContentTypes.h"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;../../../DesktopEditor/agg-2.4/include&quot;;&quot;C:\__Work\core\DesktopEditor\agg-2.4\include&quot;" AdditionalIncludeDirectories="&quot;../../../DesktopEditor/agg-2.4/include&quot;;../../../DesktopEditor/xml/build/vs2005;../../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
......
...@@ -194,6 +194,10 @@ namespace BinXlsxRW ...@@ -194,6 +194,10 @@ namespace BinXlsxRW
DdeLink = 11, DdeLink = 11,
VbaProject = 12 VbaProject = 12
};} };}
namespace c_oSerWorkbookVbaProjectTypes{enum c_oSerWorkbookVbaProjectTypes
{
Name = 0
};}
namespace c_oSerWorkbookPrTypes{enum c_oSerWorkbookPrTypes namespace c_oSerWorkbookPrTypes{enum c_oSerWorkbookPrTypes
{ {
Date1904 = 0, Date1904 = 0,
......
...@@ -1523,11 +1523,13 @@ namespace BinXlsxRW ...@@ -1523,11 +1523,13 @@ namespace BinXlsxRW
m_oBcw.WriteItemWithLengthEnd(nCurPos); m_oBcw.WriteItemWithLengthEnd(nCurPos);
} }
smart_ptr<OOX::File> vbaProject = workbook.Get(OOX::FileTypes::VbaProject); smart_ptr<OOX::File> fileVbaProject = workbook.Get(OOX::FileTypes::VbaProject);
if (vbaProject.IsInit()) if (fileVbaProject.IsInit())
{ {
nCurPos = m_oBcw.WriteItemStart(c_oSerWorkbookTypes::VbaProject); nCurPos = m_oBcw.WriteItemStart(c_oSerWorkbookTypes::VbaProject);
WriteVbaProject (vbaProject.smart_dynamic_cast<OOX::VbaProject>());
smart_ptr<OOX::VbaProject> vbaProject = fileVbaProject.smart_dynamic_cast<OOX::VbaProject>();
WriteVbaProject (vbaProject);
m_oBcw.WriteItemWithLengthEnd(nCurPos); m_oBcw.WriteItemWithLengthEnd(nCurPos);
} }
}; };
...@@ -1974,9 +1976,9 @@ namespace BinXlsxRW ...@@ -1974,9 +1976,9 @@ namespace BinXlsxRW
{ {
std::wstring file_name = fileVbaProject->filename().GetFilename(); std::wstring file_name = fileVbaProject->filename().GetFilename();
m_oBcw.m_oStream.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart); m_oBcw.m_oStream.WriteBYTE(c_oSerWorkbookVbaProjectTypes::Name);
m_oBcw.m_oStream.WriteString1(0, file_name); m_oBcw.m_oStream.WriteStringW(file_name);
m_oBcw.m_oStream.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
//... todooo write parsing vba project //... todooo write parsing vba project
//copy file bin //copy file bin
......
...@@ -2102,18 +2102,20 @@ namespace BinXlsxRW { ...@@ -2102,18 +2102,20 @@ namespace BinXlsxRW {
int ReadVbaProject(BYTE type, long length, void* poResult) int ReadVbaProject(BYTE type, long length, void* poResult)
{ {
int res = c_oSerConstants::ReadOk; int res = c_oSerConstants::ReadOk;
if(c_oSerWorkbookTypes::VbaProject == type) if(c_oSerWorkbookVbaProjectTypes::Name == type)
{ {
std::wstring file_name = m_oBufferedStream.GetString3(length); std::wstring file_name = m_oBufferedStream.GetString4(length);
OOX::CPath inputPath = m_oBufferedStream.m_strFolder + FILE_SEPARATOR_STR + _T("media") + FILE_SEPARATOR_STR + file_name; OOX::CPath inputPath = m_oBufferedStream.m_strFolder + FILE_SEPARATOR_STR + _T("media") + FILE_SEPARATOR_STR + file_name;
OOX::CPath outputPath = m_sDestinationDir + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("vbaProject.bin"); OOX::CPath outputPath = m_sDestinationDir + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("vbaProject.bin");
NSFile::CFileBinary::Copy(inputPath.GetPath(), outputPath.GetPath()); NSFile::CFileBinary::Copy(inputPath.GetPath(), outputPath.GetPath());
smart_ptr<OOX::VbaProject> oFile; smart_ptr<OOX::VbaProject> oFileVbaProject(new OOX::VbaProject());
oFile->set_filename(outputPath); oFileVbaProject->set_filename(outputPath.GetPath());
const OOX::RId oRId = m_oWorkbook.Add(oFile.smart_dynamic_cast<OOX::File>());
smart_ptr<OOX::File> oFile = oFileVbaProject.smart_dynamic_cast<OOX::File>();
const OOX::RId oRId = m_oWorkbook.Add(oFile);
return res; return res;
......
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