mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
28 Commits
v5.0.0.19
...
core-win-3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8df6286e80 | |||
| e947c91a7b | |||
| ef53ac4c63 | |||
| f50dd716ad | |||
| 54d0260ea2 | |||
| 2577365e08 | |||
| 792a722063 | |||
| 00df026108 | |||
| 56a4e80c83 | |||
| a7a78a09c1 | |||
| 6f93eeae69 | |||
| be45d169d7 | |||
| 0fc749f839 | |||
| 03267ba2ec | |||
| b0adc188a2 | |||
| 048fbc4b18 | |||
| c0a061f2cb | |||
| 0296a6ef33 | |||
| dcee112745 | |||
| 65709f9cc2 | |||
| bf5c41b9a0 | |||
| 66b45dba7c | |||
| 65e7372cf7 | |||
| 2ce5708599 | |||
| 1ea27ad7f8 | |||
| 48d94d24eb | |||
| f5c569ab2a | |||
| 2e61fcfdd9 |
@ -75,6 +75,8 @@ namespace DocFileFormat
|
||||
|
||||
while ( ( cp - m_document->FIB->m_RgLw97.ccpText ) < (*m_document->IndividualFootnotesPlex)[id + 1] )
|
||||
{
|
||||
int cpStart = cp;
|
||||
|
||||
int fc = m_document->FindFileCharPos(cp);
|
||||
if (fc < 0) break;
|
||||
|
||||
@ -93,6 +95,8 @@ namespace DocFileFormat
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
}
|
||||
while (cp <= cpStart) //conv_fQioC665ib4ngHkDGY4__docx.doc
|
||||
cp++;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:footnote");
|
||||
|
||||
@ -124,11 +124,14 @@ namespace DocFileFormat
|
||||
TableInfo tai(papx);
|
||||
if (tai.fInTable)
|
||||
{
|
||||
int cpStart = cp;
|
||||
//this PAPX is for a table
|
||||
//cp = writeTable( cp, tai.iTap );
|
||||
Table table( this, cp, ( ( tai.iTap > 0 ) ? ( 1 ) : ( 0 ) ) );
|
||||
table.Convert(this);
|
||||
cp = table.GetCPEnd();
|
||||
while (cp <= cpStart) //conv_eznHsm8em2unSv6_2QE__docx.doc
|
||||
cp++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -2,34 +2,38 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "..\DocFormatLib\Win32\DocFormatLib.vcproj", "{C5371405-338F-4B70-83BD-2A5CDF64F383}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
|
||||
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D} = {77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
|
||||
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}
|
||||
{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}
|
||||
{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}"
|
||||
@ -54,17 +58,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\..\ASCOffic
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatTest", "DocFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D} = {77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
|
||||
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\..\Common\OfficeDrawing;"..\..\..\..\..\DesktopEditor\freetype-2.5.2\include";..\..\..\..\..\Common\OfficeDrawing\Shapes"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
|
||||
@ -3025,7 +3025,7 @@ namespace BinDocxRW
|
||||
std::wstring& sShapeType = aShapeTypes[i];
|
||||
pOfficeDrawingConverter->AddShapeType(sShapeType);
|
||||
}
|
||||
pOfficeDrawingConverter->SetRels(oldRels);
|
||||
pOfficeDrawingConverter->SetRels(oldRels);
|
||||
}
|
||||
void WriteVbaProjectContent(OOX::VbaProject& oVbaProject)
|
||||
{
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_UNICODE;UNICODE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
||||
@ -74,6 +74,8 @@ xlsx_document::xlsx_document()
|
||||
|
||||
void xlsx_document::write(const std::wstring & RootPath)
|
||||
{
|
||||
_CP_LOG << L"[info][xlsx] process writing" << std::endl;
|
||||
|
||||
xl_files_.write (RootPath);
|
||||
docProps_files_.write (RootPath);
|
||||
rels_files_.write (RootPath);
|
||||
|
||||
@ -160,7 +160,10 @@ void xlsx_table_state::set_table_row_group(int count, bool collapsed, int level)
|
||||
group_row_.collapsed = collapsed;
|
||||
group_row_.level = level;
|
||||
}
|
||||
|
||||
void xlsx_table_state::add_empty_row(int count)
|
||||
{
|
||||
current_table_row_ += count;
|
||||
}
|
||||
void xlsx_table_state::start_row(const std::wstring & StyleName, const std::wstring & defaultCellStyleName)
|
||||
{
|
||||
empty_row_ = true;
|
||||
|
||||
@ -89,6 +89,8 @@ public:
|
||||
void non_empty_row ();
|
||||
bool is_empty_row () const;
|
||||
void end_row ();
|
||||
|
||||
void add_empty_row(int count);
|
||||
|
||||
std::wstring current_row_style () const;
|
||||
std::wstring default_row_cell_style () const;
|
||||
|
||||
@ -1274,16 +1274,27 @@ void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xls
|
||||
{
|
||||
if (horizontal_margins.fo_margin_left_ && horizontal_margins.fo_margin_left_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"left" , horizontal_margins.fo_margin_left_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"left", 0);
|
||||
|
||||
if (horizontal_margins.fo_margin_right_ && horizontal_margins.fo_margin_right_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"right" , horizontal_margins.fo_margin_right_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"right", 0);
|
||||
|
||||
if (vertical_margins.fo_margin_top_ && vertical_margins.fo_margin_top_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"top" , vertical_margins.fo_margin_top_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"top", 1.025);
|
||||
|
||||
if (vertical_margins.fo_margin_bottom_ && vertical_margins.fo_margin_bottom_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"bottom" , vertical_margins.fo_margin_bottom_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"bottom", 1.025);
|
||||
|
||||
CP_XML_ATTR(L"header" , vertical_margins.fo_margin_top_->get_length().get_value_unit(odf_types::length::inch));
|
||||
CP_XML_ATTR(L"footer" , vertical_margins.fo_margin_bottom_->get_length().get_value_unit(odf_types::length::inch));
|
||||
if (vertical_margins.fo_margin_top_)
|
||||
CP_XML_ATTR(L"header" , vertical_margins.fo_margin_top_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"header", 0.7875);
|
||||
|
||||
if (vertical_margins.fo_margin_bottom_)
|
||||
CP_XML_ATTR(L"footer" , vertical_margins.fo_margin_bottom_->get_length().get_value_unit(odf_types::length::inch));
|
||||
else CP_XML_ATTR(L"footer", 0.7875);
|
||||
}
|
||||
}
|
||||
if (attlist_.fo_page_width_ || attlist_.fo_page_height_ || attlist_.style_print_orientation_)
|
||||
|
||||
@ -356,7 +356,6 @@ void table_columns_and_groups::add_child_element( xml::sax * Reader, const std::
|
||||
*/
|
||||
}
|
||||
|
||||
// table-table-cell-content
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::wostream & table_table_cell_content::text_to_stream(std::wostream & _Wostream) const
|
||||
@ -393,9 +392,14 @@ void table_table_cell::add_child_element( xml::sax * Reader, const std::wstring
|
||||
void table_table_cell::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
bool table_table_cell::empty()
|
||||
{
|
||||
if (!content_.elements_.empty()) return false;
|
||||
if (attlist_.table_formula_) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
// table:covered-table-cell
|
||||
// table-covered-table-cell
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * table_covered_table_cell::ns = L"table";
|
||||
const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
|
||||
@ -412,13 +416,19 @@ void table_covered_table_cell::add_attributes( const xml::attributes_wc_ptr & At
|
||||
|
||||
void table_covered_table_cell::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
empty_ = false;
|
||||
content_.add_child_element(Reader, Ns, Name, getContext());
|
||||
}
|
||||
|
||||
void table_covered_table_cell::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
bool table_covered_table_cell::empty()
|
||||
{
|
||||
if (!content_.elements_.empty()) return false;
|
||||
if (attlist_.table_formula_) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// table:table-row
|
||||
@ -445,7 +455,38 @@ void table_table_row::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
else
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
bool table_table_row::empty()
|
||||
{
|
||||
if (content_.empty() && !attlist_.table_style_name_ && !attlist_.table_default_cell_style_name_) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
bool table_table_row::empty_content_cells()
|
||||
{
|
||||
bool res = true;
|
||||
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
table_table_cell *cell = dynamic_cast<table_table_cell*>(content_[i].get());
|
||||
table_covered_table_cell *cover_cell = dynamic_cast<table_covered_table_cell*>(content_[i].get());
|
||||
if (!cell && !cover_cell)
|
||||
{
|
||||
res = false;
|
||||
break;
|
||||
}
|
||||
if (cell && cell->empty() == false)
|
||||
{
|
||||
res = false;
|
||||
break;
|
||||
}
|
||||
if (cover_cell && cover_cell->empty() == false)
|
||||
{
|
||||
res = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
// table:table-rows
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * table_table_rows::ns = L"table";
|
||||
|
||||
@ -361,6 +361,9 @@ private:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
public:
|
||||
bool empty();
|
||||
bool empty_content_cells();
|
||||
|
||||
table_table_row_attlist attlist_;
|
||||
office_element_ptr_array content_; // table-table-cell or table-covered-table-cell
|
||||
|
||||
@ -408,6 +411,7 @@ private:
|
||||
|
||||
public:
|
||||
bool last_cell_;
|
||||
bool empty();
|
||||
|
||||
table_table_cell_attlist attlist_;
|
||||
table_table_cell_attlist_extra attlist_extra_;
|
||||
@ -427,7 +431,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
table_covered_table_cell() : last_cell_(false), empty_(true) {}
|
||||
table_covered_table_cell() : last_cell_(false){}
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
@ -443,7 +447,7 @@ private:
|
||||
|
||||
public:
|
||||
bool last_cell_;
|
||||
bool empty_;
|
||||
bool empty();
|
||||
|
||||
table_table_cell_attlist attlist_;
|
||||
table_table_cell_content content_;
|
||||
|
||||
@ -54,6 +54,7 @@ void table_data_pilot_tables::add_child_element( xml::sax * Reader, const std::w
|
||||
}
|
||||
void table_data_pilot_tables::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
return;
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
|
||||
@ -78,6 +78,17 @@ int table_table_cell_content::xlsx_convert(oox::xlsx_conversion_context & Contex
|
||||
|
||||
void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
if (attlist_.table_number_rows_repeated_ > 1 && empty())
|
||||
{
|
||||
Context.get_table_context().state()->add_empty_row(attlist_.table_number_rows_repeated_);
|
||||
return;
|
||||
}
|
||||
if (attlist_.table_number_rows_repeated_ > 0xf000 && empty_content_cells())
|
||||
{
|
||||
Context.get_table_context().state()->add_empty_row(attlist_.table_number_rows_repeated_);
|
||||
return; //conv_hSX8n3lVbhALjt0aafg__xlsx.ods, conv_MA2CauoNfX_7ejKS5eg__xlsx.ods
|
||||
}
|
||||
|
||||
std::wostream & strm = Context.current_sheet().sheetData();
|
||||
///обработка чтилей для роу -
|
||||
size_t Default_Cell_style_in_row_ = 0;
|
||||
@ -253,26 +264,20 @@ void table_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
table_table_rows_->xlsx_convert(Context);
|
||||
else
|
||||
{
|
||||
if (table_table_row_.size() > 1)
|
||||
while (table_table_row_.size() > 1)
|
||||
{
|
||||
//check 2 last rows for repeate > 65000 & 1024
|
||||
table_table_row* row_last = dynamic_cast<table_table_row*>(table_table_row_[table_table_row_.size() - 1].get());
|
||||
table_table_row* row_last_1 = dynamic_cast<table_table_row*>(table_table_row_[table_table_row_.size() - 2].get());
|
||||
|
||||
if (row_last->attlist_.table_number_rows_repeated_ > 1000 &&
|
||||
row_last_1->attlist_.table_number_rows_repeated_ > 1000 ||
|
||||
row_last_1->attlist_.table_number_rows_repeated_ > 0xf000)
|
||||
{
|
||||
std::wstring style = row_last->attlist_.table_style_name_.get_value_or(L"");
|
||||
std::wstring style_1 = row_last->attlist_.table_style_name_.get_value_or(L"");
|
||||
std::wstring style = row_last->attlist_.table_style_name_.get_value_or(L"");
|
||||
std::wstring style_1 = row_last->attlist_.table_style_name_.get_value_or(L"");
|
||||
|
||||
if (style == style_1)//check for empty also ????
|
||||
{
|
||||
row_last_1->attlist_.table_number_rows_repeated_ = 1024;
|
||||
table_table_row_.pop_back();
|
||||
}
|
||||
}
|
||||
if (style != style_1)break;
|
||||
if (row_last_1->empty_content_cells() == false) break;
|
||||
if (row_last->empty_content_cells() == false) break;
|
||||
|
||||
row_last_1->attlist_.table_number_rows_repeated_ += row_last->attlist_.table_number_rows_repeated_;
|
||||
table_table_row_.pop_back();
|
||||
}
|
||||
for (size_t i = 0; i < table_table_row_.size(); i++)
|
||||
{
|
||||
|
||||
@ -113,7 +113,7 @@ void calcext_conditional_format::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_ATTR_OPT(L"calcext:target-range-address",calcext_target_range_address_);
|
||||
|
||||
for (size_t i = content_.size() - 1; i >= 0; i--)
|
||||
for (int i = (int)content_.size() - 1; i >= 0; i--)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -269,4 +269,4 @@ void calcext_date_is::serialize(std::wostream & _Wostream)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,8 +54,9 @@ static int style_family_counts_[26]={};//согласно количеству
|
||||
void calc_paragraph_properties_content(std::vector<style_paragraph_properties*> & parProps, paragraph_format_properties * result)
|
||||
{
|
||||
if (result == NULL)return;
|
||||
if (parProps.empty()) return;
|
||||
|
||||
for (size_t i = parProps.size() - 1; i >= 0; i--)
|
||||
for (int i = (int)parProps.size() - 1; i >= 0; i--)
|
||||
{
|
||||
if (parProps[i])
|
||||
result->apply_from(parProps[i]->content_);
|
||||
@ -444,4 +445,4 @@ void odf_style_context::calc_paragraph_properties(std::wstring style_name, style
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\Common\OfficeDrawing;"..\..\DesktopEditor\freetype-2.5.2\include";..\..\Common\OfficeDrawing\Shapes"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
|
||||
PreprocessorDefinitions="_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_;DONT_WRITE_EMBEDDED_FONTS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
|
||||
@ -2228,8 +2228,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
std::wstring strPos = arSplit[i].substr(0, p);
|
||||
std::wstring strColor = arSplit[i].substr(p + 1);
|
||||
|
||||
double pos;
|
||||
pos = _wtof(strPos.c_str());
|
||||
double pos = strPos.empty() ? 0 : _wtof(strPos.c_str());
|
||||
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(strColor);
|
||||
PPTX::Logic::UniColor *oColor = new PPTX::Logic::UniColor();
|
||||
|
||||
@ -125,6 +125,19 @@ namespace NSBinPptxRW
|
||||
m_lIndexNextImage = 0;
|
||||
m_lIndexCounter = 0;
|
||||
}
|
||||
void CImageManager2::SetDstFolder(const std::wstring& strDst)
|
||||
{
|
||||
m_strDstFolder = strDst;
|
||||
m_strDstMedia = m_strDstFolder + FILE_SEPARATOR_STR + _T("media");
|
||||
m_strDstEmbed = m_strDstFolder + FILE_SEPARATOR_STR + _T("embeddings");
|
||||
|
||||
NSDirectory::CreateDirectory(m_strDstMedia);
|
||||
NSDirectory::CreateDirectory(m_strDstEmbed);
|
||||
}
|
||||
std::wstring CImageManager2::GetDstFolder()
|
||||
{
|
||||
return m_strDstFolder;
|
||||
}
|
||||
void CImageManager2::SetDstMedia(const std::wstring& strDst)
|
||||
{
|
||||
m_strDstMedia = strDst;
|
||||
@ -1222,7 +1235,7 @@ namespace NSBinPptxRW
|
||||
|
||||
m_pWriter->WriteString(strRels);
|
||||
}
|
||||
void CRelsGenerator::EndPresentationRels(const bool& bIsCommentsAuthors = false, const bool& bIsNotesMaster)
|
||||
void CRelsGenerator::EndPresentationRels(bool bIsCommentsAuthors, bool bIsNotesMaster, bool bIsVbaProject)
|
||||
{
|
||||
if (bIsNotesMaster)
|
||||
{
|
||||
@ -1247,6 +1260,12 @@ namespace NSBinPptxRW
|
||||
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors\" Target=\"commentAuthors.xml\"/>";
|
||||
m_pWriter->WriteString(strRels4);
|
||||
}
|
||||
if (bIsVbaProject)
|
||||
{
|
||||
std::wstring strRels4 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
|
||||
L"\" Type=\"http://schemas.microsoft.com/office/2006/relationships/vbaProject\" Target=\"vbaProject.bin\"/>";
|
||||
m_pWriter->WriteString(strRels4);
|
||||
}
|
||||
}
|
||||
int CRelsGenerator::GetNextId()
|
||||
{
|
||||
|
||||
@ -178,8 +178,10 @@ namespace NSBinPptxRW
|
||||
std::map<std::wstring, _imageManager2Info> m_mapImages;
|
||||
_INT32 m_lIndexNextImage;
|
||||
_INT32 m_lIndexCounter;
|
||||
|
||||
std::wstring m_strDstMedia;
|
||||
std::wstring m_strDstEmbed;
|
||||
std::wstring m_strDstFolder;
|
||||
public:
|
||||
int m_nDocumentType;
|
||||
OOX::CContentTypes* m_pContentTypes;
|
||||
@ -194,6 +196,9 @@ namespace NSBinPptxRW
|
||||
void SetDstEmbed(const std::wstring& strDst);
|
||||
std::wstring GetDstEmbed();
|
||||
|
||||
void SetDstFolder(const std::wstring& strDst);
|
||||
std::wstring GetDstFolder();
|
||||
|
||||
int IsDisplayedImage(const std::wstring& strInput);
|
||||
|
||||
_imageManager2Info GenerateImage(const std::wstring& strInput, NSCommon::smart_ptr<OOX::File> & additionalFile, const std::wstring& oleData, std::wstring strBase64Image);
|
||||
@ -419,8 +424,8 @@ namespace NSBinPptxRW
|
||||
int WriteChart (int nChartNumber, _INT32 lDocType);
|
||||
int WriteRels (const std::wstring& bsType, const std::wstring& bsTarget, const std::wstring& bsTargetMode);
|
||||
int WriteHyperlink (const std::wstring& strLink, const bool& bIsActionInit);
|
||||
|
||||
void EndPresentationRels (const bool& bIsCommentsAuthors, const bool& bIsNotesMaster = false);
|
||||
|
||||
void EndPresentationRels (bool bIsCommentsAuthors = false, bool bIsNotesMaster = false, bool bIsVbaProject = false );
|
||||
int GetNextId ();
|
||||
void CloseRels ();
|
||||
|
||||
|
||||
@ -588,7 +588,7 @@ namespace NSPresentationEditor
|
||||
#else
|
||||
std::wstring ConvertPPTtoPPTX(CPPTShape* pPPTShape, const NSGuidesVML::CFormParam& pCoef, bool bIsNamespace = false)
|
||||
{
|
||||
if (pPPTShape->m_eType == PPTShapes::sptCRect)
|
||||
if (pPPTShape->m_eType == PPTShapes::sptCRect || pPPTShape->m_eType == PPTShapes::sptCFrame)
|
||||
{
|
||||
if (bIsNamespace)
|
||||
{
|
||||
@ -604,7 +604,14 @@ namespace NSPresentationEditor
|
||||
}
|
||||
return _T("<a:prstGeom prst=\"line\"><a:avLst/></a:prstGeom>");
|
||||
}
|
||||
|
||||
else if (pPPTShape->m_eType == PPTShapes::sptCEllipse)
|
||||
{
|
||||
if (bIsNamespace)
|
||||
{
|
||||
return _T("<a:prstGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" prst=\"line\"><a:avLst/></a:prstGeom>");
|
||||
}
|
||||
return _T("<a:prstGeom prst=\"ellipse\"><a:avLst/></a:prstGeom>");
|
||||
}
|
||||
std::wstring strXmlPPTX = bIsNamespace ? _T("<a:custGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">") : _T("<a:custGeom>");
|
||||
|
||||
CFormulaConverter pFormulaConverter;
|
||||
|
||||
@ -2122,6 +2122,8 @@ namespace NSGuidesVML
|
||||
|
||||
for (size_t nIndex = 0; nIndex < oArray.size(); ++nIndex)
|
||||
{
|
||||
if (oPath.m_arParts.size() <= nIndex)
|
||||
break;
|
||||
const CPartPath& oPart = oPath.m_arParts[nIndex];
|
||||
m_lWidth = oPart.width;
|
||||
m_lHeight = oPart.height;
|
||||
|
||||
@ -100,7 +100,9 @@ namespace NSBinPptxRW
|
||||
|
||||
m_oImageManager.Clear();
|
||||
|
||||
OOX::CPath pathMedia = pathPPT / _T("media");
|
||||
m_oImageManager.SetDstFolder(pathPPT.GetPath());
|
||||
|
||||
OOX::CPath pathMedia = pathPPT / _T("media");
|
||||
NSDirectory::CreateDirectory(pathMedia.GetPath());
|
||||
|
||||
m_oImageManager.SetDstMedia(pathMedia.GetPath());
|
||||
@ -809,7 +811,8 @@ namespace NSBinPptxRW
|
||||
m_oPresentation.notesMasterIdLst[0].rid = (size_t)nCurrentRels;
|
||||
++nCurrentRels;
|
||||
}
|
||||
m_oReader.m_pRels->EndPresentationRels(m_oPresentation.commentAuthors.is_init(), bNotesMasterPresent);
|
||||
|
||||
m_oReader.m_pRels->EndPresentationRels(m_oPresentation.commentAuthors.is_init(), bNotesMasterPresent, m_oPresentation.m_pVbaProject.is_init());
|
||||
m_oReader.m_pRels->CloseRels();
|
||||
|
||||
oXmlWriter.ClearNoAttack();
|
||||
@ -840,7 +843,16 @@ namespace NSBinPptxRW
|
||||
// content types
|
||||
OOX::CContentTypes *pContentTypes = m_oImageManager.m_pContentTypes;
|
||||
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml", L"/ppt", L"presentation.xml");
|
||||
pContentTypes->Registration(m_oPresentation.type().OverrideType(),
|
||||
m_oPresentation.type().DefaultDirectory(),
|
||||
m_oPresentation.type().DefaultFileName());
|
||||
|
||||
if (m_oPresentation.m_pVbaProject.IsInit())
|
||||
{
|
||||
pContentTypes->Registration(m_oPresentation.m_pVbaProject->type().OverrideType(),
|
||||
m_oPresentation.type().DefaultDirectory() / m_oPresentation.m_pVbaProject->type().DefaultDirectory(),
|
||||
m_oPresentation.m_pVbaProject->type().DefaultFileName());
|
||||
}
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml", L"/ppt", L"presProps.xml");
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml", L"/ppt", L"viewProps.xml");
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml", L"/ppt", L"tableStyles.xml");
|
||||
|
||||
@ -84,7 +84,8 @@ namespace PPTX
|
||||
return smart_ptr<OOX::File>(new PPTX::App(filename, map));
|
||||
else if (relation.Type() == OOX::FileTypes::Core)
|
||||
return smart_ptr<OOX::File>(new PPTX::Core(filename, map));
|
||||
else if (relation.Type() == OOX::Presentation::FileTypes::Presentation)
|
||||
else if (relation.Type() == OOX::Presentation::FileTypes::Presentation ||
|
||||
relation.Type() == OOX::Presentation::FileTypes::PresentationMacro)
|
||||
return smart_ptr<OOX::File>(new PPTX::Presentation(filename, map));
|
||||
else if (relation.Type() == OOX::FileTypes::Theme)
|
||||
return smart_ptr<OOX::File>(new PPTX::Theme(filename, map));
|
||||
@ -141,6 +142,8 @@ namespace PPTX
|
||||
return smart_ptr<OOX::File>(new OOX::OleObject(filename));
|
||||
else if (relation.Type() == OOX::FileTypes::MicrosoftOfficeUnknown) //ms package
|
||||
return smart_ptr<OOX::File>(new OOX::OleObject( filename, true ));
|
||||
else if (relation.Type() == OOX::FileTypes::VbaProject)
|
||||
return smart_ptr<OOX::File>(new OOX::VbaProject( filename, filename ));
|
||||
|
||||
return smart_ptr<OOX::File>(new OOX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
@ -44,6 +44,9 @@ namespace Presentation
|
||||
const FileType Presentation (L"ppt", L"presentation.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
const FileType PresentationMacro(L"ppt", L"presentation.xml",
|
||||
_T("application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
const FileType Slide (L"slides", L"slide.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slide+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"));
|
||||
|
||||
@ -75,6 +75,12 @@ namespace PPTX
|
||||
if (_presentation.is_init())
|
||||
{
|
||||
_presentation->commentAuthors = _presentation->Get(OOX::Presentation::FileTypes::CommentAuthors).smart_dynamic_cast<PPTX::Authors>();
|
||||
|
||||
if (_presentation->IsExist(OOX::FileTypes::VbaProject))
|
||||
{
|
||||
_presentation->m_bMacroEnabled = true;
|
||||
_presentation->m_pVbaProject = _presentation->Get(OOX::FileTypes::VbaProject).smart_dynamic_cast<OOX::VbaProject>();
|
||||
}
|
||||
}
|
||||
|
||||
for (std::map<std::wstring, smart_ptr<OOX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
|
||||
@ -166,23 +166,28 @@ namespace PPTX
|
||||
pWriter->WriteBYTE(1);
|
||||
pWriter->EndRecord();
|
||||
|
||||
DocWrapper::FontProcessor fp;
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
|
||||
DocWrapper::FontProcessor oFontProcessor;
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
BinDocxRW::CDocxSerializer oDocxSerializer;
|
||||
|
||||
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
|
||||
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
|
||||
BinDocxRW::CDocxSerializer* old_serial = pWriter->m_pMainDocument;
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = pWriter;
|
||||
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &oFontProcessor, &oDrawingConverter, NULL);
|
||||
|
||||
BinDocxRW::ParamsWriter oParamsWriter(pWriter, &fp, &oDrawingConverter, NULL);
|
||||
BinDocxRW::BinaryFileWriter oBinaryFileWriter(oParamsWriter);
|
||||
pWriter->m_pMainDocument = &oDocxSerializer;
|
||||
|
||||
BinDocxRW::BinaryFileWriter oBinaryFileWriter(*oDocxSerializer.m_pParamsWriter);
|
||||
|
||||
pWriter->StartRecord(2);
|
||||
oBinaryFileWriter.intoBindoc(oox_unpacked.GetPath());
|
||||
pWriter->EndRecord();
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = old_writer;
|
||||
*pWriter->m_pCurrentContainer = old_rels;
|
||||
*pWriter->m_pCurrentContainer = old_rels;
|
||||
pWriter->m_pMainDocument = old_serial;
|
||||
}
|
||||
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX)
|
||||
//if ( std::wstring::npos != sProgID.find(L"Excel.Sheet")) //"ET.Xlsx.6" !!!
|
||||
|
||||
@ -50,6 +50,8 @@
|
||||
#include "Logic/ExtP.h"
|
||||
#include "Theme/ClrScheme.h"
|
||||
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Media/VbaProject.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Presentation : public WrapperFile, public PPTX::FileContainer
|
||||
@ -57,16 +59,16 @@ namespace PPTX
|
||||
public:
|
||||
Presentation()
|
||||
{
|
||||
m_bMacroEnabled = false;
|
||||
}
|
||||
Presentation(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
m_bMacroEnabled = false;
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Presentation()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
//FileContainer::read(filename, map);
|
||||
@ -182,6 +184,7 @@ namespace PPTX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//smartTags (Smart Tags)
|
||||
Normalize();
|
||||
}
|
||||
@ -222,6 +225,15 @@ namespace PPTX
|
||||
pWriter->WriteRecord2(6, commentAuthors);
|
||||
pWriter->WriteRecord2(7, sectionLst);
|
||||
|
||||
if (m_pVbaProject.IsInit())
|
||||
{
|
||||
pWriter->StartRecord(8);
|
||||
{
|
||||
m_pVbaProject->toPPTY(pWriter);
|
||||
}
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
@ -318,22 +330,28 @@ namespace PPTX
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case 6:
|
||||
{
|
||||
commentAuthors = new PPTX::Authors();
|
||||
commentAuthors->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
commentAuthors->fromPPTY(pReader);
|
||||
}break;
|
||||
case 7:
|
||||
{
|
||||
sectionLst = new nsPresentation::SectionLst();
|
||||
sectionLst->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
sectionLst->fromPPTY(pReader);
|
||||
}break;
|
||||
case 8:
|
||||
{
|
||||
m_pVbaProject = new OOX::VbaProject();
|
||||
m_pVbaProject->fromPPTY(pReader);
|
||||
|
||||
smart_ptr<OOX::File> file = m_pVbaProject.smart_dynamic_cast<OOX::File>();
|
||||
FileContainer::Add(file);
|
||||
|
||||
m_bMacroEnabled = true;
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->Seek(_end_pos);
|
||||
@ -397,10 +415,10 @@ namespace PPTX
|
||||
pWriter->EndNode(L"p:presentation");
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::Presentation::FileTypes::Presentation;
|
||||
if (m_bMacroEnabled) return OOX::Presentation::FileTypes::PresentationMacro;
|
||||
else return OOX::Presentation::FileTypes::Presentation;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
@ -411,7 +429,6 @@ namespace PPTX
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
//Childs
|
||||
//custDataLst (Customer Data List)
|
||||
//property<std::list<Presentation::CustShow> > custShowLst (List of Custom Shows)
|
||||
@ -446,9 +463,12 @@ namespace PPTX
|
||||
smart_ptr<PPTX::Authors> commentAuthors;
|
||||
|
||||
private:
|
||||
Logic::ClrMap m_clrMap;
|
||||
nsTheme::ClrScheme m_clrScheme;
|
||||
Logic::ClrMap m_clrMap;
|
||||
nsTheme::ClrScheme m_clrScheme;
|
||||
public:
|
||||
bool m_bMacroEnabled;
|
||||
smart_ptr<OOX::VbaProject> m_pVbaProject;
|
||||
|
||||
void SetClrMap(Logic::ClrMap map) {m_clrMap = map;};
|
||||
void SetClrScheme(nsTheme::ClrScheme scheme) {m_clrScheme = scheme;};
|
||||
|
||||
|
||||
@ -363,7 +363,7 @@ namespace PPTX
|
||||
}
|
||||
if (IsExist(OOX::FileTypes::VmlDrawing))
|
||||
{
|
||||
Vml = FileContainer::Get(OOX::FileTypes::VmlDrawing).smart_dynamic_cast<OOX::CVmlDrawing>();//boost::shared_dynamic_cast<PPTX::VmlDrawing, PPTX::File>(FileContainer::get(OOX::Presentation::FileTypes::VmlDrawing));
|
||||
Vml = FileContainer::Get(OOX::FileTypes::VmlDrawing).smart_dynamic_cast<OOX::CVmlDrawing>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,13 +44,13 @@ int OOXGraphicReader::Parse( ReaderParameter oParam , RtfShapePtr & pOutput)
|
||||
{
|
||||
if (m_ooxGraphic->element.getType() == OOX::et_p_ShapeTree)
|
||||
{
|
||||
OOXShapeReader shapeReader(m_ooxGraphic->element.GetElem().operator->());
|
||||
return (shapeReader.Parse(oParam, pOutput) ? 1 : 0);
|
||||
OOXShapeGroupReader groupReader(dynamic_cast<PPTX::Logic::SpTree*>(m_ooxGraphic->element.GetElem().operator->()));
|
||||
return (groupReader.Parse(oParam, pOutput) ? 1 : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
OOXShapeGroupReader groupReader(dynamic_cast<PPTX::Logic::SpTree*>(m_ooxGraphic->element.GetElem().operator->()));
|
||||
return (groupReader.Parse(oParam, pOutput) ? 1 : 0);
|
||||
OOXShapeReader shapeReader(m_ooxGraphic->element.GetElem().operator->());
|
||||
return (shapeReader.Parse(oParam, pOutput) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
if (m_ooxGraphic->olePic.IsInit())
|
||||
|
||||
@ -1003,7 +1003,7 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
|
||||
oNewProperty = oParam.oRtf->m_oDefaultCharProp;
|
||||
|
||||
//применяем внешний стиль
|
||||
//oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
|
||||
oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
|
||||
oNewProperty.Merge( m_oCharProperty );
|
||||
|
||||
if( NULL != poStyle && TYPE_RTF_PROPERTY_STYLE_CHAR == poStyle->GetType() )
|
||||
|
||||
@ -49,6 +49,15 @@ public:
|
||||
|
||||
pOutput->m_eAnchorTypeShape = RtfShape::st_anchor;
|
||||
|
||||
if ( m_ooxAnchor->m_oDocPr.IsInit() )
|
||||
{
|
||||
pOutput->m_nID = m_ooxAnchor->m_oDocPr->id + 1025;
|
||||
pOutput->m_sName = m_ooxAnchor->m_oDocPr->name;
|
||||
|
||||
if (m_ooxAnchor->m_oDocPr->descr.IsInit())
|
||||
pOutput->m_sDescription = m_ooxAnchor->m_oDocPr->descr.get();
|
||||
}
|
||||
|
||||
pOutput->m_bAllowOverlap = m_ooxAnchor->m_oAllowOverlap.IsInit() ? m_ooxAnchor->m_oAllowOverlap->ToBool() : false;
|
||||
pOutput->m_nZOrderRelative = m_ooxAnchor->m_oBehindDoc.IsInit() ? m_ooxAnchor->m_oBehindDoc->ToBool() : false;
|
||||
pOutput->m_bHidden = m_ooxAnchor->m_oHidden.IsInit() ? m_ooxAnchor->m_oHidden->ToBool() : false;
|
||||
|
||||
@ -77,6 +77,15 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_ooxInline->m_oDocPr.IsInit() )
|
||||
{
|
||||
pOutput->m_nID = m_ooxInline->m_oDocPr->id + 1025;
|
||||
pOutput->m_sName = m_ooxInline->m_oDocPr->name;
|
||||
|
||||
if (m_ooxInline->m_oDocPr->descr.IsInit())
|
||||
pOutput->m_sDescription = m_ooxInline->m_oDocPr->descr.get();
|
||||
}
|
||||
|
||||
OOXGraphicReader oGraphicReader(&m_ooxInline->m_oGraphic);
|
||||
|
||||
|
||||
@ -749,32 +749,44 @@ bool OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
|
||||
if( PROP_DEF != nCropedWidthGoal )
|
||||
{
|
||||
//делаем crop
|
||||
double nCropLeft = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->l.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropL = nCropLeft * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
|
||||
pOutput->m_oPicture->m_nCropL = (int)(nCropLeft * pOutput->m_oPicture->m_nWidthGoal);
|
||||
pOutput->m_nCropFromLeft = (int)(nCropLeft* 65536);
|
||||
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropL;
|
||||
if (oox_bitmap_fill->srcRect->l.IsInit())
|
||||
{
|
||||
double nCropLeft = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->l.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropL = nCropLeft * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
|
||||
pOutput->m_oPicture->m_nCropL = (int)(nCropLeft * pOutput->m_oPicture->m_nWidthGoal);
|
||||
pOutput->m_nCropFromLeft = (int)(nCropLeft* 65536);
|
||||
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropL;
|
||||
}
|
||||
|
||||
double nCropRight = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->r.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropR = nCropRight * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
|
||||
pOutput->m_oPicture->m_nCropR = (int)(nCropRight * pOutput->m_oPicture->m_nWidthGoal);
|
||||
pOutput->m_nCropFromRight = (int)(nCropRight * 65536);
|
||||
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropR;
|
||||
if (oox_bitmap_fill->srcRect->r.IsInit())
|
||||
{
|
||||
double nCropRight = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->r.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropR = nCropRight * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
|
||||
pOutput->m_oPicture->m_nCropR = (int)(nCropRight * pOutput->m_oPicture->m_nWidthGoal);
|
||||
pOutput->m_nCropFromRight = (int)(nCropRight * 65536);
|
||||
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropR;
|
||||
}
|
||||
}
|
||||
int nCropedHeightGoal = pOutput->m_oPicture->m_nHeightGoal;
|
||||
if( PROP_DEF != nCropedHeightGoal )
|
||||
{
|
||||
double nCropTop = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->t.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
|
||||
pOutput->m_oPicture->m_nCropT = (int)(nCropTop * pOutput->m_oPicture->m_nHeightGoal);
|
||||
pOutput->m_nCropFromTop = (int)(nCropTop * 65536);
|
||||
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropT;
|
||||
if (oox_bitmap_fill->srcRect->t.IsInit())
|
||||
{
|
||||
double nCropTop = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->t.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
|
||||
pOutput->m_oPicture->m_nCropT = (int)(nCropTop * pOutput->m_oPicture->m_nHeightGoal);
|
||||
pOutput->m_nCropFromTop = (int)(nCropTop * 65536);
|
||||
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropT;
|
||||
}
|
||||
|
||||
double nCropBottom = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->b.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
|
||||
pOutput->m_oPicture->m_nCropB = (int)(nCropBottom * pOutput->m_oPicture->m_nHeightGoal);
|
||||
pOutput->m_nCropFromBottom = (int)(nCropBottom * 65536);
|
||||
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropB;
|
||||
if (oox_bitmap_fill->srcRect->b.IsInit())
|
||||
{
|
||||
double nCropBottom = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->b.get()) / 100. ;
|
||||
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
|
||||
pOutput->m_oPicture->m_nCropB = (int)(nCropBottom * pOutput->m_oPicture->m_nHeightGoal);
|
||||
pOutput->m_nCropFromBottom = (int)(nCropBottom * 65536);
|
||||
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropB;
|
||||
}
|
||||
}
|
||||
//устанавливаем scale
|
||||
if( PROP_DEF != pOutput->m_nLeft && PROP_DEF != pOutput->m_nRight && PROP_DEF != nCropedWidthGoal && 0 != nCropedWidthGoal )
|
||||
@ -916,7 +928,7 @@ void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
|
||||
}
|
||||
if (oox_line_prop->w.IsInit())
|
||||
{
|
||||
pOutput->m_nLineWidth = oox_line_prop->w.get() * 12700;
|
||||
pOutput->m_nLineWidth = oox_line_prop->w.get();
|
||||
}
|
||||
if (oox_line_prop->headEnd.IsInit())
|
||||
{
|
||||
@ -1006,22 +1018,50 @@ void OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::
|
||||
// //Parse(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oSp3D.GetPointer(), &color);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
void OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::Xfrm *xfrm)
|
||||
{
|
||||
if (!m_vmlElement && !m_arrElement && !m_ooxShape) return false;
|
||||
if (!xfrm) return;
|
||||
|
||||
if (m_vmlElement || m_arrElement) return ParseVml(oParam , pOutput);
|
||||
double rot = xfrm->rot.IsInit() ? xfrm->rot.get() / 60000. : 0;
|
||||
if (rot > 0.01)
|
||||
pOutput->m_nRotation = rot * 65535;
|
||||
|
||||
if (xfrm->flipH.get_value_or(false)) pOutput->m_bFlipH = 1;
|
||||
if (xfrm->flipV.get_value_or(false)) pOutput->m_bFlipV = 1;
|
||||
|
||||
if (pOutput->m_bInGroup)
|
||||
{
|
||||
if (xfrm->offX.IsInit() && xfrm->offY.IsInit())
|
||||
{
|
||||
pOutput->m_nRelLeft = (int)xfrm->offX.get();
|
||||
pOutput->m_nRelTop = (int)xfrm->offY.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
pOutput->m_nRelLeft = 0;
|
||||
pOutput->m_nRelTop = 0;
|
||||
}
|
||||
if (xfrm->extX.IsInit() && xfrm->extY.IsInit())
|
||||
{
|
||||
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + xfrm->offX.get();
|
||||
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + xfrm->offY.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
pOutput->m_nRelRight = 0;
|
||||
pOutput->m_nRelBottom = 0;
|
||||
}
|
||||
pOutput->m_nRelRotation = pOutput->m_nRotation;
|
||||
}
|
||||
}
|
||||
|
||||
bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
{
|
||||
PPTX::Logic::Shape * ooxShape = dynamic_cast<PPTX::Logic::Shape*> (m_ooxShape);
|
||||
//PPTX::Logic::CxnSp* cxnShape = dynamic_cast<PPTX::Logic::CxnSp*> (m_ooxShape);
|
||||
//PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*> (m_ooxShape);
|
||||
|
||||
if (ooxShape == NULL) return false;
|
||||
|
||||
|
||||
if (!ooxShape) return false;
|
||||
|
||||
if (ooxShape->oTextBoxBodyPr.IsInit())
|
||||
{
|
||||
if (ooxShape->oTextBoxBodyPr->fromWordArt.get_value_or(false))
|
||||
@ -1051,7 +1091,9 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
if (ooxShape->spPr.Geometry.getType() == OOX::et_a_prstGeom)
|
||||
{
|
||||
PPTX::Logic::PrstGeom& geometry = ooxShape->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
|
||||
SimpleTypes::EShapeType type = (SimpleTypes::EShapeType)geometry.prst.GetBYTECode();
|
||||
|
||||
SimpleTypes::CShapeType<> prst_type(geometry.prst.get());
|
||||
SimpleTypes::EShapeType type = prst_type.GetValue();
|
||||
|
||||
pOutput->m_nShapeType = OOX::PrstGeom2VmlShapeType(type);
|
||||
if (pOutput->m_nShapeType == SimpleTypes::Vml::sptNotPrimitive)
|
||||
@ -1087,40 +1129,9 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
pOutput->m_nGeoRight = 100000;
|
||||
pOutput->m_nGeoBottom = 100000;
|
||||
}
|
||||
if (ooxShape->spPr.xfrm.IsInit())
|
||||
{
|
||||
double rot = ooxShape->spPr.xfrm->rot.get() / 60000.;
|
||||
if (rot > 0.01)
|
||||
pOutput->m_nRotation = rot * 65535;
|
||||
|
||||
if (ooxShape->spPr.xfrm->flipH.get_value_or(false)) pOutput->m_bFlipH = 1;
|
||||
if (ooxShape->spPr.xfrm->flipV.get_value_or(false)) pOutput->m_bFlipV = 1;
|
||||
Parse(oParam, pOutput, ooxShape->spPr.xfrm.GetPointer());
|
||||
|
||||
if (pOutput->m_bInGroup)
|
||||
{
|
||||
if (ooxShape->spPr.xfrm->offX.IsInit() && ooxShape->spPr.xfrm->offY.IsInit())
|
||||
{
|
||||
pOutput->m_nRelLeft = (int)ooxShape->spPr.xfrm->offX.get();
|
||||
pOutput->m_nRelTop = (int)ooxShape->spPr.xfrm->offY.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
pOutput->m_nRelLeft = 0;
|
||||
pOutput->m_nRelTop = 0;
|
||||
}
|
||||
if (ooxShape->spPr.xfrm->extX.IsInit() && ooxShape->spPr.xfrm->extY.IsInit())
|
||||
{
|
||||
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + ooxShape->spPr.xfrm->offX.get();
|
||||
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + ooxShape->spPr.xfrm->offY.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
pOutput->m_nRelRight = 0;
|
||||
pOutput->m_nRelBottom = 0;
|
||||
}
|
||||
pOutput->m_nRelRotation = pOutput->m_nRotation;
|
||||
}
|
||||
}
|
||||
PPTX::Logic::ShapeStyle* oox_sp_style = ooxShape->style.GetPointer();
|
||||
|
||||
bool use_fill_from_style = false;
|
||||
@ -1132,8 +1143,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
case PPTX::Logic::UniFill::gradFill:
|
||||
case PPTX::Logic::UniFill::pattFill:
|
||||
case PPTX::Logic::UniFill::solidFill:
|
||||
Parse(oParam, pOutput, &ooxShape->spPr.Fill);
|
||||
|
||||
Parse(oParam, pOutput, &ooxShape->spPr.Fill);
|
||||
break;
|
||||
case PPTX::Logic::UniFill::noFill:
|
||||
pOutput->m_bFilled = false; break;
|
||||
default:
|
||||
@ -1185,7 +1196,56 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OOXShapeReader::ParsePic( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
{
|
||||
PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*>(m_ooxShape);
|
||||
|
||||
if (!ooxPic) return false;
|
||||
|
||||
std::wstring strXml;
|
||||
pOutput->m_nShapeType = SimpleTypes::Vml::sptPictureFrame;
|
||||
|
||||
Parse(oParam, pOutput, ooxPic->spPr.xfrm.GetPointer());
|
||||
|
||||
PPTX::Logic::ShapeStyle* oox_sp_style = ooxPic->style.GetPointer();
|
||||
|
||||
pOutput->m_bFilled = true;
|
||||
|
||||
Parse(oParam, pOutput, &ooxPic->blipFill);
|
||||
|
||||
if ((oox_sp_style) && (oox_sp_style->lnRef.idx.IsInit()))
|
||||
{
|
||||
Parse(oParam, pOutput, &oox_sp_style->lnRef, 2);
|
||||
}
|
||||
if (ooxPic->spPr.ln.IsInit())
|
||||
{
|
||||
Parse(oParam, pOutput, ooxPic->spPr.ln.GetPointer());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
{
|
||||
if (!m_vmlElement && !m_arrElement && !m_ooxShape) return false;
|
||||
|
||||
if (OOX::CHdrFtr *pHdrFtr = dynamic_cast<OOX::CHdrFtr *>(oParam.oReader->m_currentContainer))
|
||||
pOutput->m_nHeader = 1;//shape in header/footer
|
||||
else
|
||||
pOutput->m_nHeader = 0;
|
||||
|
||||
if (m_vmlElement || m_arrElement) return ParseVml(oParam , pOutput);
|
||||
|
||||
PPTX::Logic::Shape * ooxShape = dynamic_cast<PPTX::Logic::Shape*> (m_ooxShape);
|
||||
// PPTX::Logic::CxnSp * cxnShape = dynamic_cast<PPTX::Logic::CxnSp*> (m_ooxShape);
|
||||
PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*> (m_ooxShape);
|
||||
|
||||
if (ooxShape) return ParseShape(oParam, pOutput);
|
||||
if (ooxPic) return ParsePic(oParam, pOutput);
|
||||
//if (cxnShape) return ParseConnector(oParam, pOutput);
|
||||
|
||||
return false;
|
||||
}
|
||||
void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::UniFill *oox_fill, std::wstring *change_sheme_color)
|
||||
{
|
||||
@ -1401,12 +1461,6 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
}
|
||||
|
||||
//---------------------
|
||||
|
||||
if (OOX::CHdrFtr *pHdrFtr = dynamic_cast<OOX::CHdrFtr *>(oParam.oReader->m_currentContainer))
|
||||
{
|
||||
pOutput->m_nHeader = 1;//shape in header/footer
|
||||
}
|
||||
|
||||
return ParseVmlChild(oParam, pOutput);
|
||||
}
|
||||
bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
@ -1499,11 +1553,6 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
}
|
||||
if (m_ooxGroup)
|
||||
{
|
||||
//if( m_ooxGroup->m_sId.IsInit())
|
||||
//{
|
||||
// pOutput->m_nID = oParam.oReader->m_oOOXIdGenerator.GetId( m_ooxGroup->m_oId.get());
|
||||
//}
|
||||
|
||||
pOutput->m_nZOrderRelative = 0;
|
||||
|
||||
pOutput->m_nWrapType = 3; //def
|
||||
|
||||
@ -67,6 +67,12 @@ public:
|
||||
|
||||
static bool Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::BlipFill *oox_bitmap_fill);
|
||||
private:
|
||||
|
||||
bool ParseShape( ReaderParameter oParam , RtfShapePtr& oOutput);
|
||||
bool ParsePic( ReaderParameter oParam , RtfShapePtr& oOutput);
|
||||
|
||||
void Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::Xfrm *xfrm);
|
||||
|
||||
void Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_color, unsigned int & nColor, _CP_OPT(double) &opacity);
|
||||
void Parse(ReaderParameter oParam, PPTX::Logic::SolidFill *oox_solid_fill, unsigned int & nColor, _CP_OPT(double) &opacity);
|
||||
|
||||
|
||||
@ -779,7 +779,7 @@ std::wstring RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
if( true == poRtfDocument->m_oStyleTable.GetStyle( m_nCharStyle, oStyle ) )
|
||||
{
|
||||
sResult += L"<w:pStyle w:val=\"";
|
||||
sResult += oStyle->m_sName;
|
||||
sResult += L"Style_" + std::to_wstring(m_nCharStyle); //oStyle->m_sName;
|
||||
sResult += L"\"/>";
|
||||
}
|
||||
}
|
||||
@ -1179,28 +1179,32 @@ std::wstring RtfStyle::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
case stSection : sType = L"numbering"; break;
|
||||
case stTable : sType = L"table"; break;
|
||||
}
|
||||
sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\">";
|
||||
sResult += L"<w:name w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>";
|
||||
//sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\">";
|
||||
sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + L"Style_" + std::to_wstring(m_nID) + L"\">";
|
||||
sResult += L"<w:name w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>";
|
||||
|
||||
if( PROP_DEF != m_nBasedOn )
|
||||
{
|
||||
RtfStylePtr oBaseStyle;
|
||||
if( true == poDocument->m_oStyleTable.GetStyle( m_nBasedOn, oBaseStyle ) )
|
||||
sResult += L"<w:basedOn w:val=\"" + XmlUtils::EncodeXmlString( oBaseStyle->m_sName ) + L"\"/>";
|
||||
{
|
||||
sResult += L"<w:basedOn w:val=\"Style_" + std::to_wstring(m_nBasedOn) + L"\"/>";
|
||||
//sResult += L"<w:basedOn w:val=\"" + XmlUtils::EncodeXmlString( oBaseStyle->m_sName ) + L"\"/>";
|
||||
}
|
||||
}
|
||||
//if( PROP_DEF != m_nNext )
|
||||
// sResult += L"<w:next w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>", );//Todo
|
||||
//if( PROP_DEF != m_nLink )
|
||||
// sResult += L"<w:link w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>", );//Todo
|
||||
if( PROP_DEF != m_bHidden ) sResult += L"<w:hidden/>";
|
||||
if( PROP_DEF != m_bLocked ) sResult += L"<w:locked/>";
|
||||
if( PROP_DEF != m_bPersonal ) sResult += L"<w:personal w:val=\"true\" />";
|
||||
if( PROP_DEF != m_bCompose ) sResult += L"<w:personalCompose w:val=\"true\" />";
|
||||
if( PROP_DEF != m_bReply ) sResult += L"<w:personalReply w:val=\"true\" />";
|
||||
if( 1 == m_nSemiHidden ) sResult += L"<w:semiHidden/>";
|
||||
if( PROP_DEF != m_bQFormat ) sResult += L"<w:qformat/>";
|
||||
if( PROP_DEF != m_nPriority ) sResult += L"<w:uiPriority w:val=\"" + std::to_wstring(m_nPriority) + L"\"/>";
|
||||
if( PROP_DEF != m_bUnhiddenWhenUse ) sResult += L"<w:unhideWhenUsed/>";
|
||||
if( 1 == m_bHidden ) sResult += L"<w:hidden/>";
|
||||
if( 1 == m_bLocked ) sResult += L"<w:locked/>";
|
||||
if( 1 == m_bPersonal ) sResult += L"<w:personal w:val=\"true\" />";
|
||||
if( 1 == m_bCompose ) sResult += L"<w:personalCompose w:val=\"true\" />";
|
||||
if( 1 == m_bReply ) sResult += L"<w:personalReply w:val=\"true\" />";
|
||||
if( 1 == m_nSemiHidden ) sResult += L"<w:semiHidden/>";
|
||||
if( 1 == m_bQFormat ) sResult += L"<w:qFormat/>";
|
||||
if( 1 == m_bUnhiddenWhenUse ) sResult += L"<w:unhideWhenUsed/>";
|
||||
if( PROP_DEF != m_nPriority ) sResult += L"<w:uiPriority w:val=\"" + std::to_wstring(m_nPriority) + L"\"/>";
|
||||
|
||||
return sResult;
|
||||
}
|
||||
@ -1965,7 +1969,7 @@ std::wstring RtfParagraphProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
if( true == poRtfDocument->m_oStyleTable.GetStyle( m_nStyle, oCurStile ) )
|
||||
{
|
||||
sResult += L"<w:pStyle w:val=\"";
|
||||
sResult += oCurStile->m_sName;
|
||||
sResult += L"Style_" + std::to_wstring(m_nStyle);//oCurStile->m_sName;
|
||||
sResult += L"\"/>" ;
|
||||
}
|
||||
}
|
||||
@ -2558,7 +2562,7 @@ std::wstring RtfTableProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
if( true == poDocument->m_oStyleTable.GetStyle( m_nStyle, oCurStyle) )
|
||||
{
|
||||
sResult += L"<w:tblStyle w:val=\"";
|
||||
sResult += oCurStyle->m_sName;
|
||||
sResult += L"Style_" + std::to_wstring(m_nStyle); //oCurStyle->m_sName;
|
||||
sResult += L"\"/>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,8 +256,6 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
sResult += L"{\\shp";
|
||||
sResult += L"{\\*\\shpinst";
|
||||
|
||||
RENDER_RTF_INT( m_nID , sResult, L"shplid" );
|
||||
|
||||
if (!m_bInGroup)
|
||||
{
|
||||
m_bAllowOverlap = 1;
|
||||
@ -265,8 +263,8 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
m_nWrapType = 3;
|
||||
m_nWrapSideType = 0;
|
||||
m_bLockAnchor = 0;
|
||||
m_nZOrder = PROP_DEF;
|
||||
m_nZOrderRelative = PROP_DEF;
|
||||
//m_nZOrder = PROP_DEF;
|
||||
m_nZOrderRelative = 0;
|
||||
m_nLeft = m_nTop = 0;
|
||||
m_nRelBottom = m_nRelRight = PROP_DEF;
|
||||
m_nPositionV = m_nPositionH = PROP_DEF;
|
||||
@ -278,26 +276,28 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
|
||||
|
||||
RENDER_RTF_INT ( m_nHeader , sResult, L"shpfhdr" );
|
||||
|
||||
//sResult += L"\\shpbxcolumn";
|
||||
sResult += L"\\shpbxcolumn";
|
||||
sResult += L"\\shpbxignore";
|
||||
//sResult += L"\\shpbypara";
|
||||
sResult += L"\\shpbypara";
|
||||
sResult += L"\\shpbyignore";
|
||||
|
||||
RENDER_RTF_INT ( m_nWrapType , sResult, L"shpwr" );
|
||||
RENDER_RTF_INT ( m_nWrapSideType , sResult, L"shpwrk" );
|
||||
|
||||
//sResult += L"\\shpfblwtxt0";
|
||||
RENDER_RTF_INT( m_nZOrderRelative, sResult, L"shpfblwtxt");
|
||||
RENDER_RTF_INT ( m_nZOrder, sResult, L"shpz" );
|
||||
sResult += L"\\shplockanchor";
|
||||
|
||||
RENDER_RTF_INT ( m_nZOrder , sResult, L"shpz" );
|
||||
|
||||
RENDER_RTF_INT( m_nID, sResult, L"shplid" );
|
||||
|
||||
sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
|
||||
sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
|
||||
|
||||
}
|
||||
sResult += RenderToRtfShapeProperty( oRenderParameter );
|
||||
|
||||
sResult += L"{\\sp{\\sn fLockPosition}{\\sv 1}}";
|
||||
sResult += L"{\\sp{\\sn fLockRotation}{\\sv 1}}";
|
||||
//sResult += L"{\\sp{\\sn fLockPosition}{\\sv 1}}";
|
||||
//sResult += L"{\\sp{\\sn fLockRotation}{\\sv 1}}";
|
||||
|
||||
//picture
|
||||
if( 0 != m_oPicture && m_nFillType == 1 || m_nFillType == 2 || m_nFillType == 3 || m_nFillType == 9)
|
||||
@ -421,11 +421,11 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
std::wstring sResult;
|
||||
|
||||
//Position absolute
|
||||
RENDER_RTF_SHAPE_PROP(L"posh", sResult, m_nPositionH);
|
||||
RENDER_RTF_SHAPE_PROP(L"posrelh", sResult, m_nPositionHRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"posv", sResult, m_nPositionV);
|
||||
RENDER_RTF_SHAPE_PROP(L"posh", sResult, m_nPositionH);
|
||||
RENDER_RTF_SHAPE_PROP(L"posrelh", sResult, m_nPositionHRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"posv", sResult, m_nPositionV);
|
||||
RENDER_RTF_SHAPE_PROP(L"posrelv", sResult, m_nPositionVRelative);
|
||||
|
||||
RENDER_RTF_SHAPE_PROP(L"posrelv", sResult, m_nPositionVRelative);
|
||||
RENDER_RTF_SHAPE_PROP(L"fLayoutInCell", sResult, m_bLayoutInCell);
|
||||
RENDER_RTF_SHAPE_PROP(L"fAllowOverlap", sResult, m_bAllowOverlap);
|
||||
|
||||
@ -438,6 +438,17 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
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);
|
||||
|
||||
if (m_sName.empty() == false)
|
||||
{
|
||||
sResult += L"{\\sp{\\sn wzName}{\\sv ";
|
||||
sResult += m_sName + L"}}";
|
||||
}
|
||||
if (m_sDescription.empty() == false)
|
||||
{
|
||||
sResult += L"{\\sp{\\sn wzDescription}{\\sv ";
|
||||
sResult += m_sDescription + L"}}";
|
||||
}
|
||||
//Rehydration
|
||||
//RENDER_RTF_SHAPE_PROP(L"metroBlob", sResult, m_sMetroBlob);
|
||||
|
||||
@ -449,7 +460,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);
|
||||
//RENDER_RTF_SHAPE_PROP(L"fBackground", sResult, m_bBackground);
|
||||
//Text
|
||||
//sResult += L"{\\sp{\\sn fLockText}{\\sv 0}}";
|
||||
|
||||
@ -586,7 +597,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
|
||||
int nCodePage = -1;
|
||||
|
||||
if( !m_sGtextFont.empty() )
|
||||
if( m_sGtextFont.empty() == false)
|
||||
{
|
||||
sResult += L"{\\sp{\\sn gtextFont}{\\sv ";
|
||||
sResult += m_sGtextFont + L"}}";
|
||||
@ -1487,8 +1498,8 @@ std::wstring RtfShape::GroupRenderToRtf(RenderParameter oRenderParameter)
|
||||
RENDER_RTF_INT( m_nWrapSideType , sResult, L"shpwrk" );
|
||||
RENDER_RTF_BOOL( m_bLockAnchor , sResult, L"shplockanchor" );
|
||||
|
||||
//sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
|
||||
//sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
|
||||
sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
|
||||
sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="RtfFormatTest"
|
||||
ProjectGUID="{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
|
||||
RootNamespace="RtfFormatTest"
|
||||
@ -44,7 +44,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\Common\OfficeDrawing;"..\..\DesktopEditor\freetype-2.5.2\include";..\..\..\..\..\Common\OfficeDrawing\Shapes"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/xml/build/vs2005"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
|
||||
@ -46,7 +46,10 @@ BiffStructurePtr XFExtGradient::clone()
|
||||
void XFExtGradient::load(CFRecord& record)
|
||||
{
|
||||
record >> gradient >> cGradStops;
|
||||
for(size_t i = 0; i < cGradStops; ++i)
|
||||
|
||||
if (cGradStops > 256) cGradStops = 256;
|
||||
|
||||
for(size_t i = 0; !record.isEOF() && i < cGradStops; ++i)
|
||||
{
|
||||
GradStop grad_stop;
|
||||
record >> grad_stop;
|
||||
|
||||
@ -61,8 +61,10 @@ void XFExtNoFRT::load(CFRecord& record)
|
||||
unsigned short cexts;
|
||||
record >> cexts;
|
||||
|
||||
for(unsigned short i = 0; !record.isEOF() && i < cexts; ++i)
|
||||
for(unsigned short i = 0; i < cexts; ++i)
|
||||
{
|
||||
if (record.checkFitReadSafe(4) == false)
|
||||
break;
|
||||
ExtProp prop;
|
||||
record >> prop;
|
||||
rgExt.push_back(prop);
|
||||
|
||||
@ -249,17 +249,12 @@ int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
// CP_XML_ATTR(L"containsString", 0);
|
||||
// }
|
||||
//}
|
||||
if (bInteger)
|
||||
{
|
||||
if (bNumber) bInteger = false;
|
||||
else bNumber = true;
|
||||
}
|
||||
|
||||
if ((bDate & bNumber) || (bNumber & bString))
|
||||
{
|
||||
CP_XML_ATTR(L"containsSemiMixedTypes", 1);
|
||||
}
|
||||
else if ( bDate & bString)
|
||||
else if (bDate & bString)
|
||||
{
|
||||
CP_XML_ATTR(L"containsMixedTypes", 1);
|
||||
}
|
||||
@ -277,9 +272,22 @@ int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
CP_XML_ATTR(L"containsString", 0);
|
||||
}
|
||||
if (bEmpty) CP_XML_ATTR(L"containsBlank", 1);
|
||||
|
||||
if (bNumber) CP_XML_ATTR(L"containsNumber", 1);
|
||||
if (bInteger) CP_XML_ATTR(L"containsInteger", 1);
|
||||
|
||||
if (bInteger && !bDate)
|
||||
{
|
||||
if (bString)
|
||||
{
|
||||
CP_XML_ATTR(L"containsInteger", 1);
|
||||
}
|
||||
else if (!bNumber)
|
||||
{
|
||||
CP_XML_ATTR(L"containsNumber", 1);
|
||||
CP_XML_ATTR(L"containsInteger", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fdb->fnumMinMaxValid)
|
||||
{
|
||||
|
||||
@ -141,8 +141,9 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
|
||||
{
|
||||
case rt_Uncalced: proc.optional<Uncalced>(); break;
|
||||
case rt_Index: proc.optional<Index>(); break;
|
||||
case rt_CalcRefMode:
|
||||
case rt_CalcRefMode://todooo сделать вариативно по всем проверку
|
||||
case rt_CalcMode:
|
||||
case rt_PrintRowCol:
|
||||
{
|
||||
GLOBALS globals(false);
|
||||
if (proc.mandatory(globals))
|
||||
@ -221,6 +222,7 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_LabelSst://order_history.xls
|
||||
case rt_Label://file(6).xls
|
||||
case rt_Row:
|
||||
{
|
||||
|
||||
@ -34,6 +34,9 @@
|
||||
#define OOX_VBA_PROJECT_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
#include "../../../../../ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h"
|
||||
#include "../../../../../ASCOfficePPTXFile/Editor/imagemanager.h"
|
||||
|
||||
#include "../IFileContainer.h"
|
||||
#include "../../XlsxFormat/FileTypes_Spreadsheet.h"
|
||||
|
||||
@ -72,6 +75,49 @@ namespace OOX
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString1(0, m_filename.GetFilename());
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
copy_to(pWriter->m_pCommon->m_pImageManager->m_strDstMedia);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
std::wstring file_name = pReader->GetString2();
|
||||
|
||||
OOX::CPath inputPath = pReader->m_strFolder + FILE_SEPARATOR_STR + _T("media") + FILE_SEPARATOR_STR + file_name;
|
||||
OOX::CPath outputPath = pReader->m_pRels->m_pManager->GetDstFolder() + FILE_SEPARATOR_STR + _T("vbaProject.bin");
|
||||
|
||||
NSFile::CFileBinary::Copy(inputPath.GetPath(), outputPath.GetPath());
|
||||
|
||||
set_filename(outputPath.GetPath());
|
||||
|
||||
}break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
protected:
|
||||
};
|
||||
} // namespace OOX
|
||||
|
||||
@ -66,6 +66,7 @@ core_mac {
|
||||
core_windows {
|
||||
CONFIG -= debug_and_release debug_and_release_target
|
||||
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS += /MP
|
||||
}
|
||||
|
||||
core_win_32 {
|
||||
|
||||
@ -189,13 +189,15 @@ static const struct ActionNamesEmf
|
||||
|
||||
do
|
||||
{
|
||||
if (m_oStream.CanRead() < 8)
|
||||
if (m_oStream.IsEof())
|
||||
break;
|
||||
if (m_oStream.CanRead() < 8)
|
||||
return SetError();
|
||||
|
||||
m_oStream >> ulType;
|
||||
m_oStream >> ulSize;
|
||||
|
||||
if (ulSize < 1)
|
||||
if (ulSize < 1)
|
||||
continue;
|
||||
|
||||
m_ulRecordPos = m_oStream.Tell();
|
||||
|
||||
@ -2170,7 +2170,7 @@ namespace NExtractTools
|
||||
return nRes;
|
||||
}
|
||||
|
||||
int fromXlsxDir(const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params)
|
||||
int fromXlsxDir(const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, bool isSavedXFile)
|
||||
{
|
||||
int nRes = 0;
|
||||
if(0 != (AVS_OFFICESTUDIO_FILE_SPREADSHEET & nFormatTo) && AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV != nFormatTo)
|
||||
@ -2221,6 +2221,11 @@ namespace NExtractTools
|
||||
nRes = fromXlstBin(sTFile, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);
|
||||
}
|
||||
}
|
||||
if (SUCCEEDED_X2T(nRes) && !isSavedXFile && params.getSaveXFile())
|
||||
{
|
||||
std::wstring sToDir = NSDirectory::GetFolderPath(sTo);
|
||||
nRes = dir2zip(sFrom, sToDir + FILE_SEPARATOR_STR + _T("Editor.xlsx"));
|
||||
}
|
||||
return nRes;
|
||||
}
|
||||
int fromXlstBin(const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params)
|
||||
@ -2252,7 +2257,7 @@ namespace NExtractTools
|
||||
nRes = xlst_bin2xlsx_dir(sFrom, sTo, sXlsxDir, bFromChanges, sThemeDir, params);
|
||||
if(SUCCEEDED_X2T(nRes))
|
||||
{
|
||||
nRes = fromXlsxDir(sXlsxDir, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);
|
||||
nRes = fromXlsxDir(sXlsxDir, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2302,9 +2307,15 @@ namespace NExtractTools
|
||||
{
|
||||
std::wstring sXlsxDir = sTemp + FILE_SEPARATOR_STR + _T("xlsx_unpacked");
|
||||
NSDirectory::CreateDirectory(sXlsxDir);
|
||||
bool isSavedXFile = false;
|
||||
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX == nFormatFrom)
|
||||
{
|
||||
nRes = zip2dir(sFrom, sXlsxDir);
|
||||
if (SUCCEEDED_X2T(nRes) && params.getSaveXFile())
|
||||
{
|
||||
NSFile::CFileBinary::Copy(sFrom, NSSystemPath::GetDirectoryName(sTo) + FILE_SEPARATOR_STR + _T("Editor.xlsx"));
|
||||
isSavedXFile = true;
|
||||
}
|
||||
}
|
||||
else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatFrom)
|
||||
{
|
||||
@ -2318,7 +2329,7 @@ namespace NExtractTools
|
||||
nRes = AVS_FILEUTILS_ERROR_CONVERT;
|
||||
if(SUCCEEDED_X2T(nRes))
|
||||
{
|
||||
nRes = fromXlsxDir(sXlsxDir, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);
|
||||
nRes = fromXlsxDir(sXlsxDir, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params, isSavedXFile);
|
||||
}
|
||||
}
|
||||
return nRes;
|
||||
|
||||
@ -145,7 +145,7 @@ namespace NExtractTools
|
||||
int fromDoctBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromDocument (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, bool isSavedXFile);
|
||||
int fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
|
||||
@ -359,6 +359,7 @@ namespace NExtractTools
|
||||
std::wstring* m_sPassword;
|
||||
std::wstring* m_sTempDir;
|
||||
bool* m_bIsNoBase64;
|
||||
bool* m_bSaveXFile;
|
||||
//output params
|
||||
mutable bool m_bOutputConvertCorrupted;
|
||||
public:
|
||||
@ -385,6 +386,7 @@ namespace NExtractTools
|
||||
m_sPassword = NULL;
|
||||
m_sTempDir = NULL;
|
||||
m_bIsNoBase64 = NULL;
|
||||
m_bSaveXFile = NULL;
|
||||
|
||||
m_bOutputConvertCorrupted = false;
|
||||
}
|
||||
@ -411,6 +413,7 @@ namespace NExtractTools
|
||||
RELEASEOBJECT(m_sPassword);
|
||||
RELEASEOBJECT(m_sTempDir);
|
||||
RELEASEOBJECT(m_bIsNoBase64);
|
||||
RELEASEOBJECT(m_bSaveXFile);
|
||||
}
|
||||
|
||||
bool FromXmlFile(const std::wstring& sFilename)
|
||||
@ -501,6 +504,8 @@ namespace NExtractTools
|
||||
m_sTempDir = new std::wstring(sValue);
|
||||
else if(_T("m_bIsNoBase64") == sName)
|
||||
m_bIsNoBase64 = new bool(XmlUtils::GetBoolean2(sValue));
|
||||
else if(_T("m_bSaveXFile") == sName)
|
||||
m_bSaveXFile = new bool(XmlUtils::GetBoolean2(sValue));
|
||||
}
|
||||
else if(_T("m_nCsvDelimiterChar") == sName)
|
||||
{
|
||||
@ -532,6 +537,10 @@ namespace NExtractTools
|
||||
{
|
||||
return (NULL != m_bIsNoBase64) ? (*m_bIsNoBase64) : false;
|
||||
}
|
||||
bool getSaveXFile() const
|
||||
{
|
||||
return (NULL != m_bSaveXFile) ? (*m_bSaveXFile) : false;
|
||||
}
|
||||
std::wstring getXmlOptions()
|
||||
{
|
||||
std::wstring sRes;
|
||||
|
||||
@ -56,8 +56,8 @@ namespace BinXlsxRW {
|
||||
std::wstring sPath;
|
||||
int nIndex;
|
||||
std::map<OOX::Spreadsheet::CDrawing*, std::wstring> mapDrawings;
|
||||
public:
|
||||
ImageObject()
|
||||
|
||||
ImageObject()
|
||||
{
|
||||
}
|
||||
ImageObject(std::wstring& _sPath, int _nIndex)
|
||||
@ -75,8 +75,8 @@ namespace BinXlsxRW {
|
||||
OOX::Spreadsheet::CPivotCacheRecords* pRecords;
|
||||
long nCacheId;
|
||||
OOX::Spreadsheet::CPivotTable* pTable;
|
||||
public:
|
||||
PivotCachesTemp()
|
||||
|
||||
PivotCachesTemp()
|
||||
{
|
||||
nId = -1;
|
||||
pDefinitionData = NULL;
|
||||
@ -1515,7 +1515,7 @@ namespace BinXlsxRW {
|
||||
int Read()
|
||||
{
|
||||
return ReadTable(&BinaryWorkbookTableReader::ReadWorkbookTableContent, this);
|
||||
};
|
||||
}
|
||||
int ReadWorkbookTableContent(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -1548,12 +1548,19 @@ namespace BinXlsxRW {
|
||||
}
|
||||
else if(c_oSerWorkbookTypes::VbaProject == type)
|
||||
{
|
||||
res = Read1(length, &BinaryWorkbookTableReader::ReadVbaProject, this, poResult);
|
||||
}
|
||||
smart_ptr<OOX::VbaProject> oFileVbaProject(new OOX::VbaProject());
|
||||
|
||||
oFileVbaProject->fromPPTY(&m_oBufferedStream);
|
||||
|
||||
smart_ptr<OOX::File> oFile = oFileVbaProject.smart_dynamic_cast<OOX::File>();
|
||||
const OOX::RId oRId = m_oWorkbook.Add(oFile);
|
||||
|
||||
m_oWorkbook.m_bMacroEnabled = true;
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadWorkbookPr(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -1570,7 +1577,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadBookViews(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -1660,7 +1667,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDefinedNames(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -1673,7 +1680,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDefinedName(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDefinedName* pDefinedName = static_cast<OOX::Spreadsheet::CDefinedName*>(poResult);
|
||||
@ -1706,7 +1713,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalBook(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalLink* extLink = static_cast<OOX::Spreadsheet::CExternalLink*>(poResult);
|
||||
@ -1741,7 +1748,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalSheetNames(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalSheetNames* pSheetNames = static_cast<OOX::Spreadsheet::CExternalSheetNames*>(poResult);
|
||||
@ -1756,7 +1763,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalDefinedNames(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalDefinedNames* pDefinedNames = static_cast<OOX::Spreadsheet::CExternalDefinedNames*>(poResult);
|
||||
@ -1770,7 +1777,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalDefinedName(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalDefinedName* pDefinedName = static_cast<OOX::Spreadsheet::CExternalDefinedName*>(poResult);
|
||||
@ -1793,7 +1800,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalSheetDataSet(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalSheetDataSet* pSheetDataSet = static_cast<OOX::Spreadsheet::CExternalSheetDataSet*>(poResult);
|
||||
@ -1807,7 +1814,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalSheetData(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalSheetData* pSheetData = static_cast<OOX::Spreadsheet::CExternalSheetData*>(poResult);
|
||||
@ -1831,7 +1838,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalRow(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalRow* pRow = static_cast<OOX::Spreadsheet::CExternalRow*>(poResult);
|
||||
@ -1850,7 +1857,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExternalCell(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalCell* pCell = static_cast<OOX::Spreadsheet::CExternalCell*>(poResult);
|
||||
@ -1873,7 +1880,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadOleLink(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExternalLink* extLink = static_cast<OOX::Spreadsheet::CExternalLink*>(poResult);
|
||||
@ -1908,7 +1915,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadOleItem(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::COleItem* pOleItem = static_cast<OOX::Spreadsheet::COleItem*>(poResult);
|
||||
@ -1936,7 +1943,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDdeLink(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDdeLink* ddeLink = static_cast<OOX::Spreadsheet::CDdeLink*>(poResult);
|
||||
@ -1964,7 +1971,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDdeItem(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDdeItem* pDdeItem = static_cast<OOX::Spreadsheet::CDdeItem*>(poResult);
|
||||
@ -1997,7 +2004,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDdeValues(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDdeValues* pDdeValues = static_cast<OOX::Spreadsheet::CDdeValues*>(poResult);
|
||||
@ -2021,7 +2028,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDdeValue(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDdeValue* pDdeValue = static_cast<OOX::Spreadsheet::CDdeValue*>(poResult);
|
||||
@ -2040,7 +2047,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadPivotCaches(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -2099,31 +2106,6 @@ namespace BinXlsxRW {
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadVbaProject(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if(c_oSerWorkbookVbaProjectTypes::Name == type)
|
||||
{
|
||||
std::wstring file_name = m_oBufferedStream.GetString4(length);
|
||||
|
||||
OOX::CPath inputPath = m_oBufferedStream.m_strFolder + FILE_SEPARATOR_STR + _T("media") + FILE_SEPARATOR_STR + file_name;
|
||||
OOX::CPath outputPath = m_sDestinationDir + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("vbaProject.bin");
|
||||
|
||||
NSFile::CFileBinary::Copy(inputPath.GetPath(), outputPath.GetPath());
|
||||
|
||||
smart_ptr<OOX::VbaProject> oFileVbaProject(new OOX::VbaProject());
|
||||
oFileVbaProject->set_filename(outputPath.GetPath());
|
||||
|
||||
smart_ptr<OOX::File> oFile = oFileVbaProject.smart_dynamic_cast<OOX::File>();
|
||||
const OOX::RId oRId = m_oWorkbook.Add(oFile);
|
||||
|
||||
m_oWorkbook.m_bMacroEnabled = true;
|
||||
return res;
|
||||
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
}
|
||||
};
|
||||
class BinaryCommentReader : public Binary_CommonReader<BinaryCommentReader>
|
||||
{
|
||||
@ -2174,7 +2156,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadComment(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -2258,7 +2240,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadCommentDatas(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -2388,7 +2370,7 @@ namespace BinXlsxRW {
|
||||
{
|
||||
m_oWorkbook.m_oSheets.Init();
|
||||
return ReadTable(&BinaryWorksheetsTableReader::ReadWorksheetsTableContent, this);
|
||||
};
|
||||
}
|
||||
int ReadWorksheetsTableContent(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -2426,7 +2408,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadWorksheet(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -3012,7 +2994,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadPageMargins(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CPageMargins* pPageMargins = static_cast<OOX::Spreadsheet::CPageMargins*>(poResult);
|
||||
@ -3050,7 +3032,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadPageSetup(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CPageSetup* pPageSetup = static_cast<OOX::Spreadsheet::CPageSetup*>(poResult);
|
||||
@ -3068,7 +3050,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadPrintOptions(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CPrintOptions* pPrintOptions = static_cast<OOX::Spreadsheet::CPrintOptions*>(poResult);
|
||||
@ -3089,7 +3071,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadHyperlinks(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -3102,7 +3084,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadHyperlink(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CHyperlink* pHyperlink = static_cast<OOX::Spreadsheet::CHyperlink*>(poResult);
|
||||
@ -3137,7 +3119,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadMergeCells(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -3299,7 +3281,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDrawing(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CCellAnchor* pCellAnchor = static_cast<OOX::Spreadsheet::CCellAnchor*>(poResult);
|
||||
@ -3347,7 +3329,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadFromTo(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CFromTo* pFromTo = static_cast<OOX::Spreadsheet::CFromTo*>(poResult);
|
||||
@ -3377,7 +3359,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadExt(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CExt* pExt = static_cast<OOX::Spreadsheet::CExt*>(poResult);
|
||||
@ -3397,7 +3379,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadPos(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CPos* pPos = static_cast<OOX::Spreadsheet::CPos*>(poResult);
|
||||
@ -3417,7 +3399,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadSheetData(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -3430,7 +3412,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadRow(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CRow* pRow = static_cast<OOX::Spreadsheet::CRow*>(poResult);
|
||||
@ -3638,7 +3620,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadConditionalFormatting(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CConditionalFormatting* pConditionalFormatting = static_cast<OOX::Spreadsheet::CConditionalFormatting*>(poResult);
|
||||
@ -3662,7 +3644,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadConditionalFormattingRule(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CConditionalFormattingRule* pConditionalFormattingRule = static_cast<OOX::Spreadsheet::CConditionalFormattingRule*>(poResult);
|
||||
@ -3779,7 +3761,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadDataBar(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CDataBar* pDataBar = static_cast<OOX::Spreadsheet::CDataBar*>(poResult);
|
||||
@ -4027,7 +4009,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadSparklines(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CSparklines* pSparklines = static_cast<OOX::Spreadsheet::CSparklines*>(poResult);
|
||||
@ -4041,7 +4023,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadSparkline(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CSparkline* pSparkline = static_cast<OOX::Spreadsheet::CSparkline*>(poResult);
|
||||
@ -4105,7 +4087,7 @@ namespace BinXlsxRW {
|
||||
int Read()
|
||||
{
|
||||
return ReadTable(&BinaryOtherTableReader::ReadOtherTableContent, this);
|
||||
};
|
||||
}
|
||||
int ReadOtherTableContent(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -4139,7 +4121,7 @@ namespace BinXlsxRW {
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
};
|
||||
}
|
||||
int ReadMediaItem(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
|
||||
Reference in New Issue
Block a user