mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
59 Commits
v7.2.0.201
...
v7.2.2.37
| Author | SHA1 | Date | |
|---|---|---|---|
| 12ef2e6510 | |||
| da3a6b3189 | |||
| 81e03f64db | |||
| 0aed94b748 | |||
| 5af4ebba9e | |||
| a8f0c12d0f | |||
| e5351899c5 | |||
| fa094e152c | |||
| a69bff9e4e | |||
| 9b5fbdfa96 | |||
| 55f026bac4 | |||
| 63b2ddfff3 | |||
| 0cad3436fd | |||
| 8aa54ed2e2 | |||
| efb1511c59 | |||
| 34e9d98bee | |||
| b25c3d3022 | |||
| 2de73e8c02 | |||
| fb04ac8a69 | |||
| a4b767303d | |||
| 4b86a6384b | |||
| 889721fd7e | |||
| 1df71c6504 | |||
| f354046cc5 | |||
| b27a36246d | |||
| 74615f508e | |||
| 204696035d | |||
| cbd5d75532 | |||
| 26be4d9b20 | |||
| 6c146707f0 | |||
| cd0c129afb | |||
| 083304c9a3 | |||
| 89fac276c1 | |||
| d322c08d98 | |||
| e175b310f5 | |||
| fe5f52b7c2 | |||
| 7df8eacf0e | |||
| 3d71c4e609 | |||
| 65a203838b | |||
| 8301f402c5 | |||
| caab9eae47 | |||
| f5282fdc98 | |||
| d560fcc0a8 | |||
| 9ca7cc5008 | |||
| 56c3301e54 | |||
| 23bf5cb929 | |||
| 0b1c7f2642 | |||
| b0d0186dd4 | |||
| d72d114f19 | |||
| a0cf3f13c3 | |||
| d400135f60 | |||
| 856933b884 | |||
| eab909f76b | |||
| 30799c7b8c | |||
| c3246cf089 | |||
| 760242fa4d | |||
| cb76784260 | |||
| 1475162206 | |||
| d4a4e91d5a |
@ -815,7 +815,7 @@ int Binary_rPrReader::ReadContent(BYTE type, long length, void* poResult)
|
||||
case c_oSerProp_rPrType::MoveTo:
|
||||
{
|
||||
pRPr->m_oMoveTo.Init();
|
||||
oBinary_CommonReader2.ReadTrackRevision2(length, pRPr->m_oMoveFrom.GetPointer());
|
||||
oBinary_CommonReader2.ReadTrackRevision2(length, pRPr->m_oMoveTo.GetPointer());
|
||||
}break;
|
||||
case c_oSerProp_rPrType::rPrChange:
|
||||
{
|
||||
|
||||
@ -790,7 +790,6 @@ std::wstring oox2odf_converter::Impl::convert_formula(const std::wstring & expr)
|
||||
boost::match_default | boost::format_all);
|
||||
}
|
||||
|
||||
XmlUtils::replace_all(res, L"&", L"&");
|
||||
oox_replace_tmp_back(res);
|
||||
|
||||
replace_vertical(res);
|
||||
|
||||
@ -569,7 +569,8 @@ enum ElementType
|
||||
|
||||
typeScriptEventListener,
|
||||
|
||||
typeNumberNumberStyle,
|
||||
typeNumberBaseStyle,
|
||||
typeNumberNumberStyle,
|
||||
typeNumberDataStyle,
|
||||
typeNumberText,
|
||||
typeNumberNumber,
|
||||
|
||||
@ -123,7 +123,7 @@ void content_types_file::write(const std::wstring & RootPath)
|
||||
content_type_content_.xml_to_stream(resStream);
|
||||
std::wstring res = resStream.str();
|
||||
|
||||
simple_element elm(filename_, resStream.str());
|
||||
simple_element elm(filename_, res);
|
||||
elm.write(RootPath);
|
||||
}
|
||||
|
||||
|
||||
@ -69,11 +69,11 @@ class slide_content : noncopyable
|
||||
{
|
||||
public:
|
||||
slide_content();
|
||||
std::wostream & content() { return content_; }
|
||||
std::wstringstream & content() { return content_; }
|
||||
void add_rel(relationship const & r);
|
||||
void add_rels(rels & r);
|
||||
rels_file_ptr get_rel_file() { return rels_; }
|
||||
std::wstring str() { return content_.str(); }
|
||||
std::wstring str() { return content_.str(); }
|
||||
|
||||
static _CP_PTR(slide_content) create();
|
||||
|
||||
|
||||
@ -45,6 +45,29 @@ public:
|
||||
std::wstring name_;
|
||||
bool hidden_;
|
||||
|
||||
void clear()
|
||||
{
|
||||
cols_.clear();
|
||||
sheetFormat_.clear();
|
||||
sheetData_.clear();
|
||||
mergeCells_.clear();
|
||||
hyperlinks_.clear();
|
||||
comments_.clear();
|
||||
sort_.clear();
|
||||
tableParts_.clear();
|
||||
autofilter_.clear();
|
||||
conditionalFormatting_.clear();
|
||||
picture_background_.clear();
|
||||
dataValidations_.clear();
|
||||
dataValidationsX14_.clear();
|
||||
ole_objects_.clear();
|
||||
page_props_.clear();
|
||||
header_footer_.clear();
|
||||
controls_.clear();
|
||||
protection_.clear();
|
||||
breaks_.clear();
|
||||
}
|
||||
|
||||
std::wstringstream cols_;
|
||||
std::wstringstream sheetFormat_;
|
||||
std::wstringstream sheetData_;
|
||||
@ -202,11 +225,16 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
|
||||
|
||||
CP_XML_NODE(L"sheetData")
|
||||
{
|
||||
CP_XML_STREAM() << impl_->sheetData_.str();
|
||||
if (impl_->sheetData_.rdbuf()->in_avail() != 0)
|
||||
{
|
||||
impl_->sheetData_.flush();
|
||||
CP_XML_STREAM() << impl_->sheetData_.rdbuf();
|
||||
}
|
||||
}
|
||||
if (!impl_->protection_.str().empty())
|
||||
std::wstring protect = impl_->protection_.str();
|
||||
if (false == protect.empty())
|
||||
{
|
||||
CP_XML_STREAM() << impl_->protection_.str();
|
||||
CP_XML_STREAM() << protect;
|
||||
}
|
||||
//оказывается порядок нахождения элементов важен !!! (для office 2010)
|
||||
//объединенные ячейки раньше чем гиперлинки !!!
|
||||
@ -220,11 +248,13 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
|
||||
CP_XML_STREAM() << impl_->conditionalFormatting_.str();
|
||||
|
||||
CP_XML_STREAM() << impl_->dataValidations_.str();
|
||||
if (!impl_->hyperlinks_.str().empty())
|
||||
|
||||
std::wstring hyperlinks = impl_->hyperlinks_.str();
|
||||
if (false == hyperlinks.empty())
|
||||
{
|
||||
CP_XML_NODE(L"hyperlinks")
|
||||
{
|
||||
CP_XML_STREAM() << impl_->hyperlinks_.str();
|
||||
CP_XML_STREAM() << hyperlinks;
|
||||
}
|
||||
}
|
||||
CP_XML_STREAM() << impl_->page_props_.str();
|
||||
@ -248,30 +278,34 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
|
||||
CP_XML_ATTR(L"r:id", impl_->vml_drawingId_);
|
||||
}
|
||||
}
|
||||
if (false == impl_->ole_objects_.str().empty())
|
||||
std::wstring oleObjects = impl_->ole_objects_.str();
|
||||
if (false == oleObjects.empty())
|
||||
{
|
||||
CP_XML_NODE(L"oleObjects")
|
||||
{
|
||||
CP_XML_STREAM() << impl_->ole_objects_.str();
|
||||
CP_XML_STREAM() << oleObjects;
|
||||
}
|
||||
}
|
||||
std::wstring controls = impl_->controls_.str();
|
||||
if (false == impl_->controls_.str().empty())
|
||||
{
|
||||
CP_XML_NODE(L"controls")
|
||||
{
|
||||
CP_XML_STREAM() << impl_->controls_.str();
|
||||
CP_XML_STREAM() << controls;
|
||||
}
|
||||
}
|
||||
if (false == impl_->tableParts_.str().empty())
|
||||
std::wstring tableParts = impl_->tableParts_.str();
|
||||
if (false == tableParts.empty())
|
||||
{
|
||||
CP_XML_NODE(L"tableParts")
|
||||
{
|
||||
CP_XML_STREAM() << impl_->tableParts_.str();
|
||||
CP_XML_STREAM() << tableParts;
|
||||
}
|
||||
}
|
||||
CP_XML_STREAM() << impl_->picture_background_.str();
|
||||
|
||||
if (false == impl_->dataValidationsX14_.str().empty())
|
||||
std::wstring dataValidations14 = impl_->dataValidationsX14_.str();
|
||||
if (false == dataValidations14.empty())
|
||||
{
|
||||
CP_XML_NODE(L"extLst")
|
||||
{
|
||||
@ -280,12 +314,13 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
|
||||
CP_XML_ATTR(L"uri", L"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}");
|
||||
CP_XML_ATTR(L"xmlns:x14", L"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
|
||||
|
||||
CP_XML_STREAM() << impl_->dataValidationsX14_.str();
|
||||
CP_XML_STREAM() << dataValidations14;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
impl_->clear();
|
||||
}
|
||||
|
||||
void xlsx_xml_worksheet::set_drawing_link(std::wstring const & fileName, std::wstring const & id)
|
||||
|
||||
@ -173,7 +173,7 @@ void sheets_files::write(const std::wstring & RootPath)
|
||||
|
||||
//item->get_rel_file()->write(path.string<std::wstring>());
|
||||
|
||||
package::simple_element(fileName, item->str()).write(path);
|
||||
package::simple_element(fileName, item->content().str()).write(path);
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------
|
||||
@ -375,7 +375,7 @@ void xl_pivot_cache_files::write(const std::wstring & RootPath)
|
||||
|
||||
contentTypes->add_override(std::wstring(L"/xl/pivotCache/") + fileNameD, kWSConTypeD);
|
||||
|
||||
package::simple_element(fileNameD, pivot_caches_[i]->str_d()).write(path);
|
||||
package::simple_element(fileNameD, pivot_caches_[i]->definitions().str()).write(path);
|
||||
|
||||
if (pivot_caches_[i]->get_rels().empty() == false)
|
||||
{
|
||||
@ -392,7 +392,7 @@ void xl_pivot_cache_files::write(const std::wstring & RootPath)
|
||||
const std::wstring fileRef = std::wstring(L"pivotCache/") + fileNameD;
|
||||
rels_->add(id, kWSRel, fileRef);
|
||||
}
|
||||
std::wstring content_records = pivot_caches_[i]->str_r();
|
||||
std::wstring content_records = pivot_caches_[i]->records().str();
|
||||
if (!content_records.empty())
|
||||
{
|
||||
const std::wstring fileNameR = std::wstring(L"pivotCacheRecords") + std::to_wstring(i + 1) + L".xml";
|
||||
|
||||
@ -57,13 +57,11 @@ class sheet_content : noncopyable
|
||||
{
|
||||
public:
|
||||
sheet_content();
|
||||
std::wostream & content() { return content_; }
|
||||
std::wstringstream & content() { return content_; }
|
||||
void add_rel(relationship const & r);
|
||||
void add_rels(rels & r);
|
||||
rels_file_ptr get_rel_file() { return rels_; }
|
||||
std::wstring str() { return content_.str(); }
|
||||
static _CP_PTR(sheet_content) create();
|
||||
|
||||
private:
|
||||
std::wstringstream content_;
|
||||
rels_file_ptr rels_;
|
||||
@ -79,13 +77,10 @@ public:
|
||||
pivot_cache_content();
|
||||
static _CP_PTR(pivot_cache_content) create();
|
||||
|
||||
std::wostream & definitions() { return definitions_; }
|
||||
std::wostream & records() { return records_; }
|
||||
std::wstringstream & definitions() { return definitions_; }
|
||||
std::wstringstream & records() { return records_; }
|
||||
rels & get_rels() { return definitions_rels_file_->get_rels(); }
|
||||
|
||||
std::wstring str_d() { return definitions_.str(); }
|
||||
std::wstring str_r() { return records_.str(); }
|
||||
|
||||
friend class xl_pivot_cache_files;
|
||||
private:
|
||||
std::wstringstream records_;
|
||||
|
||||
@ -2064,6 +2064,11 @@ void variable_get::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * variable_set::ns = L"text";
|
||||
const wchar_t * variable_set::name = L"variable-set";
|
||||
|
||||
void variable_set::add_text(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::create(Text);
|
||||
content_.push_back(elm);
|
||||
}
|
||||
void variable_set::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"style:data-style-name", style_data_style_name_);
|
||||
@ -2076,7 +2081,31 @@ void variable_set::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void variable_set::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.finish_run();
|
||||
|
||||
Context.output_stream() << L"<w:sdt>";
|
||||
Context.output_stream() << L"<w:sdtPr>";
|
||||
{
|
||||
Context.output_stream() << L"<w:id w:val=\"" + std::to_wstring(Context.get_drawing_context().get_current_shape_id()) + L"\"/>";
|
||||
if (name_)
|
||||
{
|
||||
Context.output_stream() << L"<w:placeholder/>";
|
||||
Context.output_stream() << L"<w:docPart w:val=\"" + xml::utils::replace_text_to_xml(*name_) + L"\"/>";
|
||||
}
|
||||
Context.output_stream() << L"<w:showingPlcHdr/>";
|
||||
Context.output_stream() << L"<w:text/>";
|
||||
}
|
||||
Context.output_stream() << L"</w:sdtPr>";
|
||||
Context.output_stream() << L"<w:sdtContent>";
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
}
|
||||
Context.finish_run();
|
||||
Context.output_stream() << L"</w:sdtContent>";
|
||||
Context.output_stream() << L"</w:sdt>";
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
const wchar_t * variable_decl::ns = L"text";
|
||||
|
||||
@ -864,16 +864,18 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
|
||||
odf_types::common_value_and_type_attlist office_value_;
|
||||
_CP_OPT(std::wstring) office_formula_;
|
||||
odf_types::common_value_and_type_attlist office_value_;
|
||||
_CP_OPT(std::wstring) office_formula_;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(std::wstring) display_;
|
||||
_CP_OPT(std::wstring) name_;
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(std::wstring) display_;
|
||||
_CP_OPT(std::wstring) name_;
|
||||
|
||||
office_element_ptr_array content_;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(variable_set);
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -41,9 +41,9 @@ class abstract_xml : public office_element_impl<abstract_xml>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = type_AbstractXml;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
public:
|
||||
abstract_xml() {}
|
||||
|
||||
@ -49,9 +49,9 @@ class anim_par : public office_element_impl<anim_par>//Параллельные
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeAnimPar;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
odf_types::common_anim_smil_attlist attlist_;
|
||||
office_element_ptr anim_par_;
|
||||
@ -70,9 +70,8 @@ class anim_seq : public office_element_impl<anim_seq>//Последовател
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeAnimSeq;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
static const ElementType type = typeAnimSeq;
|
||||
|
||||
odf_types::common_anim_smil_attlist attlist_;
|
||||
office_element_ptr_array anim_par_array_;
|
||||
@ -112,9 +111,9 @@ class anim_transitionFilter : public office_element_impl<anim_transitionFilter>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeAnimTransitionFilter;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -131,9 +130,9 @@ class anim_audio : public office_element_impl<anim_audio>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeAnimAudio;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
|
||||
@ -94,9 +94,9 @@ class calcext_color_scale_entry : public office_element_impl<calcext_color_scale
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextColorScaleEntry;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -116,9 +116,9 @@ class calcext_formatting_entry : public office_element_impl<calcext_formatting_e
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextFormattingEntry;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -137,9 +137,9 @@ class calcext_icon_set : public office_element_impl<calcext_icon_set>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextIconSet;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -158,9 +158,9 @@ class calcext_data_bar: public office_element_impl<calcext_data_bar>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextDataBar;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -178,9 +178,9 @@ class calcext_color_scale: public office_element_impl<calcext_color_scale>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextColorScale;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -197,9 +197,9 @@ class calcext_date_is: public office_element_impl<calcext_date_is>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextDateIs;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -216,9 +216,9 @@ class calcext_condition: public office_element_impl<calcext_condition>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextCondition;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -235,9 +235,9 @@ class calcext_conditional_format: public office_element_impl<calcext_conditional
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextConditionalFormat;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -258,9 +258,9 @@ class calcext_conditional_formats: public office_element_impl<calcext_conditiona
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeCalcextConditionalFormats;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -38,11 +38,6 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <xml/xmlchar.h>
|
||||
|
||||
#include <xml/attributes.h>
|
||||
|
||||
|
||||
#include "odf_conversion_context.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -48,10 +48,8 @@ class draw_base : public office_element_impl<draw_base>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeDrawBase;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
static const ElementType type = typeDrawBase;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -62,7 +60,6 @@ public:
|
||||
odf_types::union_common_draw_attlists common_draw_attlists_;
|
||||
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -67,9 +67,9 @@ class draw_image : public office_element_impl<draw_image>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawImage;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -93,9 +93,9 @@ class draw_chart : public office_element_impl<draw_chart>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawChart;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -118,9 +118,7 @@ class draw_frame : public draw_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeDrawFrame;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
static const ElementType type = typeDrawFrame;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -148,9 +146,9 @@ class draw_g : public office_element_impl<draw_g>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawG;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -183,9 +181,9 @@ class draw_text_box : public office_element_impl<draw_text_box>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawTextBox;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -204,9 +202,9 @@ class draw_object : public office_element_impl<draw_object>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawObject;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -225,9 +223,9 @@ class draw_object_ole : public office_element_impl<draw_object>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawObjectOle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -246,9 +244,9 @@ class draw_plugin : public office_element_impl<draw_plugin>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawPlugin;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -68,9 +68,9 @@ class draw_page : public office_element_impl<draw_page>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDrawPage;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -91,9 +91,9 @@ class presentation_footer_decl : public office_element_impl<presentation_footer_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationFooterDecl;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -112,9 +112,9 @@ class presentation_date_time_decl : public office_element_impl<presentation_date
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationDateTimeDecl;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
_CP_OPT(std::wstring) presentation_name_;
|
||||
_CP_OPT(std::wstring) presentation_source_;
|
||||
@ -134,9 +134,9 @@ class presentation_notes : public office_element_impl<presentation_notes>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationNotes;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -46,7 +46,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawShape;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
virtual void serialize_attlist(CP_ATTR_NODE);
|
||||
@ -56,7 +56,7 @@ public:
|
||||
_CP_OPT(std::wstring) draw_id_;//используется для анимашек
|
||||
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
int sub_type_;
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawRect;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -104,7 +104,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawEllipse;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -120,7 +120,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawCircle;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -146,7 +146,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawLine;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -172,7 +172,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawPath;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -199,7 +199,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawPolygon;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -219,7 +219,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawCustomShape;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -248,8 +248,8 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawEquation;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -294,8 +294,8 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawHandle;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -340,7 +340,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawEnhancedGeometry;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -361,7 +361,7 @@ public:
|
||||
|
||||
static int parsing(_CP_OPT(std::wstring) val);//todoooo наоборот
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(draw_enhanced_geometry);
|
||||
@ -375,7 +375,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawCaption;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -399,7 +399,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawConnector;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -418,7 +418,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawControl;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -442,7 +442,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDr3dScene;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -462,7 +462,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDr3dExtrude;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -479,7 +479,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDr3dRotate;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -494,9 +494,9 @@ class dr3d_light : public office_element_impl<dr3d_light>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDr3dLight;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -519,7 +519,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDr3dCube;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -541,7 +541,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDr3dSphere;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -564,8 +564,8 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeDrawA;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -71,9 +71,9 @@ class style_header_footer_properties : public office_element_impl<style_header_f
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleHeaderFooterProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child)
|
||||
|
||||
@ -45,9 +45,9 @@ class text_number : public office_element_impl<text_number>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
public:
|
||||
text_number() {}
|
||||
@ -74,9 +74,9 @@ class text_list_item : public office_element_impl<text_list_item>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListItem;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -110,9 +110,9 @@ class text_list_header : public office_element_impl<text_list_header>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListHeader;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -41,10 +41,10 @@ class math_mstack : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMStack;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
@ -65,10 +65,10 @@ class math_msrow : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSRow;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -88,10 +88,10 @@ class math_msline : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSLine;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -111,10 +111,10 @@ class math_mlongdiv : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSLongDiv;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -134,10 +134,10 @@ class math_mscarries : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSCarries;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -156,10 +156,10 @@ class math_msgroup : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSGroup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -179,11 +179,11 @@ class math_mscarry : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSCarry;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child_element);
|
||||
|
||||
@ -52,7 +52,7 @@ public:
|
||||
static const wchar_t * name;
|
||||
|
||||
static const ElementType type = typeMathElement;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name) {}
|
||||
virtual void add_child_element(const office_element_ptr & child_element) {}
|
||||
@ -60,8 +60,8 @@ public:
|
||||
virtual void serialize(std::wostream & _Wostream) {}
|
||||
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
friend class odf_document;
|
||||
};
|
||||
@ -72,10 +72,10 @@ class office_math : public office_element_impl<office_math>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMath;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
friend class odf_document;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -94,11 +94,11 @@ class math_semantics : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMathSemantics;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child_element);
|
||||
@ -116,14 +116,12 @@ class math_annotation : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMathAnnotation;
|
||||
|
||||
_CP_OPT(std::wstring) encoding_;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
private:
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child_element);
|
||||
|
||||
@ -144,11 +142,11 @@ class math_annotation_xml : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMathAnnotationXml;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child_element);
|
||||
|
||||
@ -49,13 +49,13 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMRow;
|
||||
|
||||
math_mrow();
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -73,11 +73,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMFrac;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
_CP_OPT(Bool) bevelled;
|
||||
private:
|
||||
@ -99,11 +99,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSqrt;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -120,11 +120,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMRoot;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -141,11 +141,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMStyle;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
_CP_OPT(color) color_;
|
||||
|
||||
@ -169,10 +169,10 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMEnClose;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -189,11 +189,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMFenced;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -210,11 +210,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMPadded;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
@ -43,11 +43,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSub;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -65,11 +65,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -88,11 +88,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSubSup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -109,11 +109,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMNone;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -132,11 +132,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMPreScripts;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -151,11 +151,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMMultiScripts;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -174,11 +174,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMUnderOver;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -195,11 +195,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMOver;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
_CP_OPT(Bool) accent;
|
||||
private:
|
||||
@ -217,11 +217,11 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMUnder;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
@ -41,11 +41,11 @@ class math_mtable : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMTable;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -64,11 +64,11 @@ class math_malignmark : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMAlignMark;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -87,11 +87,11 @@ class math_maligngroup : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMAlignGroup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -110,11 +110,11 @@ class math_mtd : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMTd;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -133,11 +133,11 @@ class math_mlabeledtr : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMLabelEdTr;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -156,11 +156,11 @@ class math_mtr : public office_math_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMTr;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
@ -44,7 +44,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMI;
|
||||
private:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -68,7 +68,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMO;
|
||||
|
||||
_CP_OPT(Bool) accent_;
|
||||
@ -97,7 +97,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMN;
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMText;
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMSpace;
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMS;
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ namespace cpdoccore {
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeMGlyph;
|
||||
|
||||
|
||||
|
||||
@ -49,6 +49,9 @@ namespace cpdoccore {
|
||||
using namespace odf_types;
|
||||
|
||||
namespace odf_writer {
|
||||
|
||||
const wchar_t * number_style_base::ns = L"number";
|
||||
const wchar_t * number_style_base::name = L"base-style";
|
||||
|
||||
std::wstring number_style_base::get_style_name() const
|
||||
{
|
||||
|
||||
@ -43,12 +43,13 @@
|
||||
namespace cpdoccore {
|
||||
namespace odf_writer {
|
||||
|
||||
class number_style_base : public office_element
|
||||
class number_style_base : public office_element_impl<number_style_base>
|
||||
{
|
||||
public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const ElementType type = typeNumberBaseStyle;
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
|
||||
@ -71,10 +72,10 @@ class number_number_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberNumberStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -87,10 +88,10 @@ class number_currency_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberCurrencyStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
};
|
||||
@ -102,10 +103,10 @@ class number_text_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberTextStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
};
|
||||
@ -117,10 +118,10 @@ class number_date_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberDataStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -134,10 +135,8 @@ class number_percentage_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberPercentageStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
};
|
||||
@ -149,11 +148,9 @@ class number_time_style : public number_style_base
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeNumberTimeStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
|
||||
|
||||
static const ElementType type = typeNumberTimeStyle;
|
||||
|
||||
_CP_OPT(bool) number_automatic_order_;
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -166,9 +163,9 @@ class number_text : public office_element_impl<number_text>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberText;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
|
||||
@ -187,9 +184,9 @@ class number_number : public office_element_impl<number_number>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -215,9 +212,9 @@ class number_embedded_text : public office_element_impl<number_embedded_text>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberEmbeddedText;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -236,9 +233,9 @@ class number_scientific_number : public office_element_impl<number_scientific_nu
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberScientificNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -263,9 +260,9 @@ class number_currency_symbol : public office_element_impl<number_currency_symbol
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberCurrencySymbol;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -286,9 +283,9 @@ class number_text_content : public office_element_impl<number_text_content>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberTextContent;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
|
||||
@ -306,9 +303,9 @@ class number_day_of_week : public office_element_impl<number_day_of_week>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberDayOfWeek;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -324,9 +321,9 @@ class number_quarter : public office_element_impl<number_quarter>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberQuarter;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -342,9 +339,9 @@ class number_day : public office_element_impl<number_day>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberDay;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -361,9 +358,9 @@ class number_month : public office_element_impl<number_month>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberMonth;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -381,9 +378,9 @@ class number_year : public office_element_impl<number_year>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberYear;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -399,9 +396,9 @@ class number_hours : public office_element_impl<number_hours>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberHours;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -417,9 +414,9 @@ class number_minutes : public office_element_impl<number_minutes>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberMinutes;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -435,9 +432,9 @@ class number_seconds : public office_element_impl<number_seconds>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberSeconds;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -454,9 +451,9 @@ class number_am_pm : public office_element_impl<number_am_pm>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberAmPm;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -469,9 +466,9 @@ class number_fraction : public office_element_impl<number_fraction>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeNumberFraction;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -49,14 +49,200 @@ namespace odf_writer
|
||||
{
|
||||
namespace package
|
||||
{
|
||||
std::string GetUtf8StringFromUnicode_4bytes(const wchar_t* pUnicodes, size_t lCount)
|
||||
{
|
||||
std::string res;
|
||||
res.resize(6 * lCount + 1);
|
||||
|
||||
BYTE* pData = (BYTE*)res.c_str();
|
||||
BYTE* pCodesCur = pData;
|
||||
|
||||
const wchar_t* pEnd = pUnicodes + lCount;
|
||||
const wchar_t* pCur = pUnicodes;
|
||||
|
||||
while (pCur < pEnd)
|
||||
{
|
||||
unsigned int code = (unsigned int)*pCur++;
|
||||
|
||||
if (code < 0x80)
|
||||
{
|
||||
*pCodesCur++ = (BYTE)code;
|
||||
}
|
||||
else if (code < 0x0800)
|
||||
{
|
||||
*pCodesCur++ = 0xC0 | (code >> 6);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x10000)
|
||||
{
|
||||
*pCodesCur++ = 0xE0 | (code >> 12);
|
||||
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x1FFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xF0 | (code >> 18);
|
||||
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x3FFFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xF8 | (code >> 24);
|
||||
*pCodesCur++ = 0x80 | (code >> 18 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x7FFFFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xFC | (code >> 30);
|
||||
*pCodesCur++ = 0x80 | (code >> 24 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 18 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
}
|
||||
*pCodesCur++ = 0;
|
||||
res.resize(pCodesCur - pData);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string GetUtf8StringFromUnicode_2bytes(const wchar_t* pUnicodes, size_t lCount)
|
||||
{
|
||||
std::string res;
|
||||
res.resize(6 * lCount + 1);
|
||||
|
||||
BYTE* pData = (BYTE*)res.c_str();
|
||||
BYTE* pCodesCur = pData;
|
||||
|
||||
const wchar_t* pEnd = pUnicodes + lCount;
|
||||
const wchar_t* pCur = pUnicodes;
|
||||
|
||||
while (pCur < pEnd)
|
||||
{
|
||||
unsigned int code = (unsigned int)*pCur++;
|
||||
if (code >= 0xD800 && code <= 0xDFFF && pCur < pEnd)
|
||||
{
|
||||
code = 0x10000 + (((code & 0x3FF) << 10) | (0x03FF & *pCur++));
|
||||
}
|
||||
|
||||
if (code < 0x80)
|
||||
{
|
||||
*pCodesCur++ = (BYTE)code;
|
||||
}
|
||||
else if (code < 0x0800)
|
||||
{
|
||||
*pCodesCur++ = 0xC0 | (code >> 6);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x10000)
|
||||
{
|
||||
*pCodesCur++ = 0xE0 | (code >> 12);
|
||||
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x1FFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xF0 | (code >> 18);
|
||||
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x3FFFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xF8 | (code >> 24);
|
||||
*pCodesCur++ = 0x80 | ((code >> 18) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x7FFFFFFF)
|
||||
{
|
||||
*pCodesCur++ = 0xFC | (code >> 30);
|
||||
*pCodesCur++ = 0x80 | ((code >> 24) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 18) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
|
||||
*pCodesCur++ = 0x80 | (code & 0x3F);
|
||||
}
|
||||
}
|
||||
*pCodesCur = 0;
|
||||
res.resize(pCodesCur - pData);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string GetUtf8StringFromUnicode(const wchar_t* pUnicodes, size_t lCount)
|
||||
{
|
||||
if (sizeof(WCHAR) == 2)
|
||||
{
|
||||
return GetUtf8StringFromUnicode_2bytes(pUnicodes, lCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetUtf8StringFromUnicode_4bytes(pUnicodes, lCount);
|
||||
}
|
||||
}
|
||||
simple_element::simple_element(const std::wstring & FileName, const std::wstring & Content, bool utf8) : file_name_(FileName), utf8_(utf8)
|
||||
{
|
||||
if (utf8_)
|
||||
{
|
||||
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(Content);
|
||||
if (Content.length() > 10 * 1024 * 1024)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while (pos < Content.length())
|
||||
{
|
||||
size_t sz = 2 * 1024 * 1024;
|
||||
if (sz + pos > Content.length())
|
||||
sz = Content.length() - pos;
|
||||
if (sz < 1)
|
||||
break;
|
||||
|
||||
content_utf8_ += NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content.c_str() + pos, sz);
|
||||
|
||||
pos += sz;
|
||||
}
|
||||
}
|
||||
else
|
||||
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content.c_str(), Content.length());
|
||||
}else
|
||||
content_utf8_ = std::string( Content.begin(), Content.end());
|
||||
}
|
||||
simple_element::simple_element(const std::wstring & FileName, wchar_t* Content, size_t Size, bool utf8)
|
||||
{
|
||||
if (utf8_)
|
||||
{
|
||||
if (Size > 10 * 1024 * 1024)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while (pos < Size)
|
||||
{
|
||||
size_t sz = 2 * 1024 * 1024;
|
||||
if (sz + pos > Size)
|
||||
sz = Size - pos;
|
||||
if (sz < 1)
|
||||
break;
|
||||
|
||||
content_utf8_ += NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content + pos, sz);
|
||||
|
||||
pos += sz;
|
||||
}
|
||||
}
|
||||
else
|
||||
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content, Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring str(Content, Size);
|
||||
content_utf8_ = std::string(str.begin(), str.end());
|
||||
}
|
||||
}
|
||||
simple_element::simple_element(const std::wstring & FileName, std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> & streambuf, size_t Size, bool utf8)
|
||||
{
|
||||
}
|
||||
simple_element::simple_element(const std::wstring & FileName, const std::string & Content) : file_name_(FileName), utf8_(false), content_utf8_(Content)
|
||||
{
|
||||
}
|
||||
@ -361,9 +547,11 @@ namespace odf_writer
|
||||
{
|
||||
if (false == bXmlRootNodeWrite)
|
||||
{
|
||||
if (content)
|
||||
if (content_)
|
||||
{
|
||||
simple_element elm(L"content.xml", content->content_str());
|
||||
simple_element elm(L"content.xml", content_->content_str());
|
||||
content_.reset();
|
||||
|
||||
elm.write(RootPath, add_padding);
|
||||
}
|
||||
}
|
||||
@ -375,46 +563,6 @@ namespace odf_writer
|
||||
{
|
||||
CP_XML_NODE(L"office:document-content")
|
||||
{
|
||||
//CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
|
||||
//CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/" );
|
||||
//CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
|
||||
//CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML" );
|
||||
//CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office" );
|
||||
//CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer" );
|
||||
//CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc" );
|
||||
//CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events" );
|
||||
//CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms");
|
||||
//CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema" );
|
||||
//CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance" );
|
||||
//CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report" );
|
||||
//CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2" );
|
||||
//CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml" );
|
||||
//CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#" );
|
||||
//CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office" );
|
||||
//CP_XML_ATTR(L"xmlns:textooo", L"http://openoffice.org/2013/office" );
|
||||
//CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table" );
|
||||
//CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw" );
|
||||
//CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart" );
|
||||
//CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
|
||||
//CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" );
|
||||
//CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
|
||||
CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
|
||||
CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0");
|
||||
CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
|
||||
@ -457,19 +605,23 @@ namespace odf_writer
|
||||
CP_XML_ATTR(L"office:version", L"1.2");
|
||||
|
||||
|
||||
if (content)
|
||||
if ((content_) && (content_->styles_.rdbuf()->in_avail() != 0))
|
||||
{
|
||||
CP_XML_STREAM() << content->styles_str();
|
||||
content_->styles_.flush();
|
||||
CP_XML_STREAM() << content_->styles_.rdbuf();
|
||||
content_->styles_.clear();
|
||||
}
|
||||
CP_XML_NODE(L"office:body")
|
||||
{
|
||||
if (content)
|
||||
if ((content_) && (content_->content_.rdbuf()->in_avail() != 0))
|
||||
{
|
||||
CP_XML_STREAM() << content->content_str();
|
||||
content_->content_.flush();
|
||||
CP_XML_STREAM() << content_->content_.rdbuf();
|
||||
content_->content_.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
simple_element elm(L"content.xml", resStream.str());
|
||||
elm.write(RootPath, add_padding);
|
||||
}
|
||||
@ -523,14 +675,16 @@ namespace odf_writer
|
||||
CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
|
||||
CP_XML_ATTR(L"office:version", L"1.2");
|
||||
|
||||
if (content_)
|
||||
if ((content_) && (content_->content().rdbuf()->in_avail() != 0))
|
||||
{
|
||||
CP_XML_STREAM() << content_->str();
|
||||
content_->content().flush();
|
||||
CP_XML_STREAM() << content_->content().rdbuf();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
content_.reset();
|
||||
|
||||
simple_element elm(L"styles.xml", resStream.str());
|
||||
elm.write(RootPath, add_padding);
|
||||
}
|
||||
@ -547,14 +701,16 @@ namespace odf_writer
|
||||
CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
|
||||
CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
|
||||
|
||||
if (content_)
|
||||
if ((content_) && (content_->content().rdbuf()->in_avail() != 0))
|
||||
{
|
||||
CP_XML_STREAM() << content_->str();
|
||||
content_->content().flush();
|
||||
CP_XML_STREAM() << content_->content().rdbuf();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
content_.reset();
|
||||
|
||||
simple_element elm(L"settings.xml", resStream.str());
|
||||
elm.write(RootPath, add_padding);
|
||||
}
|
||||
|
||||
@ -58,10 +58,8 @@ namespace odf_writer
|
||||
{
|
||||
public:
|
||||
content_simple(){}
|
||||
std::wostream & content() { return content_; }
|
||||
std::wstring str() { return content_.str(); }
|
||||
static _CP_PTR(content_simple) create();
|
||||
|
||||
std::wstringstream & content() { return content_;}
|
||||
private:
|
||||
std::wstringstream content_;
|
||||
};
|
||||
@ -72,6 +70,8 @@ namespace odf_writer
|
||||
class content_content : noncopyable
|
||||
{
|
||||
public:
|
||||
friend class content_file;
|
||||
|
||||
content_content(){}
|
||||
std::wostream & content() { return content_; }
|
||||
std::wostream & styles() { return styles_; }
|
||||
@ -103,6 +103,10 @@ namespace odf_writer
|
||||
simple_element(const std::wstring & FileName, const std::string & Content);
|
||||
simple_element(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
|
||||
|
||||
simple_element(const std::wstring & FileName, wchar_t* Content, size_t Size, bool utf8 = true);
|
||||
|
||||
simple_element(const std::wstring & FileName, std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> & streambuf, size_t Size, bool utf8 = true);
|
||||
|
||||
static element_ptr create(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
|
||||
static element_ptr create(const std::wstring & FileName, const std::string & Content);
|
||||
|
||||
@ -126,10 +130,10 @@ namespace odf_writer
|
||||
private:
|
||||
bool bXmlRootNodeWrite = true;
|
||||
public:
|
||||
void set_content(content_content_ptr & c, bool bRootNode = true) { content = c; bXmlRootNodeWrite = bRootNode; }
|
||||
void set_content(content_content_ptr & c, bool bRootNode = true) { content_ = c; bXmlRootNodeWrite = bRootNode; }
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
|
||||
content_content_ptr content;
|
||||
content_content_ptr content_;
|
||||
};
|
||||
|
||||
class styles_file : public element
|
||||
|
||||
@ -89,10 +89,18 @@ odf_conversion_context::odf_conversion_context(_office_type_document type_, pack
|
||||
}
|
||||
odf_conversion_context::~odf_conversion_context()
|
||||
{
|
||||
output_document_ = NULL;
|
||||
|
||||
if (applicationFonts_)
|
||||
delete applicationFonts_;
|
||||
|
||||
for (size_t i = 0; i < objects_.size(); ++i)
|
||||
{
|
||||
if (objects_[i]) delete objects_[i];
|
||||
objects_[i] = NULL;
|
||||
}
|
||||
objects_.clear();
|
||||
}
|
||||
|
||||
void odf_conversion_context::set_fonts_directory(std::wstring pathFonts)
|
||||
{
|
||||
if (applicationFonts_)
|
||||
@ -130,14 +138,14 @@ double odf_conversion_context::convert_symbol_width(double val)
|
||||
odf_style_context* odf_conversion_context::styles_context()
|
||||
{
|
||||
if (!objects_.empty())
|
||||
return objects_[current_object_].style_context.get();
|
||||
return objects_[current_object_]->style_context.get();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
odf_settings_context* odf_conversion_context::settings_context()
|
||||
{
|
||||
if (!objects_.empty())
|
||||
return objects_[current_object_].settings_context.get();
|
||||
return objects_[current_object_]->settings_context.get();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@ -159,22 +167,22 @@ odf_math_context* odf_conversion_context::math_context()
|
||||
|
||||
odf_number_styles_context* odf_conversion_context::numbers_styles_context()
|
||||
{
|
||||
if (objects_.size() > 0 && objects_[current_object_].style_context)
|
||||
return &(objects_[current_object_].style_context->numbers_styles());
|
||||
if (objects_.size() > 0 && objects_[current_object_]->style_context)
|
||||
return &(objects_[current_object_]->style_context->numbers_styles());
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
_mediaitems* odf_conversion_context::mediaitems()
|
||||
{
|
||||
return &objects_[current_object_].mediaitems;
|
||||
return &objects_[current_object_]->mediaitems;
|
||||
}
|
||||
|
||||
void odf_conversion_context::end_document()
|
||||
{
|
||||
rels rels_;
|
||||
rels rels_;
|
||||
for (size_t i = 0; i < objects_.size(); i++)
|
||||
{
|
||||
_object & object = objects_[i];
|
||||
_object & object = *objects_[i];
|
||||
bool isRoot = (i == 0 ? true : false);
|
||||
|
||||
if (object.content == NULL)continue;
|
||||
@ -184,8 +192,8 @@ void odf_conversion_context::end_document()
|
||||
|
||||
package::content_content_ptr content_root_ = package::content_content::create();
|
||||
|
||||
if (objects_.back().scripts)
|
||||
objects_.back().scripts->serialize(content_root_->styles());
|
||||
if (objects_.back()->scripts)
|
||||
objects_.back()->scripts->serialize(content_root_->styles());
|
||||
|
||||
object.content->serialize(content_root_->content());
|
||||
|
||||
@ -245,15 +253,13 @@ void odf_conversion_context::end_document()
|
||||
|
||||
output_document_->add_object(package::element_ptr(object_files), isRoot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output_document_->set_rels(rels_);
|
||||
}
|
||||
void odf_conversion_context::start_chart()
|
||||
{
|
||||
create_object();
|
||||
create_element(L"office", L"chart", objects_.back().content, this, true);
|
||||
create_element(L"office", L"chart", objects_.back()->content, this, true);
|
||||
|
||||
chart_context_.set_styles_context(odf_conversion_context::styles_context());
|
||||
chart_context_.start_chart(get_current_object_element());
|
||||
@ -261,36 +267,39 @@ void odf_conversion_context::start_chart()
|
||||
void odf_conversion_context::start_spreadsheet()
|
||||
{
|
||||
create_object();
|
||||
create_element(L"office", L"spreadsheet", objects_.back().content, this, true);
|
||||
create_element(L"office", L"spreadsheet", objects_.back()->content, this, true);
|
||||
}
|
||||
void odf_conversion_context::start_text()
|
||||
{
|
||||
create_object();
|
||||
create_element(L"office", L"text", objects_.back().content, this, true);
|
||||
create_element(L"office", L"text", objects_.back()->content, this, true);
|
||||
}
|
||||
void odf_conversion_context::start_presentation()
|
||||
{
|
||||
create_object();
|
||||
create_element(L"office", L"presentation", objects_.back().content, this, true);
|
||||
create_element(L"office", L"presentation", objects_.back()->content, this, true);
|
||||
|
||||
create_element(L"office", L"scripts", objects_.back().scripts, this);
|
||||
create_element(L"office", L"scripts", objects_.back()->scripts, this);
|
||||
}
|
||||
void odf_conversion_context::create_object(bool bAddContentExt)
|
||||
{
|
||||
_object obj;
|
||||
|
||||
obj.content_ext = bAddContentExt;
|
||||
obj.style_context = boost::make_shared<odf_style_context>();
|
||||
obj.settings_context = boost::make_shared<odf_settings_context>();
|
||||
|
||||
obj.name = get_next_name_object();
|
||||
|
||||
obj.style_context->set_odf_context(this);
|
||||
obj.settings_context->set_odf_context(this);
|
||||
|
||||
objects_.push_back(obj);
|
||||
_object *obj = new _object();
|
||||
|
||||
current_object_ = objects_.size() - 1;
|
||||
if (obj)
|
||||
{
|
||||
obj->content_ext = bAddContentExt;
|
||||
obj->style_context = boost::make_shared<odf_style_context>();
|
||||
obj->settings_context = boost::make_shared<odf_settings_context>();
|
||||
|
||||
obj->name = get_next_name_object();
|
||||
|
||||
obj->style_context->set_odf_context(this);
|
||||
obj->settings_context->set_odf_context(this);
|
||||
|
||||
objects_.push_back(obj);
|
||||
|
||||
current_object_ = objects_.size() - 1;
|
||||
}
|
||||
}
|
||||
void odf_conversion_context::end_chart()
|
||||
{
|
||||
@ -312,7 +321,7 @@ bool odf_conversion_context::start_math()
|
||||
//имитация рисованного объекта - высота-ширина ????
|
||||
|
||||
create_object(false);
|
||||
create_element(L"math", L"math", objects_.back().content, this, true);
|
||||
create_element(L"math", L"math", objects_.back()->content, this, true);
|
||||
|
||||
math_context_.set_styles_context(odf_conversion_context::styles_context());
|
||||
math_context_.start_math(get_current_object_element());
|
||||
@ -368,7 +377,7 @@ office_element_ptr & odf_conversion_context::get_current_object_element()
|
||||
create_object();
|
||||
}
|
||||
|
||||
return objects_[current_object_].content;
|
||||
return objects_[current_object_]->content;
|
||||
}
|
||||
|
||||
std::wstring odf_conversion_context::get_next_name_object()
|
||||
@ -535,13 +544,13 @@ void odf_conversion_context::add_font(const std::wstring& font_name)
|
||||
{
|
||||
if (objects_.empty())return;
|
||||
|
||||
if (objects_[current_object_].mapFonts.find(font_name) == objects_[current_object_].mapFonts.end())
|
||||
if (objects_[current_object_]->mapFonts.find(font_name) == objects_[current_object_]->mapFonts.end())
|
||||
{
|
||||
objects_[current_object_].mapFonts.insert(std::make_pair(font_name, 1));
|
||||
objects_[current_object_]->mapFonts.insert(std::make_pair(font_name, 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
objects_[current_object_].mapFonts[font_name]++;
|
||||
objects_[current_object_]->mapFonts[font_name]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ private:
|
||||
|
||||
odf_element_state temporary_;
|
||||
|
||||
std::vector<_object> objects_;//"0" = root
|
||||
std::vector<_object*> objects_;//"0" = root
|
||||
|
||||
odf_chart_context chart_context_;
|
||||
odf_page_layout_context page_layout_context_;
|
||||
|
||||
@ -425,7 +425,7 @@ office_element_ptr & odf_style_context::add_or_find(std::wstring name, style_fam
|
||||
if (oox_id >= 0 && style_state_list_[i]->style_oox_id_ == oox_id)
|
||||
return style_state_list_[i]->get_office_element();
|
||||
|
||||
if ((name.length() >=0 && style_state_list_[i]->odf_style_->get_name() == name)
|
||||
if ((name.length() >= 0 && style_state_list_[i]->odf_style_->get_name() == name)
|
||||
&& style_state_list_[i]->root_ == root) return style_state_list_[i]->get_office_element();
|
||||
//во избежания имена генерим уникальные (в принципе для root и остальных - можно одинаковые)
|
||||
}
|
||||
|
||||
@ -294,10 +294,10 @@ void odf_text_context::start_paragraph(office_element_ptr & elm, bool styled)
|
||||
}
|
||||
|
||||
text_p* p = dynamic_cast<text_p*>(elm.get());
|
||||
if (p) p->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
|
||||
if (p) p->paragraph_attrs_.text_style_name_ = style_name;
|
||||
|
||||
text_h* h = dynamic_cast<text_h*>(elm.get());
|
||||
if (h) h->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
|
||||
if (h) h->paragraph_attrs_.text_style_name_ = style_name;
|
||||
|
||||
style *style_ = dynamic_cast<style*>(style_elm.get());
|
||||
if (style_)
|
||||
@ -310,10 +310,10 @@ void odf_text_context::start_paragraph(office_element_ptr & elm, bool styled)
|
||||
else if (false == parent_paragraph_style_.empty())
|
||||
{
|
||||
text_p* p = dynamic_cast<text_p*>(elm.get());
|
||||
if (p)p->paragraph_.paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
|
||||
if (p)p->paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
|
||||
|
||||
text_h* h = dynamic_cast<text_h*>(elm.get());
|
||||
if (h)p->paragraph_.paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
|
||||
if (h)p->paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
|
||||
}
|
||||
if (paragraph_properties_ && need_break_)
|
||||
{
|
||||
@ -643,12 +643,12 @@ void odf_text_context::add_text_style(office_element_ptr & style_elm, std::wstri
|
||||
|
||||
if (text_p* p = dynamic_cast<text_p*>(current_level_.back().elm.get()))
|
||||
{
|
||||
p->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
|
||||
p->paragraph_attrs_.text_style_name_ = style_name;
|
||||
}
|
||||
|
||||
if (text_h* h = dynamic_cast<text_h*>(current_level_.back().elm.get()))
|
||||
{
|
||||
h->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
|
||||
h->paragraph_attrs_.text_style_name_ = style_name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -709,8 +709,8 @@ void odf_text_context::save_property_break()
|
||||
current_level_[i].style_elm = style_->get_office_element();
|
||||
current_level_[i].style_name = style_->get_name();
|
||||
|
||||
if (p) p->paragraph_.paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
|
||||
if (h) h->paragraph_.paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
|
||||
if (p) p->paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
|
||||
if (h) h->paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -424,7 +424,7 @@ void ods_table_context::set_data_validation_error(const std::wstring &title, con
|
||||
text_p *p = dynamic_cast<text_p*>(error_message->content_.back().get());
|
||||
if (p)
|
||||
{
|
||||
p->paragraph_.add_text(content);
|
||||
p->add_text(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -452,7 +452,7 @@ void ods_table_context::set_data_validation_promt(const std::wstring &title, con
|
||||
text_p *p = dynamic_cast<text_p*>(help_message->content_.back().get());
|
||||
if (p)
|
||||
{
|
||||
p->paragraph_.add_text(content);
|
||||
p->add_text(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,9 +160,6 @@ ods_table_state::ods_table_state(odf_conversion_context * Context, office_elemen
|
||||
|
||||
defaut_row_height_ = 9;
|
||||
defaut_column_width_ = 28.34467120181406 * 1.674;//
|
||||
|
||||
|
||||
cells_size_ = 0;
|
||||
}
|
||||
|
||||
void ods_table_state::set_table_name(std::wstring name)
|
||||
@ -498,17 +495,17 @@ void ods_table_state::set_row_height(double height)
|
||||
|
||||
bool ods_table_state::is_cell_hyperlink()
|
||||
{
|
||||
if ( cells_size_ < 1 )return false;
|
||||
if (cells_.empty())return false;
|
||||
return cells_.back().hyperlink_idx >= 0 ? true : false;
|
||||
}
|
||||
bool ods_table_state::is_cell_comment()
|
||||
{
|
||||
if ( cells_size_ < 1 )return false;
|
||||
if (cells_.empty())return false;
|
||||
return cells_.back().comment_idx >= 0 ? true : false;
|
||||
}
|
||||
bool ods_table_state::is_cell_data_validation()
|
||||
{
|
||||
if ( cells_size_ < 1 ) return false;
|
||||
if (cells_.empty()) return false;
|
||||
return cells_.back().data_validation_name.empty() ? true : false;
|
||||
}
|
||||
int ods_table_state::is_cell_hyperlink(int col, int row)
|
||||
@ -607,14 +604,14 @@ office_element_ptr & ods_table_state::current_row_element()
|
||||
}
|
||||
office_element_ptr & ods_table_state::current_cell_element()
|
||||
{
|
||||
if (cells_size_ > 0)
|
||||
if (false == cells_.empty())
|
||||
return cells_.back().elm;
|
||||
else
|
||||
throw;
|
||||
}
|
||||
ods_hyperlink_state & ods_table_state::current_hyperlink()
|
||||
{
|
||||
if ((cells_size_ > 0 && !hyperlinks_.empty()) && (cells_.back().hyperlink_idx >= 0) )
|
||||
if ((false == cells_.empty() && !hyperlinks_.empty()) && (cells_.back().hyperlink_idx >= 0) )
|
||||
{
|
||||
return hyperlinks_[cells_.back().hyperlink_idx];
|
||||
}
|
||||
@ -657,7 +654,6 @@ void ods_table_state::start_cell(office_element_ptr & elm, office_element_ptr &
|
||||
|
||||
current_table_column_ += state.repeated;
|
||||
cells_.push_back(state);
|
||||
cells_size_++;
|
||||
|
||||
if (current_covered_cols_ > 0 && covered_cell)
|
||||
current_covered_cols_--;
|
||||
@ -665,7 +661,7 @@ void ods_table_state::start_cell(office_element_ptr & elm, office_element_ptr &
|
||||
|
||||
void ods_table_state::set_cell_format_value(office_value_type::type value_type)
|
||||
{
|
||||
if (cells_size_ < 1)return;
|
||||
if (cells_.empty())return;
|
||||
if (value_type == office_value_type::Custom)return; //general .. need detect
|
||||
|
||||
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
|
||||
@ -679,7 +675,7 @@ void ods_table_state::set_cell_format_value(office_value_type::type value_type)
|
||||
}
|
||||
void ods_table_state::set_cell_type(int type)
|
||||
{
|
||||
if (cells_size_ < 1)return;
|
||||
if (cells_.empty())return;
|
||||
|
||||
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
|
||||
if (cell == NULL)return;
|
||||
@ -1270,7 +1266,7 @@ void ods_table_state::set_cell_text(odf_text_context* text_context, bool cash_va
|
||||
}
|
||||
void ods_table_state::set_cell_value(const std::wstring & value, bool need_cash)
|
||||
{
|
||||
if (cells_size_ < 1)return;
|
||||
if (cells_.empty())return;
|
||||
|
||||
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
|
||||
if (cell == NULL)return;
|
||||
@ -1416,7 +1412,7 @@ void ods_table_state::end_cell_text()
|
||||
}
|
||||
void ods_table_state::end_cell()
|
||||
{
|
||||
if ( cells_size_ < 1)return;
|
||||
if (cells_.empty())return;
|
||||
|
||||
if (cells_.back().comment_idx >= 0)
|
||||
{
|
||||
@ -1434,6 +1430,10 @@ void ods_table_state::end_cell()
|
||||
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
|
||||
if (cell)cell->attlist_.common_value_and_type_attlist_ = boost::none;
|
||||
}
|
||||
if (map_merged_cells.empty())
|
||||
{
|
||||
cells_.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
void ods_table_state::add_default_cell( int repeated)
|
||||
@ -1565,7 +1565,6 @@ void ods_table_state::add_default_cell( int repeated)
|
||||
state.comment_idx = comment_idx;
|
||||
|
||||
cells_.push_back(state);
|
||||
cells_size_++;
|
||||
|
||||
current_table_column_ += state.repeated;
|
||||
|
||||
|
||||
@ -495,7 +495,6 @@ private:
|
||||
std::vector<office_element_ptr> current_level_;//постоянно меняющийся список уровней ("0-й элемент - сама таблица)
|
||||
|
||||
std::vector<ods_cell_state> cells_;
|
||||
long cells_size_;
|
||||
|
||||
std::vector<ods_hyperlink_state> hyperlinks_;
|
||||
std::map<unsigned int, ods_shared_formula_state> shared_formulas_;
|
||||
|
||||
@ -71,9 +71,9 @@ class dc_date : public office_element_impl<dc_date>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDcDate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -92,9 +92,9 @@ class dc_creator : public office_element_impl<dc_creator>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeDcCreator;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -113,9 +113,9 @@ class office_annotation : public office_element_impl<office_annotation>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeAnnotation;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -139,9 +139,9 @@ class office_annotation_end : public office_element_impl<office_annotation_end>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeAnnotationEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -166,9 +166,9 @@ class officeooo_annotation : public office_element_impl<officeooo_annotation>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeAnnotation;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -49,10 +49,10 @@ class office_body : public office_element_impl<office_body>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeBody;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
office_element * content() { return content_.get(); }
|
||||
|
||||
|
||||
@ -51,9 +51,9 @@ class office_chart : public office_element_impl<office_chart>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeChart;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -93,9 +93,9 @@ class chart_chart : public office_element_impl<chart_chart>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartChart;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -124,9 +124,9 @@ class chart_title : public office_element_impl<chart_title>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartTitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -144,9 +144,9 @@ class chart_subtitle : public office_element_impl<chart_subtitle>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartSubtitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -165,9 +165,9 @@ class chart_footer : public office_element_impl<chart_footer>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartFooter;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -203,9 +203,9 @@ class chart_legend : public office_element_impl<chart_legend>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartLegend;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -239,9 +239,9 @@ class chart_plot_area : public office_element_impl<chart_plot_area>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartPlotArea;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -269,9 +269,9 @@ class chart_wall : public office_element_impl<chart_wall>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartWall;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -290,9 +290,9 @@ class chart_floor : public office_element_impl<chart_floor>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartFloor;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -321,9 +321,9 @@ class chart_axis : public office_element_impl<chart_axis>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartAxis;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -352,9 +352,9 @@ class chart_grid : public office_element_impl<chart_grid>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartGrid;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -372,9 +372,9 @@ class chart_categories : public office_element_impl<chart_categories>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartCategories;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -405,9 +405,9 @@ class chart_series : public office_element_impl<chart_series>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartSeries;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -425,9 +425,9 @@ class chart_domain : public office_element_impl<chart_domain>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartDomain;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -454,9 +454,9 @@ class chart_data_point : public office_element_impl<chart_data_point>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartDataPoint;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -474,9 +474,9 @@ class chart_mean_value : public office_element_impl<chart_mean_value>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartMeanValue;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -493,9 +493,9 @@ class chart_error_indicator : public office_element_impl<chart_error_indicator>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartErrorIndicator;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -511,9 +511,9 @@ class chart_equation : public office_element_impl<chart_equation>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartEquation;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}//???
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}//???
|
||||
@ -531,9 +531,9 @@ class chart_regression_curve : public office_element_impl<chart_regression_curve
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartRegressionCurve;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -552,9 +552,9 @@ class chart_stock_gain_marker : public office_element_impl<chart_stock_gain_mark
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartStockGainMarker;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -573,9 +573,9 @@ class chart_stock_loss_marker : public office_element_impl<chart_stock_loss_mark
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartStockLossMarker;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -594,9 +594,9 @@ class chart_stock_range_line : public office_element_impl<chart_stock_range_line
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartStockRangeLine;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -615,9 +615,9 @@ class chart_date_scale : public office_element_impl<chart_date_scale>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeChartDateScale;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -51,9 +51,9 @@ class manifest_encryption_data : public office_element_impl<manifest_encryption_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeManifestEncryptionData;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -76,9 +76,9 @@ class manifest_algorithm : public office_element_impl<manifest_algorithm>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeManifestAlgorithm;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -96,9 +96,9 @@ class manifest_key_derivation : public office_element_impl<manifest_key_derivati
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeManifestKeyDerivation;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -118,9 +118,9 @@ class manifest_start_key_generation : public office_element_impl<manifest_start_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeManifestStartKeyGeneration;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -32,17 +32,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
#include <CPOptional.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <CPWeakPtr.h>
|
||||
#include <xml/xmlelement.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include <logging.h>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <odf/odf_elements_type.h>
|
||||
|
||||
#include "visitor.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace odf_writer {
|
||||
|
||||
@ -51,17 +46,18 @@ class odf_conversion_context;
|
||||
class office_element;
|
||||
|
||||
typedef shared_ptr<office_element>::Type office_element_ptr;
|
||||
typedef weak_ptr<office_element>::Type office_element_weak_ptr;
|
||||
typedef std::vector<office_element_ptr> office_element_ptr_array;
|
||||
|
||||
class office_element : public xml::element<wchar_t>, public base_visitable, boost::noncopyable
|
||||
class office_element : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
office_element() : context_(NULL) {}
|
||||
|
||||
virtual ElementType get_type() const = 0;
|
||||
virtual ~office_element() = 0;
|
||||
|
||||
virtual const wchar_t * get_ns() const = 0;
|
||||
virtual const wchar_t * get_name() const = 0;
|
||||
virtual ElementType get_type() const = 0;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream) = 0 ;
|
||||
|
||||
void setContext(odf_conversion_context * Context) { context_ = Context; }
|
||||
@ -77,62 +73,39 @@ public:
|
||||
////////////////////////
|
||||
virtual std::wostream & serialize(std::wostream & _Wostream) const
|
||||
{
|
||||
_CP_LOG << L"[warning] use base text_to_stream\n";
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const
|
||||
{
|
||||
_CP_LOG << L"[warning] use base xml_to_stream\n";
|
||||
_CP_LOG << L"[warning] use base serialize\n";
|
||||
return _Wostream;
|
||||
}
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const
|
||||
{
|
||||
_CP_LOG << L"[warning] use base text_to_stream\n";
|
||||
return _Wostream;
|
||||
}
|
||||
private:
|
||||
bool is_root_;
|
||||
odf_conversion_context * context_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_ public:\
|
||||
virtual const wchar_t * get_ns() const { return ns; }\
|
||||
virtual const wchar_t * get_name() const { return name; }\
|
||||
virtual xml::NodeType get_xml_type() const { return xml_type; }\
|
||||
virtual ElementType get_type() const { return type; }
|
||||
|
||||
|
||||
|
||||
inline office_element::~office_element()
|
||||
{
|
||||
}
|
||||
|
||||
/// \class office_element_impl
|
||||
template <class Element>
|
||||
class office_element_impl : public virtual office_element
|
||||
{
|
||||
// xml::element impl
|
||||
public:
|
||||
virtual const wchar_t * get_ns() const
|
||||
{
|
||||
return Element::ns;
|
||||
}
|
||||
|
||||
}
|
||||
virtual const wchar_t * get_name() const
|
||||
{
|
||||
return Element::name;
|
||||
}
|
||||
|
||||
virtual xml::NodeType get_xml_type() const
|
||||
{
|
||||
return Element::xml_type;
|
||||
}
|
||||
virtual void add_child_element( const office_element_ptr & child)
|
||||
{
|
||||
_CP_LOG << L"Non add child in " << Element::ns << L":" << Element::name << std::endl;
|
||||
}
|
||||
private:
|
||||
|
||||
// office_element impl
|
||||
public:
|
||||
virtual ElementType get_type() const
|
||||
{
|
||||
return Element::type;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "office_elements_create.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include "logging.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
@ -111,13 +111,12 @@ void not_applicable_element(const std::wstring & Current,const std::wstring & Ns
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void not_applicable_element(const office_element * CurrentElm, const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
std::wstringstream ss;
|
||||
if (CurrentElm)
|
||||
ss << CurrentElm->get_ns() << L":" << CurrentElm->get_name();
|
||||
not_applicable_element(ss.str(), Ns, Name);
|
||||
std::wstringstream ss;
|
||||
if (CurrentElm)
|
||||
ss << CurrentElm->get_ns() << L":" << CurrentElm->get_name();
|
||||
not_applicable_element(ss.str(), Ns, Name);
|
||||
}
|
||||
|
||||
bool create_element(const std::wstring & Ns,
|
||||
|
||||
@ -48,9 +48,9 @@ class office_event_listeners : public office_element_impl<office_event_listeners
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeEventListeners;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -84,9 +84,9 @@ class presentation_event_listener : public office_element_impl<presentation_even
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationEventListener;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -107,9 +107,9 @@ class script_event_listener : public office_element_impl<presentation_event_list
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeScriptEventListener;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -54,9 +54,9 @@ class office_forms : public office_element_impl<office_forms>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeForms;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -76,9 +76,9 @@ class form_form : public office_element_impl<form_form>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormForm;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -124,9 +124,9 @@ class form_properties : public office_element_impl<form_properties>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -143,9 +143,9 @@ class form_property : public office_element_impl<form_property>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormProperty;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -163,9 +163,9 @@ class form_list_property : public office_element_impl<form_list_property>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormListProperty;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -185,9 +185,9 @@ class form_list_value : public office_element_impl<form_list_value>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormListValue;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -205,7 +205,7 @@ public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormElement;
|
||||
|
||||
form_element() {}
|
||||
@ -245,9 +245,9 @@ class form_button : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormButton;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -272,9 +272,9 @@ class form_image_frame : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormImageFrame;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -288,9 +288,9 @@ class form_text : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormText;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -308,9 +308,9 @@ class form_textarea : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormTextarea;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -327,9 +327,9 @@ class form_fixed_text : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormFixedText;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -341,9 +341,9 @@ class form_checkbox : public form_text
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormCheckbox;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
form_checkbox() : current_state_(false), image_position_(L"center") {}
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -362,9 +362,9 @@ class form_radio : public form_checkbox
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormRadio;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -376,9 +376,9 @@ class form_combobox : public form_text
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormCombobox;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -402,9 +402,9 @@ class form_listbox : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormListbox;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -434,9 +434,9 @@ class form_date : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormDate;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -450,9 +450,9 @@ public:
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormValueRange;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -471,9 +471,9 @@ class form_frame : public form_element
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormFrame;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
};
|
||||
@ -485,9 +485,9 @@ class form_item : public office_element_impl<form_item>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeFormItem;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -46,9 +46,9 @@ class office_presentation : public office_element_impl<office_presentation>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficePresentation;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -46,9 +46,9 @@ class office_scripts : public office_element_impl<office_scripts>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeScripts;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -68,9 +68,9 @@ class office_script : public office_element_impl<office_script>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeScript;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -49,9 +49,9 @@ class office_settings : public office_element_impl<office_settings>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettings;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -69,9 +69,9 @@ class settings_config_item_set : public office_element_impl<settings_config_item
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettingsConfigItemSet;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -89,9 +89,9 @@ class settings_config_item : public office_element_impl<settings_config_item>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettingsConfigItem;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -110,9 +110,9 @@ class settings_config_item_map_indexed : public office_element_impl<settings_con
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettingsConfigItemMapIndexed;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -130,9 +130,9 @@ class settings_config_item_map_named : public office_element_impl<settings_confi
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettingsConfigItemMapNamed;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -150,9 +150,9 @@ class settings_config_item_map_entry : public office_element_impl<settings_confi
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeSettingsConfigItemMapEntry;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -46,6 +46,16 @@ namespace odf_writer {
|
||||
const wchar_t * office_spreadsheet::ns = L"office";
|
||||
const wchar_t * office_spreadsheet::name = L"spreadsheet";
|
||||
|
||||
office_spreadsheet::~office_spreadsheet()
|
||||
{
|
||||
named_expressions_.reset();
|
||||
database_ranges_.reset();
|
||||
data_pilot_tables_.reset();
|
||||
content_validations_.reset();
|
||||
forms_.reset();
|
||||
|
||||
content_.clear();
|
||||
}
|
||||
void office_spreadsheet::create_child_element(const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"office", L"forms")
|
||||
|
||||
@ -46,11 +46,13 @@ namespace odf_writer {
|
||||
class office_spreadsheet : public office_element_impl<office_spreadsheet>
|
||||
{
|
||||
public:
|
||||
office_spreadsheet() {}
|
||||
virtual ~office_spreadsheet();
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeOfficeSpreadsheet;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
static const ElementType type = typeOfficeSpreadsheet;
|
||||
|
||||
office_element_ptr_array & getContent(){return content_;}
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ class office_text : public office_element_impl<office_text>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeText;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -94,9 +94,9 @@ class office_change_info : public office_element_impl<office_change_info>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeChangeInfo;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -58,9 +58,7 @@ public:
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeText;
|
||||
static const ElementType type = typeTextText;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
static const ElementType type = typeTextText;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -86,9 +84,9 @@ class text_s : public office_element_impl<text_s>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextS;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -110,9 +108,9 @@ class text_tab : public office_element_impl<text_tab>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTab;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -136,9 +134,9 @@ class text_line_break : public office_element_impl<text_line_break>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextLineBreak;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -158,9 +156,9 @@ class text_bookmark : public office_element_impl<text_bookmark>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBookmark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -184,9 +182,9 @@ class text_bookmark_start : public office_element_impl<text_bookmark_start>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBookmarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
text_bookmark_start() {}
|
||||
@ -209,9 +207,9 @@ class text_bookmark_end : public office_element_impl<text_bookmark_end>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBookmarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
text_bookmark_end() {} ;
|
||||
@ -234,9 +232,9 @@ class text_reference_mark : public office_element_impl<text_reference_mark>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextReferenceMark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
text_reference_mark() {};
|
||||
@ -259,9 +257,9 @@ class text_reference_mark_start : public office_element_impl<text_reference_mark
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextReferenceMarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
text_reference_mark_start() {}
|
||||
@ -284,9 +282,9 @@ class text_reference_mark_end : public office_element_impl<text_reference_mark_e
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextReferenceMarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
text_reference_mark_end() {};
|
||||
@ -309,9 +307,9 @@ class text_span : public office_element_impl<text_span>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSpan;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -338,9 +336,9 @@ class text_a : public office_element_impl<text_a>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextA;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
public:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -372,9 +370,9 @@ class text_note_citation : public office_element_impl<text_note_citation>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextNoteCitation;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -398,9 +396,9 @@ class text_note_body : public office_element_impl<text_note_body>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextNoteBody;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -424,9 +422,9 @@ class text_note : public office_element_impl<text_note>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextNote;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -454,9 +452,9 @@ class text_ruby : public office_element_impl<text_ruby>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextRuby;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -491,9 +489,9 @@ class text_title : public office_element_impl<text_title>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -516,9 +514,9 @@ class text_placeholder : public office_element_impl<text_placeholder>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextPlaceholder;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -539,9 +537,9 @@ class text_page_number: public office_element_impl<text_page_number>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextPageNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -568,9 +566,9 @@ class text_page_count : public office_element_impl<text_page_count>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextPageCount;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -592,9 +590,9 @@ class text_date : public office_element_impl<text_date>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextDate;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -619,9 +617,9 @@ class text_time : public office_element_impl<text_time>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTime;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -646,9 +644,9 @@ class text_file_name : public office_element_impl<text_file_name>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextFileName;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -670,9 +668,9 @@ class text_sequence : public office_element_impl<text_sequence>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSequence;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -698,9 +696,9 @@ class text_text_input : public office_element_impl<text_text_input>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTextInput;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -720,9 +718,9 @@ class text_sheet_name : public office_element_impl<text_sheet_name>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSheetName;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -742,9 +740,9 @@ class presentation_footer : public office_element_impl<presentation_footer>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationFooter;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -760,9 +758,9 @@ class presentation_date_time: public office_element_impl<presentation_date_time>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typePresentationDateTime;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -778,9 +776,9 @@ class text_toc_mark_start : public office_element_impl<text_toc_mark_start>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTocMarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -799,9 +797,9 @@ class text_toc_mark_end : public office_element_impl<text_toc_mark_end>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTocMarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -819,9 +817,9 @@ class text_toc_mark : public office_element_impl<text_toc_mark>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTocMark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -840,9 +838,9 @@ class text_alphabetical_index_mark_start : public office_element_impl<text_alpha
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndexMarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -866,9 +864,9 @@ class text_alphabetical_index_mark_end : public office_element_impl<text_alphabe
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndexMarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -886,9 +884,9 @@ class text_alphabetical_index_mark : public office_element_impl<text_alphabetica
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndexMark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -912,10 +910,10 @@ class text_bibliography_mark : public office_element_impl<text_bibliography_mark
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBibliographyMark;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -962,9 +960,9 @@ class text_sequence_ref : public office_element_impl<text_sequence_ref>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSequenceRef;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -985,9 +983,9 @@ class text_drop_down : public office_element_impl<text_drop_down>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextDropDown;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -1009,9 +1007,9 @@ class text_label : public office_element_impl<text_label>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextLabel;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
|
||||
@ -129,10 +129,10 @@ class style_chart_properties : public office_element_impl<style_chart_properties
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleChartProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
|
||||
@ -148,10 +148,10 @@ class style_graphic_properties : public office_element_impl<style_graphic_proper
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleGraphicPropertis;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -169,10 +169,10 @@ class loext_graphic_properties : public office_element_impl<loext_graphic_proper
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleGraphicPropertis;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
|
||||
@ -48,9 +48,9 @@ class style_map : public office_element_impl<style_map>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleMap;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
@ -122,9 +122,9 @@ class style_page_layout_properties : public office_element_impl<style_page_layou
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStylePageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
style_page_layout_properties() { }
|
||||
|
||||
|
||||
@ -80,10 +80,10 @@ class style_tab_stop : public office_element_impl<style_tab_stop>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTabStop;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -111,10 +111,10 @@ class style_tab_stops : public office_element_impl<style_tab_stops>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTabStops;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
size_t size() const { return style_tab_stops_.size(); }
|
||||
|
||||
@ -134,10 +134,10 @@ class style_drop_cap : public office_element_impl<style_drop_cap>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDropCap;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -159,10 +159,10 @@ class style_background_image : public office_element_impl<style_background_image
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleBackgroundImage;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -264,10 +264,10 @@ class style_paragraph_properties : public office_element_impl<style_paragraph_pr
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleParagraphProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
|
||||
@ -53,10 +53,10 @@ class presentation_placeholder : public office_element_impl<presentation_placeho
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStylePresentationPlaceholder;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -80,10 +80,10 @@ class presentation_sound : public office_element_impl<presentation_sound>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStylePresentationSound;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -135,10 +135,10 @@ class style_drawing_page_properties : public office_element_impl<style_drawing_p
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawingPageProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
|
||||
@ -51,9 +51,9 @@ class style_columns : public office_element_impl<style_columns>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleColumns;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -76,9 +76,9 @@ class style_column : public office_element_impl<style_column>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleColumn;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -100,9 +100,9 @@ class style_column_sep : public office_element_impl<style_column_sep>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleColumnSep;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -124,9 +124,9 @@ class style_section_properties : public office_element_impl<style_section_proper
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleSectionProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
|
||||
@ -97,10 +97,10 @@ class style_table_properties : public office_element_impl<style_table_properties
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTableProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child){}
|
||||
@ -134,10 +134,10 @@ class style_table_column_properties : public office_element_impl<style_table_col
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTableColumnProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -168,10 +168,10 @@ class style_table_row_properties : public office_element_impl<style_table_row_pr
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTableRowProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -236,10 +236,10 @@ class style_table_cell_properties : public office_element_impl<style_table_cell_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTableCellProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
|
||||
@ -202,10 +202,10 @@ class style_text_properties : public office_element_impl<style_text_properties>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleTextProperties;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
void apply_from(const style_text_properties * Other);
|
||||
|
||||
|
||||
@ -135,9 +135,9 @@ class default_style : public office_element_impl<default_style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDefaultStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
default_style() : content_(getContext()) {}
|
||||
|
||||
@ -160,10 +160,10 @@ class draw_gradient : public office_element_impl<draw_gradient>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawGradient;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
std::wstring get_style_name(){return draw_name_.get_value_or(L"");}
|
||||
|
||||
@ -195,10 +195,10 @@ class draw_hatch : public office_element_impl<draw_hatch>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawHatch;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
std::wstring get_style_name(){return draw_name_.get_value_or(L"");}
|
||||
|
||||
@ -222,10 +222,10 @@ class draw_opacity : public office_element_impl<draw_opacity>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawOpacity;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
std::wstring get_style_name(){return draw_name_.get_value_or(L"");}
|
||||
|
||||
@ -255,10 +255,10 @@ class draw_layer : public office_element_impl<draw_layer>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawLayer;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
_CP_OPT(std::wstring) draw_name_;
|
||||
|
||||
@ -273,10 +273,10 @@ class draw_layer_set : public office_element_impl<draw_layer_set>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawLayerSet;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -293,10 +293,10 @@ class draw_fill_image : public office_element_impl<draw_fill_image>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawFillImage;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
std::wstring get_style_name(){return draw_name_.get_value_or(L"");}
|
||||
|
||||
@ -316,10 +316,10 @@ class draw_marker : public office_element_impl<draw_marker>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleDrawMarker;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
std::wstring get_style_name(){return draw_name_.get_value_or(L"");}
|
||||
|
||||
@ -346,9 +346,9 @@ class style : public office_element_impl<style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
style() : content_(getContext()) {}
|
||||
|
||||
@ -436,9 +436,9 @@ class office_automatic_styles : public office_element_impl<office_automatic_styl
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeAutomaticStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -457,9 +457,9 @@ class office_master_styles : public office_element_impl<office_master_styles>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeMasterStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -500,9 +500,9 @@ class style_master_page: public office_element_impl<style_master_page>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleMasterPage;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -536,9 +536,9 @@ class office_styles : public office_element_impl<office_styles>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -586,9 +586,9 @@ class style_header : public office_element_impl<style_header>, public header_foo
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleHeader;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -606,9 +606,9 @@ class style_footer : public office_element_impl<style_footer>, public header_foo
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFooter;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -627,9 +627,9 @@ class style_header_first : public office_element_impl<style_header_first>, publi
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleHeaderFirst;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -647,9 +647,9 @@ class style_footer_first : public office_element_impl<style_footer_first>, publi
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFooterFirst;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -667,9 +667,9 @@ class style_header_left : public office_element_impl<style_header_left>, public
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleHeaderLeft;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -687,9 +687,9 @@ class style_footer_left : public office_element_impl<style_footer_left>, public
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFooterLeft;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -718,9 +718,9 @@ class style_header_style : public office_element_impl<style_header_style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleHeaderStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -739,9 +739,9 @@ class style_footer_style : public office_element_impl<style_footer_style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFooterStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -759,9 +759,9 @@ class style_page_layout : public office_element_impl<style_page_layout>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStylePageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
style_page_layout_attlist style_page_layout_attlist_;
|
||||
|
||||
@ -799,9 +799,9 @@ class style_footnote_sep : public office_element_impl<style_footnote_sep>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFootnoteSep;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -818,9 +818,9 @@ class text_notes_configuration : public office_element_impl<text_notes_configura
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextNotesConfiguration;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -847,9 +847,9 @@ class text_linenumbering_configuration : public office_element_impl<text_linenum
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextLinenumberingConfiguration;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -874,9 +874,9 @@ class text_linenumbering_separator : public office_element_impl<text_linenumberi
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextLinenumberingSeparator;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name) {}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
@ -894,9 +894,9 @@ class style_presentation_page_layout : public office_element_impl<style_presenta
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStylePresentationPageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -918,10 +918,10 @@ class style_font_face : public office_element_impl<style_font_face>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleFontFace;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name){}
|
||||
@ -981,10 +981,10 @@ class office_font_face_decls : public office_element_impl<office_font_face_decls
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeOfficeFontFaceDecls;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -1001,9 +1001,9 @@ class style_region_left : public office_element_impl<style_region_left>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleRegionLeft;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -1020,9 +1020,9 @@ class style_region_right : public office_element_impl<style_region_right>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleRegionRight;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -1041,9 +1041,9 @@ class style_region_center : public office_element_impl<style_region_center>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleRegionCenter;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
@ -65,9 +65,9 @@ class text_list_style : public office_element_impl<text_list_style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -117,9 +117,9 @@ class style_list_level_properties : public office_element_impl<style_list_level_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleListLevelProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -151,9 +151,9 @@ class style_list_level_label_alignment : public office_element_impl<style_list_l
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeStyleListLevelLabelAlignment;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -179,9 +179,9 @@ class text_list_level_style_number : public office_element_impl<text_list_level_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListLevelStyleNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
|
||||
office_element_ptr style_list_level_properties_;
|
||||
@ -220,9 +220,9 @@ class text_list_level_style_bullet : public office_element_impl<text_list_level_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListLevelStyleBullet;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -254,9 +254,9 @@ class text_list_level_style_image : public office_element_impl<text_list_level_s
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextListLevelStyleImage;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child);
|
||||
@ -276,9 +276,9 @@ class text_outline_style : public office_element_impl<text_outline_style>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextOutlineStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child);
|
||||
@ -296,9 +296,9 @@ class text_outline_level_style : public office_element_impl<text_outline_level_s
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextOutlineLevelStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(const office_element_ptr & child);
|
||||
|
||||
@ -417,8 +417,8 @@ void table_columns::serialize(std::wostream & strm)
|
||||
// table-columns-no-group
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//const wchar_t * table_columns_no_group::ns = L"table";
|
||||
//const wchar_t * table_columns_no_group::name = L"table-columns";
|
||||
const wchar_t * table_columns_no_group::ns = L"table";
|
||||
const wchar_t * table_columns_no_group::name = L"table-columns";
|
||||
table_columns_no_group::table_columns_no_group(odf_conversion_context * _Context) : was_header_(false)
|
||||
{
|
||||
Context = _Context;
|
||||
@ -564,24 +564,6 @@ void table_columns_and_groups::serialize(std::wostream & strm)
|
||||
content_[i]->serialize(strm);
|
||||
}
|
||||
}
|
||||
// table-table-cell-content
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void table_table_cell_content::create_child_element( const std::wstring & Ns, const std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
CP_CREATE_ELEMENT_SIMPLE(text_content_);
|
||||
}
|
||||
void table_table_cell_content::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
text_content_.push_back(child_element);
|
||||
}
|
||||
void table_table_cell_content::serialize(std::wostream & strm)
|
||||
{
|
||||
for (size_t i = 0; i < text_content_.size(); i++)
|
||||
{
|
||||
text_content_[i]->serialize(strm);
|
||||
}
|
||||
}
|
||||
// table:table-cell
|
||||
// table-table-cell
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -590,12 +572,11 @@ const wchar_t * table_table_cell::name = L"table-cell";
|
||||
|
||||
void table_table_cell::create_child_element( const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
content_.create_child_element(Ns, Name, getContext());
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
|
||||
void table_table_cell::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
content_.add_child_element(child_element);
|
||||
content_.push_back(child_element);
|
||||
}
|
||||
void table_table_cell::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
@ -606,7 +587,10 @@ void table_table_cell::serialize(std::wostream & _Wostream)
|
||||
attlist_.serialize(CP_GET_XML_NODE());
|
||||
attlist_extra_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
content_.serialize(CP_XML_STREAM());
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -619,12 +603,12 @@ const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
|
||||
void table_covered_table_cell::create_child_element( const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
empty_ = false;
|
||||
content_.create_child_element( Ns, Name, getContext());
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
void table_covered_table_cell::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
empty_ = false;
|
||||
content_.add_child_element(child_element);
|
||||
content_.push_back(child_element);
|
||||
}
|
||||
void table_covered_table_cell::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
@ -634,7 +618,10 @@ void table_covered_table_cell::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
attlist_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
content_.serialize(CP_XML_STREAM());
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,10 +157,10 @@ class table_table_protection : public office_element_impl<table_table_protection
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableProtection;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
table_table_protection() : select_protected_cells(true), select_unprotected_cells(true) {}
|
||||
|
||||
@ -188,10 +188,10 @@ class table_table_source : public office_element_impl<table_table_source>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableSource;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
table_table_source_attlist table_table_source_attlist_;
|
||||
table_linked_source_attlist table_linked_source_attlist_;
|
||||
@ -221,19 +221,14 @@ public:
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
class table_columns_no_group: public office_element
|
||||
class table_columns_no_group : public office_element_impl<table_columns_no_group>
|
||||
{
|
||||
public:
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
const wchar_t * ns;
|
||||
const wchar_t * name;
|
||||
xml::NodeType xml_type;
|
||||
ElementType type;
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const ElementType type = typeTableTableColumnNoGroup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
table_columns_no_group(odf_conversion_context * _Context);
|
||||
table_columns_no_group(odf_conversion_context * _Context);
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name/*, odf_conversion_context * Context*/);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -250,8 +245,7 @@ public:
|
||||
table_columns table_columns_2_;
|
||||
|
||||
private:
|
||||
odf_conversion_context * Context;
|
||||
|
||||
odf_conversion_context * Context;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
@ -292,10 +286,10 @@ class table_table_column : public office_element_impl<table_table_column>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableColumn;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -315,10 +309,10 @@ class table_table_columns : public office_element_impl<table_table_columns>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableColumns;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -337,10 +331,10 @@ class table_table_header_columns : public office_element_impl<table_table_header
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableHeaderColumns;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -370,10 +364,8 @@ class table_table_column_group : public office_element_impl<table_table_column_g
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeTableTableColumnGroup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
static const ElementType type = typeTableTableColumnGroup;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -397,10 +389,10 @@ class table_table_row : public office_element_impl<table_table_row>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableRow;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -413,34 +405,16 @@ public:
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(table_table_row);
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
class table_table_cell_content
|
||||
{
|
||||
public:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
private:
|
||||
// TODO table-cell-range-source
|
||||
// TODO office-annotation
|
||||
// TODO table-detective
|
||||
office_element_ptr_array text_content_; // text-content
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
class table_table_cell : public office_element_impl<table_table_cell>
|
||||
{
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableCell;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
table_table_cell() { }
|
||||
table_table_cell() { }
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -449,10 +423,9 @@ public:
|
||||
|
||||
table_table_cell_attlist attlist_;
|
||||
table_table_cell_attlist_extra attlist_extra_;
|
||||
table_table_cell_content content_;
|
||||
|
||||
office_element_ptr_array content_;
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(table_table_cell);
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
@ -461,10 +434,8 @@ class table_covered_table_cell : public office_element_impl<table_covered_table_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeTableCoveredTableCell;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
static const ElementType type = typeTableCoveredTableCell;
|
||||
|
||||
table_covered_table_cell() {empty_ = true; }
|
||||
|
||||
@ -475,7 +446,7 @@ public:
|
||||
|
||||
bool empty_;
|
||||
table_table_cell_attlist attlist_;
|
||||
table_table_cell_content content_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
|
||||
@ -487,10 +458,10 @@ class table_table_rows : public office_element_impl<table_table_rows>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableRows;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -513,10 +484,10 @@ class table_table_header_rows : public office_element_impl<table_table_header_ro
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableHeaderRows;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -543,20 +514,16 @@ public:
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
class table_rows_no_group : public office_element
|
||||
class table_rows_no_group : public office_element_impl<table_rows_no_group>
|
||||
{
|
||||
public:
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableRowNoGroup;
|
||||
|
||||
static _CP_PTR(table_rows_no_group) create(odf_conversion_context * Context);
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
table_rows_no_group(odf_conversion_context * Context);
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -609,10 +576,10 @@ class table_table_row_group : public office_element_impl<table_table_row_group>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTableRowGroup;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
table_table_row_group()
|
||||
{
|
||||
@ -635,10 +602,10 @@ class table_table : public office_element_impl<table_table>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableTable;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -669,10 +636,10 @@ class table_shapes : public office_element_impl<table_shapes>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableShapes;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -690,10 +657,10 @@ class table_content_validations : public office_element_impl<table_content_valid
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableContentValidations;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -711,10 +678,10 @@ class table_content_validation : public office_element_impl<table_content_valida
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableContentValidation;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -737,10 +704,10 @@ class table_error_message : public office_element_impl<table_error_message>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableErrorMassage;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -761,10 +728,10 @@ class table_help_message : public office_element_impl<table_help_message>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableHelpMassage;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
@ -56,9 +56,9 @@ class table_data_pilot_tables : public office_element_impl<table_data_pilot_tabl
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotTables;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -76,9 +76,9 @@ class table_data_pilot_table : public office_element_impl<table_data_pilot_table
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotTable;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -108,9 +108,9 @@ class table_data_pilot_field : public office_element_impl<table_data_pilot_field
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotField;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -139,9 +139,9 @@ class table_data_pilot_grand_total : public office_element_impl<table_data_pilot
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotGrandTotal;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -160,9 +160,9 @@ class table_data_pilot_field_reference : public office_element_impl<table_data_p
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotFieldReference;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -183,9 +183,9 @@ class table_database_source_table : public office_element_impl<table_database_so
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDatabaseSourceTable;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -204,9 +204,9 @@ class table_database_source_query : public office_element_impl<table_database_so
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDatabaseSourceQuery;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -225,9 +225,9 @@ class table_database_source_sql : public office_element_impl<table_database_sour
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDatabaseSourceSql;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -247,9 +247,9 @@ class table_source_cell_range : public office_element_impl<table_source_cell_ran
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableSourceCellRange;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -267,9 +267,9 @@ class table_source_cell_ranges : public office_element_impl<table_source_cell_ra
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableSourceCellRanges;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -287,9 +287,9 @@ class table_source_service : public office_element_impl<table_source_service>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableSourceService;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -311,9 +311,9 @@ class table_data_pilot_level : public office_element_impl<table_data_pilot_level
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotLevel;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -337,9 +337,9 @@ class table_data_pilot_groups : public office_element_impl<table_data_pilot_grou
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotGroups;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -364,9 +364,9 @@ class table_data_pilot_group : public office_element_impl<table_data_pilot_group
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotGroup;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -385,9 +385,9 @@ class table_data_pilot_members : public office_element_impl<table_data_pilot_mem
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotMembers;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -405,9 +405,9 @@ class table_data_pilot_member : public office_element_impl<table_data_pilot_memb
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotMember;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -426,9 +426,9 @@ class table_data_pilot_group_member : public office_element_impl<table_data_pilo
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotGroupMember;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -445,9 +445,9 @@ class table_data_pilot_subtotals : public office_element_impl<table_data_pilot_s
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotSubtotals;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -465,9 +465,9 @@ class table_data_pilot_subtotal : public office_element_impl<table_data_pilot_su
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataPilotSubtotal;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -485,9 +485,9 @@ class table_data_pilot_layout_info : public office_element_impl<table_data_pilot
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataLayoutInfo;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -505,9 +505,9 @@ class table_data_pilot_sort_info : public office_element_impl<table_data_pilot_s
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataSortInfo;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -526,9 +526,9 @@ class table_data_pilot_display_info : public office_element_impl<table_data_pilo
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDataDisplayInfo;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -49,10 +49,10 @@ class table_database_ranges : public office_element_impl<table_database_ranges>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDatabaseRanges;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -71,10 +71,10 @@ class table_database_range: public office_element_impl<table_database_range>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableDatabaseRange;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -47,10 +47,10 @@ class table_named_expressions : public office_element_impl<table_named_expressio
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableNamedExpressions;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -70,10 +70,10 @@ class table_named_range : public office_element_impl<table_named_range>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableNamedRange;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -97,10 +97,10 @@ class table_named_expression : public office_element_impl<table_named_expression
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTableNamedExpression;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -58,33 +58,6 @@ using xml::xml_char_wc;
|
||||
const wchar_t * text_h::ns = L"text";
|
||||
const wchar_t * text_h::name = L"h";
|
||||
|
||||
void paragraph::create_child_element( const std::wstring & Ns, const std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
CP_CREATE_ELEMENT_SIMPLE(paragraph_content_);
|
||||
}
|
||||
|
||||
void paragraph::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
paragraph_content_.push_back(child_element);
|
||||
}
|
||||
|
||||
void paragraph::add_text(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text_text::create(Text) ;
|
||||
paragraph_content_.push_back( elm );
|
||||
}
|
||||
void paragraph::serialize(std::wostream & strm)
|
||||
{
|
||||
for (size_t i = 0; i < paragraph_content_.size(); i++)
|
||||
{
|
||||
paragraph_content_[i]->serialize(strm);
|
||||
}
|
||||
}
|
||||
void paragraph::serialize_attr(CP_ATTR_NODE)
|
||||
{
|
||||
paragraph_attrs_.serialize(CP_GET_XML_NODE());
|
||||
}
|
||||
|
||||
void paragraph_attrs::serialize(CP_ATTR_NODE)
|
||||
{
|
||||
CP_XML_ATTR_OPT(L"text:style-name", text_style_name_);
|
||||
@ -116,24 +89,29 @@ void text_h::serialize(std::wostream & _Wostream)
|
||||
CP_XML_ATTR_OPT (L"text:start-value", text_start_value_);
|
||||
CP_XML_ATTR (L"text:is-list-header", text_is_list_header_);
|
||||
|
||||
paragraph_.serialize_attr (CP_GET_XML_NODE());
|
||||
paragraph_.serialize (CP_XML_STREAM());
|
||||
paragraph_attrs_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
for (size_t i = 0; i < paragraph_content_.size(); i++)
|
||||
{
|
||||
paragraph_content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
void text_h::create_child_element( const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
paragraph_.create_child_element(Ns, Name, getContext());
|
||||
CP_CREATE_ELEMENT(paragraph_content_);
|
||||
}
|
||||
|
||||
void text_h::add_text(const std::wstring & Text)
|
||||
{
|
||||
paragraph_.add_text(Text);
|
||||
office_element_ptr elm = text_text::create(Text);
|
||||
paragraph_content_.push_back(elm);
|
||||
}
|
||||
void text_h::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
paragraph_.add_child_element(child_element);
|
||||
paragraph_content_.push_back(child_element);
|
||||
}
|
||||
// text:p
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
@ -142,15 +120,16 @@ const wchar_t * text_p::name = L"p";
|
||||
|
||||
void text_p::create_child_element(const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
paragraph_.create_child_element( Ns, Name, getContext());
|
||||
CP_CREATE_ELEMENT(paragraph_content_);
|
||||
}
|
||||
void text_p::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
paragraph_.add_child_element(child_element);
|
||||
paragraph_content_.push_back(child_element);
|
||||
}
|
||||
void text_p::add_text(const std::wstring & Text)
|
||||
{
|
||||
paragraph_.add_text(Text);
|
||||
office_element_ptr elm = text_text::create(Text);
|
||||
paragraph_content_.push_back(elm);
|
||||
}
|
||||
|
||||
void text_p::serialize(std::wostream & _Wostream)
|
||||
@ -159,8 +138,12 @@ void text_p::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
paragraph_.serialize_attr (CP_GET_XML_NODE());
|
||||
paragraph_.serialize (CP_XML_STREAM());
|
||||
paragraph_attrs_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
for (size_t i = 0; i < paragraph_content_.size(); i++)
|
||||
{
|
||||
paragraph_content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,38 +59,15 @@ public:
|
||||
void serialize(CP_ATTR_NODE);
|
||||
|
||||
};
|
||||
|
||||
class paragraph
|
||||
{
|
||||
public:
|
||||
paragraph() {}
|
||||
|
||||
public:
|
||||
|
||||
void add_text(const std::wstring & Text);
|
||||
|
||||
void create_child_element(const std::wstring & Ns, const std::wstring & Name,odf_conversion_context * context);
|
||||
void add_child_element( const office_element_ptr & child_element);
|
||||
|
||||
void serialize (std::wostream & _Wostream);
|
||||
void serialize_attr (CP_ATTR_NODE);
|
||||
|
||||
paragraph_attrs paragraph_attrs_;
|
||||
|
||||
office_element_ptr_array paragraph_content_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
class text_h : public office_element_impl<text_h>
|
||||
{
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextH;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -101,18 +78,15 @@ public:
|
||||
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
// heading-attrs
|
||||
unsigned int text_outline_level_;
|
||||
bool text_restart_numbering_; // default false
|
||||
_CP_OPT(unsigned int) text_start_value_;
|
||||
bool text_is_list_header_; // default false
|
||||
_CP_OPT(std::wstring) text_number_;
|
||||
|
||||
paragraph paragraph_;
|
||||
|
||||
|
||||
paragraph_attrs paragraph_attrs_;
|
||||
office_element_ptr_array paragraph_content_;
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_h);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@ -121,9 +95,8 @@ class text_p : public office_element_impl<text_p>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeTextP;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
static const ElementType type = typeTextP;
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -131,22 +104,22 @@ public:
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
text_p(){};
|
||||
paragraph paragraph_;
|
||||
|
||||
paragraph_attrs paragraph_attrs_;
|
||||
office_element_ptr_array paragraph_content_;
|
||||
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_p);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
class text_list : public office_element_impl<text_list>
|
||||
{
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextList;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -173,9 +146,9 @@ class text_soft_page_break : public office_element_impl<text_soft_page_break>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSoftPageBreak;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -204,9 +177,9 @@ class text_section : public office_element_impl<text_section>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSection;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -241,9 +214,9 @@ class text_section_source : public office_element_impl<text_section_source>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSectionSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
@ -260,10 +233,10 @@ class text_table_of_content : public office_element_impl<text_table_of_content>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableOfContent;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -284,9 +257,9 @@ class text_index_body : public office_element_impl<text_index_body>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexBody;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -305,9 +278,9 @@ class text_index_title : public office_element_impl<text_index_title>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexTitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( const office_element_ptr & child_element);
|
||||
@ -326,10 +299,10 @@ class text_unknown_change : public office_element_impl<text_unknown_change>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextUnknownChange;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -347,7 +320,7 @@ class text_insertion : public text_unknown_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextInsertion;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -361,7 +334,7 @@ class text_deletion : public text_unknown_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextDeletion;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -375,7 +348,7 @@ class text_format_change : public text_unknown_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextFormatChange;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -391,9 +364,9 @@ class text_tracked_changes : public office_element_impl<text_tracked_changes>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTrackedChanges;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -411,9 +384,9 @@ class text_changed_region : public office_element_impl<text_changed_region>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextChangedRegion;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -432,10 +405,10 @@ public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextChange;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element) {}
|
||||
@ -451,7 +424,7 @@ class text_change : public text_add_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextChange;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -464,7 +437,7 @@ class text_change_start : public text_add_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextChangeStart;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -477,7 +450,7 @@ class text_change_end : public text_add_change
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextChangeEnd;
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -491,10 +464,10 @@ class text_table_index : public office_element_impl<text_table_index>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableIndex;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -515,10 +488,10 @@ class text_illustration_index : public office_element_impl<text_illustration_ind
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIllustrationIndex;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -539,10 +512,10 @@ class text_alphabetical_index : public office_element_impl<text_alphabetical_ind
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndex;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -563,10 +536,10 @@ class text_user_index : public office_element_impl<text_user_index>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextUserIndex;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -587,10 +560,10 @@ class text_bibliography : public office_element_impl<text_bibliography>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBibliography;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -610,9 +583,9 @@ class text_bibliography_source: public office_element_impl<text_bibliography_sou
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBibliographySource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -629,9 +602,9 @@ class common_entry_template : public office_element_impl<common_entry_template>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextCommonEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -650,9 +623,9 @@ class text_bibliography_entry_template: public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextBibliographyEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -665,9 +638,9 @@ class text_index_title_template : public office_element_impl<text_index_title_te
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexTitleTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -686,9 +659,9 @@ class text_sequence_decl : public office_element_impl<text_sequence_decl>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSequenceDecl;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -708,9 +681,9 @@ class text_sequence_decls : public office_element_impl<text_sequence_decls>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextSequenceDecls;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -728,9 +701,9 @@ class text_table_of_content_source: public office_element_impl<text_table_of_con
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableOfContentSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -758,9 +731,9 @@ class text_table_of_content_entry_template : public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableOfContentEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_table_of_content_entry_template);
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@ -771,9 +744,9 @@ class text_index_entry_bibliography: public office_element_impl<text_index_entry
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryBibliography;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -792,9 +765,9 @@ class text_index_entry_chapter: public office_element_impl<text_index_entry_chap
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryChapter;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -810,9 +783,9 @@ class text_index_entry_link_end: public office_element_impl<text_index_entry_lin
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryLinkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -828,9 +801,9 @@ class text_index_entry_link_start: public office_element_impl<text_index_entry_l
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryLinkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -846,9 +819,9 @@ class text_index_entry_page_number: public office_element_impl<text_index_entry_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryPageNumber;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -864,9 +837,9 @@ class text_index_entry_span: public office_element_impl<text_index_entry_span>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntrySpan;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -882,9 +855,9 @@ class text_index_entry_tab_stop: public office_element_impl<text_index_entry_tab
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryTabStop;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -900,9 +873,9 @@ class text_index_entry_text: public office_element_impl<text_index_entry_text>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIndexEntryText;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||
@ -918,9 +891,9 @@ class text_illustration_index_source: public office_element_impl<text_illustrati
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIllustrationIndexSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -946,9 +919,9 @@ class text_illustration_index_entry_template : public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextIllustrationIndexEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_illustration_index_entry_template);
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@ -959,9 +932,9 @@ class text_user_index_source: public office_element_impl<text_user_index_source>
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextUserIndexSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -994,9 +967,9 @@ class text_user_index_entry_template : public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextUserIndexEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_user_index_entry_template);
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@ -1007,9 +980,9 @@ class alphabetical_index_source : public office_element_impl<alphabetical_index_
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndexSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -1046,9 +1019,9 @@ class text_alphabetical_index_entry_template : public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextAlphabeticalIndexEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_alphabetical_index_entry_template);
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@ -1059,9 +1032,9 @@ class text_table_index_source: public office_element_impl<text_table_index_sourc
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableIndexSource;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
|
||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||
@ -1087,9 +1060,9 @@ class text_table_index_entry_template : public common_entry_template
|
||||
public:
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
|
||||
static const ElementType type = typeTextTableIndexEntryTemplate;
|
||||
CPDOCCORE_DEFINE_VISITABLE()
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(text_table_index_entry_template);
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ bool XlsxConverter::convertDocument()
|
||||
if (xlsx_flat_document) delete xlsx_flat_document; xlsx_flat_document = NULL;
|
||||
|
||||
ods_context->end_document();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ void Animation::Convert(PPTX::Logic::Timing &oTiming)
|
||||
{
|
||||
if (m_pPPT10)
|
||||
{
|
||||
m_isPPT10Broken = false;
|
||||
// It must be first to write some reference from ExtTimeNodeContainer
|
||||
if (m_pPPT10->m_haveBuildList && !m_pPPT10->m_pBuildListContainer->n_arrRgChildRec.empty())
|
||||
{
|
||||
@ -66,7 +67,7 @@ void Animation::Convert(PPTX::Logic::Timing &oTiming)
|
||||
FillTnLst(m_pPPT10->m_pExtTimeNodeContainer, *(oTiming.tnLst));
|
||||
}
|
||||
}
|
||||
if (!m_arrOldAnim.empty() || m_isPPT10Broken)
|
||||
if (!m_arrOldAnim.empty() && m_isPPT10Broken)
|
||||
{
|
||||
oTiming = PPTX::Logic::Timing();
|
||||
InitTimingTags(oTiming);
|
||||
@ -162,8 +163,8 @@ void Animation::FillAnim(
|
||||
}
|
||||
|
||||
auto tavTime = animValue->m_oTimeAnimationValueAtom.m_nTime;
|
||||
if (tavTime < 1000 && tavTime >= 0)
|
||||
tav.tm = std::to_wstring((1000 - tavTime) * 100);
|
||||
if (tavTime <= 1000 && tavTime >= 0) // todo check
|
||||
tav.tm = std::to_wstring((/*1000 - */tavTime) * 100);
|
||||
|
||||
if (!animValue->m_VarFormula.m_Value.empty())
|
||||
{
|
||||
@ -424,6 +425,8 @@ void Animation::FillAudio(CRecordExtTimeNodeContainer *pETNC,
|
||||
{
|
||||
oAudio.cMediaNode.tgtEl.spTgt = new PPTX::Logic::SpTgt;
|
||||
oAudio.cMediaNode.tgtEl.spTgt->spid = std::to_wstring(pCVEC->m_oVisualShapeAtom.m_nObjectIdRef);
|
||||
// oAudio.isNarration = true;
|
||||
// oAudio.cMediaNode.showWhenStopped = false;
|
||||
} else
|
||||
return;
|
||||
FillCTn(pETNC, oAudio.cMediaNode.cTn);
|
||||
@ -634,7 +637,6 @@ void Animation::FillCBhvr(
|
||||
// accumulate - MUST be 0
|
||||
// xfrmType - MUST be 0
|
||||
|
||||
|
||||
if (pBhvr->m_haveStringList)
|
||||
{
|
||||
if (!pBhvr->m_pStringList->m_arrRgChildRec.empty())
|
||||
@ -678,6 +680,46 @@ void Animation::FillCBhvr(
|
||||
oBhvr.tgtEl.spTgt->txEl->end = pBhvr->m_oClientVisualElement.m_oVisualShapeAtom.m_nData2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (pBhvr->m_pPropertyList == nullptr)
|
||||
return;
|
||||
|
||||
for (const auto prop : pBhvr->m_pPropertyList->m_arRecords)
|
||||
{
|
||||
if (prop == nullptr)
|
||||
continue;
|
||||
|
||||
switch (prop->m_oHeader.RecInstance)
|
||||
{
|
||||
case TL_TBPID_RuntimeContext:
|
||||
break;
|
||||
case TL_TBPID_MotionPathEditRelative:
|
||||
break;
|
||||
case TL_TBPID_ColorColorModel:
|
||||
break;
|
||||
case TL_TBPID_ColorDirection:
|
||||
break;
|
||||
case TL_TBPID_Override:
|
||||
{
|
||||
auto override_ = new PPTX::Limit::TLOverride;
|
||||
override_->set(L"childStyle");
|
||||
oBhvr.override_= override_;
|
||||
break;
|
||||
}
|
||||
case TL_TBPID_PathEditRotationAngle:
|
||||
break;
|
||||
case TL_TBPID_PathEditRotationX:
|
||||
break;
|
||||
case TL_TBPID_PathEditRotationY:
|
||||
break;
|
||||
case TL_TBPID_PointsTypes:
|
||||
break;
|
||||
case TL_TBPID_UnknownPropertyList:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void Animation::FillCBhvr(
|
||||
PPTX::Logic::CBhvr &oBhvr, int dur,
|
||||
@ -780,6 +822,9 @@ void Animation::FillCond(
|
||||
cond.tgtEl->spTgt = new PPTX::Logic::SpTgt;
|
||||
cond.tgtEl->spTgt->spid = std::to_wstring(
|
||||
oldCond->m_oVisualElement.m_oVisualShapeAtom.m_nObjectIdRef);
|
||||
} else if (oldCond->m_oVisualElement.m_bVisualPageAtom)
|
||||
{
|
||||
cond.tgtEl = new PPTX::Logic::TgtEl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -873,12 +918,15 @@ void Animation::FillCTn(
|
||||
if (iter->m_fIterateDirectionPropertyUsed)
|
||||
oCTn.iterate->backwards = (bool)iter->m_nIterateDirection;
|
||||
|
||||
if (iter->m_fIterateIntervalTypePropertyUsed)
|
||||
oCTn.iterate->tmPct = iter->m_nIterateInterval;
|
||||
|
||||
if (iter->m_fIterateIntervalPropertyUsed)
|
||||
oCTn.iterate->tmAbs = std::to_wstring(iter->m_nIterateIntervalType);
|
||||
int intervalType = iter->m_fIterateIntervalTypePropertyUsed ?
|
||||
iter->m_nIterateIntervalType : 0;
|
||||
unsigned int iterateInterval = iter->m_fIterateIntervalPropertyUsed ?
|
||||
iter->m_nIterateInterval : 0;
|
||||
|
||||
if (intervalType)
|
||||
oCTn.iterate->tmPct = iterateInterval > 1000 ? 10000 : iterateInterval * 10;
|
||||
else
|
||||
oCTn.iterate->tmAbs = std::to_wstring(iterateInterval);
|
||||
}
|
||||
|
||||
|
||||
@ -1437,6 +1485,9 @@ void Animation::SplitAnim(std::list<std::list<SOldAnimation*> >& arrClickPar)
|
||||
|
||||
for (auto& oldAnim : m_arrOldAnim)
|
||||
{
|
||||
if (isSpidReal(oldAnim.shapeId) == false)
|
||||
continue;
|
||||
|
||||
if (arrClickPar.empty())
|
||||
{
|
||||
std::list<SOldAnimation*> clickPar;
|
||||
@ -1670,6 +1721,7 @@ void Animation::FillCTnAnimation (PPTX::Logic::CTn &oCTN, SOldAnimation *pOldAn
|
||||
const UINT effect = pOldAnim->anim->m_AnimationAtom.m_AnimEffect;
|
||||
const UINT direct = pOldAnim->anim->m_AnimationAtom.m_AnimEffectDirection;
|
||||
|
||||
// Todo 4, 7. 0x11 - 0x1B
|
||||
switch (effect)
|
||||
{
|
||||
case 0x00:
|
||||
@ -1702,6 +1754,12 @@ void Animation::FillCTnAnimation (PPTX::Logic::CTn &oCTN, SOldAnimation *pOldAn
|
||||
ConvertDissolveIn(oCTN.childTnLst.get2(), pOldAnim);
|
||||
break;
|
||||
}
|
||||
case 0x06:
|
||||
{
|
||||
oCTN.presetID = 10;
|
||||
ConvertFade(oCTN.childTnLst.get2(), pOldAnim);
|
||||
break;
|
||||
}
|
||||
case 0x08:
|
||||
{
|
||||
oCTN.presetID = 14;
|
||||
@ -1771,6 +1829,11 @@ void Animation::FillCTnAnimation (PPTX::Logic::CTn &oCTN, SOldAnimation *pOldAn
|
||||
ConvertFlashOnce(oCTN.childTnLst.get2(), pOldAnim, presetSub);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
oCTN.presetID = 1;
|
||||
ConvertAppear(oCTN.childTnLst.get2(), pOldAnim);
|
||||
std::wcout << "Error: Unknown old animation id: " << std::to_wstring(effect) << L"\n";
|
||||
|
||||
}
|
||||
|
||||
if (presetSub != -1)
|
||||
@ -1970,6 +2033,12 @@ void Animation::ConvertDissolveIn(PPTX::Logic::ChildTnLst& oParent, SOldAnimatio
|
||||
PushAnimEffect(oParent, pOldAnim, L"dissolve", L"in");
|
||||
}
|
||||
|
||||
void Animation::ConvertFade(PPTX::Logic::ChildTnLst &oParent, SOldAnimation *pOldAnim)
|
||||
{
|
||||
PushSet(oParent, pOldAnim);
|
||||
PushAnimEffect(oParent, pOldAnim, L"fade", L"in");
|
||||
}
|
||||
|
||||
void Animation::ConvertFlashOnce(PPTX::Logic::ChildTnLst& oParent, SOldAnimation *pOldAnim, int& presetSub)
|
||||
{
|
||||
PushSet(oParent, pOldAnim);
|
||||
@ -2389,14 +2458,19 @@ void Animation::PushSet(PPTX::Logic::ChildTnLst& oParent, SOldAnimation *pOldAni
|
||||
|
||||
bool Animation::isSpidReal(const UINT spid)
|
||||
{
|
||||
if (m_arrOldAnim.empty())
|
||||
if (m_realShapesId.find(spid) == m_realShapesId.end())
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
||||
for (const auto& oldAnim : m_arrOldAnim)
|
||||
if (oldAnim.shapeId == spid)
|
||||
return true;
|
||||
// if (m_arrOldAnim.empty())
|
||||
// return true;
|
||||
|
||||
return false;
|
||||
// for (const auto& oldAnim : m_arrOldAnim)
|
||||
// if (oldAnim.shapeId == spid)
|
||||
// return true;
|
||||
|
||||
// return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
#include "../Records/SlideProgTagsContainer.h"
|
||||
#include "ImageManager.h"
|
||||
#include "../Records/Animations/AnimationInfoContainer.h"
|
||||
#include <unordered_set>
|
||||
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
@ -86,14 +87,16 @@ struct SValue
|
||||
class Animation
|
||||
{
|
||||
public:
|
||||
Animation(CRecordPP10SlideBinaryTagExtension *pPPT10Ext, const std::vector<SOldAnimation> &oldAnim, CExMedia* pExMedia, CRelsGenerator* pRels) :
|
||||
Animation(CRecordPP10SlideBinaryTagExtension *pPPT10Ext, const std::vector<SOldAnimation> &oldAnim,
|
||||
CExMedia* pExMedia, CRelsGenerator* pRels, const std::unordered_set<int>& realShapesId) :
|
||||
m_pPPT10(pPPT10Ext),
|
||||
m_arrOldAnim(oldAnim),
|
||||
m_pExMedia(pExMedia),
|
||||
m_pRels(pRels),
|
||||
m_cTnId(1),
|
||||
m_pBldLst(nullptr),
|
||||
m_currentBldP(nullptr)
|
||||
m_currentBldP(nullptr),
|
||||
m_realShapesId(realShapesId)
|
||||
{
|
||||
|
||||
}
|
||||
@ -216,6 +219,7 @@ private:
|
||||
void ConvertCheckerboard(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim);
|
||||
void ConvertCrawlIn(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim, int& presetSub);
|
||||
void ConvertDissolveIn(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim);
|
||||
void ConvertFade(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim);
|
||||
void ConvertFlashOnce(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim, int& presetSub);
|
||||
void ConvertPeekIn(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim, int& presetSub);
|
||||
void ConvertRandomBars(PPTX::Logic::ChildTnLst& oParent, SOldAnimation* pOldAnim, int& presetSub);
|
||||
@ -259,9 +263,10 @@ private:
|
||||
int m_cTnDeep = 0;
|
||||
PPTX::Logic::BldLst *m_pBldLst; // Do not delete
|
||||
PPTX::Logic::BldP *m_currentBldP;
|
||||
const std::unordered_set<int> m_realShapesId;
|
||||
|
||||
int m_nextRID; // it needs for audio maybe video for compisation id number;
|
||||
bool m_isPPT10Broken = false;
|
||||
bool m_isPPT10Broken = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -92,10 +92,10 @@ void BulletsConverter::ConvertPFRun(PPTX::Logic::TextParagraphPr &oPPr, CTextPFR
|
||||
LONG val = pPF->spaceAfter.get();
|
||||
auto pSpcAft = new PPTX::Logic::TextSpacing;
|
||||
pSpcAft->m_name = L"a:spcAft";
|
||||
if (val > 0)
|
||||
if (val > 0) // Spacing Points
|
||||
pSpcAft->spcPts = round(12.5 * pPF->spaceAfter.get());
|
||||
else if (val < 0 && val > -13200)
|
||||
pSpcAft->spcPts = val * -1000;
|
||||
else if (val < 0 && val > -13200) // Spacing Percent
|
||||
pSpcAft->spcPct = val * -1000;
|
||||
|
||||
oPPr.spcAft = pSpcAft;
|
||||
}
|
||||
@ -189,9 +189,9 @@ void BulletsConverter::ConvertAllBullets(PPTX::Logic::TextParagraphPr &oPPr, CTe
|
||||
pBuFont->m_name = L"a:buFont";
|
||||
pBuFont->typeface = pPF->bulletFontProperties->Name;
|
||||
|
||||
if ( pPF->bulletFontProperties->PitchFamily > 0)
|
||||
if ( CFontProperty::IsValidPitchFamily(pPF->bulletFontProperties->PitchFamily))
|
||||
pBuFont->pitchFamily = std::to_wstring(pPF->bulletFontProperties->PitchFamily);
|
||||
if ( pPF->bulletFontProperties->Charset > 0)
|
||||
if ( CFontProperty::IsValidCharset(pPF->bulletFontProperties->Charset))
|
||||
pBuFont->charset = std::to_wstring(pPF->bulletFontProperties->Charset);
|
||||
|
||||
oPPr.buTypeface.m_Typeface.reset(pBuFont);
|
||||
|
||||
@ -136,7 +136,7 @@ void PPT_FORMAT::CPPTXWriter::CreateFile(CPPTUserInfo* pUserInfo)
|
||||
|
||||
// core
|
||||
oFile.CreateFileW(m_strTempDirectory + FILE_SEPARATOR_STR + _T("docProps") + FILE_SEPARATOR_STR + _T("core.xml"));
|
||||
if (m_xmlCore.empty())
|
||||
if (m_xmlCore.empty())
|
||||
m_xmlCore = NSPPTXWriterConst::g_string_core;
|
||||
oFile.WriteStringUTF8(m_xmlCore);
|
||||
oFile.CloseFile();
|
||||
@ -1537,12 +1537,16 @@ void PPT_FORMAT::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
CGroupElement *pGroupElement = !pSlide->m_arElements.empty() ? dynamic_cast<CGroupElement *>(pSlide->m_arElements[0].get()) : NULL;
|
||||
|
||||
size_t start_index = 0;
|
||||
std::unordered_set<int> realShapesId;
|
||||
|
||||
if (pGroupElement)
|
||||
{
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i]);
|
||||
auto& element = pGroupElement->m_pChildElements[i];
|
||||
WriteElement(oWriter, oRels, element);
|
||||
if (element)
|
||||
realShapesId.insert(element->m_lID);
|
||||
}
|
||||
|
||||
start_index = 1;
|
||||
@ -1550,7 +1554,10 @@ void PPT_FORMAT::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
|
||||
for (size_t i = start_index; i < pSlide->m_arElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pSlide->m_arElements[i]);
|
||||
auto& element = pSlide->m_arElements[i];
|
||||
WriteElement(oWriter, oRels, element);
|
||||
if (element)
|
||||
realShapesId.insert(element->m_lID);
|
||||
}
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:spTree></p:cSld>"));
|
||||
@ -1560,7 +1567,7 @@ void PPT_FORMAT::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
WriteTransition(oWriter, pSlide->m_oSlideShow);
|
||||
|
||||
// TODO write new method and class for timing
|
||||
WriteTiming(oWriter, oRels, nIndexSlide);
|
||||
WriteTiming(oWriter, oRels, realShapesId, nIndexSlide);
|
||||
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:sld>"));
|
||||
@ -2029,7 +2036,7 @@ void CPPTXWriter::WriteLayoutAfterTheme(CThemePtr pTheme, const int nIndexTheme,
|
||||
}
|
||||
|
||||
|
||||
void PPT_FORMAT::CPPTXWriter::WriteTiming(CStringWriter& oWriter, CRelsGenerator &oRels, int nIndexSlide)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteTiming(CStringWriter& oWriter, CRelsGenerator &oRels, const std::unordered_set<int>& realShapesId, int nIndexSlide)
|
||||
{
|
||||
PPTX::Logic::Timing oTiming;
|
||||
|
||||
@ -2056,10 +2063,10 @@ void PPT_FORMAT::CPPTXWriter::WriteTiming(CStringWriter& oWriter, CRelsGenerator
|
||||
}
|
||||
}
|
||||
|
||||
if (!pPP10SlideBinaryTag && arrOldAnim.empty())
|
||||
if (/*!pPP10SlideBinaryTag && */arrOldAnim.empty()) // todo check condition
|
||||
return;
|
||||
|
||||
Animation animation(pPP10SlideBinaryTag, arrOldAnim, &(m_pUserInfo->m_oExMedia), &oRels);
|
||||
Animation animation(pPP10SlideBinaryTag, arrOldAnim, &(m_pUserInfo->m_oExMedia), &oRels, realShapesId);
|
||||
|
||||
animation.Convert(oTiming);
|
||||
oWriter.WriteString(oTiming.toXML());
|
||||
|
||||
@ -89,7 +89,7 @@ namespace PPT_FORMAT
|
||||
// void WriteRelsMaster (std::wstring path, int type, )
|
||||
void WriteSlide (int nIndexSlide);
|
||||
void WriteNotes (int nIndexNotes);
|
||||
void WriteTiming (CStringWriter& oWriter, CRelsGenerator &oRels, int nIndexSlide); // TODO write spec class for timing
|
||||
void WriteTiming (CStringWriter& oWriter, CRelsGenerator &oRels, const std::unordered_set<int> &realShapesId, int nIndexSlide);
|
||||
|
||||
void WriteTransition (CStringWriter& oWriter, CSlideShowInfo& oSSInfo);
|
||||
void WriteColorScheme (CStringWriter& oWriter, const std::wstring & name, const std::vector<CColor> & colors, bool extra = false);
|
||||
|
||||
@ -482,7 +482,7 @@ std::wstring PPT_FORMAT::CShapeWriter::ConvertShadow(CShadow & shadow)
|
||||
}
|
||||
else
|
||||
{
|
||||
// needHiddenEffect = shadow.Visible;
|
||||
// needHiddenEffect = shadow.Visible;
|
||||
shadow_writer.WriteString(L"<a:outerShdw");
|
||||
shadow_writer.WriteString(strDist);
|
||||
shadow_writer.WriteString(strDir);
|
||||
@ -499,14 +499,14 @@ std::wstring PPT_FORMAT::CShapeWriter::ConvertShadow(CShadow & shadow)
|
||||
shadow_writer.WriteString(L"</a:outerShdw>");
|
||||
}
|
||||
shadow_writer.WriteString(L"</a:effectLst>");
|
||||
// if (needHiddenEffect)
|
||||
// {
|
||||
// std::wstring STRshadow;
|
||||
// STRshadow = L"<a:extLst><a:ext uri=\"{AF507438-7753-43E0-B8FC-AC1667EBCBE1}\"><a14:hiddenEffects xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\">";
|
||||
// STRshadow += shadow_writer.GetData();
|
||||
// STRshadow += L"</a14:hiddenEffects></a:ext><a:ext uri=\"{53640926-AAD7-44D8-BBD7-CCE9431645EC}\"><a14:shadowObscured xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" val=\"1\"/></a:ext></a:extLst>";
|
||||
// return STRshadow;
|
||||
// }
|
||||
// if (needHiddenEffect)
|
||||
// {
|
||||
// std::wstring STRshadow;
|
||||
// STRshadow = L"<a:extLst><a:ext uri=\"{AF507438-7753-43E0-B8FC-AC1667EBCBE1}\"><a14:hiddenEffects xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\">";
|
||||
// STRshadow += shadow_writer.GetData();
|
||||
// STRshadow += L"</a14:hiddenEffects></a:ext><a:ext uri=\"{53640926-AAD7-44D8-BBD7-CCE9431645EC}\"><a14:shadowObscured xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" val=\"1\"/></a:ext></a:extLst>";
|
||||
// return STRshadow;
|
||||
// }
|
||||
|
||||
return shadow_writer.GetData();
|
||||
}
|
||||
@ -628,11 +628,11 @@ void PPT_FORMAT::CShapeWriter::WriteImageInfo()
|
||||
bool bExternal = false;
|
||||
std::wstring strRid = m_pRels->WriteAudio(pAudioElement->m_strAudioFileName, bExternal);
|
||||
|
||||
if ((int)pAudioElement->m_strAudioFileName.find(L".WAV") == -1 &&
|
||||
(int)pAudioElement->m_strAudioFileName.find(L".wav") == -1)
|
||||
m_oWriter.WriteString(L"<a:audioFile r:link=\"" + strRid + L"\"/>");
|
||||
else
|
||||
m_oWriter.WriteString(L"<a:wavAudioFile r:embed=\"" + strRid + L"\"/>");
|
||||
// if ((int)pAudioElement->m_strAudioFileName.find(L".WAV") == -1 &&
|
||||
// (int)pAudioElement->m_strAudioFileName.find(L".wav") == -1)
|
||||
// m_oWriter.WriteString(L"<a:wavAudioFile r:embed=\"" + strRid + L"\"/>");
|
||||
// else
|
||||
m_oWriter.WriteString(L"<a:audioFile r:link=\"" + strRid + L"\"/>"); // todo for anim connection
|
||||
|
||||
sMediaFile = bExternal ? L"" : pAudioElement->m_strAudioFileName;
|
||||
}
|
||||
@ -676,7 +676,7 @@ void PPT_FORMAT::CShapeWriter::WriteGroupInfo()
|
||||
if (!pGroupElement->m_sDescription.empty())
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L" descr=\""));
|
||||
m_oWriter.WriteStringXML(pGroupElement->m_sDescription);
|
||||
m_oWriter.WriteStringXML(XmlUtils::EncodeXmlStringExtend(pGroupElement->m_sDescription));
|
||||
m_oWriter.WriteString(std::wstring(L"\""));
|
||||
}
|
||||
m_oWriter.WriteString(std::wstring(L">"));
|
||||
@ -729,7 +729,7 @@ void PPT_FORMAT::CShapeWriter::WriteTableInfo()
|
||||
if (!pGroupElement->m_sDescription.empty())
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L" descr=\""));
|
||||
m_oWriter.WriteStringXML(pGroupElement->m_sDescription);
|
||||
m_oWriter.WriteStringXML(XmlUtils::EncodeXmlStringExtend(pGroupElement->m_sDescription));
|
||||
m_oWriter.WriteString(std::wstring(L"\""));
|
||||
}
|
||||
m_oWriter.WriteString(std::wstring(L">"));
|
||||
@ -782,7 +782,7 @@ void PPT_FORMAT::CShapeWriter::WriteShapeInfo()
|
||||
if (!pShapeElement->m_sDescription.empty())
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L" descr=\""));
|
||||
m_oWriter.WriteStringXML(pShapeElement->m_sDescription);
|
||||
m_oWriter.WriteStringXML(XmlUtils::EncodeXmlStringExtend(pShapeElement->m_sDescription, true));
|
||||
m_oWriter.WriteString(std::wstring(L"\""));
|
||||
}
|
||||
m_oWriter.WriteString(std::wstring(L">"));
|
||||
@ -1556,7 +1556,7 @@ void PPT_FORMAT::CShapeWriter::WriteHyperlink(const std::vector<CInteractiveInfo
|
||||
&& actions[i].m_lType == II_NoAction)
|
||||
continue;
|
||||
|
||||
if (actions[i].m_strHyperlink.empty())
|
||||
if (actions[i].m_strHyperlink.empty() && actions[i].m_lType != LT_CustomShow)
|
||||
continue;
|
||||
|
||||
PPTX::Logic::Hyperlink hlink;
|
||||
|
||||
@ -2401,7 +2401,11 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
|
||||
oInfo.m_type = CExFilesInfo::ExFilesType::eftSlide;
|
||||
m_oExMedia.m_arSlides.push_back(oInfo);
|
||||
wasSlide = true;
|
||||
}
|
||||
} /*else if (oInfo.isHTTPLink(recStr))
|
||||
{
|
||||
oInfo.m_type = CExFilesInfo::ExFilesType::eftHyperlink;
|
||||
m_oExMedia.m_arSlides.push_back(oInfo);
|
||||
}*/
|
||||
}
|
||||
|
||||
if (pExHyperlink->m_targetAtom.IsInit())
|
||||
@ -2483,6 +2487,9 @@ void CPPTUserInfo::LoadExAudio(CRecordsContainer* pExObject)
|
||||
|
||||
oInfo.m_bLoop = oArrayExMedia[0]->m_bLoop;
|
||||
|
||||
oInfo.m_fNarration = oArrayExMedia[0]->m_bNarration;
|
||||
oInfo.m_fRewind = oArrayExMedia[0]->m_bRewind;
|
||||
|
||||
m_oExMedia.m_arAudios.push_back(oInfo);
|
||||
}
|
||||
|
||||
|
||||
@ -2614,10 +2614,19 @@ void CDrawingConverter::ConvertShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::CX
|
||||
}
|
||||
else
|
||||
{
|
||||
//oProps.X выставлять не надо, они учтены в pMainProps
|
||||
pSpPr->xfrm = new PPTX::Logic::Xfrm();
|
||||
pSpPr->xfrm->offX = 0;
|
||||
pSpPr->xfrm->offY = 0;
|
||||
|
||||
if (*pMainProps)
|
||||
{//oProps.X выставлять не надо, они учтены в pMainProps
|
||||
|
||||
pSpPr->xfrm->offX = 0;
|
||||
pSpPr->xfrm->offY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pSpPr->xfrm->offX = oProps.X;
|
||||
pSpPr->xfrm->offY = oProps.Y;
|
||||
}
|
||||
pSpPr->xfrm->extX = oProps.Width;
|
||||
pSpPr->xfrm->extY = oProps.Height;
|
||||
}
|
||||
@ -4515,8 +4524,11 @@ std::wstring CDrawingConverter::GetVMLShapeXml(CPPTShape* pPPTShape)
|
||||
|
||||
void CDrawingConverter::SendMainProps(const std::wstring& strMainProps, std::wstring**& pMainProps)
|
||||
{
|
||||
*pMainProps = new std::wstring();
|
||||
**pMainProps = strMainProps;
|
||||
if (((m_pBinaryWriter) && (m_pBinaryWriter->m_pMainDocument)) || !m_pBinaryWriter)
|
||||
{
|
||||
*pMainProps = new std::wstring();
|
||||
**pMainProps = strMainProps;
|
||||
}
|
||||
}
|
||||
void CDrawingConverter::CheckBorderShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::CXmlNode& oNode, CPPTShape* pPPTShape)
|
||||
{
|
||||
|
||||
@ -530,6 +530,7 @@ namespace NSBinPptxRW
|
||||
_INT32 m_nCountEmbedded = 1;
|
||||
_INT32 m_nCountCharts = 1;
|
||||
_INT32 m_nCountDiagram = 1;
|
||||
_INT32 m_nCountActiveX = 1;
|
||||
|
||||
BinDocxRW::CDocxSerializer* m_pMainDocument;
|
||||
int m_nDocumentType;
|
||||
|
||||
@ -82,32 +82,26 @@ public:
|
||||
eftAudio = 2,
|
||||
eftHyperlink = 3,
|
||||
eftObject = 4,
|
||||
eftSlide = 5/*,
|
||||
eftFile = 6*/
|
||||
eftSlide = 5,
|
||||
eftFile = 6
|
||||
};
|
||||
|
||||
ExFilesType m_type;
|
||||
_UINT32 m_dwID;
|
||||
std::wstring m_strFilePath;
|
||||
ExFilesType m_type = eftNone;
|
||||
_UINT32 m_dwID = 0;
|
||||
std::wstring m_strFilePath = L"";
|
||||
std::wstring m_name;
|
||||
|
||||
// clip
|
||||
double m_dStartTime;
|
||||
double m_dEndTime;
|
||||
double m_dStartTime = 0.0;
|
||||
double m_dEndTime = 1.0;
|
||||
|
||||
// loop
|
||||
bool m_bLoop;
|
||||
bool m_bLoop = false;
|
||||
bool m_fNarration = false; // isNarration pptx
|
||||
bool m_fRewind = false;
|
||||
|
||||
CExFilesInfo()
|
||||
{
|
||||
m_type = eftNone;
|
||||
m_dwID = 0;
|
||||
m_strFilePath = _T("");
|
||||
|
||||
m_dStartTime = 0.0;
|
||||
m_dEndTime = -1.0;
|
||||
|
||||
m_bLoop = false;
|
||||
}
|
||||
CExFilesInfo(const CExFilesInfo& oSrc)
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
#include "../../../ASCOfficePPTFile/PPTFormatLib/Enums/enums.h"
|
||||
#include "../../../Common/DocxFormat/Source/Base/Nullable.h"
|
||||
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Interactive.h"
|
||||
#include <set>
|
||||
|
||||
using namespace ODRAW;
|
||||
|
||||
@ -91,8 +92,8 @@ namespace PPT_FORMAT
|
||||
{
|
||||
public:
|
||||
std::wstring Name;
|
||||
BYTE PitchFamily;
|
||||
BYTE Charset;
|
||||
int PitchFamily;
|
||||
int Charset;
|
||||
|
||||
CFontProperty() : PitchFamily(0), Charset(0) {}
|
||||
|
||||
@ -108,15 +109,36 @@ namespace PPT_FORMAT
|
||||
|
||||
return *this;
|
||||
}
|
||||
std::wstring getXmlArgsStr()const
|
||||
{
|
||||
std::wstring str = L" typeface=\"" + Name + L"\"";
|
||||
str += L" pitchFamily=\"" + std::to_wstring(PitchFamily) + L"\"";
|
||||
if (Charset != 0)
|
||||
str += L" charset=\"" + std::to_wstring((char)Charset) + L"\"";
|
||||
|
||||
return str;
|
||||
}
|
||||
std::wstring getXmlArgsStr()const
|
||||
{
|
||||
std::wstring str = L" typeface=\"" + Name + L"\"";
|
||||
if (IsValidPitchFamily(PitchFamily))
|
||||
str += L" pitchFamily=\"" + std::to_wstring(PitchFamily) + L"\"";
|
||||
if (IsValidCharset(Charset))
|
||||
str += L" charset=\"" + std::to_wstring((char)Charset) + L"\"";
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static bool IsValidCharset(int value)
|
||||
{
|
||||
if (value <= 0 || value > 255)
|
||||
return false;
|
||||
|
||||
std::set<int> BLCharset = {128, 136, 129};
|
||||
return BLCharset.find(value) == BLCharset.end();
|
||||
}
|
||||
|
||||
static bool IsValidPitchFamily(int value)
|
||||
{
|
||||
if (value <= 0 || value > 255)
|
||||
return false;
|
||||
|
||||
std::set<int> BLPitchFamily = {148, 164};
|
||||
return BLPitchFamily.find(value) == BLPitchFamily.end();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class CBulletAutoNum
|
||||
|
||||
@ -774,93 +774,57 @@ namespace NSBinPptxRW
|
||||
m_oReader.m_pRels->WriteCustoms(nCountCustoms);
|
||||
}
|
||||
|
||||
if (false)
|
||||
// presProps
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::PresProps);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
// tableStyles
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::TableStyles);
|
||||
if (m_mainTables.end() != pPair)
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oTableStyles.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
m_oPresProps.fromPPTY(&m_oReader);
|
||||
}
|
||||
|
||||
// presProps
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::PresProps);
|
||||
if (m_mainTables.end() != pPair)
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDefaultPresProps();
|
||||
}
|
||||
// viewProps
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::ViewProps);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oViewProps.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oPresProps.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
//todooo сделать в отдельный лог
|
||||
}
|
||||
}
|
||||
|
||||
// viewProps
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::ViewProps);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oViewProps.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// create default
|
||||
CreateDefaultViewProps();
|
||||
|
||||
// presProps
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::PresProps);
|
||||
if (m_mainTables.end() != pPair)
|
||||
}
|
||||
// tableStyles
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::TableStyles);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oPresProps.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
m_oTableStyles.fromPPTY(&m_oReader);
|
||||
}
|
||||
else
|
||||
catch (...)
|
||||
{
|
||||
CreateDefaultPresProps();
|
||||
}
|
||||
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::TableStyles);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
try
|
||||
{
|
||||
m_oTableStyles.fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (m_oTableStyles.Styles.empty())
|
||||
{
|
||||
CreateDefaultTableStyles();
|
||||
}
|
||||
}
|
||||
if (m_oTableStyles.Styles.empty())
|
||||
{
|
||||
CreateDefaultTableStyles();
|
||||
}
|
||||
//------------------------------------------------------------------------------------------
|
||||
// app
|
||||
oXmlWriter.ClearNoAttack();
|
||||
@ -886,14 +850,14 @@ namespace NSBinPptxRW
|
||||
oXmlWriter.SaveToFile(pathCore.GetPath());
|
||||
}
|
||||
|
||||
// presProps
|
||||
// presProps
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oPresProps.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathPresProps = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("presProps.xml");
|
||||
oXmlWriter.SaveToFile(pathPresProps.GetPath());
|
||||
|
||||
// viewProps
|
||||
// viewProps
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oViewProps.toXmlWriter(&oXmlWriter);
|
||||
|
||||
@ -903,14 +867,14 @@ namespace NSBinPptxRW
|
||||
m_oReader.m_pRels->Clear();
|
||||
m_oReader.m_pRels->StartRels();
|
||||
|
||||
// tablestyles
|
||||
// tablestyles
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oTableStyles.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathTableStyles = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("tableStyles.xml");
|
||||
oXmlWriter.SaveToFile(pathTableStyles.GetPath());
|
||||
|
||||
// presentation
|
||||
// presentation
|
||||
bool bIsAuthors = false;
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::Presentation);
|
||||
if (m_mainTables.end() != pPair)
|
||||
@ -1015,7 +979,7 @@ namespace NSBinPptxRW
|
||||
RELEASEARRAYOBJECTS(pDstBuffer);
|
||||
}
|
||||
|
||||
// content types
|
||||
// content types
|
||||
OOX::CContentTypes *pContentTypes = m_oImageManager.m_pContentTypes;
|
||||
|
||||
pContentTypes->Registration(m_oPresentation.type().OverrideType(),
|
||||
@ -1040,47 +1004,47 @@ namespace NSBinPptxRW
|
||||
pContentTypes->Registration(OOX::FileTypes::CustomProperties.OverrideType(), L"/docProps", OOX::FileTypes::CustomProperties.DefaultFileName().GetPath());
|
||||
}
|
||||
|
||||
// themes
|
||||
// themes
|
||||
for (size_t i = 0; i < m_arThemes.size(); ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.theme+xml", L"/ppt/theme", L"theme" + std::to_wstring((int)i + 1) + L".xml");
|
||||
}
|
||||
// notes master
|
||||
// notes master
|
||||
if (!m_arNotesMasters.empty())
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml", L"/ppt/notesMasters", L"notesMaster1.xml");
|
||||
}
|
||||
|
||||
// masters
|
||||
// masters
|
||||
for (LONG i = 0; i < nCountMasters; ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml", L"/ppt/slideMasters", L"slideMaster" + std::to_wstring(i + 1) + L".xml");
|
||||
}
|
||||
|
||||
// layouts
|
||||
// layouts
|
||||
for (LONG i = 0; i < nCountLayouts; ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml", L"/ppt/slideLayouts", L"slideLayout" + std::to_wstring((int)i + 1) + L".xml");
|
||||
}
|
||||
|
||||
// slides
|
||||
// slides
|
||||
for (size_t i = 0; i < m_arSlides.size(); ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.slide+xml", L"/ppt/slides", L"slide" + std::to_wstring((int)i + 1) + L".xml");
|
||||
}
|
||||
|
||||
// notes
|
||||
// notes
|
||||
for (size_t i = 0; i < m_arNotesSlides.size(); ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml", L"/ppt/notesSlides", L"notesSlide" + std::to_wstring((int)i + 1) + L".xml");
|
||||
}
|
||||
|
||||
// slideComments
|
||||
// slideComments
|
||||
for (int i = 1; i < nComment; ++i)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.comments+xml", L"/ppt/comments", L"comment" + std::to_wstring(i) + L".xml");
|
||||
}
|
||||
// comment authors
|
||||
// comment authors
|
||||
if (bIsAuthors)
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml", L"/ppt", L"commentAuthors.xml");
|
||||
|
||||
@ -161,6 +161,10 @@ namespace PPTX
|
||||
return smart_ptr<OOX::File>(new OOX::JsaProject( pMain, filename ));
|
||||
else if (relation.Type() == OOX::FileTypes::CustomXml)
|
||||
return smart_ptr<OOX::File>(new OOX::CCustomXML(pMain, filename, filename));
|
||||
else if (relation.Type() == OOX::FileTypes::ActiveX_xml)
|
||||
return smart_ptr<OOX::File>(new OOX::ActiveX_xml(pMain, filename, filename));
|
||||
else if (relation.Type() == OOX::FileTypes::ActiveX_bin)
|
||||
return smart_ptr<OOX::File>(new OOX::ActiveX_bin(pMain, filename));
|
||||
|
||||
return smart_ptr<OOX::File>(new OOX::UnknowTypeFile(pMain));
|
||||
}
|
||||
|
||||
@ -47,10 +47,9 @@ namespace PPTX
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CSld)
|
||||
|
||||
CSld() : spTree(L"p")
|
||||
CSld(OOX::Document *pMain = NULL) : WrapperWritingElement(pMain), spTree(L"p")
|
||||
{
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
}
|
||||
@ -58,9 +57,9 @@ namespace PPTX
|
||||
{
|
||||
XmlMacroReadAttributeBase(node, L"name", attrName);
|
||||
|
||||
bg = node.ReadNode(_T("p:bg"));
|
||||
spTree = node.ReadNodeNoNS(_T("spTree"));
|
||||
controls = node.ReadNode(_T("p:controls"));
|
||||
bg = node.ReadNode(L"p:bg");
|
||||
spTree = node.ReadNodeNoNS(L"spTree");
|
||||
controls = node.ReadNode(L"p:controls");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
@ -68,27 +67,29 @@ namespace PPTX
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("name"), attrName);
|
||||
oAttr.Write(L"name", attrName);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.WriteNullable(bg);
|
||||
oValue.Write(spTree);
|
||||
oValue.WriteNullable(controls);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:cSld"), oAttr, oValue);
|
||||
return XmlUtils::CreateNode(L"p:cSld", oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cSld"));
|
||||
pWriter->StartNode(L"p:cSld");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute2(_T("name"), attrName);
|
||||
pWriter->WriteAttribute2(L"name", attrName);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->Write(bg);
|
||||
spTree.toXmlWriter(pWriter);
|
||||
pWriter->Write(controls);
|
||||
|
||||
pWriter->EndNode(_T("p:cSld"));
|
||||
pWriter->EndNode(L"p:cSld");
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
@ -105,18 +106,16 @@ namespace PPTX
|
||||
pWriter->WriteRecord1(1, spTree.grpSpPr);
|
||||
|
||||
pWriter->StartRecord(2);
|
||||
pWriter->WriteULONG((_UINT32)spTree.SpTreeElems.size() + (controls.IsInit() ? controls->arrControls.size() : 0));
|
||||
pWriter->WriteULONG((_UINT32)spTree.SpTreeElems.size());
|
||||
for (size_t i = 0; i < spTree.SpTreeElems.size(); i++)
|
||||
{
|
||||
pWriter->WriteRecord1(0, spTree.SpTreeElems[i]);
|
||||
}
|
||||
if (controls.IsInit())
|
||||
{
|
||||
controls->toPPTY(pWriter);
|
||||
}
|
||||
pWriter->EndRecord();
|
||||
pWriter->EndRecord();
|
||||
pWriter->EndRecord();
|
||||
pWriter->EndRecord();
|
||||
|
||||
pWriter->WriteRecord2(2, controls);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
@ -152,6 +151,12 @@ namespace PPTX
|
||||
spTree.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
controls = new Controls(m_pMainDocument);
|
||||
controls->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->Seek(_end_rec);
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
#include "Controls.h"
|
||||
#include "../../ASCOfficeDrawingConverter.h"
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/Media/ActiveX.h"
|
||||
|
||||
#include "../Slide.h"
|
||||
|
||||
@ -38,13 +39,155 @@ namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
void Controls::fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
arrControls.clear();
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (node.GetNodes(L"*", oNodes))
|
||||
{
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNodes.GetAt(i, oNode);
|
||||
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oNode.GetName());
|
||||
|
||||
if (strName == L"control")
|
||||
{
|
||||
Control elem(oNode);
|
||||
arrControls.push_back(elem);
|
||||
}
|
||||
else if (L"AlternateContent" == strName)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeChoice, oNodeFallback;
|
||||
XmlUtils::CXmlNode oNodeFallbackControl;
|
||||
|
||||
bool resFallback, resChoice = oNode.GetNode(L"mc:Choice", oNodeChoice);
|
||||
if (oNode.GetNode(L"mc:Fallback", oNodeFallback))
|
||||
{
|
||||
resFallback = oNodeFallback.GetNode(L"p:control", oNodeFallbackControl);
|
||||
}
|
||||
|
||||
std::wstring sRequires;
|
||||
if (resChoice)
|
||||
{
|
||||
oNodeChoice.GetAttributeIfExist(L"Requires", sRequires);
|
||||
}
|
||||
if (L"v" != sRequires || !resFallback)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeChoiceControl;
|
||||
if (oNodeChoice.GetNode(L"p:control", oNodeChoiceControl))
|
||||
{
|
||||
Control elem(oNodeChoiceControl);
|
||||
arrControls.push_back(elem);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Control elem(oNodeFallbackControl);
|
||||
arrControls.push_back(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
std::wstring Controls::toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
|
||||
oValue.WriteArray(arrControls);
|
||||
|
||||
return XmlUtils::CreateNode(L"p:controls", oValue);
|
||||
}
|
||||
|
||||
void Controls::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(L"p:controls");
|
||||
pWriter->EndAttributes();
|
||||
|
||||
for (size_t i = 0; i < arrControls.size(); ++i)
|
||||
arrControls[i].toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(L"p:controls");
|
||||
}
|
||||
void Controls::toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
for (size_t i = 0; i <arrControls.size(); i++)
|
||||
arrControls[i].toPPTY(pWriter);
|
||||
for (size_t i = 0; i < arrControls.size(); i++)
|
||||
{
|
||||
pWriter->WriteRecord1(0, arrControls[i]);
|
||||
}
|
||||
}
|
||||
void Controls::fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
arrControls.push_back(Control(m_pMainDocument));
|
||||
arrControls.back().fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
void Control::fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
name = node.GetAttribute(L"name");
|
||||
spid = node.GetAttribute(L"spid");
|
||||
|
||||
XmlMacroReadAttributeBase(node, L"r:id", rId);
|
||||
XmlMacroReadAttributeBase(node, L"imgW", width);
|
||||
XmlMacroReadAttributeBase(node, L"imgH", height);
|
||||
XmlMacroReadAttributeBase(node, L"showAsIcon", showAsIcon);
|
||||
|
||||
if (false == rId.IsInit())
|
||||
XmlMacroReadAttributeBase(node, L"id", rId);
|
||||
pic = node.ReadNode(L"p:pic");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
|
||||
std::wstring Control::toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(L"name", name);
|
||||
|
||||
if (rId.IsInit()) oAttr.Write(L"r:id", rId->ToString());
|
||||
if (width.IsInit()) oAttr.Write(L"imgW", std::to_wstring(*width));
|
||||
if (height.IsInit())oAttr.Write(L"imgH", std::to_wstring(*height));
|
||||
|
||||
oAttr.Write(L"spid", spid);
|
||||
|
||||
return XmlUtils::CreateNode(L"p:control", oAttr);
|
||||
}
|
||||
void Control::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(L"p:control");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(L"name", name);
|
||||
pWriter->WriteAttribute(L"spid", spid);
|
||||
|
||||
if (rId.IsInit()) pWriter->WriteAttribute(L"r:id", rId->ToString());
|
||||
if (width.IsInit())pWriter->WriteAttribute(L"imgW", std::to_wstring(*width));
|
||||
if (height.IsInit())pWriter->WriteAttribute(L"imgH", std::to_wstring(*height));
|
||||
pWriter->WriteAttribute(L"showAsIcon", showAsIcon);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->Write(pic);
|
||||
|
||||
pWriter->EndNode(L"p:control");
|
||||
}
|
||||
std::wstring Control::GetVmlXmlBySpid(std::wstring spid, smart_ptr<OOX::IFileContainer> & rels) const
|
||||
{
|
||||
@ -69,43 +212,126 @@ namespace PPTX
|
||||
}
|
||||
void Control::toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
if (spid.IsInit() == false) return;
|
||||
|
||||
std::wstring s = *spid;
|
||||
if (s.length() < 8) s = _T("_x0000_s") + s;
|
||||
|
||||
smart_ptr<OOX::IFileContainer> rels;
|
||||
std::wstring xml = GetVmlXmlBySpid(s, rels);
|
||||
|
||||
if (xml.length() > 0)
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteString2(0, name);
|
||||
pWriter->WriteUInt2(1, width);
|
||||
pWriter->WriteUInt2(2, height);
|
||||
pWriter->WriteBool2(3, showAsIcon);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
if (pic.IsInit())
|
||||
{
|
||||
std::wstring temp = _T("<v:object>");
|
||||
temp += xml;
|
||||
temp += L"</v:object>";
|
||||
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
|
||||
RELEASEOBJECT(oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager);
|
||||
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = pWriter->m_pCommon->m_pMediaManager;
|
||||
|
||||
std::wstring *main_props = NULL;
|
||||
|
||||
oDrawingConverter.SetRels(rels);
|
||||
|
||||
std::vector<nullable<PPTX::Logic::SpTreeElem>> elements;
|
||||
oDrawingConverter.ConvertVml(temp, elements);
|
||||
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = NULL;
|
||||
|
||||
smart_ptr<OOX::IFileContainer> rels_old = pWriter->GetRels();
|
||||
pWriter->SetRels(rels);
|
||||
for (size_t i = 0; i < elements.size(); ++i)
|
||||
{
|
||||
pWriter->StartRecord(0);
|
||||
elements[i]->toPPTY(pWriter);
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
pWriter->SetRels(rels_old);
|
||||
pWriter->WriteRecord2(0, pic);
|
||||
}
|
||||
else if (spid.IsInit())
|
||||
{
|
||||
std::wstring s = *spid;
|
||||
if (s.length() < 8) s = L"_x0000_s" + s;
|
||||
|
||||
smart_ptr<OOX::IFileContainer> rels;
|
||||
std::wstring xml = GetVmlXmlBySpid(s, rels);
|
||||
|
||||
if (false == xml.empty())
|
||||
{
|
||||
std::wstring temp = L"<v:object>";
|
||||
temp += xml;
|
||||
temp += L"</v:object>";
|
||||
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
|
||||
RELEASEOBJECT(oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager);
|
||||
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = pWriter->m_pCommon->m_pMediaManager;
|
||||
|
||||
std::wstring *main_props = NULL;
|
||||
|
||||
oDrawingConverter.SetRels(rels);
|
||||
|
||||
std::vector<nullable<PPTX::Logic::SpTreeElem>> elements;
|
||||
oDrawingConverter.ConvertVml(temp, elements);
|
||||
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = NULL;
|
||||
|
||||
smart_ptr<OOX::IFileContainer> rels_old = pWriter->GetRels();
|
||||
pWriter->SetRels(rels);
|
||||
for (size_t i = 0; i < elements.size(); ++i)
|
||||
{
|
||||
pWriter->WriteRecord2(0, elements[i]);
|
||||
}
|
||||
pWriter->SetRels(rels_old);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
smart_ptr<OOX::File> pFileControl;
|
||||
|
||||
if (rId.IsInit() && parentFileIs<PPTX::Slide>())
|
||||
{
|
||||
pFileControl = parentFileAs<PPTX::Slide>().Find(rId.get());
|
||||
}
|
||||
smart_ptr<OOX::ActiveX_xml> pActiveX_xml = pFileControl.smart_dynamic_cast<OOX::ActiveX_xml>();
|
||||
|
||||
if (pActiveX_xml.IsInit())
|
||||
{
|
||||
pWriter->StartRecord(1);
|
||||
pActiveX_xml->toPPTY(pWriter);
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
}
|
||||
void Control::fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
if (0 == _at) name = pReader->GetString2();
|
||||
else if (1 == _at) width = pReader->GetULong();
|
||||
else if (2 == _at) height = pReader->GetULong();
|
||||
else if (3 == _at) showAsIcon = pReader->GetBool();
|
||||
else
|
||||
break;
|
||||
}
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pReader->Skip(1); // type (0)
|
||||
LONG nElemLength = pReader->GetLong(); // len
|
||||
|
||||
pic.Init();
|
||||
pic->fromPPTY(pReader);
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
smart_ptr<OOX::ActiveX_xml> pActiveX_xml = new OOX::ActiveX_xml(m_pMainDocument);
|
||||
pActiveX_xml->fromPPTY(pReader);
|
||||
|
||||
std::wstring sActiveXFileName = L"activeX" + std::to_wstring(pReader->m_nCountActiveX++) + L".xml";
|
||||
OOX::CPath sActiveXPath = pReader->m_pRels->m_pManager->GetDstFolder() + FILE_SEPARATOR_STR + L"activeX";
|
||||
|
||||
NSDirectory::CreateDirectory(sActiveXPath.GetPath());
|
||||
|
||||
OOX::CPath oActiveXRegPath = std::wstring(L"/ppt/activeX/");
|
||||
pActiveX_xml->write(sActiveXPath + FILE_SEPARATOR_STR + sActiveXFileName, oActiveXRegPath, *pReader->m_pRels->m_pManager->m_pContentTypes);
|
||||
|
||||
std::wstring sActiveXRelsPath = L"../activeX/" + sActiveXFileName;
|
||||
size_t nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/control", sActiveXRelsPath, L"");
|
||||
rId = OOX::RId(nRId);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
} // namespace Logic
|
||||
} // namespace PPTX
|
||||
|
||||
@ -45,74 +45,33 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Control)
|
||||
|
||||
void AddObjectTo (const std::vector<SpTreeElem> *spTreeElements, NSShapeImageGen::CMediaManager* pMediaManager) const ;
|
||||
|
||||
Control(OOX::Document *pMain = NULL) : WrapperWritingElement(pMain)
|
||||
{
|
||||
}
|
||||
std::wstring GetVmlXmlBySpid(std::wstring spid, smart_ptr<OOX::IFileContainer> & rels) const ;
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const ;
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader);
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
name = node.GetAttribute(_T("name"));
|
||||
spid = node.GetAttribute(_T("spid"));
|
||||
|
||||
XmlMacroReadAttributeBase(node, L"rId" , rId);
|
||||
XmlMacroReadAttributeBase(node, L"width" , width);
|
||||
XmlMacroReadAttributeBase(node, L"height" , height);
|
||||
XmlMacroReadAttributeBase(node, L"showAsIcon", showAsIcon);
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node);
|
||||
|
||||
pic = node.ReadNode(_T("p:pic"));
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const;
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
nullable_string name;
|
||||
nullable_string spid;
|
||||
nullable_bool showAsIcon;
|
||||
nullable_uint height;
|
||||
nullable_uint width;
|
||||
nullable<OOX::RId> rId;
|
||||
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("name"), name);
|
||||
|
||||
if (rId.IsInit()) oAttr.Write(_T("rId"), rId->ToString());
|
||||
if (width.IsInit()) oAttr.Write(_T("width"), width->ToString());
|
||||
if (height.IsInit())oAttr.Write(_T("height"), height->ToString());
|
||||
|
||||
oAttr.Write(_T("spid"), spid);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:control"), oAttr);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:control"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("name") , name);
|
||||
pWriter->WriteAttribute(_T("showAsIcon"), showAsIcon);
|
||||
pWriter->WriteAttribute(_T("spid") , spid);
|
||||
|
||||
if (rId.IsInit()) pWriter->WriteAttribute(_T("rId"), rId->ToString());
|
||||
if (width.IsInit())pWriter->WriteAttribute(_T("width"), width->ToString());
|
||||
if (height.IsInit())pWriter->WriteAttribute(_T("height"), height->ToString());
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->Write(pic);
|
||||
|
||||
pWriter->EndNode(_T("p:control"));
|
||||
}
|
||||
|
||||
nullable_string name;
|
||||
nullable_string spid;
|
||||
nullable_bool showAsIcon;
|
||||
nullable<SimpleTypes::CPositiveCoordinate<0>> height;
|
||||
nullable<SimpleTypes::CPositiveCoordinate<0>> width;
|
||||
nullable<OOX::RId> rId;
|
||||
|
||||
nullable<PPTX::Logic::Pic> pic;
|
||||
/// todooo
|
||||
nullable<PPTX::Logic::Pic> pic;
|
||||
//extLst (Extension List) 19.2.1.12
|
||||
protected:
|
||||
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
if (pic.IsInit()) pic->SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
|
||||
@ -121,58 +80,19 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Controls)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
|
||||
Controls(OOX::Document *pMain = NULL) : WrapperWritingElement(pMain)
|
||||
{
|
||||
arrControls.clear();
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (node.GetNodes(_T("*"), oNodes))
|
||||
{
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNodes.GetAt(i, oNode);
|
||||
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oNode.GetName());
|
||||
|
||||
if (strName == _T("control"))
|
||||
{
|
||||
Control elem(oNode);
|
||||
arrControls.push_back(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
|
||||
oValue.WriteArray(arrControls);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:controls"), oValue);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:controls"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
for (size_t i = 0; i < arrControls.size(); ++i)
|
||||
arrControls[i].toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:controls"));
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node);
|
||||
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const;
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader);
|
||||
|
||||
public:
|
||||
std::vector<Control> arrControls;
|
||||
|
||||
protected:
|
||||
|
||||
@ -270,8 +270,6 @@ namespace PPTX
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
|
||||
public:
|
||||
std::vector<Gd> avLst;
|
||||
std::vector<Gd> gdLst;
|
||||
std::vector<AhBase> ahLst;
|
||||
|
||||
@ -187,7 +187,7 @@ namespace PPTX
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
public:
|
||||
|
||||
Limit::TextShapeType prst;
|
||||
std::vector<Gd> avLst;
|
||||
protected:
|
||||
|
||||
@ -250,7 +250,7 @@ namespace PPTX
|
||||
{
|
||||
pReader->Skip(1); // type
|
||||
Paragrs.push_back(Paragraph());
|
||||
Paragrs[Paragrs.size() - 1].fromPPTY(pReader);
|
||||
Paragrs.back().fromPPTY(pReader);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_SLIDES_SLIDE_INCLUDE_H_
|
||||
#define PPTX_SLIDES_SLIDE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
@ -251,7 +249,7 @@ namespace PPTX
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
cSld = new Logic::CSld();
|
||||
cSld = new Logic::CSld(WrapperFile::m_pMainDocument);
|
||||
cSld->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
@ -345,5 +343,3 @@ namespace PPTX
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_SLIDES_SLIDE_INCLUDE_H_
|
||||
|
||||
@ -85,8 +85,6 @@ namespace PPTX
|
||||
{
|
||||
WrapperFile::write(filename, directory, content);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::Presentation::FileTypes::TableStyles;
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_FILE_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_FILE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
@ -61,54 +59,74 @@ namespace PPTX
|
||||
virtual ~ViewProps()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
//FileContainer::read(filename, map);
|
||||
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile(filename.m_strFilename);
|
||||
|
||||
XmlMacroReadAttributeBase(oNode, L"lastView", attrLastView);
|
||||
XmlMacroReadAttributeBase(oNode, L"showComments", attrShowComments);
|
||||
|
||||
|
||||
GridSpacing = oNode.ReadNode(_T("p:gridSpacing"));
|
||||
if(GridSpacing.is_init())
|
||||
GridSpacing->SetParentFilePointer(this);
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (oNode.GetNodes(_T("*"), oNodes))
|
||||
{
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeChild;
|
||||
oNodes.GetAt(i, oNodeChild);
|
||||
|
||||
NormalViewPr = oNode.ReadNode(_T("normalViewPr"));
|
||||
if(NormalViewPr.is_init())
|
||||
NormalViewPr->SetParentFilePointer(this);
|
||||
|
||||
NotesTextViewPr = oNode.ReadNode(_T("notesTextViewPr"));
|
||||
if(NotesTextViewPr.is_init())
|
||||
NotesTextViewPr->SetParentFilePointer(this);
|
||||
|
||||
NotesViewPr = oNode.ReadNode(_T("notesViewPr"));
|
||||
if(NotesViewPr.is_init())
|
||||
NotesViewPr->SetParentFilePointer(this);
|
||||
|
||||
OutlineViewPr = oNode.ReadNode(_T("outlineViewPr"));
|
||||
if(OutlineViewPr.is_init())
|
||||
OutlineViewPr->SetParentFilePointer(this);
|
||||
|
||||
SlideViewPr = oNode.ReadNode(_T("slideViewPr"));
|
||||
if(SlideViewPr.is_init())
|
||||
SlideViewPr->SetParentFilePointer(this);
|
||||
|
||||
SorterViewPr = oNode.ReadNode(_T("sorterViewPr"));
|
||||
if(SorterViewPr.is_init())
|
||||
SorterViewPr->SetParentFilePointer(this);
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oNodeChild.GetName());
|
||||
if (L"gridSpacing" == strName)
|
||||
{
|
||||
GridSpacing = oNodeChild;
|
||||
if (GridSpacing.is_init())
|
||||
GridSpacing->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"normalViewPr" == strName)
|
||||
{
|
||||
NormalViewPr = oNodeChild;
|
||||
if (NormalViewPr.is_init())
|
||||
NormalViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"notesTextViewPr" == strName)
|
||||
{
|
||||
NotesTextViewPr = oNodeChild;
|
||||
if (NotesTextViewPr.is_init())
|
||||
NotesTextViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"notesViewPr" == strName)
|
||||
{
|
||||
NotesViewPr = oNodeChild;
|
||||
if (NotesViewPr.is_init())
|
||||
NotesViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"outlineViewPr" == strName)
|
||||
{
|
||||
OutlineViewPr = oNodeChild;
|
||||
if (OutlineViewPr.is_init())
|
||||
OutlineViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"slideViewPr" == strName)
|
||||
{
|
||||
SlideViewPr = oNodeChild;
|
||||
if (SlideViewPr.is_init())
|
||||
SlideViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
else if (L"sorterViewPr" == strName)
|
||||
{
|
||||
SorterViewPr = oNodeChild;
|
||||
if (SorterViewPr.is_init())
|
||||
SorterViewPr->SetParentFilePointer(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::CContentTypes& content)const
|
||||
{
|
||||
WrapperFile::write(filename, directory, content);
|
||||
FileContainer::write(filename, directory, content);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::Presentation::FileTypes::ViewProps;
|
||||
@ -143,17 +161,94 @@ namespace PPTX
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
pReader->Skip(1);
|
||||
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrLastView = pReader->GetUChar();
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
attrShowComments = pReader->GetBool();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
GridSpacing = new nsViewProps::GridSpacing();
|
||||
GridSpacing->fromPPTY(pReader);
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
NormalViewPr = new nsViewProps::NormalViewPr();
|
||||
NormalViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
case 2:
|
||||
{
|
||||
NotesTextViewPr = new nsViewProps::NotesTextViewPr();
|
||||
NotesTextViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
case 3:
|
||||
{
|
||||
NotesViewPr = new nsViewProps::NotesViewPr();
|
||||
NotesViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
case 4:
|
||||
{
|
||||
OutlineViewPr = new nsViewProps::OutlineViewPr();
|
||||
OutlineViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
case 5:
|
||||
{
|
||||
SlideViewPr = new nsViewProps::SlideViewPr();
|
||||
SlideViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
case 6:
|
||||
{
|
||||
SorterViewPr = new nsViewProps::SorterViewPr();
|
||||
SorterViewPr->fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:viewPr"));
|
||||
pWriter->StartNode(L"p:viewPr");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("xmlns:a"), PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:r"), PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:p"), PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->WriteAttribute(_T("lastView"), attrLastView);
|
||||
pWriter->WriteAttribute(_T("showComments"), attrShowComments);
|
||||
pWriter->WriteAttribute(L"xmlns:a", PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:r", PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:p", PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->WriteAttribute(L"lastView", attrLastView);
|
||||
pWriter->WriteAttribute(L"showComments", attrShowComments);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
@ -165,10 +260,9 @@ namespace PPTX
|
||||
pWriter->Write(NotesViewPr);
|
||||
pWriter->Write(GridSpacing);
|
||||
|
||||
pWriter->EndNode(_T("p:viewPr"));
|
||||
pWriter->EndNode(L"p:viewPr");
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_limit<Limit::LastView> attrLastView;
|
||||
nullable_bool attrShowComments;
|
||||
|
||||
@ -182,4 +276,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_FILE_INCLUDE_H_
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
@ -60,16 +58,14 @@ namespace PPTX
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
GuideLst.clear();
|
||||
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
CViewPr = node.ReadNode(L"p:cViewPr");
|
||||
|
||||
XmlUtils::CXmlNode oNodeLst = node.ReadNode(_T("p:guideLst"));
|
||||
XmlMacroLoadArray(oNodeLst, _T("p:guide"), GuideLst, Guide);
|
||||
XmlUtils::CXmlNode oNodeLst = node.ReadNode(L"p:guideLst");
|
||||
XmlMacroLoadArray(oNodeLst, L"p:guide", GuideLst, Guide);
|
||||
|
||||
XmlMacroReadAttributeBase(node, L"showGuides", attrShowGuides);
|
||||
XmlMacroReadAttributeBase(node, L"snapToGrid", attrSnapToGrid);
|
||||
@ -80,15 +76,15 @@ namespace PPTX
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("showGuides"), attrShowGuides);
|
||||
oAttr.Write(_T("snapToGrid"), attrSnapToGrid);
|
||||
oAttr.Write(_T("snapToObjects"), attrSnapToObjects);
|
||||
oAttr.Write(L"showGuides", attrShowGuides);
|
||||
oAttr.Write(L"snapToGrid", attrSnapToGrid);
|
||||
oAttr.Write(L"snapToObjects", attrSnapToObjects);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
oValue.WriteArray(_T("p:guideLst"), GuideLst);
|
||||
oValue.WriteArray(L"p:guideLst", GuideLst);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:cSldViewPr"), oAttr, oValue);
|
||||
return XmlUtils::CreateNode(L"p:cSldViewPr", oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
@ -100,35 +96,84 @@ namespace PPTX
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
pWriter->WriteRecordArray(1, 2, GuideLst);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
pWriter->StartRecord(1);
|
||||
ULONG len = (ULONG)GuideLst.size();
|
||||
pWriter->WriteULONG(len);
|
||||
for (ULONG i = 0; i < len; i++)
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
pWriter->WriteRecord1(2, GuideLst[i]);
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrShowGuides = pReader->GetBool();
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
attrSnapToGrid = pReader->GetBool();
|
||||
}break;
|
||||
case 2:
|
||||
{
|
||||
attrSnapToObjects = pReader->GetBool();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
pWriter->EndRecord();
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar();
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
CViewPr.fromPPTY(pReader);
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
pReader->Skip(4);
|
||||
ULONG _c = pReader->GetULong();
|
||||
for (ULONG i = 0; i < _c; ++i)
|
||||
{
|
||||
pReader->Skip(1); // type
|
||||
GuideLst.push_back(Guide());
|
||||
GuideLst.back().fromPPTY(pReader);
|
||||
}
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cSldViewPr"));
|
||||
pWriter->StartNode(L"p:cSldViewPr");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("showGuides"), attrShowGuides);
|
||||
pWriter->WriteAttribute(_T("snapToGrid"), attrSnapToGrid);
|
||||
pWriter->WriteAttribute(_T("snapToObjects"), attrSnapToObjects);
|
||||
pWriter->WriteAttribute(L"showGuides", attrShowGuides);
|
||||
pWriter->WriteAttribute(L"snapToGrid", attrSnapToGrid);
|
||||
pWriter->WriteAttribute(L"snapToObjects", attrSnapToObjects);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
pWriter->WriteArray(_T("p:guideLst"), GuideLst);
|
||||
pWriter->WriteArray(L"p:guideLst", GuideLst);
|
||||
|
||||
pWriter->EndNode(_T("p:cSldViewPr"));
|
||||
pWriter->EndNode(L"p:cSldViewPr");
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
std::vector<Guide> GuideLst;
|
||||
|
||||
@ -147,5 +192,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "Origin.h"
|
||||
@ -45,27 +43,25 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(CViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
XmlMacroReadAttributeBase(node, L"varScale", attrVarScale);
|
||||
|
||||
Scale = node.ReadNode(_T("p:scale"));
|
||||
Origin = node.ReadNode(_T("p:origin"));
|
||||
Scale = node.ReadNode(L"p:scale");
|
||||
Origin = node.ReadNode(L"p:origin");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("varScale"), attrVarScale);
|
||||
oAttr.Write(L"varScale", attrVarScale);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(Scale);
|
||||
oValue.Write(Origin);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:cViewPr"), oAttr, oValue);
|
||||
return XmlUtils::CreateNode(L"p:cViewPr", oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
@ -77,21 +73,64 @@ namespace PPTX
|
||||
pWriter->WriteRecord1(0, Origin);
|
||||
pWriter->WriteRecord1(1, Scale);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrVarScale = pReader->GetBool();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Origin.fromPPTY(pReader);
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
Scale.fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cViewPr"));
|
||||
pWriter->StartNode(L"p:cViewPr");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("varScale"), attrVarScale);
|
||||
pWriter->WriteAttribute(L"varScale", attrVarScale);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
Scale.toXmlWriter(pWriter);
|
||||
Origin.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:cViewPr"));
|
||||
pWriter->EndNode(L"p:cViewPr");
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_bool attrVarScale;
|
||||
nsViewProps::Origin Origin;
|
||||
nsViewProps::Scale Scale;
|
||||
@ -104,5 +143,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
@ -30,9 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
@ -44,7 +41,6 @@ namespace PPTX
|
||||
public:
|
||||
PPTX_LOGIC_BASE(GridSpacing)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
cx = node.ReadAttributeInt(L"cx");
|
||||
@ -55,34 +51,60 @@ namespace PPTX
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("cx"), cx);
|
||||
oAttr.Write(_T("cy"), cy);
|
||||
oAttr.Write(L"cx", cx);
|
||||
oAttr.Write(L"cy", cy);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:gridSpacing"), oAttr);
|
||||
return XmlUtils::CreateNode(L"p:gridSpacing", oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteINT(cx);
|
||||
pWriter->WriteINT(cy);
|
||||
pWriter->WriteInt1(0, cx);
|
||||
pWriter->WriteInt1(1, cy);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
cx = pReader->GetLong();
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
cy = pReader->GetLong();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:gridSpacing"));
|
||||
pWriter->StartNode(L"p:gridSpacing");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("cx"), cx);
|
||||
pWriter->WriteAttribute(_T("cy"), cy);
|
||||
pWriter->WriteAttribute(L"cx", cx);
|
||||
pWriter->WriteAttribute(L"cy", cy);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:gridSpacing"));
|
||||
pWriter->EndNode(L"p:gridSpacing");
|
||||
}
|
||||
|
||||
public:
|
||||
int cx;
|
||||
int cy;
|
||||
protected:
|
||||
@ -98,5 +120,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "./../Limit/Orient.h"
|
||||
@ -45,7 +43,6 @@ namespace PPTX
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Guide)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
XmlMacroReadAttributeBase(node, L"orient", orient);
|
||||
@ -56,12 +53,11 @@ namespace PPTX
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("pos"), pos);
|
||||
oAttr.WriteLimitNullable(_T("orient"), orient);
|
||||
oAttr.Write(L"pos", pos);
|
||||
oAttr.WriteLimitNullable(L"orient", orient);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:guide"), oAttr);
|
||||
return XmlUtils::CreateNode(L"p:guide", oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
@ -71,20 +67,45 @@ namespace PPTX
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pos = pReader->GetLong();
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
orient = pReader->GetUChar();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:guide"));
|
||||
pWriter->StartNode(L"p:guide");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("pos"), pos);
|
||||
pWriter->WriteAttribute(_T("orient"), orient);
|
||||
pWriter->WriteAttribute(L"pos", pos);
|
||||
pWriter->WriteAttribute(L"orient", orient);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:guide"));
|
||||
pWriter->EndNode(L"p:guide");
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_int pos;
|
||||
nullable_limit<Limit::Orient> orient;
|
||||
protected:
|
||||
@ -97,5 +118,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
|
||||
@ -53,77 +53,134 @@ namespace PPTX
|
||||
XmlMacroReadAttributeBase(node, L"showOutlineIcons", attrShowOutlineIcons);
|
||||
XmlMacroReadAttributeBase(node, L"snapVertSplitter", attrSnapVertSplitter);
|
||||
|
||||
restoredLeft = node.ReadNodeNoNS(_T("restoredLeft"));
|
||||
restoredTop = node.ReadNodeNoNS(_T("restoredTop"));
|
||||
restoredLeft = node.ReadNodeNoNS(L"restoredLeft");
|
||||
restoredTop = node.ReadNodeNoNS(L"restoredTop");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("horzBarState"), attrHorzBarState->get());
|
||||
oAttr.Write(_T("vertBarState"), attrVertBarState->get());
|
||||
oAttr.Write(L"horzBarState", attrHorzBarState->get());
|
||||
oAttr.Write(L"vertBarState", attrVertBarState->get());
|
||||
|
||||
oAttr.Write(_T("preferSingleView"), attrPreferSingleView);
|
||||
oAttr.Write(_T("showOutlineIcons"), attrShowOutlineIcons);
|
||||
oAttr.Write(_T("snapVertSplitter"), attrSnapVertSplitter);
|
||||
oAttr.Write(L"preferSingleView", attrPreferSingleView);
|
||||
oAttr.Write(L"showOutlineIcons", attrShowOutlineIcons);
|
||||
oAttr.Write(L"snapVertSplitter", attrSnapVertSplitter);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(restoredTop);
|
||||
oValue.Write(restoredLeft);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:normalViewPr"), oAttr, oValue);
|
||||
return XmlUtils::CreateNode(L"p:normalViewPr", oAttr, oValue);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:normalViewPr"));
|
||||
pWriter->StartNode(L"p:normalViewPr");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("horzBarState"), attrHorzBarState);
|
||||
pWriter->WriteAttribute(_T("vertBarState"), attrVertBarState);
|
||||
pWriter->WriteAttribute(_T("preferSingleView"), attrPreferSingleView);
|
||||
pWriter->WriteAttribute(_T("showOutlineIcons"), attrShowOutlineIcons);
|
||||
pWriter->WriteAttribute(_T("snapVertSplitter"), attrSnapVertSplitter);
|
||||
pWriter->WriteAttribute(L"horzBarState", attrHorzBarState);
|
||||
pWriter->WriteAttribute(L"vertBarState", attrVertBarState);
|
||||
pWriter->WriteAttribute(L"preferSingleView", attrPreferSingleView);
|
||||
pWriter->WriteAttribute(L"showOutlineIcons", attrShowOutlineIcons);
|
||||
pWriter->WriteAttribute(L"snapVertSplitter", attrSnapVertSplitter);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("p:restoredLeft"));
|
||||
pWriter->StartNode(L"p:restoredLeft");
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("sz"), restoredLeft.sz);
|
||||
pWriter->WriteAttribute(_T("autoAdjust"), restoredLeft.autoAdjust);
|
||||
pWriter->WriteAttribute(L"sz", restoredLeft.sz);
|
||||
pWriter->WriteAttribute(L"autoAdjust", restoredLeft.autoAdjust);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("p:restoredLeft"));
|
||||
pWriter->EndNode(L"p:restoredLeft");
|
||||
|
||||
pWriter->StartNode(_T("p:restoredTop"));
|
||||
pWriter->StartNode(L"p:restoredTop");
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("sz"), restoredTop.sz);
|
||||
pWriter->WriteAttribute(_T("autoAdjust"), restoredTop.autoAdjust);
|
||||
pWriter->WriteAttribute(L"sz", restoredTop.sz);
|
||||
pWriter->WriteAttribute(L"autoAdjust", restoredTop.autoAdjust);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("p:restoredTop"));
|
||||
pWriter->EndNode(L"p:restoredTop");
|
||||
|
||||
pWriter->EndNode(_T("p:normalViewPr"));
|
||||
pWriter->EndNode(L"p:normalViewPr");
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrHorzBarState = pReader->GetUChar();
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
attrVertBarState = pReader->GetUChar();
|
||||
}break;
|
||||
case 2:
|
||||
{
|
||||
attrPreferSingleView = pReader->GetBool();
|
||||
}break;
|
||||
case 3:
|
||||
{
|
||||
attrShowOutlineIcons = pReader->GetBool();
|
||||
}break;
|
||||
case 4:
|
||||
{
|
||||
attrSnapVertSplitter = pReader->GetBool();
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
restoredLeft.name = L"restoredLeft";
|
||||
restoredLeft.fromPPTY(pReader);
|
||||
}break;
|
||||
case 1:
|
||||
{
|
||||
restoredTop.name = L"restoredTop";
|
||||
restoredTop.fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrPreferSingleView);
|
||||
pWriter->WriteBool2(1, attrShowOutlineIcons);
|
||||
pWriter->WriteBool2(2, attrSnapVertSplitter);
|
||||
pWriter->WriteLimit2(3, attrHorzBarState);
|
||||
pWriter->WriteLimit2(4, attrVertBarState);
|
||||
pWriter->WriteBool2(0, attrPreferSingleView);
|
||||
pWriter->WriteBool2(1, attrShowOutlineIcons);
|
||||
pWriter->WriteBool2(2, attrSnapVertSplitter);
|
||||
pWriter->WriteLimit2(3, attrHorzBarState);
|
||||
pWriter->WriteLimit2(4, attrVertBarState);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, restoredLeft);
|
||||
pWriter->WriteRecord1(1, restoredTop);
|
||||
}
|
||||
|
||||
nsViewProps::Restored restoredLeft;
|
||||
nsViewProps::Restored restoredTop;
|
||||
nsViewProps::Restored restoredLeft;
|
||||
nsViewProps::Restored restoredTop;
|
||||
|
||||
nullable_limit<Limit::SplitterBarState> attrHorzBarState;
|
||||
nullable_limit<Limit::SplitterBarState> attrVertBarState;
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
@ -45,10 +43,9 @@ namespace PPTX
|
||||
public:
|
||||
PPTX_LOGIC_BASE(NotesTextViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
CViewPr = node.ReadNode(L"p:cViewPr");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
@ -57,24 +54,44 @@ namespace PPTX
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:notesTextViewPr"), oValue);
|
||||
return XmlUtils::CreateNode(L"p:notesTextViewPr", oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
CViewPr.fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:notesTextViewPr"));
|
||||
pWriter->StartNode(L"p:notesTextViewPr");
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:notesTextViewPr"));
|
||||
pWriter->EndNode(L"p:notesTextViewPr");
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
@ -83,6 +100,4 @@ namespace PPTX
|
||||
}
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
} // namespace PPTX
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CSldViewPr.h"
|
||||
@ -45,10 +43,9 @@ namespace PPTX
|
||||
public:
|
||||
PPTX_LOGIC_BASE(NotesViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CSldViewPr = node.ReadNode(_T("p:cSldViewPr"));
|
||||
CSldViewPr = node.ReadNode(L"p:cSldViewPr");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
@ -57,24 +54,44 @@ namespace PPTX
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CSldViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:notesViewPr"), oValue);
|
||||
return XmlUtils::CreateNode(L"p:notesViewPr", oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CSldViewPr);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
CSldViewPr.fromPPTY(pReader);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}break;
|
||||
}
|
||||
}
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:notesViewPr"));
|
||||
pWriter->StartNode(L"p:notesViewPr");
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CSldViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:notesViewPr"));
|
||||
pWriter->EndNode(L"p:notesViewPr");
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CSldViewPr CSldViewPr;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
@ -84,5 +101,3 @@ namespace PPTX
|
||||
};
|
||||
} // namespace nsViewProps
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user