This commit is contained in:
Elena.Subbotina
2022-11-28 13:32:50 +03:00
parent ad3faa301d
commit eb5eb69be3
9 changed files with 74 additions and 73 deletions

View File

@ -105,7 +105,7 @@ public:
if( m_mapComments.empty() ) return false;
NSFile::CFileBinary file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("comments.xml"))) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("comments.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"), _T("comments.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"), _T("/word/comments.xml") );
@ -118,7 +118,7 @@ public:
file.CloseFile();
//-------------------------------------------------------------------------------------------------------------------------
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + L"commentsExtended.xml")) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + L"commentsExtended.xml")) return false;
m_oWriter.m_oDocRels.AddRelationship( L"http://schemas.microsoft.com/office/2011/relationships/commentsExtended", L"commentsExtended.xml" );
m_oWriter.m_oContentTypes.AddContent( L"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml", L"/word/commentsExtended.xml" );

View File

@ -58,7 +58,7 @@ public:
{
NSFile::CFileBinary file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("[Content_Types].xml")) != S_OK) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("[Content_Types].xml"))) return false;
std::wstring sXml = CreateXml();

View File

@ -54,7 +54,7 @@ public:
if( false == m_sFileXml.empty() )
{
NSFile::CFileBinary file;
if (file.CreateFile(pathWord + FILE_SEPARATOR_STR + _T("fontTable.xml"))) return false;
if (false == file.CreateFile(pathWord + FILE_SEPARATOR_STR + _T("fontTable.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"), _T("fontTable.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"), _T("/word/fontTable.xml") );

View File

@ -81,7 +81,7 @@ public:
if( m_sFootnotes.empty() ) return false;
NSFile::CFileBinary file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("footnotes.xml"))) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("footnotes.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"), _T("footnotes.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"), _T("/word/footnotes.xml") );
@ -161,7 +161,7 @@ public:
if( m_sEndnotes.empty() ) return false;
NSFile::CFileBinary file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("endnotes.xml"))) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("endnotes.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"), _T("endnotes.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"), _T("/word/endnotes.xml") );

View File

@ -54,7 +54,7 @@ public:
{
NSFile::CFileBinary file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("numbering.xml")) != S_OK) return false;
if (false == file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("numbering.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"), _T("numbering.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"), _T("/word/numbering.xml") );

View File

@ -96,7 +96,7 @@ public:
NSDirectory::CreateDirectory(pathRels) ;
NSFile::CFileBinary file;
if (file.CreateFile(pathRels + FILE_SEPARATOR_STR + m_sFileName + _T(".rels"))) return false;
if (false == file.CreateFile(pathRels + FILE_SEPARATOR_STR + m_sFileName + _T(".rels"))) return false;
std::wstring sXml = CreateXml();

View File

@ -64,7 +64,7 @@ public:
{
std::wstring pathWord = sFolder + FILE_SEPARATOR_STR + _T("word");
if( false == m_sFileXml.empty() )
if ( false == m_sFileXml.empty() )
{
//генерируем свою xml
std::wstring sXml = CreateXml();
@ -87,7 +87,7 @@ public:
//}
NSFile::CFileBinary file;
if (file.CreateFile(pathWord + FILE_SEPARATOR_STR + _T("settings.xml"))) return false;
if (false == file.CreateFile(pathWord + FILE_SEPARATOR_STR + _T("settings.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"), _T("settings.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"), _T("/word/settings.xml") );

View File

@ -32,6 +32,7 @@
#pragma once
#include "../../Format/IdGenerator.h"
#include "../../OOXml/Writer/OOXWriter.h"
class OOXStylesWriter
{
@ -57,7 +58,7 @@ public:
//if( false == m_sFileXml.empty() )
{
NSFile::CFileBinary file;
if (file.CreateFile(pathWord + FILE_SEPARATOR_STR + L"styles.xml")) return false;
if (false == file.CreateFile(pathWord + FILE_SEPARATOR_STR + L"styles.xml")) return false;
m_oWriter.m_oDocRels.AddRelationship( L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", L"styles.xml" );
m_oWriter.m_oContentTypes.AddContent( L"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", L"/word/styles.xml" );

View File

@ -7,67 +7,67 @@
<Filter Include="OOMXL\OOXReader">
<UniqueIdentifier>{715362a1-7e7d-445b-bb2e-631c63dc3d84}</UniqueIdentifier>
</Filter>
<Filter Include="OOMXL\OOXWriter">
<UniqueIdentifier>{cae0af0f-d827-4e9e-8d7e-7923ef558bbc}</UniqueIdentifier>
</Filter>
<Filter Include="Common">
<UniqueIdentifier>{95794ea8-1003-43ce-bfd1-2707898c3c5b}</UniqueIdentifier>
</Filter>
<Filter Include="Format">
<Filter Include="OOMXL\Format">
<UniqueIdentifier>{28b462c0-4897-439d-94d0-45d6d1f6035f}</UniqueIdentifier>
</Filter>
<Filter Include="OOXWriter">
<UniqueIdentifier>{cae0af0f-d827-4e9e-8d7e-7923ef558bbc}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Format\DestinationCommand.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfBookmark.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfChar.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfDocument.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfField.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfGlobalTables.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfMath.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfOldList.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfOle.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfParagraph.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfPicture.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfProperty.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfReader.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfSection.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfShape.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfTable.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\RtfWriter.cpp">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClCompile>
<ClCompile Include="..\..\..\OOXml\Reader\OOXDocumentReader.cpp">
<Filter>OOMXL\OOXReader</Filter>
@ -97,97 +97,97 @@
<Filter>OOMXL\OOXReader</Filter>
</ClCompile>
<ClCompile Include="..\..\..\OOXml\Writer\OOXDocumentWriter.cpp">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClCompile>
<ClCompile Include="..\..\..\OOXml\Writer\OOXWriter.cpp">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Format\ConvertationManager.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\Format\Basic.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\DestinationCommand.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\IdGenerator.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\Ole1FormatReader.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\OOXColorTable.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfBookmark.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfChar.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfDefine.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfDocument.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfErrors.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfField.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfGlobalTables.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfLex.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfMath.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfOle.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfParagraph.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfPicture.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfProperty.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfReader.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfSection.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfShape.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfTable.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfTableCell.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfTableRow.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfToken.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\RtfWriter.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\UniversalConverterUtils.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\Utils.h">
<Filter>Format</Filter>
<Filter>OOMXL\Format</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Reader\OOXAbstractNumReader.h">
<Filter>OOMXL\OOXReader</Filter>
@ -340,37 +340,37 @@
<Filter>OOMXL\OOXReader</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXCommentsWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXContentTypesWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXDocumentWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXFontTableWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXFootnoteWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXNumberingWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXRelsWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXSettingsWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXStylesWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXThemeWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\OOXml\Writer\OOXWriter.h">
<Filter>OOMXL\OOXWriter</Filter>
<Filter>OOXWriter</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Format\convertationmanager.h" />
</ItemGroup>