mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-20 23:06:35 +08:00
Compare commits
13 Commits
core/devel
...
core-windo
| Author | SHA1 | Date | |
|---|---|---|---|
| e04388aa32 | |||
| cee61e7a92 | |||
| 48185ed4e9 | |||
| 7bea086784 | |||
| 774f9c42cb | |||
| 10964d32e6 | |||
| da2493ed3b | |||
| 0a183f3505 | |||
| ac6cc1ec24 | |||
| a1846da0da | |||
| 0bd10c28ac | |||
| 2367cee329 | |||
| 288d89301a |
@ -307,13 +307,11 @@ namespace DocFileFormat
|
||||
if (!FormatUtils::IsControlSymbol(xchBullet))
|
||||
{
|
||||
ret.push_back(lvl.xst[0]);
|
||||
ret.push_back(L'\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.push_back(L'\xF0B7');
|
||||
ret.push_back(L'\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -250,10 +250,6 @@ public:
|
||||
{
|
||||
pFile->WriteFile((BYTE*)m_pMetaHeader, m_lMetaHeaderSize);
|
||||
}
|
||||
if (NULL != m_pMetaFile)
|
||||
{
|
||||
pFile->WriteFile((BYTE*)m_pMetaFile, m_lMetaFileSize);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -71,26 +71,26 @@ namespace DocFileFormat
|
||||
{
|
||||
struct __BITMAPINFOHEADER
|
||||
{
|
||||
DWORD biSize;
|
||||
LONG biWidth;
|
||||
LONG biHeight;
|
||||
WORD biPlanes;
|
||||
WORD biBitCount;
|
||||
DWORD biCompression;
|
||||
DWORD biSizeImage;
|
||||
LONG biXPelsPerMeter;
|
||||
LONG biYPelsPerMeter;
|
||||
DWORD biClrUsed;
|
||||
DWORD biClrImportant;
|
||||
_UINT32 biSize;
|
||||
_INT32 biWidth;
|
||||
_INT32 biHeight;
|
||||
_UINT16 biPlanes;
|
||||
_UINT16 biBitCount;
|
||||
_UINT32 biCompression;
|
||||
_UINT32 biSizeImage;
|
||||
_INT32 biXPelsPerMeter;
|
||||
_INT32 biYPelsPerMeter;
|
||||
_UINT32 biClrUsed;
|
||||
_UINT32 biClrImportant;
|
||||
};
|
||||
|
||||
struct __BITMAPCOREHEADER
|
||||
{
|
||||
DWORD bcSize; /* used to get to color table */
|
||||
WORD bcWidth;
|
||||
WORD bcHeight;
|
||||
WORD bcPlanes;
|
||||
WORD bcBitCount;
|
||||
_UINT32 bcSize; /* used to get to color table */
|
||||
_UINT16 bcWidth;
|
||||
_UINT16 bcHeight;
|
||||
_UINT16 bcPlanes;
|
||||
_UINT16 bcBitCount;
|
||||
};
|
||||
Global::BlipType GetFormatPict(unsigned char* data, int size)
|
||||
{
|
||||
|
||||
@ -37,29 +37,29 @@
|
||||
|
||||
namespace ImageHelper
|
||||
{
|
||||
struct __BITMAPINFOHEADER
|
||||
{
|
||||
DWORD biSize;
|
||||
LONG biWidth;
|
||||
LONG biHeight;
|
||||
WORD biPlanes;
|
||||
WORD biBitCount;
|
||||
DWORD biCompression;
|
||||
DWORD biSizeImage;
|
||||
LONG biXPelsPerMeter;
|
||||
LONG biYPelsPerMeter;
|
||||
DWORD biClrUsed;
|
||||
DWORD biClrImportant;
|
||||
};
|
||||
struct __BITMAPINFOHEADER
|
||||
{
|
||||
_UINT32 biSize;
|
||||
_INT32 biWidth;
|
||||
_INT32 biHeight;
|
||||
_UINT16 biPlanes;
|
||||
_UINT16 biBitCount;
|
||||
_UINT32 biCompression;
|
||||
_UINT32 biSizeImage;
|
||||
_INT32 biXPelsPerMeter;
|
||||
_INT32 biYPelsPerMeter;
|
||||
_UINT32 biClrUsed;
|
||||
_UINT32 biClrImportant;
|
||||
};
|
||||
|
||||
struct __BITMAPCOREHEADER
|
||||
{
|
||||
DWORD bcSize; /* used to get to color table */
|
||||
WORD bcWidth;
|
||||
WORD bcHeight;
|
||||
WORD bcPlanes;
|
||||
WORD bcBitCount;
|
||||
};
|
||||
struct __BITMAPCOREHEADER
|
||||
{
|
||||
_UINT32 bcSize; /* used to get to color table */
|
||||
_UINT16 bcWidth;
|
||||
_UINT16 bcHeight;
|
||||
_UINT16 bcPlanes;
|
||||
_UINT16 bcBitCount;
|
||||
};
|
||||
|
||||
inline Global::_BlipType SaveImageToFileFromDIB(unsigned char* data, int size, const std::wstring& file_name)//without ext
|
||||
{
|
||||
@ -152,10 +152,10 @@ namespace ImageHelper
|
||||
NSFile::CFileBinary file;
|
||||
if (file.CreateFileW(file_name + L".bmp"))
|
||||
{
|
||||
WORD vtType = 0x4D42; file.WriteFile((BYTE*)&vtType, 2);
|
||||
DWORD dwLen = biSizeImage; file.WriteFile((BYTE*)&dwLen, 4);
|
||||
DWORD dwRes = 0; file.WriteFile((BYTE*)&dwRes, 4);
|
||||
DWORD dwOffset = 2; file.WriteFile((BYTE*)&dwOffset, 4);
|
||||
_UINT16 vtType = 0x4D42; file.WriteFile((BYTE*)&vtType, 2);
|
||||
_UINT32 dwLen = biSizeImage; file.WriteFile((BYTE*)&dwLen, 4);
|
||||
_UINT32 dwRes = 0; file.WriteFile((BYTE*)&dwRes, 4);
|
||||
_UINT32 dwOffset = 2; file.WriteFile((BYTE*)&dwOffset, 4);
|
||||
|
||||
file.WriteFile((BYTE*)data, size);
|
||||
file.CloseFile();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
||||
//
|
||||
#include "../DocFormatLib/DocFormatLib.h"
|
||||
|
||||
#include "../win32/ASCOfficeCriticalSection.h"
|
||||
#include "../../OfficeUtils/src/ASCOfficeCriticalSection.h"
|
||||
|
||||
#include "../../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(_WIN64)
|
||||
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
|
||||
@ -58,7 +59,6 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(sDstDocx);
|
||||
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
|
||||
// doc->docx
|
||||
COfficeDocFile docFile;
|
||||
|
||||
docFile.m_sTempFolder = outputDir;
|
||||
@ -71,7 +71,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
hRes = oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), sDstDocx, -1);
|
||||
}
|
||||
|
||||
FileSystem::Directory::DeleteDirectory(dstTempPath);
|
||||
NSDirectory::DeleteDirectory(dstTempPath);
|
||||
|
||||
return hRes;
|
||||
}
|
||||
|
||||
@ -338,6 +338,58 @@
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Common"
|
||||
>
|
||||
<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>
|
||||
<File
|
||||
RelativePath=".\DocFormatTest.cpp"
|
||||
>
|
||||
@ -386,6 +438,14 @@
|
||||
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\win32\cpxml.vcproj", "{41BED424-4EAF-4053-8A5F-1E2A387D53D1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
@ -21,7 +24,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\wi
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileReaderTest", "OdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{41BED424-4EAF-4053-8A5F-1E2A387D53D1} = {41BED424-4EAF-4053-8A5F-1E2A387D53D1}
|
||||
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
@ -30,7 +35,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileReaderTest", "OdfFil
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
|
||||
|
||||
@ -31,18 +31,23 @@
|
||||
*/
|
||||
// OdfFileTest.cpp
|
||||
|
||||
#include "../../../OfficeUtils/src/OfficeUtils.h"
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
|
||||
|
||||
#include "../../src/ConvertOO2OOX.h"
|
||||
#include "../../OfficeUtils/src/OfficeUtils.h"
|
||||
#include "../../DesktopEditor/common/Directory.h"
|
||||
#include "../src/ConvertOO2OOX.h"
|
||||
|
||||
|
||||
#if defined(_WIN64)
|
||||
#pragma comment(lib, "../../../build/bin/icu/win_64/icuuc.lib")
|
||||
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
|
||||
#elif defined (_WIN32)
|
||||
#pragma comment(lib, "../../../build/bin/icu/win_32/icuuc.lib")
|
||||
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
if (argc < 2) return 1;
|
||||
@ -50,12 +55,12 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
HRESULT hr = S_OK;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
std::wstring srcFileName = argv[1];
|
||||
std::wstring dstPath = argc > 2 ? argv[2] : sSrcDoc + L"-my.docx"; //xlsx pptx
|
||||
std::wstring dstPath = argc > 2 ? argv[2] : srcFileName + L"-my.pptx"; //xlsx pptx
|
||||
|
||||
std::wstring outputDir = FileSystem::Directory::GetFolderPath(dstPath);
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
|
||||
|
||||
std::wstring srcTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
||||
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
||||
std::wstring srcTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
|
||||
// распаковываем исходник во временную директорию
|
||||
COfficeUtils oCOfficeUtils(NULL);
|
||||
@ -64,14 +69,14 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
|
||||
hr = ConvertOO2OOX(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", false, NULL);
|
||||
|
||||
FileSystem::Directory::DeleteDirectory(srcTempPath);
|
||||
NSDirectory::DeleteDirectory(srcTempPath);
|
||||
|
||||
if (hr != S_OK) return hr;
|
||||
|
||||
if (S_OK != oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath.c_str(), -1))
|
||||
return hr;
|
||||
|
||||
FileSystem::Directory::DeleteDirectory(dstTempPath);
|
||||
NSDirectory::DeleteDirectory(dstTempPath);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
return 0;
|
||||
|
||||
@ -43,11 +43,11 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_UNICODE;UNICODE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
@ -63,7 +63,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="gdi32.lib"
|
||||
AdditionalDependencies="gdi32.lib Rpcrt4.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
@ -369,6 +369,30 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
@ -58,7 +58,7 @@ bool is_internal(const std::wstring & uri, const std::wstring & packetRoot)
|
||||
|
||||
std::wstring resultPath = packetRoot + FILE_SEPARATOR_STR + mediaPath;
|
||||
|
||||
return NSDirectory::Exists(resultPath) || NSDirectory::Exists(mediaPath);
|
||||
return NSFile::CFileBinary::Exists(resultPath) || NSDirectory::Exists(mediaPath);
|
||||
}
|
||||
|
||||
mediaitems::item::item( std::wstring const & _href,
|
||||
|
||||
@ -433,8 +433,6 @@ void pptx_slide_context::end_shape()
|
||||
|
||||
void pptx_slide_context::end_table()
|
||||
{
|
||||
impl_->objects_.push_back(impl_->object_description_);
|
||||
default_set();
|
||||
}
|
||||
|
||||
bool pptx_slide_context::empty() const
|
||||
|
||||
@ -376,7 +376,7 @@ void oox_serialize_tcPr(std::wostream & strm, std::vector<const odf_reader::styl
|
||||
|
||||
if (fill.bitmap)
|
||||
{
|
||||
bool isMediaInternal = false;
|
||||
bool isMediaInternal = true;
|
||||
std::wstring ref;
|
||||
fill.bitmap->rId = Context.get_slide_context().get_mediaitems().add_or_find(fill.bitmap->xlink_href_, oox::typeImage, isMediaInternal, ref);
|
||||
Context.get_slide_context().add_rels(isMediaInternal, fill.bitmap->rId, ref, oox::typeImage);
|
||||
|
||||
@ -71,14 +71,9 @@ namespace odf_reader {
|
||||
|
||||
void draw_g::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
int i=0;
|
||||
int size = content_.size();
|
||||
while(true)
|
||||
{
|
||||
if (i>=size)break;
|
||||
office_element_ptr const & elm = content_[i];
|
||||
elm->pptx_convert(Context);
|
||||
i++;
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
}
|
||||
void draw_frame::pptx_convert_placeHolder(oox::pptx_conversion_context & Context)
|
||||
|
||||
@ -94,10 +94,10 @@ void math_mtr::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:mr>";
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
{
|
||||
strm << L"<m:e>";
|
||||
//strm << L"<m:e>"; // EqArray записался в числитель вместо знаменателя.docx - дублирование
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:e>";
|
||||
//strm << L"</m:e>";
|
||||
}
|
||||
strm << L"</m:mr>";
|
||||
}
|
||||
|
||||
@ -63,8 +63,7 @@ void OoxConverter::convert(OOX::Vml::CShapeType *vml_shape_type)
|
||||
if (odf_context()->drawing_context()->m_mapVmlShapeTypes.find( sId ) ==
|
||||
odf_context()->drawing_context()->m_mapVmlShapeTypes.end())
|
||||
{
|
||||
odf_context()->drawing_context()->m_mapVmlShapeTypes.insert(odf_context()->drawing_context()->m_mapVmlShapeTypes.begin(),
|
||||
std::pair<std::wstring, OOX::Vml::CShapeType*>(sId, vml_shape_type));
|
||||
odf_context()->drawing_context()->m_mapVmlShapeTypes.insert(std::make_pair(sId, vml_shape_type));
|
||||
|
||||
}
|
||||
}
|
||||
@ -80,9 +79,9 @@ void OoxConverter::convert(OOX::Vml::CShapeType *vml_shape_type)
|
||||
}
|
||||
|
||||
//o:spt
|
||||
//nullable<std::wstring> m_oAdj;
|
||||
//nullable<SimpleTypes::Vml::CVmlPath> m_oPath;
|
||||
//SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oMaster;
|
||||
//nullable<std::wstring> m_oAdj;
|
||||
//nullable<SimpleTypes::Vml::CVmlPath> m_oPath;
|
||||
//SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oMaster;
|
||||
//m_arrItems
|
||||
//CVmlCommonElements
|
||||
}
|
||||
|
||||
@ -1676,20 +1676,21 @@ void DocxConverter::convert(OOX::Logic::CBackground *oox_background, int type)
|
||||
{
|
||||
if (oox_background == NULL) return;
|
||||
|
||||
_CP_OPT(odf_types::color) color;
|
||||
convert ( oox_background->m_oColor.GetPointer(),
|
||||
oox_background->m_oThemeColor.GetPointer(),
|
||||
oox_background->m_oThemeTint.GetPointer(),
|
||||
oox_background->m_oThemeShade.GetPointer(), color);
|
||||
|
||||
odt_context->set_background(color, type);
|
||||
|
||||
if (oox_background->m_oDrawing.IsInit())
|
||||
{
|
||||
//подложка
|
||||
convert(oox_background->m_oDrawing.GetPointer());
|
||||
}
|
||||
else
|
||||
else if (oox_background->m_oBackground.IsInit())
|
||||
{
|
||||
//цветовая подложка
|
||||
_CP_OPT(odf_types::color) color;
|
||||
convert ( oox_background->m_oColor.GetPointer(),
|
||||
oox_background->m_oThemeColor.GetPointer(),
|
||||
oox_background->m_oThemeTint.GetPointer(),
|
||||
oox_background->m_oThemeShade.GetPointer(), color);
|
||||
|
||||
odt_context->set_background(color, type);
|
||||
convert(oox_background->m_oBackground.GetPointer());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1735,13 +1735,16 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
|
||||
|
||||
OOX::CPath pathDiagramDrawing = pathDiagramData.GetDirectory() + FILE_SEPARATOR_STR + L"drawing" + strId + L".xml";
|
||||
|
||||
oFileDrawing = smart_ptr<OOX::File>(dynamic_cast<OOX::File*>(new OOX::CDiagramDrawing(pathDiagramDrawing)));
|
||||
if (oFileDrawing.IsInit())
|
||||
pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->());
|
||||
if (NSFile::CFileBinary::Exists(pathDiagramDrawing.GetPath()))
|
||||
{
|
||||
oFileDrawing = smart_ptr<OOX::File>(dynamic_cast<OOX::File*>(new OOX::CDiagramDrawing(pathDiagramDrawing)));
|
||||
if (oFileDrawing.IsInit())
|
||||
pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pDiagramDrawing)
|
||||
if ((pDiagramDrawing) && (pDiagramDrawing->m_oShapeTree.IsInit()))
|
||||
{
|
||||
result->InitElem(new PPTX::Logic::SpTree(*pDiagramDrawing->m_oShapeTree));
|
||||
//to correct write blipFill rId to binary
|
||||
|
||||
@ -257,54 +257,74 @@ namespace PPTX2EditorAdvanced
|
||||
tablestyles->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// Presentation
|
||||
// Presentation
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Presentation);
|
||||
presentation->toPPTY(&oBinaryWriter);
|
||||
|
||||
// themes
|
||||
// themes
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Themes);
|
||||
ULONG nCountThemes = (ULONG)_themes.size();
|
||||
|
||||
ULONG nCountThemes = 0;
|
||||
for (size_t i = 0; i < _themes.size(); ++i)
|
||||
{
|
||||
if (_themes[i].IsInit()) nCountThemes++;
|
||||
}
|
||||
oBinaryWriter.WriteULONG(nCountThemes);
|
||||
for (ULONG i = 0; i < nCountThemes; ++i)
|
||||
|
||||
for (size_t i = 0; i < _themes.size(); ++i)
|
||||
{
|
||||
if (_themes[i].IsInit() == false) continue;
|
||||
_themes[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slidemasters
|
||||
// slidemasters
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::SlideMasters);
|
||||
ULONG nCountSM = (ULONG)_slideMasters.size();
|
||||
|
||||
ULONG nCountSM = 0;
|
||||
for (size_t i = 0; i < _slideMasters.size(); ++i)
|
||||
{
|
||||
if (_slideMasters[i].IsInit()) nCountSM++;
|
||||
}
|
||||
oBinaryWriter.WriteULONG(nCountSM);
|
||||
for (ULONG i = 0; i < nCountSM; ++i)
|
||||
|
||||
for (size_t i = 0; i < _slideMasters.size(); ++i)
|
||||
{
|
||||
if (_slideMasters[i].IsInit() == false) continue;
|
||||
|
||||
_slideMasters[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slidelayouts
|
||||
// slidelayouts
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::SlideLayouts);
|
||||
ULONG nCountL = 0;
|
||||
|
||||
for (ULONG i = 0; i < _layouts.size(); ++i)
|
||||
|
||||
ULONG nCountL = 0;
|
||||
for (size_t i = 0; i < _layouts.size(); ++i)
|
||||
{
|
||||
if (_layouts[i].IsInit())nCountL++;
|
||||
if (_layouts[i].IsInit())nCountL++;
|
||||
}
|
||||
|
||||
oBinaryWriter.WriteULONG(nCountL);
|
||||
for (ULONG i = 0; i < _layouts.size(); ++i)
|
||||
|
||||
for (size_t i = 0; i < _layouts.size(); ++i)
|
||||
{
|
||||
if (_layouts[i].IsInit() == false)
|
||||
{
|
||||
continue;
|
||||
//непонятки с 42 шаблоном в FY10_September_Partner_Call.pptx
|
||||
}
|
||||
if (_layouts[i].IsInit() == false) continue; //непонятки с 42 шаблоном в FY10_September_Partner_Call.pptx
|
||||
|
||||
_layouts[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slides
|
||||
// slides
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Slides);
|
||||
ULONG nCountS = (ULONG)_slides.size();
|
||||
|
||||
ULONG nCountS = 0;
|
||||
for (size_t i = 0; i < _slides.size(); ++i)
|
||||
{
|
||||
if (_slides[i].IsInit()) nCountS++;
|
||||
}
|
||||
oBinaryWriter.WriteULONG(nCountS);
|
||||
for (ULONG i = 0; i < nCountS; ++i)
|
||||
|
||||
for (size_t i = 0; i < _slides.size(); ++i)
|
||||
{
|
||||
if (_slides[i].IsInit() == false ) continue;
|
||||
|
||||
_slides[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
@ -312,7 +332,7 @@ namespace PPTX2EditorAdvanced
|
||||
{
|
||||
// ПОКА нету NOTES
|
||||
|
||||
// notes
|
||||
// notes
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::NotesSlides);
|
||||
ULONG nCountN = (ULONG)_notes.size();
|
||||
oBinaryWriter.WriteULONG(nCountN);
|
||||
@ -321,7 +341,7 @@ namespace PPTX2EditorAdvanced
|
||||
_notes[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// notesmasters
|
||||
// notesmasters
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::NotesMasters);
|
||||
ULONG nCountNM = (ULONG)_notesMasters.size();
|
||||
oBinaryWriter.WriteULONG(nCountNM);
|
||||
|
||||
@ -42,11 +42,49 @@
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/ContentTypes.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/External/HyperLink.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
|
||||
#include "../../DesktopEditor/common/Directory.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
static std::wstring arDefDirectories [9][2] = //in ppt Directory
|
||||
{
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide", L"slides"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout", L"slideLayouts"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster", L"slideMasters"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide", L"notesSlides"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster", L"notesMasters"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster", L"handoutMasters"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", L"comments"},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors", L""},
|
||||
{L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", L"theme"},
|
||||
};
|
||||
|
||||
static std::wstring FindFileInDirectory(std::wstring directory, std::wstring filename)
|
||||
{
|
||||
if (directory.empty()) return L"";
|
||||
|
||||
if (directory[directory.length() - 1] == FILE_SEPARATOR_CHAR)
|
||||
directory = directory.substr(0, directory.length() - 1);
|
||||
|
||||
int pos_ppt = directory.rfind(L"ppt");
|
||||
if (pos_ppt >= 0)
|
||||
{
|
||||
directory = directory.substr(0, pos_ppt - 1); //root directory
|
||||
}
|
||||
CArray<std::wstring> arrFiles = NSDirectory::GetFiles(directory, true);
|
||||
|
||||
for (int i = 0 ; i < arrFiles.GetCount(); i++)
|
||||
{
|
||||
if (std::wstring::npos != arrFiles[i].find(filename))
|
||||
{
|
||||
return arrFiles[i];
|
||||
}
|
||||
}
|
||||
return L"";
|
||||
}
|
||||
|
||||
void FileContainer::read(const OOX::CPath& filename)
|
||||
{
|
||||
//not implement FileContainer.read
|
||||
@ -70,6 +108,39 @@ namespace PPTX
|
||||
read(rels, path, map, Event);
|
||||
}
|
||||
|
||||
OOX::CPath FileContainer::CorrectPathRels(const OOX::CPath& path, OOX::Rels::CRelationShip* relation )
|
||||
{
|
||||
OOX::CPath filename = path / relation->Target();
|
||||
|
||||
if ( NSFile::CFileBinary::Exists(filename.GetPath()) == true ) return filename;
|
||||
|
||||
//file_1_ (1).pptx
|
||||
std::wstring strDefDirectory;
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
if (relation->Type() == arDefDirectories[i][0])
|
||||
{
|
||||
strDefDirectory = arDefDirectories[i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OOX::CPath new_filename = strDefDirectory + FILE_SEPARATOR_STR + relation->Filename().GetFilename();
|
||||
|
||||
filename = path / new_filename;
|
||||
|
||||
if (NSFile::CFileBinary::Exists(filename.GetPath()) == false)
|
||||
{
|
||||
filename = FindFileInDirectory(path.GetPath(), relation->Filename().GetFilename()); // find true path by filename
|
||||
|
||||
if (NSFile::CFileBinary::Exists(filename.GetPath()) == false)
|
||||
return filename;
|
||||
}
|
||||
|
||||
*relation = OOX::Rels::CRelationShip( relation->rId(), relation->Type(), filename);
|
||||
|
||||
return filename;
|
||||
}
|
||||
void FileContainer::read(const OOX::CRels& rels, const OOX::CPath& path, FileMap& map, IPPTXEvent* Event)
|
||||
{
|
||||
bool bIsSlide = false;
|
||||
@ -81,10 +152,11 @@ namespace PPTX
|
||||
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const OOX::Rels::CRelationShip* pRelation = rels.m_arrRelations[i];
|
||||
OOX::CPath normPath = path / pRelation->Target();
|
||||
OOX::Rels::CRelationShip* pRelation = rels.m_arrRelations[i];
|
||||
|
||||
std::map<std::wstring, smart_ptr<OOX::File>>::const_iterator pPair = map.find(normPath);
|
||||
OOX::CPath normPath = CorrectPathRels(path, pRelation);
|
||||
|
||||
std::map<std::wstring, smart_ptr<OOX::File>>::const_iterator pPair = map.find(normPath);
|
||||
|
||||
if (bIsSlide && (pRelation->Type() == OOX::Presentation::FileTypes::Slide))
|
||||
{
|
||||
@ -112,7 +184,10 @@ namespace PPTX
|
||||
{
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
smart_ptr<OOX::File> file = PPTX::FileFactory::CreateFilePPTX(path, *pRelation, map);
|
||||
smart_ptr<OOX::File> file = PPTX::FileFactory::CreateFilePPTX(normPath, *pRelation, map);
|
||||
|
||||
if (file.IsInit() == false)
|
||||
continue;
|
||||
|
||||
map.add(normPath, file);
|
||||
Add(pRelation->rId(), file);
|
||||
@ -223,9 +298,11 @@ namespace PPTX
|
||||
size_t nCount = rels.m_arrRelations.size();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const OOX::Rels::CRelationShip* pRelation = rels.m_arrRelations[i];
|
||||
OOX::Rels::CRelationShip* pRelation = rels.m_arrRelations[i];
|
||||
|
||||
smart_ptr<OOX::File> _file = PPTX::FileFactory::CreateFilePPTX_OnlyMedia(path, *pRelation);
|
||||
OOX::CPath normPath = CorrectPathRels(path, pRelation);
|
||||
|
||||
smart_ptr<OOX::File> _file = PPTX::FileFactory::CreateFilePPTX_OnlyMedia(normPath, *pRelation);
|
||||
Add(pRelation->rId(), _file);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ namespace PPTX
|
||||
void write(OOX::CRels& rels, const OOX::CPath& current, const OOX::CPath& directory, OOX::CContentTypes& content) const;
|
||||
|
||||
void WrittenSetFalse();
|
||||
OOX::CPath CorrectPathRels(const OOX::CPath& path, OOX::Rels::CRelationShip* relation );
|
||||
|
||||
long m_lPercent;
|
||||
bool m_bCancelled;
|
||||
|
||||
@ -30,13 +30,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "FileFactory.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 "FileFactory.h"
|
||||
#include "App.h"
|
||||
#include "Core.h"
|
||||
#include "Theme.h"
|
||||
@ -69,11 +69,15 @@
|
||||
|
||||
#include "FileMap.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX(const OOX::CPath& path, const OOX::Rels::CRelationShip& relation, FileMap& map)
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX(const OOX::CPath& filename, OOX::Rels::CRelationShip& relation, FileMap& map)
|
||||
{
|
||||
OOX::CPath filename = path / relation.Filename();
|
||||
if (NSFile::CFileBinary::Exists(filename.GetPath()) == false)
|
||||
{
|
||||
return smart_ptr<OOX::File>(NULL);
|
||||
}
|
||||
|
||||
if (relation.Type() == OOX::Presentation::FileTypes::App)
|
||||
return smart_ptr<OOX::File>(new PPTX::App(filename, map));
|
||||
@ -138,7 +142,7 @@ namespace PPTX
|
||||
return smart_ptr<OOX::File>(new OOX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const OOX::Rels::CRelationShip& relation)
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX_OnlyMedia(const OOX::CPath& norm_filename, OOX::Rels::CRelationShip& relation)
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
std::wstring strFile = relation.Filename().GetPath();
|
||||
@ -152,7 +156,7 @@ namespace PPTX
|
||||
if (0 == n1 || 0 == n2 || 0 == n3 || 0 == n4)
|
||||
bIsDownload = true;
|
||||
|
||||
OOX::CPath filename = path / relation.Filename();
|
||||
OOX::CPath filename = norm_filename;
|
||||
|
||||
if (bIsDownload)
|
||||
filename = relation.Filename();
|
||||
|
||||
@ -30,9 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
#define PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/File.h"
|
||||
|
||||
namespace OOX {namespace Rels {class CRelationShip;}}
|
||||
@ -44,9 +41,7 @@ namespace PPTX
|
||||
class FileFactory
|
||||
{
|
||||
public:
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX(const OOX::CPath& path, const OOX::Rels::CRelationShip& relation, FileMap& map);
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const OOX::Rels::CRelationShip& relation);
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX(const OOX::CPath& path, OOX::Rels::CRelationShip& relation, FileMap& map);
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX_OnlyMedia(const OOX::CPath& path, OOX::Rels::CRelationShip& relation);
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
@ -33,7 +33,7 @@
|
||||
#ifndef PPTXOOX_FILE_TYPES_INCLUDE_H_
|
||||
#define PPTXOOX_FILE_TYPES_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/FileType.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/FileType.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
|
||||
@ -60,11 +60,13 @@ namespace PPTX
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
private:
|
||||
virtual void fromXML2(XmlUtils::CXmlNode& node, bool bClear)
|
||||
{
|
||||
RunElems.clear();
|
||||
if (bClear)
|
||||
{
|
||||
RunElems.clear();
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (node.GetNodes(_T("*"), oNodes))
|
||||
@ -94,19 +96,24 @@ namespace PPTX
|
||||
//todo better check (a14 can be math, slicer)
|
||||
if(oNodeChoice.GetAttributeIfExist(L"Requires", sRequires) && L"a14" == sRequires)
|
||||
{
|
||||
fromXML(oNodeChoice);
|
||||
fromXML2(oNodeChoice, false);
|
||||
}
|
||||
else if (oNode.GetNode(_T("mc:Fallback"), oNodeFall))
|
||||
{
|
||||
fromXML(oNodeFall);
|
||||
fromXML2(oNodeFall, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML2(node, true);
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
|
||||
@ -121,9 +121,11 @@ namespace PPTX
|
||||
theme_= (FileContainer::Get(OOX::Presentation::FileTypes::ThemePPTX)).smart_dynamic_cast<PPTX::Theme>();
|
||||
|
||||
if (theme_.IsInit())
|
||||
{
|
||||
theme_->SetColorMap(clrMap);
|
||||
|
||||
tableStyles_ = (theme_->presentation->Get(OOX::Presentation::FileTypes::TableStyles)).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
tableStyles_ = (theme_->presentation->Get(OOX::Presentation::FileTypes::TableStyles)).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
|
||||
@ -407,14 +407,20 @@ namespace PPTX
|
||||
Layout = FileContainer::Get(OOX::Presentation::FileTypes::SlideLayout).smart_dynamic_cast<PPTX::SlideLayout>();//boost::shared_dynamic_cast<PPTX::SlideLayout, PPTX::File>(FileContainer::get(OOX::Presentation::FileTypes::SlideLayout));
|
||||
Note = FileContainer::Get(OOX::Presentation::FileTypes::NotesSlide).smart_dynamic_cast<PPTX::NotesSlide>();
|
||||
comments = FileContainer::Get(OOX::Presentation::FileTypes::SlideComments).smart_dynamic_cast<PPTX::Comments>();
|
||||
Master = Layout->Master;
|
||||
theme = Layout->theme;
|
||||
|
||||
tableStyles_= theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles).smart_dynamic_cast<PPTX::TableStyles>();//boost::shared_dynamic_cast<PPTX::TableStyles, PPTX::File>(Theme->Presentation->get(OOX::Presentation::FileTypes::TableStyles));
|
||||
|
||||
if (IsExist(OOX::Presentation::FileTypes::VmlDrawing))
|
||||
if (Layout.IsInit())
|
||||
{
|
||||
Vml = FileContainer::Get(OOX::Presentation::FileTypes::VmlDrawing).smart_dynamic_cast<OOX::CVmlDrawing>();//boost::shared_dynamic_cast<PPTX::VmlDrawing, PPTX::File>(FileContainer::get(OOX::Presentation::FileTypes::VmlDrawing));
|
||||
Master = Layout->Master;
|
||||
theme = Layout->theme;
|
||||
|
||||
if (theme.IsInit())
|
||||
{
|
||||
tableStyles_= theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles).smart_dynamic_cast<PPTX::TableStyles>();//boost::shared_dynamic_cast<PPTX::TableStyles, PPTX::File>(Theme->Presentation->get(OOX::Presentation::FileTypes::TableStyles));
|
||||
}
|
||||
if (IsExist(OOX::Presentation::FileTypes::VmlDrawing))
|
||||
{
|
||||
Vml = FileContainer::Get(OOX::Presentation::FileTypes::VmlDrawing).smart_dynamic_cast<OOX::CVmlDrawing>();//boost::shared_dynamic_cast<PPTX::VmlDrawing, PPTX::File>(FileContainer::get(OOX::Presentation::FileTypes::VmlDrawing));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -478,11 +478,13 @@ namespace PPTX
|
||||
Master = pFile.smart_dynamic_cast<PPTX::SlideMaster>();
|
||||
|
||||
if (Master.IsInit())
|
||||
{
|
||||
theme = Master->theme;
|
||||
|
||||
if (theme.IsInit())
|
||||
{
|
||||
tableStyles = theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
if (theme.IsInit())
|
||||
{
|
||||
tableStyles = theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
}
|
||||
}
|
||||
if (IsExist(OOX::Presentation::FileTypes::VmlDrawing))
|
||||
{
|
||||
|
||||
@ -76,7 +76,7 @@ namespace PPTX
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
//FileContainer::read(filename, map);
|
||||
//FileContainer::read(filename, map);
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile(filename.m_strFilename);
|
||||
|
||||
@ -516,9 +516,11 @@ namespace PPTX
|
||||
theme = (FileContainer::Get(OOX::Presentation::FileTypes::ThemePPTX)).smart_dynamic_cast<PPTX::Theme>();
|
||||
|
||||
if (theme.IsInit())
|
||||
{
|
||||
theme->SetColorMap(clrMap);
|
||||
//Theme->Master.reset((PPTX::WrapperFile*)this);
|
||||
tableStyles = (theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles)).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
//Theme->Master.reset((PPTX::WrapperFile*)this);
|
||||
tableStyles = (theme->presentation->Get(OOX::Presentation::FileTypes::TableStyles)).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
}
|
||||
|
||||
if (IsExist(OOX::Presentation::FileTypes::VmlDrawing))
|
||||
{
|
||||
|
||||
@ -38,6 +38,8 @@ class OOXReader;
|
||||
class RtfWriter;
|
||||
class RtfReader;
|
||||
|
||||
namespace OOX { namespace Vml { class CShapeType; } }
|
||||
|
||||
class RtfConvertationManager
|
||||
{
|
||||
public:
|
||||
@ -58,6 +60,7 @@ public:
|
||||
|
||||
void OnCompleteItemRtf();
|
||||
void OnCompleteItemOOX();
|
||||
|
||||
private:
|
||||
OOXWriter* m_poOOXWriter;
|
||||
OOXReader* m_poOOXReader;
|
||||
|
||||
@ -155,7 +155,7 @@ bool RtfDocumentCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRead
|
||||
oReader.m_oCurSectionProp.m_bSwitchMargin = 1;
|
||||
}
|
||||
}
|
||||
else if ( "gutter" == sCommand )
|
||||
else if ( "gutter" == sCommand )
|
||||
{
|
||||
if ( hasParameter )
|
||||
{
|
||||
@ -163,12 +163,12 @@ bool RtfDocumentCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRead
|
||||
oReader.m_oCurSectionProp.m_nGutterMarginWidth = parameter;
|
||||
}
|
||||
}
|
||||
else if ( "ogutter" == sCommand )
|
||||
else if ( "ogutter" == sCommand )
|
||||
{
|
||||
if ( hasParameter )
|
||||
oDocument.m_oProperty.m_nGutterWidthOutside = parameter;
|
||||
}
|
||||
else if ( "margmirror" == sCommand )
|
||||
else if ( "margmirror" == sCommand )
|
||||
{
|
||||
if ( hasParameter && 0 == parameter )
|
||||
{
|
||||
@ -194,7 +194,7 @@ bool RtfDocumentCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRead
|
||||
COMMAND_RTF_BOOL( "useltbaln", oDocument.m_oProperty.m_bUseTabAlignment, sCommand, hasParameter, parameter )
|
||||
//Footnotes and Endnotes
|
||||
COMMAND_RTF_INT ( "endnotes", oDocument.m_oProperty.m_eFootnotePlacement, sCommand, true, RtfDocumentProperty::fp_EndSection )
|
||||
COMMAND_RTF_INT ( "enddoc", oDocument.m_oProperty.m_eFootnotePlacement, sCommand, true, RtfDocumentProperty::fp_EndDocument )
|
||||
COMMAND_RTF_INT ( "enddoc", oDocument.m_oProperty.m_eFootnotePlacement, sCommand, true, RtfDocumentProperty::fp_EndDocument )
|
||||
COMMAND_RTF_INT ( "ftntj", oDocument.m_oProperty.m_eFootnotePlacement, sCommand, true, RtfDocumentProperty::fp_BeneathText )
|
||||
COMMAND_RTF_INT ( "ftnbj", oDocument.m_oProperty.m_eFootnotePlacement, sCommand, true, RtfDocumentProperty::fp_BottomPage )
|
||||
|
||||
@ -309,6 +309,15 @@ bool RtfNormalReader::ExecuteCommand( RtfDocument& oDocument, RtfReader& oReader
|
||||
RtfInfoReader oInfoReader;
|
||||
return StartSubReader( oInfoReader, oDocument, oReader );
|
||||
}
|
||||
else if ( "background" == sCommand )
|
||||
{
|
||||
oDocument.m_pBackground = RtfShapePtr( new RtfShape() );
|
||||
|
||||
oDocument.m_pBackground->m_bBackground = true;
|
||||
|
||||
RtfBackgroundReader oBackgroundReader( *oDocument.m_pBackground );
|
||||
return StartSubReader( oBackgroundReader, oDocument, oReader );
|
||||
}
|
||||
//else if ( "colorschememapping" == sCommand )
|
||||
//{
|
||||
// RtfColorSchemeReader oSchemeReader;
|
||||
|
||||
@ -509,9 +509,9 @@ public:
|
||||
else if( "author" == sCommand ) m_eInternalState = is_author;
|
||||
else if( "manager" == sCommand ) m_eInternalState = is_manager;
|
||||
else if( "company" == sCommand ) m_eInternalState = is_company;
|
||||
else if( "operator" == sCommand ) m_eInternalState = is_operator;
|
||||
else if( "category" == sCommand ) m_eInternalState = is_category;
|
||||
else if( "keywords" == sCommand ) m_eInternalState = is_keywords;
|
||||
else if( "operator" == sCommand ) m_eInternalState = is_operator;
|
||||
else if( "category" == sCommand ) m_eInternalState = is_category;
|
||||
else if( "keywords" == sCommand ) m_eInternalState = is_keywords;
|
||||
else if( "comment" == sCommand ) m_eInternalState = is_comment;
|
||||
else if( "doccomm" == sCommand ) m_eInternalState = is_doccomm;
|
||||
else if( "hlinkbase" == sCommand ) m_eInternalState = is_hlinkbase;
|
||||
@ -720,12 +720,12 @@ class RtfPictureReader : public RtfAbstractReader
|
||||
};
|
||||
|
||||
private:
|
||||
RtfShape& m_oShape;
|
||||
std::wstring m_sFile;
|
||||
std::wstring m_sData;
|
||||
bool m_bBin;
|
||||
BYTE* m_pbBin;
|
||||
int m_nBinLength;
|
||||
RtfShape& m_oShape;
|
||||
std::wstring m_sFile;
|
||||
std::wstring m_sData;
|
||||
bool m_bBin;
|
||||
BYTE* m_pbBin;
|
||||
int m_nBinLength;
|
||||
|
||||
public:
|
||||
RtfPictureReader( RtfReader& oReader, RtfShape& oShape ) : m_oShape(oShape)
|
||||
@ -983,7 +983,31 @@ public:
|
||||
return true;
|
||||
}
|
||||
};
|
||||
class RtfBackgroundReader : public RtfShapeReader
|
||||
{
|
||||
public:
|
||||
RtfShape& m_oShape;
|
||||
|
||||
RtfBackgroundReader( RtfShape& oShape ) : RtfShapeReader(oShape), m_oShape(oShape)
|
||||
{
|
||||
}
|
||||
bool ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter)
|
||||
{
|
||||
if( "background" == sCommand )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( "shp" == sCommand )
|
||||
{
|
||||
RtfShapeReader oShapeReader( m_oShape );
|
||||
|
||||
StartSubReader( oShapeReader, oDocument, oReader );
|
||||
}
|
||||
else
|
||||
return RtfShapeReader::ExecuteCommand( oDocument, oReader, sCommand, hasParameter, parameter);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
class RtfOldShapeReader : public RtfAbstractReader
|
||||
{
|
||||
private:
|
||||
|
||||
@ -31,7 +31,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "OOXShapeReader.h"
|
||||
#include "OOXTextItemReader.h"
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/DocxFormat/Document.h"
|
||||
|
||||
class OOXDocumentReader
|
||||
@ -58,6 +60,13 @@ public:
|
||||
|
||||
m_poReader = oParam.oReader;
|
||||
m_poDocument = oParam.oRtf;
|
||||
|
||||
if ( m_ooxDocument->m_oBackground.IsInit())
|
||||
{
|
||||
m_poDocument->m_pBackground = RtfShapePtr(new RtfShape());
|
||||
OOXBackgroundReader oBackgroundReader(m_ooxDocument->m_oBackground.GetPointer());
|
||||
oBackgroundReader.Parse( oParam, m_poDocument->m_pBackground);
|
||||
}
|
||||
|
||||
int last_section_start = 0;
|
||||
|
||||
|
||||
@ -745,17 +745,24 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
|
||||
RtfShapePtr pNewShape ( new RtfShape() );
|
||||
pNewShape->m_oCharProperty = oNewProperty;
|
||||
|
||||
OOXShapeReader *pShapeReader = NULL;
|
||||
|
||||
if (ooxPicture->m_oShape.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShape.GetPointer());
|
||||
else if (ooxPicture->m_oShapeType.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeType.GetPointer());
|
||||
else if (ooxPicture->m_oShapeArc.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeArc.GetPointer());
|
||||
OOXShapeReader* pShapeReader = NULL;
|
||||
if (ooxPicture->m_oShapeType.IsInit())
|
||||
{
|
||||
pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeType.GetPointer());
|
||||
if(pShapeReader)
|
||||
{
|
||||
pShapeReader->Parse( oParam, pNewShape );
|
||||
delete pShapeReader; pShapeReader = NULL;
|
||||
}
|
||||
}
|
||||
if (ooxPicture->m_oShapeArc.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeArc.GetPointer());
|
||||
else if (ooxPicture->m_oShapeRect.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeRect.GetPointer());
|
||||
else if (ooxPicture->m_oShapeRoundRect.IsInit())pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeRoundRect.GetPointer());
|
||||
else if (ooxPicture->m_oShapeOval.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeOval.GetPointer());
|
||||
else if (ooxPicture->m_oShapeLine.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeLine.GetPointer());
|
||||
else if (ooxPicture->m_oShapePolyLine.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapePolyLine.GetPointer());
|
||||
else if (ooxPicture->m_oShapeCurve.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShapeCurve.GetPointer());
|
||||
else if (ooxPicture->m_oShape.IsInit()) pShapeReader = new OOXShapeReader(ooxPicture->m_oShape.GetPointer());
|
||||
|
||||
if (pShapeReader)
|
||||
{
|
||||
|
||||
@ -41,7 +41,7 @@ class OOXReader
|
||||
public:
|
||||
|
||||
RtfConvertationManager* m_convertationManager;
|
||||
std::wstring m_sPath;
|
||||
std::wstring m_sPath;
|
||||
|
||||
int m_nCurItap; //для определение вложенности таблицы
|
||||
|
||||
|
||||
@ -36,6 +36,9 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#ifndef RGB
|
||||
#define RGB(r,g,b) ((_UINT32)(((BYTE)(r)|((_UINT16)((BYTE)(g))<<8))|(((_UINT32)(BYTE)(b))<<16)))
|
||||
#endif
|
||||
bool ParseStyle(RtfShape* pShape, SimpleTypes::Vml::CCssProperty* prop)
|
||||
{
|
||||
if (pShape == NULL) return false;
|
||||
@ -249,7 +252,7 @@ bool ParseStyle(RtfShape* pShape, SimpleTypes::Vml::CCssProperty* prop)
|
||||
}
|
||||
|
||||
|
||||
OOXShapeReader::OOXShapeReader(OOX::WritingElementWithChilds<OOX::WritingElement> * elem)
|
||||
OOXShapeReader::OOXShapeReader(OOX::WritingElementWithChilds<OOX::WritingElement> * elem)
|
||||
{
|
||||
m_arrElement = elem;
|
||||
|
||||
@ -328,7 +331,7 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
|
||||
case SimpleTypes::filltypeFrame : oOutput->m_nFillType = 3; break;
|
||||
case SimpleTypes::filltypeGradient: oOutput->m_nFillType = 4; break;
|
||||
case SimpleTypes::filltypeGradientCenter: oOutput->m_nFillType = 4; break;
|
||||
case SimpleTypes::filltypeGradientRadial: oOutput->m_nFillType = 4; break;
|
||||
case SimpleTypes::filltypeGradientRadial: oOutput->m_nFillType = 6; break;
|
||||
case SimpleTypes::filltypeGradientUnscaled: oOutput->m_nFillType = 4; break;
|
||||
case SimpleTypes::filltypePattern: oOutput->m_nFillType = 1; break;
|
||||
case SimpleTypes::filltypeTile: oOutput->m_nFillType = 2; break;
|
||||
@ -346,6 +349,21 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
|
||||
{
|
||||
oOutput->m_nFillFocus = fill->m_oFocus->GetValue();
|
||||
}
|
||||
if (fill->m_oFocusPosition.IsInit())
|
||||
{
|
||||
if (fill->m_oFocusPosition->GetY() > 0.99 || fill->m_oFocusPosition->GetX() > 0.99)
|
||||
oOutput->m_nFillType = 5;
|
||||
|
||||
int toBottom = (1. - fill->m_oFocusPosition->GetY()) * 65535;
|
||||
int toTop = (fill->m_oFocusPosition->GetY()) * 65535;
|
||||
int toRight = (1. - fill->m_oFocusPosition->GetX()) * 65535;
|
||||
int toLeft = (fill->m_oFocusPosition->GetX()) * 65535;
|
||||
|
||||
if (toBottom > 0) oOutput->m_nFillToBottom = toBottom;
|
||||
if (toTop > 0) oOutput->m_nFillToTop = toTop;
|
||||
if (toRight > 0) oOutput->m_nFillToRight = toRight;
|
||||
if (toLeft > 0) oOutput->m_nFillToLeft = toLeft;
|
||||
}
|
||||
}break;
|
||||
case OOX::et_v_stroke:
|
||||
{
|
||||
@ -825,3 +843,58 @@ void OOXShapeReader::ParseAdjustment(RtfShape& oShape, std::wstring sAdjustment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool OOXBackgroundReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
|
||||
{
|
||||
if (!m_ooxBackground) return false;
|
||||
|
||||
oOutput->m_nShapeType = 1;
|
||||
oOutput->m_bBackground = true;
|
||||
oOutput->m_bFilled = true;
|
||||
|
||||
if (m_ooxBackground->m_oColor.IsInit() && m_ooxBackground->m_oColor->GetValue() == SimpleTypes::hexcolorRGB)
|
||||
{
|
||||
unsigned char ucR = m_ooxBackground->m_oColor->Get_R();
|
||||
unsigned char ucB = m_ooxBackground->m_oColor->Get_B();
|
||||
unsigned char ucG = m_ooxBackground->m_oColor->Get_G();
|
||||
unsigned char ucA = m_ooxBackground->m_oColor->Get_A();
|
||||
|
||||
oOutput->m_nFillColor = RGB(ucR, ucG , ucB);
|
||||
|
||||
if (ucA != 0xff)
|
||||
oOutput->m_nFillOpacity = ucA / 255. * 100;
|
||||
}
|
||||
else if (m_ooxBackground->m_oThemeColor.IsInit())
|
||||
{
|
||||
//nullable<SimpleTypes::CUcharHexNumber<> > m_oThemeShade;
|
||||
//nullable<SimpleTypes::CUcharHexNumber<> > m_oThemeTint;
|
||||
}
|
||||
|
||||
if (m_ooxBackground->m_oBackground.IsInit())
|
||||
{
|
||||
OOXShapeReader sub_reader(m_ooxBackground->m_oBackground.GetPointer());
|
||||
sub_reader.Parse(oParam, oOutput);
|
||||
}
|
||||
else if (m_ooxBackground->m_oDrawing.IsInit())
|
||||
{
|
||||
OOXDrawingReader oDrawingReader(m_ooxBackground->m_oDrawing.GetPointer());
|
||||
|
||||
if( false == oDrawingReader.Parse( oParam, *oOutput ) )
|
||||
{
|
||||
if (!m_ooxBackground->m_oDrawing->m_sXml.IsInit())
|
||||
{
|
||||
OOXDrawingGraphicReader oGraphiceReader(*m_ooxBackground->m_oDrawing->m_sXml);
|
||||
OOX::Logic::CPicture *ooxPicture = oGraphiceReader.Parse( oParam, *oOutput );
|
||||
if (ooxPicture)
|
||||
{
|
||||
OOXShapeReader sub_reader(ooxPicture);
|
||||
sub_reader.Parse(oParam, oOutput);
|
||||
|
||||
delete ooxPicture;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -69,7 +69,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class OOXShapeGroupReader
|
||||
{
|
||||
private:
|
||||
@ -91,3 +90,16 @@ public:
|
||||
|
||||
bool Parse( ReaderParameter oParam , RtfShapeGroupPtr& oOutput);
|
||||
};
|
||||
|
||||
class OOXBackgroundReader
|
||||
{
|
||||
private:
|
||||
OOX::Logic::CBackground *m_ooxBackground;
|
||||
public:
|
||||
OOXBackgroundReader(OOX::Logic::CBackground *oox_background)
|
||||
{
|
||||
m_ooxBackground = oox_background;
|
||||
}
|
||||
|
||||
bool Parse( ReaderParameter oParam , RtfShapePtr& oOutput);
|
||||
};
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
#include "RtfGlobalTables.h"
|
||||
#include "RtfSection.h"
|
||||
#include "RtfMath.h"
|
||||
#include "RtfShape.h"
|
||||
|
||||
struct _section
|
||||
{
|
||||
@ -56,6 +57,7 @@ public:
|
||||
RtfStyleTable m_oStyleTable;
|
||||
RtfRevisionTable m_oRevisionTable;
|
||||
RtfInformation m_oInformation;
|
||||
RtfShapePtr m_pBackground;
|
||||
|
||||
RtfListTable m_oListTable;
|
||||
RtfListOverrideTable m_oListOverrideTable;
|
||||
@ -80,8 +82,10 @@ public:
|
||||
void SetShapeId( int nShapeId )
|
||||
{
|
||||
for( int i = 0; i < (int)m_aShapeId.size(); i++ )
|
||||
{
|
||||
if( nShapeId == m_aShapeId[i] )
|
||||
return;
|
||||
}
|
||||
m_aShapeId.push_back( nShapeId );
|
||||
}
|
||||
int GetShapeId( int& nShapeId )
|
||||
|
||||
@ -95,7 +95,7 @@ std::wstring RtfOldList::RenderToOOX(RenderParameter oRenderParameter)
|
||||
{
|
||||
if( PROP_DEF != m_nLs && PROP_DEF != m_nIlvl )
|
||||
sResult += L"<w:numPr><w:ilvl w:val=\"" + std::to_wstring(m_nLs) +
|
||||
L"\"/><w:numId w:val=\"%" + std::to_wstring(m_nLs) + L"\"/></w:numPr>";
|
||||
L"\"/><w:numId w:val=\"" + std::to_wstring(m_nLs) + L"\"/></w:numPr>";
|
||||
}
|
||||
}
|
||||
return sResult;
|
||||
|
||||
@ -2090,7 +2090,7 @@ std::wstring RtfParagraphProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
case tbw_txbxtwno: sResult += L"<w:textboxTightWrap w:val=\"none\"/>"; break;
|
||||
case tbw_txbxtwalways: sResult += L"<w:textboxTightWrap w:val=\"allLines\"/>"; break;
|
||||
case tbw_txbxtwfirstlast: sResult += L"<w:textboxTightWrap w:val=\"firstAndLastLine\"/>"; break;
|
||||
case tbw_txbxtwfirst: sResult += L"<w:textboxTightWrap w:val=\"firstLineOnly\"/>"; break;
|
||||
case tbw_txbxtwfirst: sResult += L"<w:textboxTightWrap w:val=\"firstLineOnly\"/>"; break;
|
||||
case tbw_txbxtwlast: sResult += L"<w:textboxTightWrap w:val=\"lastLineOnly\"/>"; break;
|
||||
}
|
||||
if( PROP_DEF != m_nListId && PROP_DEF != m_nListLevel )
|
||||
|
||||
@ -146,6 +146,10 @@ void RtfShape::SetDefault()
|
||||
DEFAULT_PROPERTY( m_nFillOpacity )
|
||||
DEFAULT_PROPERTY( m_nFillFocus )
|
||||
DEFAULT_PROPERTY( m_nFillAngle )
|
||||
DEFAULT_PROPERTY( m_nFillToBottom )
|
||||
DEFAULT_PROPERTY( m_nFillToTop )
|
||||
DEFAULT_PROPERTY( m_nFillToRight )
|
||||
DEFAULT_PROPERTY( m_nFillToLeft )
|
||||
//Line
|
||||
DEFAULT_PROPERTY_DEF( m_bLine, true )
|
||||
DEFAULT_PROPERTY( m_nLineColor )
|
||||
@ -168,7 +172,7 @@ void RtfShape::SetDefault()
|
||||
|
||||
m_aTextItems = TextItemContainerPtr();
|
||||
m_oPicture = RtfPicturePtr();
|
||||
|
||||
m_bBackground = false;
|
||||
m_bIsOle = false;
|
||||
m_bInGroup = false;
|
||||
|
||||
@ -234,6 +238,9 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_bBackground)
|
||||
sResult += L"{\\*\\background";
|
||||
|
||||
sResult += L"{\\shp";
|
||||
sResult += L"{\\*\\shpinst";
|
||||
|
||||
@ -281,7 +288,7 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
sResult += L"{\\sp{\\sn fLockRotation}{\\sv 1}}";
|
||||
|
||||
//picture
|
||||
if( 0 != m_oPicture && m_nFillType == 1 || m_nFillType == 2 || m_nFillType == 9)
|
||||
if( 0 != m_oPicture && m_nFillType == 1 || m_nFillType == 2 || m_nFillType == 3 || m_nFillType == 9)
|
||||
{
|
||||
sResult += L"{\\sp{\\sn fillBlip}{\\sv ";
|
||||
sResult += m_oPicture->RenderToRtf( oRenderParameter );
|
||||
@ -296,6 +303,9 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
}
|
||||
sResult += L"}";
|
||||
sResult += L"}";
|
||||
|
||||
if (m_bBackground)
|
||||
sResult += L"}";
|
||||
}
|
||||
}
|
||||
else // anchor
|
||||
@ -400,14 +410,14 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
RENDER_RTF_SHAPE_PROP(L"fAllowOverlap", sResult, m_bAllowOverlap);
|
||||
|
||||
//Position relative
|
||||
RENDER_RTF_SHAPE_PROP(L"pctHorizPos", sResult, m_nPositionHPct);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctVertPos", sResult, m_nPositionVPct);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctHoriz", sResult, m_nPctWidth);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctVert", sResult, m_nPctHeight);
|
||||
RENDER_RTF_SHAPE_PROP(L"sizerelh", sResult, m_nPctWidthRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"sizerelv", sResult, m_nPctHeightRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"colStart", sResult, m_nColStart);
|
||||
RENDER_RTF_SHAPE_PROP(L"colSpan", sResult, m_nColSpan);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctHorizPos", sResult, m_nPositionHPct);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctVertPos", sResult, m_nPositionVPct);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctHoriz", sResult, m_nPctWidth);
|
||||
RENDER_RTF_SHAPE_PROP(L"pctVert", sResult, m_nPctHeight);
|
||||
RENDER_RTF_SHAPE_PROP(L"sizerelh", sResult, m_nPctWidthRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"sizerelv", sResult, m_nPctHeightRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"colStart", sResult, m_nColStart);
|
||||
RENDER_RTF_SHAPE_PROP(L"colSpan", sResult, m_nColSpan);
|
||||
//Rehydration
|
||||
//RENDER_RTF_SHAPE_PROP(L"metroBlob", sResult, m_sMetroBlob);
|
||||
|
||||
@ -419,6 +429,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
RENDER_RTF_SHAPE_PROP(L"shapeType", sResult, m_nShapeType);
|
||||
RENDER_RTF_SHAPE_PROP(L"fBehindDocument",sResult, m_nZOrderRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"fHidden", sResult, m_bHidden);
|
||||
RENDER_RTF_SHAPE_PROP(L"fBackground", sResult, m_bBackground);
|
||||
//Text
|
||||
//sResult += L"{\\sp{\\sn fLockText}{\\sv 0}}";
|
||||
|
||||
@ -430,10 +441,10 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
RENDER_RTF_SHAPE_PROP(L"anchorText", sResult, m_nAnchorText);
|
||||
//else
|
||||
{
|
||||
RENDER_RTF_SHAPE_PROP(L"dxWrapDistLeft", sResult, RtfUtility::Twips2Emu( m_nWrapDistLeft ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dyWrapDistTop", sResult, RtfUtility::Twips2Emu( m_nWrapDistTop ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dxWrapDistRight", sResult, RtfUtility::Twips2Emu( m_nWrapDistRight ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dyWrapDistBottom", sResult, RtfUtility::Twips2Emu( m_nWrapDistBottom ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dxWrapDistLeft", sResult, RtfUtility::Twips2Emu( m_nWrapDistLeft ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dyWrapDistTop", sResult, RtfUtility::Twips2Emu( m_nWrapDistTop ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dxWrapDistRight", sResult, RtfUtility::Twips2Emu( m_nWrapDistRight ));
|
||||
RENDER_RTF_SHAPE_PROP(L"dyWrapDistBottom", sResult, RtfUtility::Twips2Emu( m_nWrapDistBottom ));
|
||||
}
|
||||
RENDER_RTF_SHAPE_PROP(L"fFitShapeToText", sResult, m_bFitShapeToText);
|
||||
RENDER_RTF_SHAPE_PROP(L"fFitTextToShape", sResult, m_bFitTextToShape);
|
||||
@ -503,11 +514,16 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
|
||||
if (PROP_DEF != m_nFillOpacity)
|
||||
RENDER_RTF_SHAPE_PROP(L"fillOpacity", sResult, ( m_nFillOpacity * 65536 /100 ) );
|
||||
RENDER_RTF_SHAPE_PROP(L"fillFocus", sResult, m_nFillFocus );
|
||||
RENDER_RTF_SHAPE_PROP(L"fillFocus", sResult, m_nFillFocus );
|
||||
|
||||
if (PROP_DEF != m_nFillAngle)
|
||||
RENDER_RTF_SHAPE_PROP(L"fillAngle", sResult, m_nFillAngle * 65536 );
|
||||
//Line
|
||||
|
||||
RENDER_RTF_SHAPE_PROP(L"fillToBottom", sResult, m_nFillToBottom )
|
||||
RENDER_RTF_SHAPE_PROP(L"fillToTop", sResult, m_nFillToTop )
|
||||
RENDER_RTF_SHAPE_PROP(L"fillToRight", sResult, m_nFillToRight )
|
||||
RENDER_RTF_SHAPE_PROP(L"fillToLeft", sResult, m_nFillToLeft )
|
||||
//Line
|
||||
if( 0 == m_bLine )
|
||||
sResult += L"{\\sp{\\sn fLine}{\\sv 0}}";
|
||||
RENDER_RTF_SHAPE_PROP(L"lineColor", sResult, m_nLineColor );
|
||||
@ -642,9 +658,11 @@ std::wstring RtfShape::RenderToOOX(RenderParameter oRenderParameter)
|
||||
|
||||
return sResult;
|
||||
}
|
||||
std::wstring RtfShape::GetShapeNodeName(int type)
|
||||
std::wstring RtfShape::GetShapeNodeName()
|
||||
{
|
||||
switch(type)
|
||||
if (m_bBackground) return L"v:background";
|
||||
|
||||
switch(m_nShapeType)
|
||||
{
|
||||
case NSOfficeDrawing::sptRectangle: return L"v:rect";
|
||||
case NSOfficeDrawing::sptEllipse: return L"v:oval";
|
||||
@ -707,7 +725,9 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
}
|
||||
|
||||
if (oRenderParameter.sValue.empty())
|
||||
oRenderParameter.sValue = GetShapeNodeName(m_nShapeType);
|
||||
{
|
||||
oRenderParameter.sValue = GetShapeNodeName();
|
||||
}
|
||||
|
||||
sResult += L"<" + oRenderParameter.sValue;
|
||||
|
||||
@ -1285,7 +1305,9 @@ std::wstring RtfShape::RenderToOOXEnd(RenderParameter oRenderParameter)
|
||||
std::wstring sResult;
|
||||
|
||||
if (oRenderParameter.sValue.empty())
|
||||
oRenderParameter.sValue = GetShapeNodeName(m_nShapeType);
|
||||
{
|
||||
oRenderParameter.sValue = GetShapeNodeName();
|
||||
}
|
||||
|
||||
sResult += L"</" + oRenderParameter.sValue + L">";
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ private:
|
||||
bool m_bDelete;
|
||||
|
||||
public:
|
||||
bool m_bBackground;
|
||||
bool m_bIsOle;
|
||||
bool m_bInGroup; //local anchor
|
||||
|
||||
@ -166,6 +167,10 @@ public:
|
||||
int m_nFillOpacity;
|
||||
int m_nFillFocus;
|
||||
int m_nFillAngle;
|
||||
int m_nFillToBottom;
|
||||
int m_nFillToTop;
|
||||
int m_nFillToRight;
|
||||
int m_nFillToLeft;
|
||||
//int m_bFillShape; //есть копия заливки картинкой
|
||||
//Line
|
||||
int m_bLine; //fLine Has a line
|
||||
@ -251,7 +256,7 @@ public:
|
||||
}
|
||||
}
|
||||
std::wstring RenderToRtfShapeProperty(RenderParameter oRenderParameter);
|
||||
std::wstring GetShapeNodeName(int type);
|
||||
std::wstring GetShapeNodeName();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -274,28 +274,37 @@ int RtfWriter::GetCount()
|
||||
std::wstring RtfWriter::CreateRtfStart()
|
||||
{
|
||||
RenderParameter oRenderParameter;
|
||||
|
||||
oRenderParameter.poDocument = &m_oDocument;
|
||||
oRenderParameter.poWriter = this;
|
||||
oRenderParameter.nType = RENDER_TO_RTF_PARAM_UNKNOWN;
|
||||
oRenderParameter.poWriter = this;
|
||||
oRenderParameter.nType = RENDER_TO_RTF_PARAM_UNKNOWN;
|
||||
|
||||
std::wstring sResult;
|
||||
sResult += L"{\\rtf1\\ulc1";
|
||||
sResult += m_oDocument.m_oProperty.RenderToRtf( oRenderParameter );
|
||||
sResult += m_oDocument.m_oFontTable.RenderToRtf( oRenderParameter );
|
||||
sResult += m_oDocument.m_oColorTable.RenderToRtf( oRenderParameter );
|
||||
//---------- test
|
||||
|
||||
std::wstring sDefCharProp = m_oDocument.m_oDefaultCharProp.RenderToRtf( oRenderParameter );
|
||||
if( false == sDefCharProp.empty() )
|
||||
|
||||
if( false == sDefCharProp.empty() )
|
||||
sResult += L"{\\*\\defchp " + sDefCharProp + L"}";
|
||||
std::wstring sDefParProp = m_oDocument.m_oDefaultParagraphProp.RenderToRtf( oRenderParameter );
|
||||
if( false == sDefParProp.empty() )
|
||||
|
||||
if( false == sDefParProp.empty() )
|
||||
sResult += L"{\\*\\defpap " + sDefParProp+ L"}";
|
||||
sResult += m_oDocument.m_oStyleTable.RenderToRtf( oRenderParameter );
|
||||
//---------- test
|
||||
|
||||
sResult += m_oDocument.m_oListTable.RenderToRtf ( oRenderParameter );
|
||||
sResult += m_oDocument.m_oListOverrideTable.RenderToRtf ( oRenderParameter );
|
||||
sResult += m_oDocument.m_oRevisionTable.RenderToRtf ( oRenderParameter );
|
||||
sResult += m_oDocument.m_oInformation.RenderToRtf ( oRenderParameter );
|
||||
|
||||
if (m_oDocument.m_pBackground)
|
||||
{
|
||||
sResult += m_oDocument.m_pBackground->RenderToRtf ( oRenderParameter );
|
||||
}
|
||||
|
||||
sResult += L"\\fet2";//0 Footnotes only or nothing at all (the default). 1 Endnotes only. 2 Both footnotes and endnotes
|
||||
|
||||
std::wstring sFootnote;
|
||||
@ -323,7 +332,6 @@ std::wstring RtfWriter::CreateRtfStart()
|
||||
if( !sFootnote.empty() )
|
||||
sResult += L"{\\*\\aftnsepc " + sFootnote + L"}";
|
||||
}
|
||||
|
||||
sResult += L"\n\n";
|
||||
return sResult;
|
||||
}
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#include "OOXDocumentWriter.h"
|
||||
//#include "OOXContentTypesWriter.h"
|
||||
#include "OOXRelsWriter.h"
|
||||
#include "OOXDocumentWriter.h"
|
||||
#include "OOXNumberingWriter.h"
|
||||
@ -41,33 +40,42 @@
|
||||
#include "OOXFootnoteWriter.h"
|
||||
#include "OOXStylesWriter.h"
|
||||
|
||||
//#include "../../../../ASCOfficeDocxFile2/BinReader/ContentTypesWriter.h"
|
||||
|
||||
std::wstring OOXDocumentWriter::CreateXmlStart()
|
||||
{
|
||||
//пишем Footnotes
|
||||
RenderParameter oNewParam;
|
||||
oNewParam.poDocument = &m_oDocument;
|
||||
oNewParam.poWriter = &m_oWriter;
|
||||
oNewParam.poRels = &m_oWriter.m_oDocRels;
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
|
||||
|
||||
oNewParam.poDocument = &m_oDocument;
|
||||
oNewParam.poWriter = &m_oWriter;
|
||||
oNewParam.poRels = &m_oWriter.m_oDocRels;
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
|
||||
//пишем document.xml
|
||||
std::wstring sResult = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n");
|
||||
sResult += _T("<w:document");
|
||||
sResult += _T(" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"");
|
||||
sResult += _T(" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"");
|
||||
sResult += _T(" xmlns:v=\"urn:schemas-microsoft-com:vml\"");
|
||||
sResult += _T(" xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
|
||||
sResult += _T(" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\"");
|
||||
sResult += _T(" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\"");
|
||||
sResult += _T(" xmlns:w10=\"urn:schemas-microsoft-com:office:word\"");
|
||||
sResult += _T(" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"");
|
||||
sResult += _T(">");
|
||||
std::wstring sResult = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n";
|
||||
sResult += L"<w:document";
|
||||
sResult += L" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"";
|
||||
sResult += L" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"";
|
||||
sResult += L" xmlns:v=\"urn:schemas-microsoft-com:vml\"";
|
||||
sResult += L" xmlns:o=\"urn:schemas-microsoft-com:office:office\"";
|
||||
sResult += L" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\"";
|
||||
sResult += L" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\"";
|
||||
sResult += L" xmlns:w10=\"urn:schemas-microsoft-com:office:word\"";
|
||||
sResult += L" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"";
|
||||
sResult += L">";
|
||||
|
||||
sResult += _T("<w:body>");
|
||||
if (m_oDocument.m_pBackground)
|
||||
{
|
||||
RtfColor color(m_oDocument.m_pBackground->m_nFillColor);
|
||||
|
||||
sResult += L"<w:background w:color=\"" + color.ToHexColor() + L"\">";
|
||||
{
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_SHAPE_WSHAPE2;
|
||||
sResult += m_oDocument.m_pBackground->RenderToOOX(oNewParam);
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
}
|
||||
sResult += L"</w:background>";
|
||||
}
|
||||
|
||||
sResult += L"<w:body>";
|
||||
return sResult;
|
||||
}
|
||||
std::wstring OOXDocumentWriter::CreateXmlEnd( )
|
||||
@ -88,25 +96,25 @@ std::wstring OOXDocumentWriter::CreateXmlEnd( )
|
||||
{
|
||||
oNewParam.poRels = poFootnoteWriter->m_oRelsWriter.get();
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
poFootnoteWriter->AddFootnoteBegin( _T("continuationSeparator"), 1, m_oDocument.m_oFootnoteCon->RenderToOOX( oNewParam ) );
|
||||
poFootnoteWriter->AddFootnoteBegin( L"continuationSeparator", 1, m_oDocument.m_oFootnoteCon->RenderToOOX( oNewParam ) );
|
||||
}
|
||||
if( NULL != m_oDocument.m_oFootnoteSep )
|
||||
{
|
||||
oNewParam.poRels = poFootnoteWriter->m_oRelsWriter.get();
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
poFootnoteWriter->AddFootnoteBegin( _T("separator"), 0, m_oDocument.m_oFootnoteSep->RenderToOOX(oNewParam) );
|
||||
poFootnoteWriter->AddFootnoteBegin( L"separator", 0, m_oDocument.m_oFootnoteSep->RenderToOOX(oNewParam) );
|
||||
}
|
||||
if( NULL != m_oDocument.m_oEndnoteCon )
|
||||
{
|
||||
oNewParam.poRels = poEndnoteWriter->m_oRelsWriter.get();
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
poEndnoteWriter->AddEndnoteBegin( _T("continuationSeparator"), 1, m_oDocument.m_oEndnoteSep->RenderToOOX(oNewParam) );
|
||||
poEndnoteWriter->AddEndnoteBegin( L"continuationSeparator", 1, m_oDocument.m_oEndnoteSep->RenderToOOX(oNewParam) );
|
||||
}
|
||||
if( NULL != m_oDocument.m_oEndnoteSep )
|
||||
{
|
||||
oNewParam.poRels = poEndnoteWriter->m_oRelsWriter.get();
|
||||
oNewParam.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
|
||||
poEndnoteWriter->AddEndnoteBegin( _T("separator"), 0, m_oDocument.m_oEndnoteSep->RenderToOOX(oNewParam) );
|
||||
poEndnoteWriter->AddEndnoteBegin( L"separator", 0, m_oDocument.m_oEndnoteSep->RenderToOOX(oNewParam) );
|
||||
}
|
||||
|
||||
//fontTable.xml
|
||||
@ -142,20 +150,20 @@ std::wstring OOXDocumentWriter::CreateXmlEnd( )
|
||||
|
||||
if( false == sTempParaDef.empty() || false == sTempCharDef.empty() )
|
||||
{
|
||||
sStyles += _T("<w:docDefaults>");
|
||||
sStyles += L"<w:docDefaults>";
|
||||
if( false == sTempCharDef.empty() )
|
||||
{
|
||||
sStyles += _T("<w:rPrDefault><w:rPr>");
|
||||
sStyles += L"<w:rPrDefault><w:rPr>";
|
||||
sStyles += sTempCharDef ;
|
||||
sStyles += _T("</w:rPr></w:rPrDefault>");
|
||||
sStyles += L"</w:rPr></w:rPrDefault>";
|
||||
}
|
||||
if( false == sTempParaDef.empty() )
|
||||
{
|
||||
sStyles += _T("<w:pPrDefault><w:pPr>");
|
||||
sStyles += L"<w:pPrDefault><w:pPr>";
|
||||
sStyles += sTempParaDef;
|
||||
sStyles += _T("</w:pPr></w:pPrDefault>");
|
||||
sStyles += L"</w:pPr></w:pPrDefault>";
|
||||
}
|
||||
sStyles += _T("</w:docDefaults>");
|
||||
sStyles += L"</w:docDefaults>";
|
||||
}
|
||||
|
||||
sStyles += m_oDocument.m_oStyleTable.RenderToOOX(oNewParam);
|
||||
@ -182,28 +190,28 @@ std::wstring OOXDocumentWriter::CreateXmlEnd( )
|
||||
|
||||
sResult += m_oDocument[0].props->m_oProperty.RenderToOOX(oNewParam);
|
||||
|
||||
sResult += _T("</w:body>");
|
||||
sResult += _T("</w:document>");
|
||||
sResult += L"</w:body>";
|
||||
sResult += L"</w:document>";
|
||||
|
||||
return sResult;
|
||||
}
|
||||
|
||||
bool OOXDocumentWriter::SaveByItemStart( std::wstring sFolder )
|
||||
{
|
||||
std::wstring pathWord = sFolder + FILE_SEPARATOR_STR + _T("word");
|
||||
std::wstring pathWord = sFolder + FILE_SEPARATOR_STR + L"word";
|
||||
NSDirectory::CreateDirectory(pathWord) ;
|
||||
|
||||
try
|
||||
{
|
||||
std::wstring sFilename = pathWord + FILE_SEPARATOR_STR + _T("document.xml");
|
||||
std::wstring sFilename = pathWord + FILE_SEPARATOR_STR + L"document.xml";
|
||||
m_oFileWriter = new NFileWriter::CBufferedFileWriter( sFilename );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_oWriter.m_oRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"), _T("word/document.xml") );
|
||||
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"), _T("/word/document.xml") );
|
||||
m_oWriter.m_oRels.AddRelationship( L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", L"word/document.xml" );
|
||||
m_oWriter.m_oContentTypes.AddContent( L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml", L"/word/document.xml" );
|
||||
|
||||
std::wstring sXml = CreateXmlStart( );
|
||||
std::string sXmlUTF = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(sXml);
|
||||
@ -261,7 +269,7 @@ bool OOXDocumentWriter::SaveByItem()
|
||||
else
|
||||
{
|
||||
//генерация ???
|
||||
sXml = _T("<w:p><w:pPr>") + sectPr + _T("</w:pPr></w:p>");
|
||||
sXml = L"<w:p><w:pPr>" + sectPr + L"</w:pPr></w:p>";
|
||||
}
|
||||
|
||||
std::string sXmlUTF = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(sXml);
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
class OOXDocumentWriter
|
||||
{
|
||||
private:
|
||||
OOXWriter& m_oWriter;
|
||||
RtfDocument& m_oDocument;
|
||||
NFileWriter::CBufferedFileWriter* m_oFileWriter;
|
||||
bool m_bFirst; //один параграф пишем другой храним в памяти
|
||||
OOXWriter& m_oWriter;
|
||||
RtfDocument& m_oDocument;
|
||||
NFileWriter::CBufferedFileWriter* m_oFileWriter;
|
||||
bool m_bFirst; //один параграф пишем другой храним в памяти
|
||||
public:
|
||||
OOXDocumentWriter( OOXWriter& oWriter,RtfDocument& oDocument ): m_oWriter(oWriter), m_oDocument(oDocument)
|
||||
{
|
||||
@ -64,7 +64,9 @@ public:
|
||||
{
|
||||
int nCount = 0;
|
||||
for( int i = 0; i < m_oDocument.GetCount(); i++ )
|
||||
{
|
||||
nCount += m_oDocument[i].props->GetCount();
|
||||
}
|
||||
return nCount;
|
||||
}
|
||||
};
|
||||
|
||||
@ -3,7 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatLib", "..\RtfFormatLib\Win32\RtfFormatLib.vcproj", "{AF2D00A7-A351-4700-AE88-C1D9ADE29345}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@ -14,21 +13,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
|
||||
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
|
||||
@ -53,15 +52,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\Off
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatTest", "RtfFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
|
||||
{AF2D00A7-A351-4700-AE88-C1D9ADE29345} = {AF2D00A7-A351-4700-AE88-C1D9ADE29345}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{AF2D00A7-A351-4700-AE88-C1D9ADE29345} = {AF2D00A7-A351-4700-AE88-C1D9ADE29345}
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
|
||||
|
||||
@ -112,21 +112,21 @@ namespace SimpleTypes
|
||||
|
||||
virtual ECalendarType FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("gregorian") == sValue ) this->m_eValue = calendartypeGregorian;
|
||||
else if ( _T("gregorianArabic") == sValue ) this->m_eValue = calendartypeGregorianArabic;
|
||||
else if ( _T("gregorianMeFrench") == sValue ) this->m_eValue = calendartypeGregorianMeFrench;
|
||||
else if ( _T("gregorianUs") == sValue ) this->m_eValue = calendartypeGregorianUs;
|
||||
else if ( _T("gregorianXlitEnglish") == sValue ) this->m_eValue = calendartypeGregorianXlitEnglish;
|
||||
else if ( _T("gregorianXlitFrench") == sValue ) this->m_eValue = calendartypeGregorianXlitFrench;
|
||||
else if ( _T("hebrew") == sValue ) this->m_eValue = calendartypeHebrew;
|
||||
else if ( _T("hijri") == sValue ) this->m_eValue = calendartypeHijri;
|
||||
else if ( _T("japan") == sValue ) this->m_eValue = calendartypeJapan;
|
||||
else if ( _T("korea") == sValue ) this->m_eValue = calendartypeKorea;
|
||||
else if ( _T("none") == sValue ) this->m_eValue = calendartypeNone;
|
||||
else if ( _T("saka") == sValue ) this->m_eValue = calendartypeSaka;
|
||||
else if ( _T("taiwan") == sValue ) this->m_eValue = calendartypeTaiwan;
|
||||
else if ( _T("thai") == sValue ) this->m_eValue = calendartypeThai;
|
||||
else this->m_eValue = eDefValue;
|
||||
if ( L"gregorian" == sValue ) this->m_eValue = calendartypeGregorian;
|
||||
else if ( L"gregorianArabic" == sValue ) this->m_eValue = calendartypeGregorianArabic;
|
||||
else if ( L"gregorianMeFrench" == sValue ) this->m_eValue = calendartypeGregorianMeFrench;
|
||||
else if ( L"gregorianUs" == sValue ) this->m_eValue = calendartypeGregorianUs;
|
||||
else if ( L"gregorianXlitEnglish" == sValue ) this->m_eValue = calendartypeGregorianXlitEnglish;
|
||||
else if ( L"gregorianXlitFrench" == sValue ) this->m_eValue = calendartypeGregorianXlitFrench;
|
||||
else if ( L"hebrew" == sValue ) this->m_eValue = calendartypeHebrew;
|
||||
else if ( L"hijri" == sValue ) this->m_eValue = calendartypeHijri;
|
||||
else if ( L"japan" == sValue ) this->m_eValue = calendartypeJapan;
|
||||
else if ( L"korea" == sValue ) this->m_eValue = calendartypeKorea;
|
||||
else if ( L"none" == sValue ) this->m_eValue = calendartypeNone;
|
||||
else if ( L"saka" == sValue ) this->m_eValue = calendartypeSaka;
|
||||
else if ( L"taiwan" == sValue ) this->m_eValue = calendartypeTaiwan;
|
||||
else if ( L"thai" == sValue ) this->m_eValue = calendartypeThai;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
}
|
||||
@ -135,21 +135,21 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case calendartypeGregorian : return _T("gregorian");
|
||||
case calendartypeGregorianArabic : return _T("gregorianArabic");
|
||||
case calendartypeGregorianMeFrench : return _T("gregorianMeFrench");
|
||||
case calendartypeGregorianUs : return _T("gregorianUs");
|
||||
case calendartypeGregorianXlitEnglish : return _T("gregorianXlitEnglish");
|
||||
case calendartypeGregorianXlitFrench : return _T("gregorianXlitFrench");
|
||||
case calendartypeHebrew : return _T("hebrew");
|
||||
case calendartypeHijri : return _T("hijri");
|
||||
case calendartypeJapan : return _T("japan");
|
||||
case calendartypeKorea : return _T("korea");
|
||||
case calendartypeNone : return _T("none");
|
||||
case calendartypeSaka : return _T("saka");
|
||||
case calendartypeTaiwan : return _T("taiwan");
|
||||
case calendartypeThai : return _T("thai");
|
||||
default : return _T("none");
|
||||
case calendartypeGregorian : return L"gregorian";
|
||||
case calendartypeGregorianArabic : return L"gregorianArabic";
|
||||
case calendartypeGregorianMeFrench : return L"gregorianMeFrench";
|
||||
case calendartypeGregorianUs : return L"gregorianUs";
|
||||
case calendartypeGregorianXlitEnglish : return L"gregorianXlitEnglish";
|
||||
case calendartypeGregorianXlitFrench : return L"gregorianXlitFrench";
|
||||
case calendartypeHebrew : return L"hebrew";
|
||||
case calendartypeHijri : return L"hijri";
|
||||
case calendartypeJapan : return L"japan";
|
||||
case calendartypeKorea : return L"korea";
|
||||
case calendartypeNone : return L"none";
|
||||
case calendartypeSaka : return L"saka";
|
||||
case calendartypeTaiwan : return L"taiwan";
|
||||
case calendartypeThai : return L"thai";
|
||||
default : return L"none";
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,9 +174,9 @@ namespace SimpleTypes
|
||||
|
||||
virtual EConformanceClass FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("strict") == sValue ) this->m_eValue = conformanceclassStrict;
|
||||
else if ( _T("transitional") == sValue ) this->m_eValue = conformanceclassTransitional;
|
||||
else this->m_eValue = eDefValue;
|
||||
if ( L"strict" == sValue ) this->m_eValue = conformanceclassStrict;
|
||||
else if ( L"transitional" == sValue ) this->m_eValue = conformanceclassTransitional;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
}
|
||||
@ -185,9 +185,9 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case conformanceclassStrict : return _T("strict");
|
||||
case conformanceclassTransitional : return _T("transitional");
|
||||
default : return _T("strict");
|
||||
case conformanceclassStrict : return L"strict";
|
||||
case conformanceclassTransitional : return L"transitional";
|
||||
default : return L"strict";
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,16 +514,16 @@ namespace SimpleTypes
|
||||
|
||||
virtual EOnOff FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("true") == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( _T("True") == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( _T("1") == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( _T("t") == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( _T("on") == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( _T("f") == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( _T("0") == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( _T("false") == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( _T("False") == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( _T("off") == sValue ) this->m_eValue = onoffFalse;
|
||||
if ( L"true" == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( L"True" == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( L"1" == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( L"t" == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( L"on" == sValue ) this->m_eValue = onoffTrue;
|
||||
else if ( L"f" == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( L"0" == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( L"false" == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( L"False" == sValue ) this->m_eValue = onoffFalse;
|
||||
else if ( L"off" == sValue ) this->m_eValue = onoffFalse;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
@ -533,9 +533,9 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case onoffFalse : return _T("false");
|
||||
case onoffTrue : return _T("true");
|
||||
default : return _T("false");
|
||||
case onoffFalse : return L"false";
|
||||
case onoffTrue : return L"true";
|
||||
default : return L"false";
|
||||
}
|
||||
}
|
||||
std::wstring ToString2(EOnOffToString eType) const
|
||||
@ -544,39 +544,39 @@ namespace SimpleTypes
|
||||
{
|
||||
switch (this->m_eValue)
|
||||
{
|
||||
case onoffFalse: return _T("false");
|
||||
case onoffTrue: return _T("true");
|
||||
default: return _T("false");
|
||||
case onoffFalse: return L"false";
|
||||
case onoffTrue: return L"true";
|
||||
default: return L"false";
|
||||
}
|
||||
}
|
||||
else if (onofftostring1 == eType)
|
||||
{
|
||||
switch (this->m_eValue)
|
||||
{
|
||||
case onoffFalse: return _T("0");
|
||||
case onoffTrue: return _T("1");
|
||||
default: return _T("0");
|
||||
case onoffFalse: return L"0";
|
||||
case onoffTrue: return L"1";
|
||||
default: return L"0";
|
||||
}
|
||||
}
|
||||
else if (onofftostringOn == eType)
|
||||
{
|
||||
switch (this->m_eValue)
|
||||
{
|
||||
case onoffFalse: return _T("off");
|
||||
case onoffTrue: return _T("on");
|
||||
default: return _T("off");
|
||||
case onoffFalse: return L"off";
|
||||
case onoffTrue: return L"on";
|
||||
default: return L"off";
|
||||
}
|
||||
}
|
||||
else if (onofftostringT == eType)
|
||||
{
|
||||
switch (this->m_eValue)
|
||||
{
|
||||
case onoffFalse: return _T("f");
|
||||
case onoffTrue: return _T("t");
|
||||
default: return _T("f");
|
||||
case onoffFalse: return L"f";
|
||||
case onoffTrue: return L"t";
|
||||
default: return L"f";
|
||||
}
|
||||
}
|
||||
return _T("false");
|
||||
return L"false";
|
||||
}
|
||||
std::wstring ToString3(EOnOffToString eType) const
|
||||
{
|
||||
@ -584,39 +584,39 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case onoffFalse : return _T("false");
|
||||
case onoffTrue : return _T("true");
|
||||
default : return _T("false");
|
||||
case onoffFalse : return L"false";
|
||||
case onoffTrue : return L"true";
|
||||
default : return L"false";
|
||||
}
|
||||
}
|
||||
else if(onofftostring1 == eType)
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case onoffFalse : return _T("0");
|
||||
case onoffTrue : return _T("1");
|
||||
default : return _T("0");
|
||||
case onoffFalse : return L"0";
|
||||
case onoffTrue : return L"1";
|
||||
default : return L"0";
|
||||
}
|
||||
}
|
||||
else if(onofftostringOn == eType)
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case onoffFalse : return _T("off");
|
||||
case onoffTrue : return _T("on");
|
||||
default : return _T("off");
|
||||
case onoffFalse : return L"off";
|
||||
case onoffTrue : return L"on";
|
||||
default : return L"off";
|
||||
}
|
||||
}
|
||||
else if(onofftostringT == eType)
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case onoffFalse : return _T("f");
|
||||
case onoffTrue : return _T("t");
|
||||
default : return _T("f");
|
||||
case onoffFalse : return L"f";
|
||||
case onoffTrue : return L"t";
|
||||
default : return L"f";
|
||||
}
|
||||
}
|
||||
return _T("false");
|
||||
return L"false";
|
||||
}
|
||||
bool ToBool()
|
||||
{
|
||||
@ -658,7 +658,7 @@ namespace SimpleTypes
|
||||
m_sValue = sValue;
|
||||
for ( size_t nIndex = 0; nIndex < 20 - sValue.length(); nIndex++ )
|
||||
{
|
||||
m_sValue += _T("0");
|
||||
m_sValue += L"0";
|
||||
}
|
||||
}
|
||||
else if ( 20 == sValue.length() )
|
||||
@ -826,9 +826,9 @@ namespace SimpleTypes
|
||||
|
||||
virtual EVerticalAlignRun FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("baseline") == sValue ) this->m_eValue = verticalalignrunBaseline;
|
||||
else if ( _T("subscript") == sValue ) this->m_eValue = verticalalignrunSubscript;
|
||||
else if ( _T("superscript") == sValue ) this->m_eValue = verticalalignrunSuperscript;
|
||||
if ( L"baseline" == sValue ) this->m_eValue = verticalalignrunBaseline;
|
||||
else if ( L"subscript" == sValue ) this->m_eValue = verticalalignrunSubscript;
|
||||
else if ( L"superscript" == sValue ) this->m_eValue = verticalalignrunSuperscript;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
@ -838,10 +838,10 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case verticalalignrunBaseline : return _T("baseline");
|
||||
case verticalalignrunSubscript : return _T("subscript");
|
||||
case verticalalignrunSuperscript : return _T("superscript");
|
||||
default : return _T("baseline");
|
||||
case verticalalignrunBaseline : return L"baseline";
|
||||
case verticalalignrunSubscript : return L"subscript";
|
||||
case verticalalignrunSuperscript : return L"superscript";
|
||||
default : return L"baseline";
|
||||
}
|
||||
}
|
||||
|
||||
@ -871,12 +871,12 @@ namespace SimpleTypes
|
||||
|
||||
virtual EXAlign FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("center") == sValue ) this->m_eValue = xalignCenter;
|
||||
else if ( _T("inside") == sValue ) this->m_eValue = xalignInside;
|
||||
else if ( _T("left") == sValue ) this->m_eValue = xalignLeft;
|
||||
else if ( _T("outside") == sValue ) this->m_eValue = xalignOutside;
|
||||
else if ( _T("right") == sValue ) this->m_eValue = xalignRight;
|
||||
else this->m_eValue = eDefValue;
|
||||
if ( L"center" == sValue ) this->m_eValue = xalignCenter;
|
||||
else if ( L"inside" == sValue ) this->m_eValue = xalignInside;
|
||||
else if ( L"left" == sValue ) this->m_eValue = xalignLeft;
|
||||
else if ( L"outside" == sValue ) this->m_eValue = xalignOutside;
|
||||
else if ( L"right" == sValue ) this->m_eValue = xalignRight;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
}
|
||||
@ -885,12 +885,12 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case xalignCenter : return _T("center");
|
||||
case xalignInside : return _T("inside");
|
||||
case xalignLeft : return _T("left");
|
||||
case xalignOutside : return _T("outside");
|
||||
case xalignRight : return _T("right");
|
||||
default : return _T("left");
|
||||
case xalignCenter : return L"center";
|
||||
case xalignInside : return L"inside";
|
||||
case xalignLeft : return L"left";
|
||||
case xalignOutside : return L"outside";
|
||||
case xalignRight : return L"right";
|
||||
default : return L"left";
|
||||
}
|
||||
}
|
||||
|
||||
@ -923,14 +923,14 @@ namespace SimpleTypes
|
||||
|
||||
virtual EYAlign FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("bottom") == sValue ) this->m_eValue = yalignBottom;
|
||||
else if ( _T("bot") == sValue ) this->m_eValue = yalignBottom;
|
||||
else if ( _T("center") == sValue ) this->m_eValue = yalignCenter;
|
||||
else if ( _T("inline") == sValue ) this->m_eValue = yalignInline;
|
||||
else if ( _T("inside") == sValue ) this->m_eValue = yalignInside;
|
||||
else if ( _T("outside") == sValue ) this->m_eValue = yalignOutside;
|
||||
else if ( _T("top") == sValue ) this->m_eValue = yalignTop;
|
||||
else this->m_eValue = eDefValue;
|
||||
if ( L"bottom" == sValue ) this->m_eValue = yalignBottom;
|
||||
else if ( L"bot" == sValue ) this->m_eValue = yalignBottom;
|
||||
else if ( L"center" == sValue ) this->m_eValue = yalignCenter;
|
||||
else if ( L"inline" == sValue ) this->m_eValue = yalignInline;
|
||||
else if ( L"inside" == sValue ) this->m_eValue = yalignInside;
|
||||
else if ( L"outside" == sValue ) this->m_eValue = yalignOutside;
|
||||
else if ( L"top" == sValue ) this->m_eValue = yalignTop;
|
||||
else this->m_eValue = eDefValue;
|
||||
|
||||
return this->m_eValue;
|
||||
}
|
||||
@ -939,13 +939,13 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case yalignBottom : return _T("bottom");
|
||||
case yalignCenter : return _T("center");
|
||||
case yalignInline : return _T("inline");
|
||||
case yalignInside : return _T("inside");
|
||||
case yalignOutside : return _T("outside");
|
||||
case yalignTop : return _T("top");
|
||||
default : return _T("top");
|
||||
case yalignBottom : return L"bottom";
|
||||
case yalignCenter : return L"center";
|
||||
case yalignInline : return L"inline";
|
||||
case yalignInside : return L"inside";
|
||||
case yalignOutside : return L"outside";
|
||||
case yalignTop : return L"top";
|
||||
default : return L"top";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1180,22 +1180,22 @@ namespace SimpleTypes
|
||||
}
|
||||
void ByColorName(std::wstring& sValue)
|
||||
{
|
||||
if (sValue.find(_T("aqua")) >= 0)this->m_eValue = colortypeAqua;
|
||||
else if (sValue.find(_T("black")) >= 0)this->m_eValue = colortypeBlack;
|
||||
else if (sValue.find(_T("blue")) >= 0)this->m_eValue = colortypeBlue;
|
||||
else if (sValue.find(_T("fuchsia")) >= 0)this->m_eValue = colortypeFuchsia;
|
||||
else if (sValue.find(_T("gray")) >= 0)this->m_eValue = colortypeGray;
|
||||
else if (sValue.find(_T("green")) >= 0)this->m_eValue = colortypeGreen;
|
||||
else if (sValue.find(_T("lime")) >= 0)this->m_eValue = colortypeLime;
|
||||
else if (sValue.find(_T("maroon")) >= 0)this->m_eValue = colortypeMaroon;
|
||||
else if (sValue.find(_T("navy")) >= 0)this->m_eValue = colortypeNavy;
|
||||
else if (sValue.find(_T("olive")) >= 0)this->m_eValue = colortypeOlive;
|
||||
else if (sValue.find(_T("purple")) >= 0)this->m_eValue = colortypePurple;
|
||||
else if (sValue.find(_T("red")) >= 0)this->m_eValue = colortypeRed;
|
||||
else if (sValue.find(_T("silver")) >= 0)this->m_eValue = colortypeSilver;
|
||||
else if (sValue.find(_T("teal")) >= 0)this->m_eValue = colortypeTeal;
|
||||
else if (sValue.find(_T("white")) >= 0)this->m_eValue = colortypeWhite;
|
||||
else if (sValue.find(_T("yellow")) >= 0)this->m_eValue = colortypeYellow;
|
||||
if (std::wstring::npos != sValue.find(L"aqua")) this->m_eValue = colortypeAqua;
|
||||
else if (std::wstring::npos != sValue.find(L"black")) this->m_eValue = colortypeBlack;
|
||||
else if (std::wstring::npos != sValue.find(L"blue")) this->m_eValue = colortypeBlue;
|
||||
else if (std::wstring::npos != sValue.find(L"fuchsia")) this->m_eValue = colortypeFuchsia;
|
||||
else if (std::wstring::npos != sValue.find(L"gray")) this->m_eValue = colortypeGray;
|
||||
else if (std::wstring::npos != sValue.find(L"green")) this->m_eValue = colortypeGreen;
|
||||
else if (std::wstring::npos != sValue.find(L"lime")) this->m_eValue = colortypeLime;
|
||||
else if (std::wstring::npos != sValue.find(L"maroon")) this->m_eValue = colortypeMaroon;
|
||||
else if (std::wstring::npos != sValue.find(L"navy")) this->m_eValue = colortypeNavy;
|
||||
else if (std::wstring::npos != sValue.find(L"olive")) this->m_eValue = colortypeOlive;
|
||||
else if (std::wstring::npos != sValue.find(L"purple")) this->m_eValue = colortypePurple;
|
||||
else if (std::wstring::npos != sValue.find(L"red")) this->m_eValue = colortypeRed;
|
||||
else if (std::wstring::npos != sValue.find(L"silver")) this->m_eValue = colortypeSilver;
|
||||
else if (std::wstring::npos != sValue.find(L"teal")) this->m_eValue = colortypeTeal;
|
||||
else if (std::wstring::npos != sValue.find(L"white")) this->m_eValue = colortypeWhite;
|
||||
else if (std::wstring::npos != sValue.find(L"yellow")) this->m_eValue = colortypeYellow;
|
||||
else this->m_eValue = colortypeNone;
|
||||
|
||||
SetRGB();
|
||||
@ -1227,14 +1227,14 @@ namespace SimpleTypes
|
||||
|
||||
virtual ETrueFalse FromString(std::wstring &sValue)
|
||||
{
|
||||
if ( _T("t") == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( _T("true") == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( _T("True") == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( _T("") == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( _T("f") == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( _T("false") == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( _T("False") == sValue ) this->m_eValue = booleanFalse;
|
||||
else this->m_eValue = booleanFalse;
|
||||
if ( L"t" == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( L"true" == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( L"True" == sValue ) this->m_eValue = booleanTrue;
|
||||
else if ( L"" == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( L"f" == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( L"false" == sValue ) this->m_eValue = booleanFalse;
|
||||
else if ( L"False" == sValue ) this->m_eValue = booleanFalse;
|
||||
else this->m_eValue = booleanFalse;
|
||||
|
||||
return this->m_eValue;
|
||||
}
|
||||
@ -1243,9 +1243,9 @@ namespace SimpleTypes
|
||||
{
|
||||
switch(this->m_eValue)
|
||||
{
|
||||
case booleanFalse : return _T("f");
|
||||
case booleanTrue : return _T("t");
|
||||
default : return _T("f");
|
||||
case booleanFalse : return L"f";
|
||||
case booleanTrue : return L"t";
|
||||
default : return L"f";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2889,26 +2889,35 @@ namespace SimpleTypes
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
if ( -1 == nPos )
|
||||
return 0;
|
||||
|
||||
std::wstring strX = sValue.substr( 0, nPos );
|
||||
{//only x position
|
||||
std::wstring strX = sValue;
|
||||
XmlUtils::replace_all(strX, L"@", L"");
|
||||
|
||||
m_nX = strX.empty() ? 0 : _wtoi(strX.c_str() );
|
||||
m_nX = strX.empty() ? 0 : _wtoi(strX.c_str() );
|
||||
return 0;
|
||||
}
|
||||
std::wstring strX = sValue.substr( 0, nPos );
|
||||
XmlUtils::replace_all(strX, L"@", L"");
|
||||
|
||||
m_nX = strX.empty() ? 0 : _wtoi(strX.c_str() );
|
||||
|
||||
int nPos2 = (int)sValue.find( _T(","), nPos + 1 );
|
||||
if ( -1 == nPos2 )
|
||||
return 0;
|
||||
|
||||
std::wstring strY = sValue.substr( nPos + 1, nPos2 - nPos - 1);
|
||||
std::wstring strZ = sValue.substr( nPos2 + 1, nLen - nPos2 - 1 ) ;
|
||||
|
||||
{// only x, y position
|
||||
std::wstring strY = sValue.substr( nPos + 1);
|
||||
XmlUtils::replace_all(strY, L"@", L"");
|
||||
XmlUtils::replace_all(strZ, L"@", L"");
|
||||
m_nY = strY.empty() ? 0 : _wtoi(strY.c_str() );
|
||||
return 0;
|
||||
}
|
||||
|
||||
m_nY = strY.empty() ? 0 : _wtoi(strY.c_str() );
|
||||
m_nZ = strZ.empty() ? 0 : _wtoi(strZ.c_str() );
|
||||
std::wstring strY = sValue.substr( nPos + 1, nPos2 - nPos - 1);
|
||||
std::wstring strZ = sValue.substr( nPos2 + 1, nLen - nPos2 - 1 ) ;
|
||||
|
||||
XmlUtils::replace_all(strY, L"@", L"");
|
||||
XmlUtils::replace_all(strZ, L"@", L"");
|
||||
|
||||
m_nY = strY.empty() ? 0 : _wtoi(strY.c_str() );
|
||||
m_nZ = strZ.empty() ? 0 : _wtoi(strZ.c_str() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -2964,24 +2973,22 @@ namespace SimpleTypes
|
||||
return 0;
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
|
||||
|
||||
std::wstring strX, strY;
|
||||
if ( -1 == nPos )
|
||||
{
|
||||
//only x coord
|
||||
XmlUtils::replace_all(sValue, L"@", L"");
|
||||
m_nX = sValue.empty() ? 0 : _wtoi(sValue.c_str() );
|
||||
{//only x coord
|
||||
strX = sValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring strX = sValue.substr( 0, nPos );
|
||||
std::wstring strY = sValue.substr( nPos + 1, nLen - nPos - 1 ) ;
|
||||
|
||||
XmlUtils::replace_all(strY, L"@", L"");
|
||||
XmlUtils::replace_all(strX, L"@", L"");
|
||||
|
||||
m_nX = strX.empty() ? 0 : _wtoi(strX.c_str() );
|
||||
m_nY = strY.empty() ? 0 : _wtoi(strY.c_str() );
|
||||
strX = sValue.substr( 0, nPos );
|
||||
strY = sValue.substr( nPos + 1, nLen - nPos - 1 ) ;
|
||||
}
|
||||
XmlUtils::replace_all(strY, L"@", L"");
|
||||
XmlUtils::replace_all(strX, L"@", L"");
|
||||
|
||||
m_nX = strX.empty() ? 0 : _wtoi(strX.c_str() );
|
||||
m_nY = strY.empty() ? 0 : _wtoi(strY.c_str() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3036,14 +3043,20 @@ namespace SimpleTypes
|
||||
return 0;
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
|
||||
std::wstring strX, strY;
|
||||
if ( -1 == nPos )
|
||||
return 0;
|
||||
{
|
||||
strX = sValue.substr( 0, nPos );
|
||||
}
|
||||
else
|
||||
{
|
||||
strX = sValue.substr( 0, nPos );
|
||||
strY = sValue.substr( nPos + 1, nLen - nPos - 1 ) ;
|
||||
}
|
||||
|
||||
std::wstring strX = sValue.substr( 0, nPos );
|
||||
std::wstring strY = sValue.substr( nPos + 1, nLen - nPos - 1 ) ;
|
||||
|
||||
m_dX = strX.empty() ? 0 : _wtof(strX.c_str() );
|
||||
m_dY = strY.empty() ? 0 : _wtof(strY.c_str() );
|
||||
m_dX = strX.empty() ? 0 : _wtof(strX.c_str() );
|
||||
m_dY = strY.empty() ? 0 : _wtof(strY.c_str() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3188,62 +3201,62 @@ namespace SimpleTypes
|
||||
|
||||
enum ECssPropertyType
|
||||
{
|
||||
cssptUnknown = 0000,
|
||||
cssptUnknown = 0000,
|
||||
|
||||
cssptFlip = 1000,
|
||||
cssptHeight = 1001,
|
||||
cssptLeft = 1002,
|
||||
cssptMarginBottom = 1003,
|
||||
cssptMarginLeft = 1004,
|
||||
cssptMarginRight = 1005,
|
||||
cssptMarginTop = 1006,
|
||||
cssptFlip = 1000,
|
||||
cssptHeight = 1001,
|
||||
cssptLeft = 1002,
|
||||
cssptMarginBottom = 1003,
|
||||
cssptMarginLeft = 1004,
|
||||
cssptMarginRight = 1005,
|
||||
cssptMarginTop = 1006,
|
||||
cssptMsoPositionHorizontal = 1007,
|
||||
cssptMsoPositionHorizontalRelative = 1008,
|
||||
cssptMsoPositionVertical = 1009,
|
||||
cssptMsoPositionVerticalRelative = 1010,
|
||||
cssptMsoWrapDistanceBottom = 1011,
|
||||
cssptMsoWrapDistanceLeft = 1012,
|
||||
cssptMsoWrapDistanceRight = 1013,
|
||||
cssptMsoWrapDistanceTop = 1014,
|
||||
cssptMsoWrapEdited = 1015,
|
||||
cssptMsoWrapStyle = 1016,
|
||||
cssptPosition = 1017,
|
||||
cssptRotation = 1018,
|
||||
cssptTop = 1019,
|
||||
cssptVisibility = 1020,
|
||||
cssptWidth = 1021,
|
||||
cssptMsoPositionHorizontalRelative = 1008,
|
||||
cssptMsoPositionVertical = 1009,
|
||||
cssptMsoPositionVerticalRelative = 1010,
|
||||
cssptMsoWrapDistanceBottom = 1011,
|
||||
cssptMsoWrapDistanceLeft = 1012,
|
||||
cssptMsoWrapDistanceRight = 1013,
|
||||
cssptMsoWrapDistanceTop = 1014,
|
||||
cssptMsoWrapEdited = 1015,
|
||||
cssptMsoWrapStyle = 1016,
|
||||
cssptPosition = 1017,
|
||||
cssptRotation = 1018,
|
||||
cssptTop = 1019,
|
||||
cssptVisibility = 1020,
|
||||
cssptWidth = 1021,
|
||||
cssptZIndex = 1022,
|
||||
csspctMsoWidthPercent = 1023,
|
||||
csspctMsoHeightPercent = 1024,
|
||||
csspctMsoWidthPercent = 1023,
|
||||
csspctMsoHeightPercent = 1024,
|
||||
|
||||
// Для элемента Textbox 14.1.2.22
|
||||
cssptDirection = 1100,
|
||||
cssptLayoutFlow = 1101,
|
||||
cssptMsoDirectionAlt = 1102,
|
||||
cssptMsoFitShapeToText = 1103,
|
||||
cssptMsoFitTextToShape = 1104,
|
||||
cssptMsoLayoutFlowAlt = 1105,
|
||||
cssptMsoNextTextbox = 1106,
|
||||
cssptMsoRotate = 1107,
|
||||
cssptMsoTextScale = 1108,
|
||||
cssptVTextAnchor = 1109,
|
||||
cssptDirection = 1100,
|
||||
cssptLayoutFlow = 1101,
|
||||
cssptMsoDirectionAlt = 1102,
|
||||
cssptMsoFitShapeToText = 1103,
|
||||
cssptMsoFitTextToShape = 1104,
|
||||
cssptMsoLayoutFlowAlt = 1105,
|
||||
cssptMsoNextTextbox = 1106,
|
||||
cssptMsoRotate = 1107,
|
||||
cssptMsoTextScale = 1108,
|
||||
cssptVTextAnchor = 1109,
|
||||
|
||||
// Для элемента Textpath 14.1.2.23
|
||||
cssptFont = 1200,
|
||||
cssptFontFamily = 1201,
|
||||
cssptFontSize = 1202,
|
||||
cssptFontStyle = 1203,
|
||||
cssptFontVariant = 1204,
|
||||
cssptFontWeight = 1205,
|
||||
cssptMsoTextShadow = 1206,
|
||||
cssptTextDecoration = 1207,
|
||||
cssptVRotateLetters = 1208,
|
||||
cssptVSameLetterHeights = 1209,
|
||||
cssptVTextAlign = 1210,
|
||||
cssptVTextKern = 1211,
|
||||
cssptVTextReverse = 1212,
|
||||
cssptVTextSpacingMode = 1213,
|
||||
cssptVTextSpacing = 1214,
|
||||
cssptFont = 1200,
|
||||
cssptFontFamily = 1201,
|
||||
cssptFontSize = 1202,
|
||||
cssptFontStyle = 1203,
|
||||
cssptFontVariant = 1204,
|
||||
cssptFontWeight = 1205,
|
||||
cssptMsoTextShadow = 1206,
|
||||
cssptTextDecoration = 1207,
|
||||
cssptVRotateLetters = 1208,
|
||||
cssptVSameLetterHeights = 1209,
|
||||
cssptVTextAlign = 1210,
|
||||
cssptVTextKern = 1211,
|
||||
cssptVTextReverse = 1212,
|
||||
cssptVTextSpacingMode = 1213,
|
||||
cssptVTextSpacing = 1214,
|
||||
};
|
||||
|
||||
enum ECssFlip
|
||||
@ -3334,10 +3347,10 @@ namespace SimpleTypes
|
||||
};
|
||||
enum ECssLayoutFlow
|
||||
{
|
||||
csslayoutflowHorizontal = 0,
|
||||
csslayoutflowVertical = 1,
|
||||
csslayoutflowVerticalIdeographic = 2,
|
||||
csslayoutflowHorizontalIdeographic = 3,
|
||||
csslayoutflowHorizontal = 0,
|
||||
csslayoutflowVertical = 1,
|
||||
csslayoutflowVerticalIdeographic = 2,
|
||||
csslayoutflowHorizontalIdeographic = 3,
|
||||
};
|
||||
enum ECssDirectionAlt
|
||||
{
|
||||
@ -3421,23 +3434,23 @@ namespace SimpleTypes
|
||||
|
||||
union UCssValue
|
||||
{
|
||||
ECssFlip eFlip;
|
||||
TCssUnitsValue oValue;
|
||||
ECssMsoPosHor eMsoPosHor;
|
||||
ECssMsoPosHorRel eMsoPosHorRel;
|
||||
ECssMsoPosVer eMsoPosVer;
|
||||
ECssMsoPosVerRel eMsoPosVerRel;
|
||||
double dValue;
|
||||
bool bValue;
|
||||
ECssMsoWrapStyle eMsoWrapStyle;
|
||||
ECssPosition ePosition;
|
||||
ECssVisibility eVisibility;
|
||||
TCssZIndexValue oZIndex;
|
||||
ECssDirection eDirection;
|
||||
ECssLayoutFlow eLayoutFlow;
|
||||
ECssDirectionAlt eDirectionAlt;
|
||||
ECssLayoutFlowAlt eLayoutFlowAlt;
|
||||
wchar_t wsValue[CSS_MAX_NAME_LEN + 1];
|
||||
ECssFlip eFlip;
|
||||
TCssUnitsValue oValue;
|
||||
ECssMsoPosHor eMsoPosHor;
|
||||
ECssMsoPosHorRel eMsoPosHorRel;
|
||||
ECssMsoPosVer eMsoPosVer;
|
||||
ECssMsoPosVerRel eMsoPosVerRel;
|
||||
double dValue;
|
||||
bool bValue;
|
||||
ECssMsoWrapStyle eMsoWrapStyle;
|
||||
ECssPosition ePosition;
|
||||
ECssVisibility eVisibility;
|
||||
TCssZIndexValue oZIndex;
|
||||
ECssDirection eDirection;
|
||||
ECssLayoutFlow eLayoutFlow;
|
||||
ECssDirectionAlt eDirectionAlt;
|
||||
ECssLayoutFlowAlt eLayoutFlowAlt;
|
||||
wchar_t wsValue[CSS_MAX_NAME_LEN + 1];
|
||||
ECssMsoRotate eRotate;
|
||||
ECssVTextAnchor eVTextAnchor;
|
||||
ECssFontStyle eFontStyle;
|
||||
@ -4176,12 +4189,16 @@ namespace SimpleTypes
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
if ( -1 == nPos )
|
||||
{//only x position
|
||||
SimpleTypes::CPoint oPt1 = sValue;
|
||||
m_dX = oPt1.GetValue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SimpleTypes::CPoint oPt1 = sValue.substr( 0, nPos );
|
||||
SimpleTypes::CPoint oPt1 = sValue.substr( 0, nPos );
|
||||
m_dX = oPt1.GetValue();
|
||||
|
||||
SimpleTypes::CPoint oPt2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
SimpleTypes::CPoint oPt2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
m_dY = oPt2.GetValue();
|
||||
|
||||
return 0;
|
||||
@ -4238,12 +4255,16 @@ namespace SimpleTypes
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
if ( -1 == nPos )
|
||||
{//only x position
|
||||
SimpleTypes::CPercentage oPerc1 = sValue;
|
||||
m_dX = oPerc1.GetValue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SimpleTypes::CPercentage oPerc1 = sValue.substr( 0, nPos );
|
||||
SimpleTypes::CPercentage oPerc1 = sValue.substr( 0, nPos );
|
||||
m_dX = oPerc1.GetValue();
|
||||
|
||||
SimpleTypes::CPercentage oPerc2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
SimpleTypes::CPercentage oPerc2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
m_dY = oPerc2.GetValue();
|
||||
|
||||
return 0;
|
||||
@ -4300,12 +4321,16 @@ namespace SimpleTypes
|
||||
|
||||
int nPos = (int)sValue.find( _T(",") );
|
||||
if ( -1 == nPos )
|
||||
{//only x position
|
||||
SimpleTypes::Vml::CVml_1_65536 oFraction1 = sValue;
|
||||
m_dX = oFraction1.GetValue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SimpleTypes::Vml::CVml_1_65536 oFraction1 = sValue.substr( 0, nPos );
|
||||
SimpleTypes::Vml::CVml_1_65536 oFraction1 = sValue.substr( 0, nPos );
|
||||
m_dX = oFraction1.GetValue();
|
||||
|
||||
SimpleTypes::Vml::CVml_1_65536 oFraction2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
SimpleTypes::Vml::CVml_1_65536 oFraction2 = sValue.substr( nPos + 1, nLen - nPos - 1 );
|
||||
m_dY = oFraction2.GetValue();
|
||||
|
||||
return 0;
|
||||
|
||||
@ -643,7 +643,7 @@ namespace OOX
|
||||
nullable<OOX::Logic::CBackground > m_oBackground;
|
||||
|
||||
std::vector<WritingElement *> m_arrItems;
|
||||
std::vector<std::wstring> m_arrShapeTypes;
|
||||
std::vector<std::wstring> m_arrShapeTypes;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -53,7 +53,8 @@ namespace OOX
|
||||
|
||||
FileType(const WCHAR* defaultDirectory, const WCHAR* defaultFileName,
|
||||
const std::wstring& overrideType,
|
||||
const std::wstring& relationType, bool bEnumerated = false, bool bEnumeratedGlobal = false ) : m_defaultDirectory(defaultDirectory),
|
||||
const std::wstring& relationType, bool bEnumerated = false, bool bEnumeratedGlobal = false )
|
||||
: m_defaultDirectory(defaultDirectory),
|
||||
m_defaultFileName(defaultFileName),
|
||||
m_overrideType(overrideType),
|
||||
m_relationType(relationType),
|
||||
|
||||
@ -60,77 +60,77 @@ namespace OOX
|
||||
|
||||
virtual ~CVmlCommonElements(){}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes (oReader);
|
||||
ReadElements (oReader);
|
||||
}
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_v_shape_elements;
|
||||
}
|
||||
|
||||
// 1 AG_AllCoreAttributes
|
||||
// 1.1 AG_CoreAttributes
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<std::wstring> m_sTarget;
|
||||
nullable<std::wstring> m_sClass;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
nullable<std::wstring> m_sAlt;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordSize;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordOrigin;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oWrapCoords;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oPrint;
|
||||
// 1.2 AG_OfficeCoreAttributes
|
||||
nullable<std::wstring> m_sSpId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOned;
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oRegroupId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oDoubleClickNotify;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oButton;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserHidden;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBullet;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHr;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrStd;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrNoShade;
|
||||
SimpleTypes::CDouble m_oHrPct;
|
||||
SimpleTypes::CHrAlign<SimpleTypes::hralignLeft> m_oHrAlign;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oAllowInCell;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oAllowOverlap;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserDrawn;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderTopColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderLeftColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderBottomColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderRightColor;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayout;
|
||||
nullable<std::wstring> m_oDgmNodeKind;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayoutMru;
|
||||
SimpleTypes::CInsetMode<SimpleTypes::insetmodeAuto> m_oInsetMode;
|
||||
// 2 AG_AllShapeAttributes
|
||||
// 2.1 AG_ShapeAttributes
|
||||
nullable<SimpleTypes::CColorType<>> m_oChromaKey;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFilled;
|
||||
nullable<SimpleTypes::CColorType<>> m_oFillColor;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oOpacity;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oStroked;
|
||||
nullable<SimpleTypes::CColorType<>> m_oStrokeColor;
|
||||
nullable<SimpleTypes::CEmu> m_oStrokeWeight;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oInsetPen;
|
||||
// 2.2 AG_OfficeShapeAttributes
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oSpt;
|
||||
nullable<SimpleTypes::CConnectorType<>> m_oConnectorType;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwMode;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwPure;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwNormal;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oForceDash;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOleIcon;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOle;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oPreferRelative;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oClipToWrap;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oClip;
|
||||
// 1 AG_AllCoreAttributes
|
||||
// 1.1 AG_CoreAttributes
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<std::wstring> m_sTarget;
|
||||
nullable<std::wstring> m_sClass;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
nullable<std::wstring> m_sAlt;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordSize;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordOrigin;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oWrapCoords;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oPrint;
|
||||
// 1.2 AG_OfficeCoreAttributes
|
||||
nullable<std::wstring> m_sSpId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOned;
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oRegroupId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oDoubleClickNotify;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oButton;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserHidden;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBullet;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHr;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrStd;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrNoShade;
|
||||
SimpleTypes::CDouble m_oHrPct;
|
||||
SimpleTypes::CHrAlign<SimpleTypes::hralignLeft> m_oHrAlign;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oAllowInCell;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oAllowOverlap;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserDrawn;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderTopColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderLeftColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderBottomColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderRightColor;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayout;
|
||||
nullable<std::wstring> m_oDgmNodeKind;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayoutMru;
|
||||
SimpleTypes::CInsetMode<SimpleTypes::insetmodeAuto> m_oInsetMode;
|
||||
// 2 AG_AllShapeAttributes
|
||||
// 2.1 AG_ShapeAttributes
|
||||
nullable<SimpleTypes::CColorType<>> m_oChromaKey;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFilled;
|
||||
nullable<SimpleTypes::CColorType<>> m_oFillColor;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oOpacity;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oStroked;
|
||||
nullable<SimpleTypes::CColorType<>> m_oStrokeColor;
|
||||
nullable<SimpleTypes::CEmu> m_oStrokeWeight;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oInsetPen;
|
||||
// 2.2 AG_OfficeShapeAttributes
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oSpt;
|
||||
nullable<SimpleTypes::CConnectorType<>> m_oConnectorType;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwMode;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwPure;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwNormal;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oForceDash;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOleIcon;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOle;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oPreferRelative;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oClipToWrap;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oClip;
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
void ReadElements(XmlUtils::CXmlLiteReader& oReader) ;
|
||||
@ -150,18 +150,18 @@ namespace OOX
|
||||
virtual ~CArc(){}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CArc::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:arc ");
|
||||
|
||||
@ -233,17 +233,17 @@ namespace OOX
|
||||
virtual ~CCurve(){}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CCurve::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:curve ");
|
||||
|
||||
@ -404,11 +404,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CFill::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -597,7 +597,7 @@ namespace OOX
|
||||
|
||||
// Attributes
|
||||
nullable<SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue>> m_oAlignShape;
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oAngle;
|
||||
nullable<SimpleTypes::CImageAspect<SimpleTypes::imageaspectIgnore>> m_oAspect;
|
||||
nullable<SimpleTypes::CColorType<>> m_oColor;
|
||||
@ -607,9 +607,9 @@ namespace OOX
|
||||
nullable<SimpleTypes::CFixedPercentage > m_oFocus;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D_Percentage> m_oFocusPosition;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D_Percentage> m_oFocusSize;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<SimpleTypes::CRelationshipId> m_rId;
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::CFillMethod<SimpleTypes::fillmethodSigma>> m_oMethod;
|
||||
nullable<SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue>> m_oOn;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oOpacity;
|
||||
@ -620,8 +620,8 @@ namespace OOX
|
||||
nullable<SimpleTypes::CRelationshipId> m_oRelId;
|
||||
nullable<SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse>> m_oRotate;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D_Units> m_oSize;
|
||||
nullable<std::wstring> m_sSrc;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
nullable<std::wstring> m_sSrc;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
SimpleTypes::CFillType<SimpleTypes::filltypeSolid, 0> m_oType;
|
||||
|
||||
// Childs
|
||||
@ -631,7 +631,7 @@ namespace OOX
|
||||
//--------------------------------------------------------------------------------
|
||||
// CBackground 14.1.2.2 (Part4)
|
||||
//--------------------------------------------------------------------------------
|
||||
class CBackground : public WritingElement
|
||||
class CBackground : public CVmlCommonElements
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CBackground)
|
||||
@ -644,35 +644,24 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CBackground::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while ( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
if ( _T("v:fill") == sName )
|
||||
m_oFill = oReader;
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:background ");
|
||||
|
||||
ComplexTypes_WriteAttribute2( _T("id=\""), m_sId );
|
||||
|
||||
if ( SimpleTypes::booleanTrue != m_oFilled.GetValue() )
|
||||
sResult += _T("filled=\"false\" ");
|
||||
|
||||
ComplexTypes_WriteAttribute ( _T("fillcolor=\""), m_oFillColor );
|
||||
sResult += CVmlCommonElements::WriteAttributes();
|
||||
|
||||
ComplexTypes_WriteAttribute ( _T("o:bwmode=\""), m_oBwMode );
|
||||
ComplexTypes_WriteAttribute ( _T("o:bwpure=\""), m_oBwPure );
|
||||
ComplexTypes_WriteAttribute ( _T("o:bwnormal=\""), m_oBwNormal );
|
||||
@ -680,8 +669,7 @@ namespace OOX
|
||||
|
||||
sResult += _T(">");
|
||||
|
||||
if ( m_oFill.IsInit() )
|
||||
sResult += m_oFill->toXML();
|
||||
sResult += CVmlCommonElements::WriteElements();
|
||||
|
||||
sResult += _T("</v:background>");
|
||||
|
||||
@ -709,15 +697,6 @@ namespace OOX
|
||||
wchar_t wsChar = wsName[0];
|
||||
switch ( wsChar )
|
||||
{
|
||||
case 'f':
|
||||
if ( _T("fillcolor") == wsName ) m_oFillColor = oReader.GetText();
|
||||
else if ( _T("filled") == wsName ) m_oFilled = oReader.GetText();
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
if ( _T("id") == wsName ) m_sId = oReader.GetText();
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
if ( _T("o:bwmode") == wsName ) m_oBwMode = oReader.GetText();
|
||||
else if ( _T("o:bwnormal") == wsName ) m_oBwNormal = oReader.GetText();
|
||||
@ -739,17 +718,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwMode;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwNormal;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwPure;
|
||||
nullable<SimpleTypes::CColorType<>> m_oFillColor;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oFilled;
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::CScreenSize<>> m_oTargetScreenSize;
|
||||
|
||||
// Childs
|
||||
nullable<OOX::Vml::CFill> m_oFill;
|
||||
// Attributes
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwMode;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwNormal;
|
||||
nullable<SimpleTypes::CBWMode<>> m_oBwPure;
|
||||
nullable<SimpleTypes::CScreenSize<>> m_oTargetScreenSize;
|
||||
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -768,11 +741,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CFormulas::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
@ -788,7 +761,7 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:formulas>");
|
||||
|
||||
@ -1029,17 +1002,17 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CImage::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:image ");
|
||||
|
||||
@ -1176,18 +1149,18 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CImageData::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:imagedata ");
|
||||
|
||||
@ -1343,16 +1316,16 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBiLevel;
|
||||
SimpleTypes::CDouble m_oBlackLevel;
|
||||
nullable<SimpleTypes::CColorType<>> m_oChromaKey;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropLeft;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropTop;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropRight;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropBottom;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oDetectMouseClick;
|
||||
nullable<SimpleTypes::CColorType<>> m_oEmbossColor;
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBiLevel;
|
||||
SimpleTypes::CDouble m_oBlackLevel;
|
||||
nullable<SimpleTypes::CColorType<>> m_oChromaKey;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropLeft;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropTop;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropRight;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oCropBottom;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oDetectMouseClick;
|
||||
nullable<SimpleTypes::CColorType<>> m_oEmbossColor;
|
||||
SimpleTypes::CDouble m_oGain;
|
||||
SimpleTypes::CDouble m_oGamma;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oGrayscale;
|
||||
@ -1379,17 +1352,17 @@ namespace OOX
|
||||
virtual ~CLine(){}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CLine::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:line ");
|
||||
|
||||
@ -1465,16 +1438,16 @@ namespace OOX
|
||||
virtual ~COval(){}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать COval::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:oval ");
|
||||
|
||||
@ -1510,18 +1483,18 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CPath::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:path ");
|
||||
|
||||
@ -1788,17 +1761,17 @@ namespace OOX
|
||||
virtual ~CRoundRect(){}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CRoundRect::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:roundrect ");
|
||||
|
||||
@ -1872,11 +1845,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CShadow::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -1987,17 +1960,17 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
SimpleTypes::CColorType<SimpleTypes::colortypeRGB> m_oColor;
|
||||
SimpleTypes::CColorType<SimpleTypes::colortypeRGB> m_oColor2;
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<SimpleTypes::Vml::CVml_Matrix> m_oMatrix;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oObscured;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage m_oOffset;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage m_oOffset2;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oOn;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oOpacity;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Percentage m_oOrigin;
|
||||
SimpleTypes::CShadowType<SimpleTypes::shadowtypeSingle> m_oType;
|
||||
SimpleTypes::CColorType<SimpleTypes::colortypeRGB> m_oColor;
|
||||
SimpleTypes::CColorType<SimpleTypes::colortypeRGB> m_oColor2;
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<SimpleTypes::Vml::CVml_Matrix> m_oMatrix;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oObscured;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage m_oOffset;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage m_oOffset2;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oOn;
|
||||
nullable<SimpleTypes::Vml::CVml_1_65536> m_oOpacity;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Percentage m_oOrigin;
|
||||
SimpleTypes::CShadowType<SimpleTypes::shadowtypeSingle> m_oType;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
// CShape 14.1.2.19 (Part4)
|
||||
@ -2011,14 +1984,14 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const;
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return OOX::et_v_shape;
|
||||
@ -2089,14 +2062,14 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode){}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadAttributes( oReader );
|
||||
CVmlCommonElements::ReadElements( oReader );
|
||||
}
|
||||
virtual std::wstring toXML() const;
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return OOX::et_v_shapetype;
|
||||
@ -2161,9 +2134,9 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return OOX::et_v_ClientData;
|
||||
@ -2197,13 +2170,13 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<SimpleTypes::Vml::CVmlClientDataObjectType<>> m_oObjectType;
|
||||
nullable<SimpleTypes::Vml::CVmlClientDataObjectType<>> m_oObjectType;
|
||||
|
||||
nullable<SimpleTypes::COnOff<SimpleTypes::onoffTrue>> m_oMoveWithCells;
|
||||
nullable<SimpleTypes::COnOff<SimpleTypes::onoffTrue>> m_oSizeWithCells;
|
||||
nullable<std::wstring> m_oAnchor;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oRow;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oColumn;
|
||||
nullable<SimpleTypes::COnOff<SimpleTypes::onoffTrue>> m_oMoveWithCells;
|
||||
nullable<SimpleTypes::COnOff<SimpleTypes::onoffTrue>> m_oSizeWithCells;
|
||||
nullable<std::wstring> m_oAnchor;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oRow;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oColumn;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
// CStroke 14.1.2.21 (Part4)
|
||||
@ -2221,11 +2194,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CStroke::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -2249,7 +2222,7 @@ namespace OOX
|
||||
m_oColumn = oReader;
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:stroke ");
|
||||
|
||||
@ -2440,35 +2413,35 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
nullable<SimpleTypes::CColorType<SimpleTypes::colortypeBlack>> m_oColor;
|
||||
nullable<SimpleTypes::CColorType<SimpleTypes::colortypeBlack>> m_oColor2;
|
||||
SimpleTypes::Vml::CVmlDashStyle<SimpleTypes::Vml::vmldashstyleSolid> m_oDahsStyle;
|
||||
SimpleTypes::CStrokeArrowType<SimpleTypes::strokearrowtypeNone> m_oEndArrow;
|
||||
SimpleTypes::CStrokeArrowLength<SimpleTypes::strokearrowlengthMedium> m_oEndArrowLength;
|
||||
SimpleTypes::CStrokeArrowWidth<SimpleTypes::strokearrowwidthMedium> m_oEndArrowWidth;
|
||||
SimpleTypes::CStrokeEndCap<SimpleTypes::strokeendcapFlat> m_oEndCap;
|
||||
SimpleTypes::CFillType<SimpleTypes::filltypeSolid, 0> m_oFillType;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oForceDash;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<SimpleTypes::CRelationshipId> m_rId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oImageAlignShape;
|
||||
SimpleTypes::CImageAspect<SimpleTypes::imageaspectIgnore> m_oImageAspect;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D_Units> m_oImageSize;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oInsetPen;
|
||||
SimpleTypes::CStrokeJoinStyle<SimpleTypes::strokejoinstyleRound> m_oJoinStyle;
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<std::wstring> m_sAltHref;
|
||||
nullable<SimpleTypes::CColorType<SimpleTypes::colortypeBlack>> m_oColor;
|
||||
nullable<SimpleTypes::CColorType<SimpleTypes::colortypeBlack>> m_oColor2;
|
||||
SimpleTypes::Vml::CVmlDashStyle<SimpleTypes::Vml::vmldashstyleSolid> m_oDahsStyle;
|
||||
SimpleTypes::CStrokeArrowType<SimpleTypes::strokearrowtypeNone> m_oEndArrow;
|
||||
SimpleTypes::CStrokeArrowLength<SimpleTypes::strokearrowlengthMedium> m_oEndArrowLength;
|
||||
SimpleTypes::CStrokeArrowWidth<SimpleTypes::strokearrowwidthMedium> m_oEndArrowWidth;
|
||||
SimpleTypes::CStrokeEndCap<SimpleTypes::strokeendcapFlat> m_oEndCap;
|
||||
SimpleTypes::CFillType<SimpleTypes::filltypeSolid, 0> m_oFillType;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oForceDash;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<SimpleTypes::CRelationshipId> m_rId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oImageAlignShape;
|
||||
SimpleTypes::CImageAspect<SimpleTypes::imageaspectIgnore> m_oImageAspect;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D_Units> m_oImageSize;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oInsetPen;
|
||||
SimpleTypes::CStrokeJoinStyle<SimpleTypes::strokejoinstyleRound> m_oJoinStyle;
|
||||
nullable<SimpleTypes::CStrokeLineStyle<SimpleTypes::strokelinestyleSingle>> m_oLineStyle;
|
||||
SimpleTypes::CDecimalNumber<8> m_oMiterLimit;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oOn;
|
||||
nullable<SimpleTypes::CDouble> m_oOpacity;
|
||||
nullable<SimpleTypes::CRelationshipId> m_oRelId;
|
||||
nullable<std::wstring> m_sSrc;
|
||||
SimpleTypes::CStrokeArrowType<SimpleTypes::strokearrowtypeNone> m_oStartArrow;
|
||||
SimpleTypes::CStrokeArrowLength<SimpleTypes::strokearrowlengthMedium> m_oStartArrowLength;
|
||||
SimpleTypes::CStrokeArrowWidth<SimpleTypes::strokearrowwidthMedium> m_oStartArrowWidth;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
SimpleTypes::CDouble m_oWeight;
|
||||
SimpleTypes::CDecimalNumber<8> m_oMiterLimit;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oOn;
|
||||
nullable<SimpleTypes::CDouble> m_oOpacity;
|
||||
nullable<SimpleTypes::CRelationshipId> m_oRelId;
|
||||
nullable<std::wstring> m_sSrc;
|
||||
SimpleTypes::CStrokeArrowType<SimpleTypes::strokearrowtypeNone> m_oStartArrow;
|
||||
SimpleTypes::CStrokeArrowLength<SimpleTypes::strokearrowlengthMedium> m_oStartArrowLength;
|
||||
SimpleTypes::CStrokeArrowWidth<SimpleTypes::strokearrowwidthMedium> m_oStartArrowWidth;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
SimpleTypes::CDouble m_oWeight;
|
||||
|
||||
// Childs
|
||||
nullable<OOX::VmlOffice::CStrokeChild> m_oLeft;
|
||||
@ -2494,11 +2467,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CTextbox::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -2612,11 +2585,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CTextPath::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -2625,7 +2598,7 @@ namespace OOX
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<v:textpath ");
|
||||
|
||||
@ -2707,16 +2680,16 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFitPath;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFitShape;
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oOn;
|
||||
nullable<std::wstring> m_sString;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oTrim;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oXScale;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFitPath;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oFitShape;
|
||||
nullable<std::wstring> m_oId;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oOn;
|
||||
nullable<std::wstring> m_sString;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oTrim;
|
||||
nullable<SimpleTypes::CTrueFalse<>> m_oXScale;
|
||||
|
||||
nullable<std::wstring> m_sStringOriginal;
|
||||
nullable<std::wstring> m_sStringOriginal;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
// CGroup 14.1.2.7 (Part4)
|
||||
@ -2731,9 +2704,9 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return OOX::et_v_group;
|
||||
@ -2865,51 +2838,49 @@ namespace OOX
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
||||
// Attributes
|
||||
|
||||
// AG_AllCoreAttributes
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<std::wstring> m_sTarget;
|
||||
nullable<std::wstring> m_sClass;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
nullable<std::wstring> m_sAlt;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordSize;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordOrigin;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oWrapCoords;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oPrint;
|
||||
nullable<std::wstring> m_sSpId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOned;
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oRegroupId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oDoubleClickNotify;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oButton;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserHidden;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBullet;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHr;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrStd;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrNoShade;
|
||||
SimpleTypes::CDouble m_oHrPct;
|
||||
SimpleTypes::CHrAlign<SimpleTypes::hralignLeft> m_oHrAlign;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oAllowInCell;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oAllowOverlap;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserDrawn;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderTopColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderLeftColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderBottomColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderRightColor;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayout;
|
||||
nullable<std::wstring> m_oDgmNodeKind;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayoutMru;
|
||||
SimpleTypes::CInsetMode<SimpleTypes::insetmodeCustom> m_oInsetMode;
|
||||
nullable<std::wstring> m_sId;
|
||||
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
|
||||
nullable<std::wstring> m_sHref;
|
||||
nullable<std::wstring> m_sTarget;
|
||||
nullable<std::wstring> m_sClass;
|
||||
nullable<std::wstring> m_sTitle;
|
||||
nullable<std::wstring> m_sAlt;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordSize;
|
||||
nullable<SimpleTypes::Vml::CVml_Vector2D> m_oCoordOrigin;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oWrapCoords;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oPrint;
|
||||
nullable<std::wstring> m_sSpId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oOned;
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_oRegroupId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oDoubleClickNotify;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oButton;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserHidden;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oBullet;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHr;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrStd;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oHrNoShade;
|
||||
SimpleTypes::CDouble m_oHrPct;
|
||||
SimpleTypes::CHrAlign<SimpleTypes::hralignLeft> m_oHrAlign;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oAllowInCell;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oAllowOverlap;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oUserDrawn;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderTopColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderLeftColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderBottomColor;
|
||||
nullable<SimpleTypes::CColorType<>> m_oBorderRightColor;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayout;
|
||||
nullable<std::wstring> m_oDgmNodeKind;
|
||||
nullable<SimpleTypes::CDiagramLayout<>> m_oDgmLayoutMru;
|
||||
SimpleTypes::CInsetMode<SimpleTypes::insetmodeCustom> m_oInsetMode;
|
||||
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oFilled;
|
||||
nullable<SimpleTypes::CColorType<>> m_oFillColor;
|
||||
nullable<SimpleTypes::CEditAs<>> m_oEditAs;
|
||||
nullable<SimpleTypes::Vml::CVml_TableLimits> m_oTableLimits;
|
||||
SimpleTypes::Vml::CVml_TableProperties<0> m_oTableProperties;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oFilled;
|
||||
nullable<SimpleTypes::CColorType<>> m_oFillColor;
|
||||
nullable<SimpleTypes::CEditAs<>> m_oEditAs;
|
||||
nullable<SimpleTypes::Vml::CVml_TableLimits> m_oTableLimits;
|
||||
SimpleTypes::Vml::CVml_TableProperties<0> m_oTableProperties;
|
||||
};
|
||||
} // namespace Vml
|
||||
} // namespace OOX
|
||||
@ -2934,11 +2905,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать CShapeDefaults::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -2971,7 +2942,7 @@ namespace OOX
|
||||
m_oColorMenu = oReader;
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<o:shapedefaults ");
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ namespace NSFontConverter
|
||||
// BE = big endian
|
||||
int GetS8 (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos >= m_nLen )
|
||||
{
|
||||
@ -111,7 +111,7 @@ namespace NSFontConverter
|
||||
|
||||
int GetU8 (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
if ( nPos < 0 || nPos >= m_nLen )
|
||||
{
|
||||
*pbSuccess = false;
|
||||
@ -122,7 +122,7 @@ namespace NSFontConverter
|
||||
|
||||
int GetS16BE (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + 1 >= m_nLen )
|
||||
{
|
||||
@ -138,7 +138,7 @@ namespace NSFontConverter
|
||||
|
||||
int GetU16BE (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + 1 >= m_nLen)
|
||||
{
|
||||
@ -152,7 +152,7 @@ namespace NSFontConverter
|
||||
|
||||
int GetS32BE (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + 3 >= m_nLen )
|
||||
{
|
||||
@ -171,7 +171,7 @@ namespace NSFontConverter
|
||||
|
||||
unsigned int GetU32BE (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + 3 >= m_nLen )
|
||||
{
|
||||
@ -186,7 +186,7 @@ namespace NSFontConverter
|
||||
}
|
||||
unsigned int GetU32LE (int nPos, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + 3 >= m_nLen )
|
||||
{
|
||||
@ -201,7 +201,7 @@ namespace NSFontConverter
|
||||
}
|
||||
unsigned int GetUVarBE(int nPos, int nSize, bool *pbSuccess)
|
||||
{
|
||||
*pbSuccess = true;
|
||||
//*pbSuccess = true;
|
||||
|
||||
if ( nPos < 0 || nPos + nSize > m_nLen )
|
||||
{
|
||||
|
||||
@ -1261,6 +1261,10 @@ namespace NSHtmlRenderer
|
||||
m_pInternal->m_bPageOpened = false;
|
||||
|
||||
m_pInternal->m_pFontManager = m_pInternal->m_oApplicationFonts.GenerateFontManager();
|
||||
CFontsCache* pGraphicsFontCache = new CFontsCache();
|
||||
pGraphicsFontCache->SetStreams(m_pInternal->m_oApplicationFonts.GetStreams());
|
||||
pGraphicsFontCache->SetCacheSize(16);
|
||||
m_pInternal->m_pFontManager->SetOwnerCache(pGraphicsFontCache);
|
||||
|
||||
m_pInternal->m_oFont.SetDefaultParams();
|
||||
m_pInternal->m_oInstalledFont.SetDefaultParams();
|
||||
|
||||
@ -1646,7 +1646,7 @@ namespace PdfReader
|
||||
|
||||
MemUtilsFree(punRefSegs);
|
||||
|
||||
if (m_pCurStream->GetPos() - unDataStartPos != unSegLength)
|
||||
if (unSegLength != 0xFFFFFFFF && m_pCurStream->GetPos() - unDataStartPos != unSegLength)
|
||||
m_pCurStream->SetPos(unDataStartPos + unSegLength);
|
||||
}
|
||||
|
||||
|
||||
@ -803,7 +803,7 @@ namespace PdfReader
|
||||
if (!bLimited || unStart + unLength > m_unStart + m_unLength)
|
||||
{
|
||||
unNewLength = m_unStart + m_unLength - unStart;
|
||||
if (unStart >= m_unLength)
|
||||
if (unStart >= m_unStart + m_unLength)
|
||||
unNewLength = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
QT -= core
|
||||
QT -= gui
|
||||
|
||||
VERSION = 2.0.3.432
|
||||
VERSION = 2.0.3.434
|
||||
DEFINES += INTVER=$$VERSION
|
||||
|
||||
TARGET = x2t
|
||||
|
||||
Reference in New Issue
Block a user