mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-26 07:11:53 +08:00
Compare commits
13 Commits
core-linux
...
core-win-6
| Author | SHA1 | Date | |
|---|---|---|---|
| ed613f7ec1 | |||
| e0bc06d3db | |||
| 366f16aa4f | |||
| 662c687520 | |||
| efc70421e2 | |||
| 7522ad9167 | |||
| f7922fcea8 | |||
| 19dabff8e6 | |||
| 84bd16951f | |||
| 4e4e1e4ba5 | |||
| 8996935a10 | |||
| 87c999474d | |||
| 7959642072 |
@ -4266,10 +4266,10 @@ namespace BinDocxRW
|
||||
|
||||
if ( pSSub->m_oSSubPr.IsInit() )
|
||||
WriteMathSSubPr(pSSub->m_oSSubPr.get());
|
||||
if ( pSSub->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSub->m_oSub.get());
|
||||
if ( pSSub->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSub->m_oElement.get());
|
||||
if ( pSSub->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSub->m_oSub.get());
|
||||
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -4281,12 +4281,12 @@ namespace BinDocxRW
|
||||
|
||||
if ( pSSubSup->m_oSSubSupPr.IsInit() )
|
||||
WriteMathSSubSupPr(pSSubSup->m_oSSubSupPr.get());
|
||||
if ( pSSubSup->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSubSup->m_oElement.get());
|
||||
if ( pSSubSup->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSubSup->m_oSub.get());
|
||||
if ( pSSubSup->m_oSup.IsInit() )
|
||||
WriteMathSup(pSSubSup->m_oSup.get());
|
||||
if ( pSSubSup->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSubSup->m_oElement.get());
|
||||
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
|
||||
@ -42,11 +42,11 @@ namespace odf_reader {
|
||||
const wchar_t * abstract_xml::ns = L"";
|
||||
const wchar_t * abstract_xml::name = L"abstract-xml";
|
||||
|
||||
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < xml_content_.size(); i++)
|
||||
{
|
||||
xml_content_[i]->text_to_stream(_Wostream);
|
||||
xml_content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
|
||||
|
||||
public:
|
||||
|
||||
@ -34,6 +34,8 @@
|
||||
|
||||
#include "serialize_elements.h"
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
#include "../formulasconvert/formulasconvert.h"
|
||||
|
||||
#include "style_graphic_properties.h"
|
||||
@ -735,7 +737,7 @@ void process_build_object::visit(chart_title& val)
|
||||
if (val.text_p_)
|
||||
{
|
||||
std::wstringstream v;
|
||||
val.text_p_->text_to_stream(v);
|
||||
val.text_p_->text_to_stream(v, false);
|
||||
t.content_ = v.str();
|
||||
}
|
||||
ApplyTextProperties(val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), t.text_properties_);
|
||||
@ -762,7 +764,7 @@ void process_build_object::visit(chart_subtitle & val)
|
||||
{
|
||||
title t;
|
||||
std::wstringstream v;
|
||||
val.text_p_->text_to_stream(v);
|
||||
val.text_p_->text_to_stream(v, false);
|
||||
t.content_ = v.str();
|
||||
|
||||
if (val.attlist_.common_draw_position_attlist_.svg_x_)
|
||||
@ -1036,7 +1038,8 @@ void process_build_object::visit(table_table_cell& val)
|
||||
for (size_t i = 0 ; i < val.content_.elements_.size(); i++)
|
||||
{
|
||||
std::wstringstream wstream_temp;
|
||||
val.content_.elements_[i]->text_to_stream(wstream_temp);
|
||||
val.content_.elements_[i]->text_to_stream(wstream_temp, false);
|
||||
|
||||
if (val.content_.elements_[i]->get_type() == typeTextP)
|
||||
{
|
||||
cell_cash += wstream_temp.str();
|
||||
|
||||
@ -106,7 +106,7 @@ void draw_image::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
//CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
}
|
||||
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -115,7 +115,7 @@ std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
|
||||
const wchar_t * draw_chart::ns = L"draw";
|
||||
const wchar_t * draw_chart::name = L"chart";
|
||||
|
||||
std::wostream & draw_chart::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_chart::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -225,9 +225,9 @@ void draw_g::add_child_element( xml::sax * Reader, const std::wstring & Ns, cons
|
||||
}
|
||||
}
|
||||
|
||||
std::wostream & draw_g::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_g::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -236,9 +236,9 @@ std::wostream & draw_g::text_to_stream(std::wostream & _Wostream) const
|
||||
const wchar_t * draw_frame::ns = L"draw";
|
||||
const wchar_t * draw_frame::name = L"frame";
|
||||
|
||||
std::wostream & draw_frame::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_frame::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -308,9 +308,9 @@ void draw_text_box_attlist::add_attributes( const xml::attributes_wc_ptr & Attri
|
||||
const wchar_t * draw_text_box::ns = L"draw";
|
||||
const wchar_t * draw_text_box::name = L"text-box";
|
||||
|
||||
std::wostream & draw_text_box::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_text_box::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ public:
|
||||
static const ElementType type = typeDrawImage;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -114,7 +114,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
private:
|
||||
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);
|
||||
@ -160,7 +160,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
virtual void pptx_convert_placeHolder(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
int idx_in_owner ;
|
||||
|
||||
@ -211,7 +211,7 @@ public:
|
||||
|
||||
draw_g() : position_child_x1(0x7fffffff), position_child_y1(0x7fffffff), position_child_x2(0x7fffffff), position_child_y2(0x7fffffff) {}
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -263,7 +263,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
draw_text_box_attlist draw_text_box_attlist_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -44,7 +44,7 @@ namespace odf_reader {
|
||||
const wchar_t * svg_desc::ns = L"svg";
|
||||
const wchar_t * svg_desc::name = L"desc";
|
||||
|
||||
std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << text_ ;
|
||||
return _Wostream;
|
||||
@ -60,7 +60,7 @@ void svg_desc::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_uri::ns = L"svg";
|
||||
const wchar_t * svg_font_face_uri::name = L"font-face-uri";
|
||||
|
||||
std::wostream & svg_font_face_uri::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_uri::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -88,7 +88,7 @@ void svg_font_face_uri::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_format::ns = L"svg";
|
||||
const wchar_t * svg_font_face_format::name = L"font-face-format";
|
||||
|
||||
std::wostream & svg_font_face_format::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_format::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -111,7 +111,7 @@ void svg_font_face_format::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_name::ns = L"svg";
|
||||
const wchar_t * svg_font_face_name::name = L"font-face-name";
|
||||
|
||||
std::wostream & svg_font_face_name::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_name::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
common_svg_font_face_xlink_attlist common_svg_font_face_xlink_attlist_;
|
||||
office_element_ptr_array svg_font_face_format_;
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring text_;
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
optional<std::wstring>::Type svg_string_;
|
||||
|
||||
@ -136,7 +136,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
optional<std::wstring>::Type name_;
|
||||
|
||||
private:
|
||||
|
||||
@ -87,9 +87,9 @@ void common_style_header_footer_attlist::add_attributes( const xml::attributes_w
|
||||
}
|
||||
|
||||
// header-footer-content
|
||||
std::wostream & header_footer_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & header_footer_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
serialize_elements_text(_Wostream, content_);
|
||||
serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ private:
|
||||
class header_footer_content
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
office_element_ptr tracked_changes_;
|
||||
|
||||
@ -48,9 +48,9 @@ namespace text {
|
||||
const wchar_t * number::ns = L"text";
|
||||
const wchar_t * number::name = L"number";
|
||||
|
||||
std::wostream & number::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & number::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_xml_to_text( string_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_xml_to_text( string_ ) : string_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -64,11 +64,11 @@ void number::add_text(const std::wstring & Text)
|
||||
const wchar_t * list_item::ns = L"text";
|
||||
const wchar_t * list_item::name = L"list-item";
|
||||
|
||||
std::wostream & list_item::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list_item::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -161,11 +161,11 @@ void list_header::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
|
||||
|
||||
std::wostream & list_header::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list_header::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
number() {}
|
||||
@ -90,7 +90,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
public:
|
||||
list_item() {}
|
||||
|
||||
@ -128,7 +128,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
list_header() {}
|
||||
|
||||
@ -65,7 +65,7 @@ void math_mi::add_text(const std::wstring & Text)
|
||||
text_ = Text;
|
||||
}
|
||||
|
||||
std::wostream & math_mi::text_to_stream(std::wostream & _strm) const
|
||||
std::wostream & math_mi::text_to_stream(std::wostream & _strm, bool bXmlEncode) const
|
||||
{
|
||||
if (text_)
|
||||
_strm << *text_;
|
||||
@ -143,7 +143,7 @@ void math_mo::add_text(const std::wstring & Text)
|
||||
text_ = Text;
|
||||
}
|
||||
|
||||
std::wostream & math_mo::text_to_stream(std::wostream & _strm) const
|
||||
std::wostream & math_mo::text_to_stream(std::wostream & _strm, bool bXmlEncode) const
|
||||
{
|
||||
if (text_)
|
||||
_strm << *text_;
|
||||
|
||||
@ -48,7 +48,7 @@ public:
|
||||
|
||||
virtual void oox_convert(oox::math_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
private:
|
||||
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);
|
||||
@ -73,7 +73,7 @@ public:
|
||||
|
||||
virtual void oox_convert(oox::math_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(bool) fence_;
|
||||
_CP_OPT(bool) stretchy_;
|
||||
|
||||
@ -48,14 +48,14 @@ namespace text {
|
||||
const wchar_t * note_citation::ns = L"text";
|
||||
const wchar_t * note_citation::name = L"note-citation";
|
||||
|
||||
std::wostream & note_citation::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note_citation::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (!text_label_.empty())
|
||||
_Wostream << text_label_;
|
||||
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -89,11 +89,11 @@ void note_citation::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * note_body::ns = L"text";
|
||||
const wchar_t * note_body::name = L"note-body";
|
||||
|
||||
std::wostream & note_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
note_citation() {}
|
||||
@ -84,7 +84,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
public:
|
||||
note_body() {}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ namespace odf_reader {
|
||||
const wchar_t * office_binary_data::ns = L"office";
|
||||
const wchar_t * office_binary_data::name = L"binary-data";
|
||||
|
||||
std::wostream & office_binary_data::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_binary_data::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring write_to(const std::wstring & path);
|
||||
private:
|
||||
|
||||
@ -55,10 +55,10 @@ namespace odf_reader {
|
||||
const wchar_t * office_body::ns = L"office";
|
||||
const wchar_t * office_body::name = L"body";
|
||||
|
||||
std::wostream & office_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (content_)
|
||||
content_->text_to_stream(_Wostream);
|
||||
content_->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
office_body();
|
||||
|
||||
@ -43,9 +43,9 @@ namespace odf_reader {
|
||||
|
||||
|
||||
|
||||
std::wostream & office_document_base::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_document_base::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
office_body_->text_to_stream(_Wostream);
|
||||
office_body_->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ namespace odf_reader {
|
||||
class office_document_base : public office_element
|
||||
{
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
_CP_OPT(std::wstring) element_style_name;
|
||||
_CP_OPT(std::wstring) next_element_style_name; //for master page
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const
|
||||
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;
|
||||
|
||||
@ -120,9 +120,9 @@ void paragraph_content_element<ElementT>::docx_serialize_run(office_element_ptr
|
||||
const wchar_t * text::ns = L"";
|
||||
const wchar_t * text::name = L"";
|
||||
|
||||
std::wostream & text::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_, true );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_, true ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ office_element_ptr text::create(const std::wstring & Text)
|
||||
const wchar_t * s::ns = L"text";
|
||||
const wchar_t * s::name = L"s";
|
||||
|
||||
std::wostream & s::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & s::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_c_)
|
||||
{
|
||||
@ -259,7 +259,7 @@ void s::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * tab::ns = L"text";
|
||||
const wchar_t * tab::name = L"tab";
|
||||
|
||||
std::wostream & tab::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & tab::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << std::wstring(L"\t");
|
||||
return _Wostream;
|
||||
@ -291,7 +291,7 @@ void tab::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * line_break::ns = L"text";
|
||||
const wchar_t * line_break::name = L"line-break";
|
||||
|
||||
std::wostream & line_break::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & line_break::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << std::wstring(L"\r\n");
|
||||
return _Wostream;
|
||||
@ -332,7 +332,7 @@ void bookmark::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"text:name", text_name_, std::wstring(L""));
|
||||
}
|
||||
std::wostream & bookmark::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -348,7 +348,7 @@ void bookmark_start::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.start_bookmark(name_);
|
||||
}
|
||||
std::wostream & bookmark_start::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark_start::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -364,7 +364,7 @@ void bookmark_end::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.end_bookmark(name_);
|
||||
}
|
||||
std::wostream & bookmark_end::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark_end::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -461,11 +461,11 @@ void hidden_text::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * span::ns = L"text";
|
||||
const wchar_t * span::name = L"span";
|
||||
|
||||
std::wostream & span::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & span::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -574,11 +574,11 @@ void span::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * a::ns = L"text";
|
||||
const wchar_t * a::name = L"a";
|
||||
|
||||
std::wostream & a::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & a::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -712,13 +712,13 @@ const wchar_t * note::name = L"note";
|
||||
note::note()
|
||||
{}
|
||||
|
||||
std::wostream & note::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_note_citation_)
|
||||
text_note_citation_->text_to_stream(_Wostream);
|
||||
text_note_citation_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
if (text_note_body_)
|
||||
text_note_body_->text_to_stream(_Wostream);
|
||||
text_note_body_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
return _Wostream;
|
||||
}
|
||||
@ -806,13 +806,13 @@ void note::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * ruby::ns = L"text";
|
||||
const wchar_t * ruby::name = L"ruby";
|
||||
|
||||
std::wostream & ruby::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_ruby_base_)
|
||||
text_ruby_base_->text_to_stream(_Wostream);
|
||||
text_ruby_base_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
if (text_ruby_text_)
|
||||
text_ruby_text_->text_to_stream(_Wostream);
|
||||
text_ruby_text_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
return _Wostream;
|
||||
}
|
||||
@ -846,9 +846,9 @@ void ruby::add_text(const std::wstring & Text)
|
||||
const wchar_t * title::ns = L"text";
|
||||
const wchar_t * title::name = L"title";
|
||||
|
||||
std::wostream & title::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & title::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -883,9 +883,9 @@ void title::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * subject::ns = L"text";
|
||||
const wchar_t * subject::name = L"subject";
|
||||
|
||||
std::wostream & subject::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & subject::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -919,9 +919,9 @@ void subject::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * chapter::ns = L"text";
|
||||
const wchar_t * chapter::name = L"chapter";
|
||||
|
||||
std::wostream & chapter::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & chapter::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -955,9 +955,9 @@ void chapter::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_placeholder::ns = L"text";
|
||||
const wchar_t * text_placeholder::name = L"placeholder";
|
||||
|
||||
std::wostream & text_placeholder::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_placeholder::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -986,9 +986,9 @@ void text_placeholder::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_page_number::ns = L"text";
|
||||
const wchar_t * text_page_number::name = L"page-number";
|
||||
|
||||
std::wostream & text_page_number::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_page_number::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1024,9 +1024,9 @@ void text_page_number::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_page_count::ns = L"text";
|
||||
const wchar_t * text_page_count::name = L"page-count";
|
||||
|
||||
std::wostream & text_page_count::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_page_count::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1059,9 +1059,9 @@ void text_page_count::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_date::ns = L"text";
|
||||
const wchar_t * text_date::name = L"date";
|
||||
|
||||
std::wostream & text_date::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_date::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1120,9 +1120,9 @@ void text_modification_date::pptx_convert(oox::pptx_conversion_context & Context
|
||||
const wchar_t * text_time::ns = L"text";
|
||||
const wchar_t * text_time::name = L"time";
|
||||
|
||||
std::wostream & text_time::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_time::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1180,9 +1180,9 @@ void text_modification_time::pptx_convert(oox::pptx_conversion_context & Context
|
||||
const wchar_t * text_file_name::ns = L"text";
|
||||
const wchar_t * text_file_name::name = L"file-name";
|
||||
|
||||
std::wostream & text_file_name::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_file_name::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void text_file_name::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1245,9 +1245,9 @@ void sequence::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:ref-name", ref_name_);
|
||||
CP_APPLY_ATTR(L"text:name", name_);
|
||||
}
|
||||
std::wostream & sequence::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & sequence::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void sequence::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
|
||||
@ -1332,9 +1332,9 @@ void expression::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:formula", text_formula_);
|
||||
|
||||
}
|
||||
std::wostream & expression::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & expression::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
void expression::add_text(const std::wstring & Text)
|
||||
@ -1361,9 +1361,9 @@ void text_input::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:description", text_description_);
|
||||
|
||||
}
|
||||
std::wostream & text_input::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_input::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
void text_input::add_text(const std::wstring & Text)
|
||||
@ -1405,9 +1405,9 @@ void text_drop_down::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_ = Text;
|
||||
}
|
||||
std::wostream & text_drop_down::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_drop_down::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1570,9 +1570,9 @@ void sender_company::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * sender_postal_code::ns = L"text";
|
||||
const wchar_t * sender_postal_code::name = L"sender-postal-code";
|
||||
|
||||
std::wostream & sender_postal_code::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & sender_postal_code::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1722,9 +1722,9 @@ void bibliography_mark::add_text(const std::wstring & Text)
|
||||
text_ = text::create(Text) ;
|
||||
}
|
||||
|
||||
std::wostream & bibliography_mark::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bibliography_mark::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void bibliography_mark::serialize(std::wostream & strm)
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
bool preserve_;
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
s(unsigned int c) : text_c_(c) {};
|
||||
s() {};
|
||||
@ -146,7 +146,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(unsigned int) text_tab_ref_;
|
||||
|
||||
@ -174,7 +174,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) {}
|
||||
@ -196,7 +196,7 @@ public:
|
||||
static const ElementType type = typeTextBookmark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring text_name_;
|
||||
|
||||
@ -220,7 +220,7 @@ public:
|
||||
static const ElementType type = typeTextBookmarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
std::wstring name_;
|
||||
@ -244,7 +244,7 @@ public:
|
||||
static const ElementType type = typeTextBookmarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
std::wstring name_;
|
||||
@ -382,7 +382,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
span() {}
|
||||
|
||||
@ -414,7 +414,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
a() {}
|
||||
|
||||
@ -450,7 +450,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
note();
|
||||
|
||||
private:
|
||||
@ -477,7 +477,7 @@ public:
|
||||
static const ElementType type = typeTextRuby;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -502,7 +502,7 @@ public:
|
||||
static const ElementType type = typeTextTitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -530,7 +530,7 @@ public:
|
||||
static const ElementType type = typeTextChapter;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
@ -556,7 +556,7 @@ public:
|
||||
static const ElementType type = typeTextSubject;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
@ -584,7 +584,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) text_description_;
|
||||
_CP_OPT(std::wstring) text_placeholder_type_;
|
||||
@ -611,7 +611,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -643,7 +643,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(odf_types::style_numformat) style_num_format_;
|
||||
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
|
||||
@ -672,7 +672,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(odf_types::Bool) text_fixed_;
|
||||
@ -727,7 +727,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(odf_types::Bool)text_fixed_;
|
||||
@ -782,7 +782,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -858,7 +858,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(odf_types::style_numformat) style_num_format_;
|
||||
_CP_OPT(std::wstring) style_num_letter_sync_;
|
||||
@ -888,7 +888,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(std::wstring) text_display_;
|
||||
@ -916,7 +916,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) text_description_;
|
||||
std::wstring text_;
|
||||
@ -965,7 +965,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -1099,7 +1099,7 @@ public:
|
||||
static const ElementType type = typeTextSenderPostalCode;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
private:
|
||||
@ -1316,7 +1316,7 @@ public:
|
||||
|
||||
void serialize(std::wostream & strm);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring identifier_;
|
||||
odf_types::bibliography bibliography_type_;
|
||||
|
||||
@ -50,9 +50,9 @@ namespace text {
|
||||
const wchar_t * ruby_base::ns = L"text";
|
||||
const wchar_t * ruby_base::name = L"ruby-base";
|
||||
|
||||
std::wostream & ruby_base::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby_base::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
serialize_elements_text(_Wostream, content_);
|
||||
serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@ void ruby_base::add_text(const std::wstring & Text)
|
||||
const wchar_t * ruby_text::ns = L"text";
|
||||
const wchar_t * ruby_text::name = L"ruby-text";
|
||||
|
||||
std::wostream & ruby_text::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby_text::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -53,9 +53,7 @@ public:
|
||||
static const ElementType type = typeTextRubyBase;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
ruby_base() {}
|
||||
|
||||
private:
|
||||
@ -63,7 +61,6 @@ private:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
@ -82,10 +79,8 @@ public:
|
||||
static const ElementType type = typeTextRubyText;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
ruby_text() {}
|
||||
|
||||
private:
|
||||
@ -93,7 +88,6 @@ private:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
odf_types::style_ref text_style_name_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
|
||||
@ -36,40 +36,23 @@
|
||||
namespace cpdoccore {
|
||||
namespace odf_reader {
|
||||
|
||||
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr & elm)
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr & elm, bool bXmlEncode = true)
|
||||
{
|
||||
if (elm)
|
||||
elm->xml_to_stream(_Wostream);
|
||||
elm->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr_array & elms)
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr_array & elms, bool bXmlEncode = true)
|
||||
{
|
||||
for (size_t i = 0; i < elms.size(); i++)
|
||||
{
|
||||
serialize_elements(_Wostream, elms[i]);
|
||||
serialize_elements_text(_Wostream, elms[i], bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr & elm)
|
||||
{
|
||||
if (elm)
|
||||
elm->text_to_stream(_Wostream);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr_array & elms)
|
||||
{
|
||||
for (size_t i = 0; i < elms.size(); i++)
|
||||
{
|
||||
serialize_elements_text(_Wostream, elms[i]);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
#define CP_SERIALIZE_XML(ELEMENT) serialize_elements(_Wostream, (ELEMENT))
|
||||
#define CP_SERIALIZE_TEXT(ELEMENT) serialize_elements_text(_Wostream, (ELEMENT))
|
||||
#define CP_SERIALIZE_TEXT(ELEMENT, bXmlEncode) serialize_elements_text(_Wostream, (ELEMENT), bXmlEncode)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ namespace odf_reader {
|
||||
const wchar_t * style_tab_stop::ns = L"style";
|
||||
const wchar_t * style_tab_stop::name = L"tab-stop";
|
||||
|
||||
std::wostream & style_tab_stop::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_tab_stop::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -84,7 +84,7 @@ void style_tab_stop::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_tab_stops::ns = L"style";
|
||||
const wchar_t * style_tab_stops::name = L"tab-stops";
|
||||
|
||||
std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -104,7 +104,7 @@ void style_tab_stops::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * style_drop_cap::ns = L"style";
|
||||
const wchar_t * style_drop_cap::name = L"drop-cap";
|
||||
|
||||
std::wostream & style_drop_cap::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_drop_cap::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -129,7 +129,7 @@ void style_drop_cap::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_background_image::ns = L"style";
|
||||
const wchar_t * style_background_image::name = L"background-image";
|
||||
|
||||
std::wostream & style_background_image::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_background_image::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -267,7 +267,7 @@ bool paragraph_format_properties::add_child_element( xml::sax * Reader, const st
|
||||
const wchar_t * style_paragraph_properties::ns = L"style";
|
||||
const wchar_t * style_paragraph_properties::name = L"paragraph-properties";
|
||||
|
||||
std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
private:
|
||||
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);
|
||||
@ -129,7 +129,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr_array content_;
|
||||
private:
|
||||
@ -152,7 +152,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
odf_types::drop_cap_length style_length_;
|
||||
unsigned int style_lines_;
|
||||
@ -179,7 +179,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
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);
|
||||
@ -294,7 +294,7 @@ public:
|
||||
paragraph_format_properties content_;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
|
||||
@ -296,7 +296,7 @@ void style_content::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
const wchar_t * default_style::ns = L"style";
|
||||
const wchar_t * default_style::name = L"default-style";
|
||||
|
||||
std::wostream & default_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & default_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -440,7 +440,7 @@ void draw_opacity::add_child_element( xml::sax * Reader, const std::wstring & Ns
|
||||
const wchar_t * style::ns = L"style";
|
||||
const wchar_t * style::name = L"style";
|
||||
|
||||
std::wostream & style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -559,7 +559,7 @@ void draw_styles::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
const wchar_t * office_automatic_styles::ns = L"office";
|
||||
const wchar_t * office_automatic_styles::name = L"automatic-styles";
|
||||
|
||||
std::wostream & office_automatic_styles::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_automatic_styles::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -587,7 +587,7 @@ void office_automatic_styles::add_text(const std::wstring & Text)
|
||||
const wchar_t * office_master_styles::ns = L"office";
|
||||
const wchar_t * office_master_styles::name = L"master-styles";
|
||||
|
||||
std::wostream & office_master_styles::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_master_styles::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -849,7 +849,7 @@ void style_section_properties::add_child_element( xml::sax * Reader, const std::
|
||||
const wchar_t * style_header_style::ns = L"style";
|
||||
const wchar_t * style_header_style::name = L"header-style";
|
||||
|
||||
std::wostream & style_header_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_header_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -874,7 +874,7 @@ void style_header_style::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
const wchar_t * style_footer_style::ns = L"style";
|
||||
const wchar_t * style_footer_style::name = L"footer-style";
|
||||
|
||||
std::wostream & style_footer_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_footer_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -900,7 +900,7 @@ void style_footer_style::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
const wchar_t * style_page_layout::ns = L"style";
|
||||
const wchar_t * style_page_layout::name = L"page-layout";
|
||||
|
||||
std::wostream & style_page_layout::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_page_layout::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -1529,7 +1529,7 @@ void style_master_page_attlist::add_attributes( const xml::attributes_wc_ptr & A
|
||||
const wchar_t * style_master_page::ns = L"style";
|
||||
const wchar_t * style_master_page::name = L"master-page";
|
||||
|
||||
std::wostream & style_master_page::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_master_page::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -1786,7 +1786,7 @@ void text_notes_configuration::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_presentation_page_layout::ns = L"style";
|
||||
const wchar_t * style_presentation_page_layout::name = L"presentation-page-layout";
|
||||
|
||||
std::wostream & style_presentation_page_layout::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_presentation_page_layout::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
static const ElementType type = typeStyleDefaultStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
default_style() {};
|
||||
|
||||
@ -350,7 +350,7 @@ public:
|
||||
static const ElementType type = typeStyleStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
style() : style_auto_update_(false) { }
|
||||
|
||||
@ -442,7 +442,7 @@ public:
|
||||
static const ElementType type = typeOfficeAutomaticStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
styles styles_; ///< styles
|
||||
office_element_ptr_array style_page_layout_;
|
||||
@ -467,7 +467,7 @@ public:
|
||||
static const ElementType type = typeOfficeMasterStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr_array style_master_page_; // разметки тем
|
||||
office_element_ptr style_handout_master_; // разметки для принтера - .. второстепенно
|
||||
@ -512,7 +512,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -843,7 +843,7 @@ public:
|
||||
static const ElementType type = typeStyleHeaderStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr style_header_footer_properties_;
|
||||
|
||||
@ -864,7 +864,7 @@ public:
|
||||
static const ElementType type = typeStyleFooterStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr style_header_footer_properties_;
|
||||
|
||||
@ -885,7 +885,7 @@ public:
|
||||
static const ElementType type = typeStylePageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring style_name_;
|
||||
odf_types::page_usage style_page_usage_; // default All
|
||||
@ -1082,7 +1082,7 @@ public:
|
||||
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_name_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -369,9 +369,9 @@ void table_columns_and_groups::add_child_element( xml::sax * Reader, const std::
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::wostream & table_table_cell_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_cell_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(elements_);
|
||||
return CP_SERIALIZE_TEXT(elements_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_cell_content::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
|
||||
@ -384,9 +384,9 @@ void table_table_cell_content::add_child_element( xml::sax * Reader, const std::
|
||||
const wchar_t * table_table_cell::ns = L"table";
|
||||
const wchar_t * table_table_cell::name = L"table-cell";
|
||||
|
||||
std::wostream & table_table_cell::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_cell::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return content_.text_to_stream(_Wostream);
|
||||
return content_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_cell::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -420,9 +420,9 @@ bool table_table_cell::empty(bool bWithStyle)
|
||||
const wchar_t * table_covered_table_cell::ns = L"table";
|
||||
const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
|
||||
|
||||
std::wostream & table_covered_table_cell::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_covered_table_cell::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return content_.text_to_stream(_Wostream);
|
||||
return content_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_covered_table_cell::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -451,9 +451,9 @@ bool table_covered_table_cell::empty()
|
||||
const wchar_t * table_table_row::ns = L"table";
|
||||
const wchar_t * table_table_row::name = L"table-row";
|
||||
|
||||
std::wostream & table_table_row::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_row::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(content_);
|
||||
return CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_row::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -508,9 +508,9 @@ bool table_table_row::empty_content_cells(bool bWithCellStyle)
|
||||
const wchar_t * table_table_rows::ns = L"table";
|
||||
const wchar_t * table_table_rows::name = L"table-rows";
|
||||
|
||||
std::wostream & table_table_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(table_table_row_);
|
||||
return CP_SERIALIZE_TEXT(table_table_row_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_rows::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -527,9 +527,9 @@ void table_table_rows::add_child_element( xml::sax * Reader, const std::wstring
|
||||
const wchar_t * table_table_header_rows::ns = L"table";
|
||||
const wchar_t * table_table_header_rows::name = L"table-header-rows";
|
||||
|
||||
std::wostream & table_table_header_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_header_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return serialize_elements_text(_Wostream, table_table_row_);
|
||||
return serialize_elements_text(_Wostream, table_table_row_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_header_rows::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -552,12 +552,12 @@ void table_table_header_rows::add_text(const std::wstring & Text)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// table:rows
|
||||
std::wostream & table_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (table_table_rows_)
|
||||
CP_SERIALIZE_TEXT(table_table_rows_);
|
||||
CP_SERIALIZE_TEXT(table_table_rows_, bXmlEncode);
|
||||
else
|
||||
CP_SERIALIZE_TEXT(table_table_row_);
|
||||
CP_SERIALIZE_TEXT(table_table_row_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -628,10 +628,10 @@ table_rows_no_group::table_rows_no_group() : was_header_(false)
|
||||
{
|
||||
};
|
||||
|
||||
std::wostream & table_rows_no_group::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows_no_group::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
table_rows_1_.text_to_stream(_Wostream);
|
||||
CP_SERIALIZE_TEXT(table_table_header_rows_);
|
||||
CP_SERIALIZE_TEXT(table_table_header_rows_, bXmlEncode);
|
||||
table_rows_2_.text_to_stream(_Wostream);
|
||||
return _Wostream;
|
||||
}
|
||||
@ -663,9 +663,9 @@ table_rows_and_groups::table_rows_and_groups()
|
||||
{
|
||||
}
|
||||
|
||||
std::wostream & table_rows_and_groups::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows_and_groups::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -706,9 +706,9 @@ void table_rows_and_groups::add_child_element( xml::sax * Reader, const std::wst
|
||||
const wchar_t * table_table_row_group::ns = L"table";
|
||||
const wchar_t * table_table_row_group::name = L"table-row-group";
|
||||
|
||||
std::wostream & table_table_row_group::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_row_group::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return table_rows_and_groups_.text_to_stream(_Wostream);
|
||||
return table_rows_and_groups_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_row_group::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
|
||||
@ -356,7 +356,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -375,7 +375,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_row);
|
||||
class table_table_cell_content
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context) ;
|
||||
@ -404,7 +404,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -439,7 +439,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -475,7 +475,7 @@ public:
|
||||
table_table_rows()
|
||||
{
|
||||
}
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -501,7 +501,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -517,7 +517,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_rows);
|
||||
class table_rows
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
@ -549,7 +549,7 @@ public:
|
||||
|
||||
table_rows_no_group();
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
@ -568,7 +568,7 @@ class table_rows_and_groups
|
||||
{
|
||||
public:
|
||||
table_rows_and_groups();
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
@ -606,7 +606,7 @@ public:
|
||||
{
|
||||
}
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
|
||||
@ -122,9 +122,9 @@ void process_paragraph_index(const paragraph_attrs & Attr, oox::docx_conversion_
|
||||
|
||||
}
|
||||
|
||||
std::wostream & paragraph::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & paragraph::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
//_Wostream << L"\n";
|
||||
return _Wostream;
|
||||
}
|
||||
@ -255,7 +255,7 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
|
||||
if (sequence_)
|
||||
{
|
||||
std::wstringstream _Wostream;
|
||||
CP_SERIALIZE_TEXT(content_);///todooo
|
||||
CP_SERIALIZE_TEXT(content_, true);///todooo
|
||||
|
||||
Context.get_drawing_context().set_next_object_caption(_Wostream.str());
|
||||
}
|
||||
@ -431,9 +431,9 @@ void soft_page_break::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
||||
std::wostream & h::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & h::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return paragraph_.text_to_stream(_Wostream);
|
||||
return paragraph_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void h::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -485,9 +485,9 @@ void h::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * p::ns = L"text";
|
||||
const wchar_t * p::name = L"p";
|
||||
|
||||
std::wostream & p::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & p::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return paragraph_.text_to_stream(_Wostream);
|
||||
return paragraph_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void p::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -531,11 +531,11 @@ void p::afterReadContent()
|
||||
const wchar_t * list::ns = L"text";
|
||||
const wchar_t * list::name = L"list";
|
||||
|
||||
std::wostream & list::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < list_items_.size(); i++)
|
||||
{
|
||||
list_items_[i]->text_to_stream(_Wostream);
|
||||
list_items_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -599,7 +599,7 @@ void list::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * soft_page_break::ns = L"text";
|
||||
const wchar_t * soft_page_break::name = L"soft-page-break";
|
||||
|
||||
std::wostream & soft_page_break::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & soft_page_break::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << L"\n";
|
||||
return _Wostream;
|
||||
@ -618,9 +618,9 @@ void soft_page_break::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * section::ns = L"text";
|
||||
const wchar_t * section::name = L"section";
|
||||
|
||||
std::wostream & section::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & section::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return serialize_elements_text(_Wostream, content_);
|
||||
return serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
}
|
||||
|
||||
void section::afterCreate()
|
||||
@ -768,9 +768,9 @@ void section_source::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * index_body::ns = L"text";
|
||||
const wchar_t * index_body::name = L"index-body";
|
||||
|
||||
std::wostream & index_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & index_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -829,9 +829,9 @@ void index_title::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
}
|
||||
std::wostream & index_title::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & index_title::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -914,9 +914,9 @@ void table_of_content::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
|
||||
|
||||
std::wostream & table_of_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_of_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
// text:table-of-content-source
|
||||
@ -1032,9 +1032,9 @@ void table_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & table_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void table_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1155,9 +1155,9 @@ void illustration_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
|
||||
std::wostream & illustration_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & illustration_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1307,9 +1307,9 @@ void alphabetical_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & alphabetical_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & alphabetical_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -1418,9 +1418,9 @@ void object_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & object_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & object_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void object_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1531,9 +1531,9 @@ void user_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & user_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & user_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void user_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1692,9 +1692,9 @@ void bibliography::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
}
|
||||
|
||||
std::wostream & bibliography::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bibliography::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1949,9 +1949,9 @@ void variable_input::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_ = Text;
|
||||
}
|
||||
std::wostream & variable_input::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & variable_input::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_, bXmlEncode );
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ class paragraph
|
||||
public:
|
||||
paragraph() : next_section_(false), next_end_section_(false), is_header_(false) {}
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
void add_attributes ( const xml::attributes_wc_ptr & Attributes );
|
||||
void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
@ -110,7 +110,7 @@ public:
|
||||
|
||||
virtual void afterReadContent();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
paragraph paragraph_;
|
||||
|
||||
@ -146,7 +146,7 @@ public:
|
||||
|
||||
virtual void afterReadContent();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
p(){};
|
||||
paragraph paragraph_;
|
||||
@ -169,7 +169,7 @@ public:
|
||||
static const ElementType type = typeTextList;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
list(){};
|
||||
|
||||
@ -200,7 +200,7 @@ public:
|
||||
static const ElementType type = typeTextSoftPageBreak;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
private:
|
||||
@ -222,7 +222,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void afterCreate();
|
||||
virtual void afterReadContent();
|
||||
@ -306,7 +306,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -336,7 +336,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -368,7 +368,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -400,7 +400,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -432,7 +432,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -464,7 +464,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -496,7 +496,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -565,7 +565,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr index_title_;
|
||||
office_element_ptr_array content_;
|
||||
@ -588,7 +588,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -814,7 +814,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
private:
|
||||
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){}
|
||||
|
||||
@ -306,38 +306,18 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\attributes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\nodetype.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\sax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\simple_xml_writer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\xmlchar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\xmlelement.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\src\xml\attributes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\attributes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\nodetype.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\sax.cpp"
|
||||
>
|
||||
@ -350,6 +330,14 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\sax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\simple_xml_writer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\utils.cpp"
|
||||
>
|
||||
@ -363,13 +351,21 @@
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\utils.h"
|
||||
RelativePath="..\include\xml\utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\xmlchar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\xmlchar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\xmlelement.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "../utils.h"
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/Diagram/DiagramDrawing.h"
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/ChartDrawing.h"
|
||||
#include "../../../Common/DocxFormat/Source/XlsxFormat/Chart/Chart.h"
|
||||
#include "../../../ASCOfficePPTXFile/PPTXFormat/Slide.h"
|
||||
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpTreeElem.h"
|
||||
@ -424,8 +425,10 @@ void OoxConverter::convert(PPTX::Logic::ChartRec *oox_chart)
|
||||
if (!oox_chart) return;
|
||||
if( !oox_chart->id_data.IsInit()) return;
|
||||
|
||||
_CP_OPT(double) width, height;
|
||||
_CP_OPT(double) width, height, x, y, zero(0);
|
||||
|
||||
odf_context()->drawing_context()->get_size (width, height);
|
||||
odf_context()->drawing_context()->get_position (x, y);
|
||||
|
||||
smart_ptr<OOX::File> oFile = find_file_by_id (oox_chart->id_data->get());
|
||||
if (oFile.IsInit())
|
||||
@ -435,6 +438,25 @@ void OoxConverter::convert(PPTX::Logic::ChartRec *oox_chart)
|
||||
if (pChart)
|
||||
{
|
||||
oox_current_child_document = dynamic_cast<OOX::IFileContainer*>(pChart);
|
||||
|
||||
OOX::CChartDrawing* pChartDrawing = NULL;
|
||||
if ((pChart->m_oChartSpace.m_userShapes) && (pChart->m_oChartSpace.m_userShapes->m_id))
|
||||
{
|
||||
oFile = find_file_by_id (*pChart->m_oChartSpace.m_userShapes->m_id);
|
||||
pChartDrawing = dynamic_cast<OOX::CChartDrawing*>(oFile.operator->());
|
||||
}
|
||||
if ((pChartDrawing) && (false == pChartDrawing->m_arrItems.empty()))
|
||||
{
|
||||
odf_context()->drawing_context()->start_group();
|
||||
|
||||
odf_context()->drawing_context()->set_group_size (width, height, width, height);
|
||||
odf_context()->drawing_context()->set_group_position (x, y, 0, 0);
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
odf_context()->drawing_context()->set_position (zero, zero);
|
||||
odf_context()->drawing_context()->set_size (width, height);
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->start_object(odf_context()->get_next_name_object());
|
||||
{
|
||||
odf_context()->start_chart();
|
||||
@ -446,10 +468,59 @@ void OoxConverter::convert(PPTX::Logic::ChartRec *oox_chart)
|
||||
odf_context()->end_chart();
|
||||
}
|
||||
odf_context()->drawing_context()->end_object();
|
||||
|
||||
if ((pChartDrawing) && (false == pChartDrawing->m_arrItems.empty()))
|
||||
{
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
|
||||
oox_current_child_document = dynamic_cast<OOX::IFileContainer*>(pChartDrawing);
|
||||
|
||||
for (size_t i = 0; i < pChartDrawing->m_arrItems.size(); i++)
|
||||
{
|
||||
convert(pChartDrawing->m_arrItems[i], 0, 0, width.get_value_or(0), height.get_value_or(0));
|
||||
}
|
||||
odf_context()->drawing_context()->end_group();
|
||||
}
|
||||
oox_current_child_document = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
void OoxConverter::convert(OOX::CSizeAnchor *sz_anchor, double x0, double y0, double width, double height)
|
||||
{
|
||||
if (!sz_anchor) return;
|
||||
|
||||
_CP_OPT(double) x, y, cx, cy;
|
||||
|
||||
if (sz_anchor->m_oFrom.IsInit())
|
||||
{
|
||||
if (sz_anchor->m_oFrom->m_oX.IsInit()) x = *sz_anchor->m_oFrom->m_oX * width + x0;
|
||||
if (sz_anchor->m_oFrom->m_oY.IsInit()) y = *sz_anchor->m_oFrom->m_oY * height + y0;
|
||||
}
|
||||
|
||||
OOX::CRelSizeAnchor *relAnchor = dynamic_cast<OOX::CRelSizeAnchor*>(sz_anchor);
|
||||
OOX::CAbsSizeAnchor *absAnchor = dynamic_cast<OOX::CAbsSizeAnchor*>(sz_anchor);
|
||||
|
||||
if ((relAnchor) && (relAnchor->m_oTo.IsInit() && sz_anchor->m_oFrom.IsInit()))
|
||||
{
|
||||
if (relAnchor->m_oTo->m_oX.IsInit()) cx = (*relAnchor->m_oTo->m_oX - *sz_anchor->m_oFrom->m_oX) * width;
|
||||
if (relAnchor->m_oTo->m_oY.IsInit()) cy = (*relAnchor->m_oTo->m_oY - *sz_anchor->m_oFrom->m_oY) * height;
|
||||
}
|
||||
if ((absAnchor) && (absAnchor->m_oExt.IsInit()))
|
||||
{
|
||||
if (absAnchor->m_oExt->m_oCx.IsInit()) cx = *absAnchor->m_oExt->m_oCx * width;
|
||||
if (absAnchor->m_oExt->m_oCy.IsInit()) cy = *absAnchor->m_oExt->m_oCy * height;
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
|
||||
odf_context()->drawing_context()->set_position (x, y);
|
||||
odf_context()->drawing_context()->set_size (cx, cy);
|
||||
|
||||
convert(sz_anchor->m_oElement.GetPointer());
|
||||
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
void OoxConverter::convert(PPTX::Logic::CNvGrpSpPr *oox_cnvGrpSpPr)
|
||||
{
|
||||
if (!oox_cnvGrpSpPr) return;
|
||||
|
||||
@ -231,6 +231,7 @@ namespace OOX
|
||||
class CT_TextLanguageID;
|
||||
class CTextProperties;
|
||||
}
|
||||
class CSizeAnchor;
|
||||
namespace Vml
|
||||
{
|
||||
class CShapeType;
|
||||
@ -524,6 +525,8 @@ public:
|
||||
void convert(OOX::Spreadsheet::CT_ExternalData *external_data);
|
||||
void convert(OOX::Spreadsheet::CT_NumData *num_data, bool categories, bool label);
|
||||
void convert(OOX::Spreadsheet::CT_StrData *str_data, bool categories, bool label);
|
||||
|
||||
void convert(OOX::CSizeAnchor *sz_anchor, double x0, double y0, double width, double height);
|
||||
|
||||
//.vml............................................................................................................................
|
||||
void convert(OOX::Vml::CShapeType *vml_shape_type);
|
||||
|
||||
@ -110,10 +110,10 @@ smart_ptr<OOX::File> XlsxConverter::find_file_by_id(const std::wstring & sId)
|
||||
{
|
||||
smart_ptr<OOX::File> oFile;
|
||||
|
||||
if (xlsx_current_container)
|
||||
oFile = xlsx_current_container->Find(sId);
|
||||
else if (oox_current_child_document)
|
||||
if (oox_current_child_document)
|
||||
oFile = oox_current_child_document->Find(sId);
|
||||
else if (xlsx_current_container)
|
||||
oFile = xlsx_current_container->Find(sId);
|
||||
|
||||
return oFile;
|
||||
}
|
||||
@ -122,17 +122,17 @@ std::wstring XlsxConverter::find_link_by_id (const std::wstring & sId, int type)
|
||||
smart_ptr<OOX::File> oFile;
|
||||
std::wstring ref;
|
||||
|
||||
if (xlsx_current_container)
|
||||
{
|
||||
oFile = xlsx_current_container->Find(sId);
|
||||
ref = OoxConverter::find_link_by(oFile, type);
|
||||
}
|
||||
if (!ref.empty()) return ref;
|
||||
|
||||
if (oox_current_child_document)
|
||||
{
|
||||
oFile = oox_current_child_document->Find(sId);
|
||||
ref = OoxConverter::find_link_by(oFile, type);
|
||||
}
|
||||
if (!ref.empty()) return ref;
|
||||
|
||||
if (xlsx_current_container)
|
||||
{
|
||||
oFile = xlsx_current_container->Find(sId);
|
||||
ref = OoxConverter::find_link_by(oFile, type);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
@ -1404,11 +1404,11 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pShapeElement->m_lPlaceholderType == PT_MasterSlideNumber && pParagraph->m_arSpans[nSpan].m_bField)
|
||||
if (pShapeElement->m_lPlaceholderType == PT_MasterSlideNumber/* && pParagraph->m_arSpans[nSpan].m_bField*/)
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L"<a:fld id=\"{D038279B-FC19-497E-A7D1-5ADD9CAF016F}\" type=\"slidenum\"><a:rPr"));
|
||||
}
|
||||
else if (pShapeElement->m_lPlaceholderType == PT_MasterDate && pShapeElement->m_nFormatDate == 1 && pParagraph->m_arSpans[nSpan].m_bField)
|
||||
else if (pShapeElement->m_lPlaceholderType == PT_MasterDate && pShapeElement->m_nFormatDate == 1/* && pParagraph->m_arSpans[nSpan].m_bField*/)
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L"<a:fld id=\"{D7E01130-044F-4930-9A27-C729C70D8524}\" type=\"datetime1\"><a:rPr"));
|
||||
}
|
||||
@ -1534,7 +1534,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
|
||||
m_oWriter.WriteString(strT2);
|
||||
|
||||
if ((pShapeElement->m_lPlaceholderType == PT_MasterSlideNumber ||
|
||||
(pShapeElement->m_lPlaceholderType == PT_MasterDate && pShapeElement->m_nFormatDate == 1)) && pParagraph->m_arSpans[nSpan].m_bField)
|
||||
(pShapeElement->m_lPlaceholderType == PT_MasterDate && pShapeElement->m_nFormatDate == 1))/* && pParagraph->m_arSpans[nSpan].m_bField*/)
|
||||
{
|
||||
m_oWriter.WriteString(std::wstring(L"</a:fld>"));
|
||||
}
|
||||
|
||||
@ -180,17 +180,22 @@ namespace PPTX
|
||||
return;
|
||||
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
NSBinPptxRW::CBinaryFileWriter* pOldWriter = oDrawingConverter.m_pBinaryWriter;
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = pWriter;
|
||||
smart_ptr<OOX::IFileContainer> oldRels = oDrawingConverter.GetRels();
|
||||
NSBinPptxRW::CBinaryFileWriter *pOldDrawingWriter = oDrawingConverter.m_pBinaryWriter;
|
||||
BinDocxRW::CDocxSerializer *pOldMainDocument = pWriter->m_pMainDocument;
|
||||
|
||||
pWriter->m_pMainDocument = NULL;
|
||||
oDrawingConverter.m_pBinaryWriter = pWriter;
|
||||
smart_ptr<OOX::IFileContainer> oldRels = oDrawingConverter.GetRels();
|
||||
oDrawingConverter.SetRels(pChart.smart_dynamic_cast<OOX::IFileContainer>());
|
||||
|
||||
BinXlsxRW::BinaryChartWriter oBinaryChartWriter(*pWriter, &oDrawingConverter);
|
||||
oBinaryChartWriter.WriteCT_ChartSpace(*pChart);
|
||||
|
||||
oDrawingConverter.SetRels(oldRels);
|
||||
oDrawingConverter.m_pBinaryWriter = pOldWriter;
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = pOldDrawingWriter;
|
||||
pWriter->m_pMainDocument = pOldMainDocument;
|
||||
}
|
||||
std::wstring ChartRec::toXML() const
|
||||
{
|
||||
|
||||
@ -62,6 +62,15 @@ void Theme::readFields(CFRecord& record)
|
||||
if (dwThemeVersion == 124226)
|
||||
{
|
||||
//default theme
|
||||
global_info->sTheme = \
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"Theme Office\">\
|
||||
<a:themeElements>\
|
||||
<a:clrScheme name=\"Standard\"><a:dk1><a:sysClr val=\"windowText\" lastClr=\"000000\"/></a:dk1><a:lt1><a:sysClr val=\"window\" lastClr=\"FFFFFF\"/></a:lt1><a:dk2><a:srgbClr val=\"1F497D\"/></a:dk2><a:lt2><a:srgbClr val=\"EEECE1\"/></a:lt2><a:accent1><a:srgbClr val=\"4F81BD\"/></a:accent1><a:accent2><a:srgbClr val=\"C0504D\"/></a:accent2><a:accent3><a:srgbClr val=\"9BBB59\"/></a:accent3><a:accent4><a:srgbClr val=\"8064A2\"/></a:accent4><a:accent5><a:srgbClr val=\"4BACC6\"/></a:accent5><a:accent6><a:srgbClr val=\"F79646\"/></a:accent6><a:hlink><a:srgbClr val=\"0000FF\"/></a:hlink><a:folHlink><a:srgbClr val=\"800080\"/></a:folHlink></a:clrScheme>\
|
||||
<a:fontScheme name=\"Standard\"><a:majorFont><a:latin typeface=\"Cambria\" panose=\"020F0302020204030204\"/><a:ea typeface=\"\"/><a:cs typeface=\"\"/><a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/><a:font script=\"Hang\" typeface=\"맑은 고딕\"/><a:font script=\"Hans\" typeface=\"宋体\"/><a:font script=\"Hant\" typeface=\"新細明體\"/><a:font script=\"Arab\" typeface=\"Times New Roman\"/><a:font script=\"Hebr\" typeface=\"Times New Roman\"/><a:font script=\"Thai\" typeface=\"Tahoma\"/><a:font script=\"Ethi\" typeface=\"Nyala\"/><a:font script=\"Beng\" typeface=\"Vrinda\"/><a:font script=\"Gujr\" typeface=\"Shruti\"/><a:font script=\"Khmr\" typeface=\"MoolBoran\"/><a:font script=\"Knda\" typeface=\"Tunga\"/><a:font script=\"Guru\" typeface=\"Raavi\"/><a:font script=\"Cans\" typeface=\"Euphemia\"/><a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/><a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/><a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/><a:font script=\"Thaa\" typeface=\"MV Boli\"/><a:font script=\"Deva\" typeface=\"Mangal\"/><a:font script=\"Telu\" typeface=\"Gautami\"/><a:font script=\"Taml\" typeface=\"Latha\"/><a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/><a:font script=\"Orya\" typeface=\"Kalinga\"/><a:font script=\"Mlym\" typeface=\"Kartika\"/><a:font script=\"Laoo\" typeface=\"DokChampa\"/><a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/><a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/><a:font script=\"Viet\" typeface=\"Times New Roman\"/><a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/><a:font script=\"Geor\" typeface=\"Sylfaen\"/></a:majorFont><a:minorFont><a:latin typeface=\"Calibri\" panose=\"020F0502020204030204\"/><a:ea typeface=\"\"/><a:cs typeface=\"\"/><a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/><a:font script=\"Hang\" typeface=\"맑은 고딕\"/><a:font script=\"Hans\" typeface=\"宋体\"/><a:font script=\"Hant\" typeface=\"新細明體\"/><a:font script=\"Arab\" typeface=\"Arial\"/><a:font script=\"Hebr\" typeface=\"Arial\"/><a:font script=\"Thai\" typeface=\"Tahoma\"/><a:font script=\"Ethi\" typeface=\"Nyala\"/><a:font script=\"Beng\" typeface=\"Vrinda\"/><a:font script=\"Gujr\" typeface=\"Shruti\"/><a:font script=\"Khmr\" typeface=\"DaunPenh\"/><a:font script=\"Knda\" typeface=\"Tunga\"/><a:font script=\"Guru\" typeface=\"Raavi\"/><a:font script=\"Cans\" typeface=\"Euphemia\"/><a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/><a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/><a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/><a:font script=\"Thaa\" typeface=\"MV Boli\"/><a:font script=\"Deva\" typeface=\"Mangal\"/><a:font script=\"Telu\" typeface=\"Gautami\"/><a:font script=\"Taml\" typeface=\"Latha\"/><a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/><a:font script=\"Orya\" typeface=\"Kalinga\"/><a:font script=\"Mlym\" typeface=\"Kartika\"/><a:font script=\"Laoo\" typeface=\"DokChampa\"/><a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/><a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/><a:font script=\"Viet\" typeface=\"Arial\"/><a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/><a:font script=\"Geor\" typeface=\"Sylfaen\"/></a:minorFont></a:fontScheme>\
|
||||
<a:fmtScheme name=\"Standard\"><a:fillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"50000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"35000\"><a:schemeClr val=\"phClr\"><a:tint val=\"37000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:tint val=\"15000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"16200000\" scaled=\"1\"/></a:gradFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:shade val=\"51000\"/><a:satMod val=\"130000\"/></a:schemeClr></a:gs><a:gs pos=\"80000\"><a:schemeClr val=\"phClr\"><a:shade val=\"93000\"/><a:satMod val=\"130000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"94000\"/><a:satMod val=\"135000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"16200000\" scaled=\"0\"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w=\"9525\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"><a:shade val=\"95000\"/><a:satMod val=\"105000\"/></a:schemeClr></a:solidFill><a:prstDash val=\"solid\"/></a:ln><a:ln w=\"25400\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln><a:ln w=\"38100\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"20000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"38000\"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst=\"orthographicFront\"><a:rot lat=\"0\" lon=\"0\" rev=\"0\"/></a:camera><a:lightRig rig=\"threePt\" dir=\"t\"><a:rot lat=\"0\" lon=\"0\" rev=\"1200000\"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w=\"63500\" h=\"25400\"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"40000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs><a:gs pos=\"40000\"><a:schemeClr val=\"phClr\"><a:tint val=\"45000\"/><a:shade val=\"99000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"20000\"/><a:satMod val=\"255000\"/></a:schemeClr></a:gs></a:gsLst><a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"-80000\" r=\"50000\" b=\"180000\"/></a:path></a:gradFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"80000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"30000\"/><a:satMod val=\"200000\"/></a:schemeClr></a:gs></a:gsLst><a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"50000\" r=\"50000\" b=\"50000\"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme>\
|
||||
</a:themeElements>\
|
||||
<a:objectDefaults/><a:extraClrSchemeLst/></a:theme>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -91,18 +100,21 @@ void Theme::readFields(CFRecord& record)
|
||||
|
||||
if (hresult != S_OK || pBuffer == NULL)
|
||||
hresult = OfficeUtils.LoadFileFromArchive(tempThemePath, L"theme/theme/theme1.xml", &pBuffer, nBufferSize);
|
||||
//??? переписать по нормальному
|
||||
|
||||
if (hresult == S_OK && pBuffer != NULL)
|
||||
{
|
||||
global_info->sTheme = std::string((char*)pBuffer, nBufferSize);
|
||||
|
||||
global_info->m_pTheme = boost::shared_ptr<PPTX::Theme>(new PPTX::Theme(NULL, global_info->sTheme));
|
||||
|
||||
delete []pBuffer;
|
||||
pBuffer = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (false == global_info->sTheme.empty())
|
||||
{
|
||||
global_info->m_pTheme = boost::shared_ptr<PPTX::Theme>(new PPTX::Theme(NULL, global_info->sTheme));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -67,6 +67,7 @@ std::size_t hash_value(BorderInfo const & val)
|
||||
std::size_t hash_value(FontInfo const & val)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
boost::hash_combine(seed, val.dyHeight);
|
||||
boost::hash_combine(seed, val.fItalic);
|
||||
boost::hash_combine(seed, val.fStrikeOut);
|
||||
boost::hash_combine(seed, val.fOutline);
|
||||
@ -91,6 +92,7 @@ std::size_t hash_value(FontInfo const & val)
|
||||
bool FontInfo::operator == (const FontInfo & rVal) const
|
||||
{
|
||||
const bool res =
|
||||
dyHeight== rVal.dyHeight &&
|
||||
name == rVal.name &&
|
||||
scheme == rVal.scheme &&
|
||||
fItalic == rVal.fItalic &&
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
|
||||
#include "IFileContainer.h"
|
||||
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpTreeElem.h"
|
||||
#include "../XlsxFormat/WritingElement.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
|
||||
@ -285,6 +285,22 @@ namespace OOX
|
||||
L"",
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath");
|
||||
|
||||
const FileType ExternalLinkLibrary (L"", L"",
|
||||
L"",
|
||||
L"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlLibrary");
|
||||
|
||||
const FileType ExternalLinkPathMissing(L"", L"",
|
||||
L"",
|
||||
L"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing");
|
||||
|
||||
const FileType ExternalLinkPathStartup(L"", L"",
|
||||
L"",
|
||||
L"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlStartup");
|
||||
|
||||
const FileType ExternalLinkPathAlternateStartup(L"", L"",
|
||||
L"",
|
||||
L"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlAlternateStartup");
|
||||
|
||||
const FileType LegacyDiagramText (L"", L"legacyDiagramText.bin",
|
||||
L"",
|
||||
L"http://schemas.microsoft.com/office/2006/relationships/legacyDiagramText");
|
||||
|
||||
@ -351,22 +351,22 @@ namespace OOX
|
||||
if(comment->m_dLeftMM.IsInit())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint; oPoint.FromMm(comment->m_dLeftMM.get());
|
||||
sStyle += L"margin-left:" + OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(oPoint.ToPoints()) + L"pt;";
|
||||
sStyle += L"margin-left:" + XmlUtils::DoubleToString(oPoint.ToPoints()) + L"pt;";
|
||||
}
|
||||
if(comment->m_dTopMM.IsInit())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint; oPoint.FromMm(comment->m_dTopMM.get());
|
||||
sStyle += L"margin-top:" + OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(oPoint.ToPoints()) + L"pt;";
|
||||
sStyle += L"margin-top:" + XmlUtils::DoubleToString(oPoint.ToPoints()) + L"pt;";
|
||||
}
|
||||
if(comment->m_dWidthMM.IsInit())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint; oPoint.FromMm(comment->m_dWidthMM.get());
|
||||
sStyle += L"width:" + OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(oPoint.ToPoints()) + L"pt;";
|
||||
sStyle += L"width:" + XmlUtils::DoubleToString(oPoint.ToPoints()) + L"pt;";
|
||||
}
|
||||
if(comment->m_dHeightMM.IsInit())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint; oPoint.FromMm(comment->m_dHeightMM.get());
|
||||
sStyle += L"height:" + OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(oPoint.ToPoints()) + L"pt;";
|
||||
sStyle += L"height:" + XmlUtils::DoubleToString(oPoint.ToPoints()) + L"pt;";
|
||||
}
|
||||
std::wstring sClientData = L"<x:ClientData ObjectType=\"Note\">";
|
||||
|
||||
|
||||
@ -1076,7 +1076,13 @@ namespace OOX
|
||||
et_x_Controls,
|
||||
et_x_Control,
|
||||
et_x_ControlPr,
|
||||
et_x_OcxPr,
|
||||
et_x_OcxPr,
|
||||
et_x_QueryTable,
|
||||
et_x_QueryTableField,
|
||||
et_x_QueryTableFields,
|
||||
et_x_QueryTableRefresh,
|
||||
et_x_QueryTableDeletedFields,
|
||||
et_x_QueryTableDeletedField,
|
||||
et_x_TableParts,
|
||||
et_x_TablePart,
|
||||
et_x_Table,
|
||||
|
||||
@ -89,35 +89,46 @@ namespace OOX
|
||||
return smart_ptr<OOX::File>(new CWorksheet( pMain, oRootPath, oFileName, oRelation.rId().ToString() ));
|
||||
else if ( oRelation.Type() == FileTypes::Table )
|
||||
return smart_ptr<OOX::File>(new CTableFile( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == FileTypes::QueryTable )
|
||||
return smart_ptr<OOX::File>(new CQueryTableFile( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == FileTypes::Comments )
|
||||
return smart_ptr<OOX::File>(new CComments( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == FileTypes::WorkbookComments)
|
||||
return smart_ptr<OOX::File>(new WorkbookComments( pMain, oRootPath, oFileName));
|
||||
else if ( oRelation.Type() == FileTypes::ExternalLinks )
|
||||
return smart_ptr<OOX::File>(new CExternalLink( pMain, oRootPath, oFileName ));
|
||||
|
||||
else if ( oRelation.Type() == OOX::FileTypes::Chart )
|
||||
return smart_ptr<OOX::File>(new CChartSpace( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == OOX::FileTypes::ExternalLinkPath)
|
||||
else if ( oRelation.Type() == OOX::FileTypes::ExternalLinkPath ||
|
||||
oRelation.Type() == OOX::FileTypes::ExternalLinkPathMissing ||
|
||||
oRelation.Type() == OOX::FileTypes::ExternalLinkPathStartup ||
|
||||
oRelation.Type() == OOX::FileTypes::ExternalLinkPathAlternateStartup ||
|
||||
oRelation.Type() == OOX::FileTypes::ExternalLinkLibrary)
|
||||
{// https://msdn.microsoft.com/en-us/library/ff531845(v=office.12).aspx
|
||||
return smart_ptr<OOX::File>(new ExternalLinkPath( pMain, oRelation.Target()));
|
||||
else if ( oRelation.Type() == FileTypes::WorkbookComments)
|
||||
return smart_ptr<OOX::File>(new WorkbookComments( pMain, oRootPath, oFileName));
|
||||
//common
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::ChartDrawing)
|
||||
// return smart_ptr<OOX::File>(new CChartDrawing( pMain, oRootPath, oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::VmlDrawing )
|
||||
// return smart_ptr<OOX::File>(new CVmlDrawing( oRootPath, oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::Theme )
|
||||
// return smart_ptr<OOX::File>(new PPTX::Theme( oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::Image )
|
||||
// return smart_ptr<OOX::File>(new Image( oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::ThemeOverride )
|
||||
// return smart_ptr<OOX::File>(new PPTX::Theme( oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::OleObject)
|
||||
// return smart_ptr<OOX::File>(new OOX::OleObject( oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::Data)
|
||||
// return smart_ptr<OOX::File>(new OOX::CDiagramData( oRootPath, oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::DiagDrawing)
|
||||
// return smart_ptr<OOX::File>(new OOX::CDiagramDrawing( oRootPath, oFileName ));
|
||||
//else if ( oRelation.Type() == OOX::FileTypes::MicrosoftOfficeUnknown) //ms package
|
||||
// return smart_ptr<OOX::File>(new OOX::OleObject( oFileName, true ));
|
||||
}
|
||||
else if ( oRelation.Type() == OOX::FileTypes::OleObject)
|
||||
{
|
||||
if (oRelation.IsExternal())
|
||||
{
|
||||
return smart_ptr<OOX::File>(new OOX::OleObject( pMain, oRelationFilename ));
|
||||
}
|
||||
else
|
||||
{
|
||||
return smart_ptr<OOX::File>(new OOX::OleObject( pMain, oFileName ));
|
||||
}
|
||||
}
|
||||
else if ( oRelation.Type() == OOX::FileTypes::Data)
|
||||
return smart_ptr<OOX::File>(new OOX::CDiagramData( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == OOX::FileTypes::DiagDrawing)
|
||||
return smart_ptr<OOX::File>(new OOX::CDiagramDrawing( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == OOX::FileTypes::MicrosoftOfficeUnknown) //ms package
|
||||
return smart_ptr<OOX::File>(new OOX::OleObject( pMain, oFileName, true ));
|
||||
else if ( oRelation.Type() == OOX::FileTypes::ActiveX_xml)
|
||||
return smart_ptr<OOX::File>(new OOX::ActiveX_xml( pMain, oRootPath, oFileName ));
|
||||
else if ( oRelation.Type() == OOX::FileTypes::ActiveX_bin)
|
||||
return smart_ptr<OOX::File>(new OOX::ActiveX_bin( pMain, oFileName ));
|
||||
|
||||
return smart_ptr<OOX::File>( new UnknowTypeFile(pMain) );
|
||||
}
|
||||
@ -171,6 +182,8 @@ namespace OOX
|
||||
return smart_ptr<OOX::File>(new CWorksheet( pMain, oRootPath, oFileName, pRelation->rId().ToString() ));
|
||||
else if ( pRelation->Type() == FileTypes::Table )
|
||||
return smart_ptr<OOX::File>(new CTableFile( pMain, oRootPath, oFileName ));
|
||||
else if ( pRelation->Type() == FileTypes::QueryTable )
|
||||
return smart_ptr<OOX::File>(new CQueryTableFile( pMain, oRootPath, oFileName ));
|
||||
else if ( pRelation->Type() == OOX::FileTypes::VmlDrawing )
|
||||
return smart_ptr<OOX::File>(new CVmlDrawing( pMain, oRootPath, oFileName ));
|
||||
else if ( pRelation->Type() == OOX::FileTypes::ChartDrawing)
|
||||
@ -181,8 +194,14 @@ namespace OOX
|
||||
return smart_ptr<OOX::File>(new CChartSpace( pMain, oRootPath, oFileName ));
|
||||
else if ( pRelation->Type() == FileTypes::ExternalLinks )
|
||||
return smart_ptr<OOX::File>(new CExternalLink( pMain, oRootPath, oFileName ));
|
||||
else if ( pRelation->Type() == OOX::FileTypes::ExternalLinkPath)
|
||||
else if ( pRelation->Type() == OOX::FileTypes::ExternalLinkPath ||
|
||||
pRelation->Type() == OOX::FileTypes::ExternalLinkPathMissing ||
|
||||
pRelation->Type() == OOX::FileTypes::ExternalLinkPathStartup ||
|
||||
pRelation->Type() == OOX::FileTypes::ExternalLinkPathAlternateStartup ||
|
||||
pRelation->Type() == OOX::FileTypes::ExternalLinkLibrary )
|
||||
{// https://msdn.microsoft.com/en-us/library/ff531845(v=office.12).aspx)
|
||||
return smart_ptr<OOX::File>(new ExternalLinkPath( pMain, oRelationFilename ));
|
||||
}
|
||||
else if ( pRelation->Type() == OOX::FileTypes::OleObject)
|
||||
{
|
||||
if (pRelation->IsExternal())
|
||||
|
||||
@ -82,6 +82,11 @@ namespace OOX
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
|
||||
L"tables/table", true, true);
|
||||
|
||||
const FileType QueryTable (L"../queryTables", L"queryTable.xml",
|
||||
L"application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml",
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable",
|
||||
L"queryTables/table", true, true);
|
||||
|
||||
const FileType Drawings (L"../drawings", L"drawing.xml",
|
||||
L"application/vnd.openxmlformats-officedocument.drawing+xml",
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
|
||||
|
||||
@ -152,11 +152,11 @@ namespace OOX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("name"), m_oName )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showColumnStripes"), m_oShowColumnStripes )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showFirstColumn"), m_oShowFirstColumn )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showLastColumn"), m_oShowLastColumn )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showRowStripes"), m_oShowRowStripes )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("name"), m_oName )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showColumnStripes"), m_oShowColumnStripes )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showFirstColumn"), m_oShowFirstColumn )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showLastColumn"), m_oShowLastColumn )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("showRowStripes"), m_oShowRowStripes )
|
||||
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
@ -354,36 +354,36 @@ namespace OOX
|
||||
}
|
||||
virtual void toXML2(NSStringUtils::CStringBuilder& writer, int nIndex) const
|
||||
{
|
||||
if(m_oRef.IsInit() && m_oDisplayName.IsInit())
|
||||
{
|
||||
writer.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><table xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"");
|
||||
WritingStringAttrInt(L"id", nIndex);
|
||||
WritingStringAttrEncodeXmlString(L"name", m_oDisplayName.get());
|
||||
WritingStringAttrEncodeXmlString(L"displayName", m_oDisplayName.get());
|
||||
WritingStringAttrString(L"ref", m_oRef->ToString());
|
||||
if(m_oHeaderRowCount.IsInit() && 0 == m_oHeaderRowCount->GetValue())
|
||||
writer.WriteString(L" headerRowCount=\"0\"");
|
||||
if(m_oTotalsRowCount.IsInit() && m_oTotalsRowCount->GetValue() > 0)
|
||||
writer.WriteString(L" totalsRowCount=\"1\"");
|
||||
else
|
||||
writer.WriteString(L" totalsRowShown=\"0\"");
|
||||
WritingStringNullableAttrInt(L"tableBorderDxfId", m_oTableBorderDxfId, m_oTableBorderDxfId->GetValue());
|
||||
writer.WriteString(L">");
|
||||
if(false == m_oRef.IsInit() || false == m_oDisplayName.IsInit()) return;
|
||||
|
||||
writer.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<table xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"");
|
||||
WritingStringAttrInt(L"id", nIndex);
|
||||
WritingStringAttrEncodeXmlString(L"name", m_oDisplayName.get());
|
||||
WritingStringAttrEncodeXmlString(L"displayName", m_oDisplayName.get());
|
||||
WritingStringAttrString(L"ref", m_oRef->ToString());
|
||||
if(m_oHeaderRowCount.IsInit() && 0 == m_oHeaderRowCount->GetValue())
|
||||
writer.WriteString(L" headerRowCount=\"0\"");
|
||||
if(m_oTotalsRowCount.IsInit() && m_oTotalsRowCount->GetValue() > 0)
|
||||
writer.WriteString(L" totalsRowCount=\"1\"");
|
||||
else
|
||||
writer.WriteString(L" totalsRowShown=\"0\"");
|
||||
WritingStringNullableAttrInt(L"tableBorderDxfId", m_oTableBorderDxfId, m_oTableBorderDxfId->GetValue());
|
||||
writer.WriteString(L">");
|
||||
|
||||
if(m_oAutoFilter.IsInit())
|
||||
m_oAutoFilter->toXML(writer);
|
||||
if(m_oSortState.IsInit())
|
||||
m_oSortState->toXML(writer);
|
||||
if(m_oTableColumns.IsInit())
|
||||
m_oTableColumns->toXML(writer);
|
||||
if(m_oTableStyleInfo.IsInit())
|
||||
m_oTableStyleInfo->toXML(writer);
|
||||
if(m_oExtLst.IsInit())
|
||||
{
|
||||
writer.WriteString(m_oExtLst->toXMLWithNS(_T("")));
|
||||
}
|
||||
writer.WriteString(L"</table>");
|
||||
if(m_oAutoFilter.IsInit())
|
||||
m_oAutoFilter->toXML(writer);
|
||||
if(m_oSortState.IsInit())
|
||||
m_oSortState->toXML(writer);
|
||||
if(m_oTableColumns.IsInit())
|
||||
m_oTableColumns->toXML(writer);
|
||||
if(m_oTableStyleInfo.IsInit())
|
||||
m_oTableStyleInfo->toXML(writer);
|
||||
if(m_oExtLst.IsInit())
|
||||
{
|
||||
writer.WriteString(m_oExtLst->toXMLWithNS(_T("")));
|
||||
}
|
||||
writer.WriteString(L"</table>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
@ -418,14 +418,13 @@ namespace OOX
|
||||
private:
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("ref"), m_oRef )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("headerRowCount"), m_oHeaderRowCount )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("totalsRowCount"), m_oTotalsRowCount )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("displayName"), m_oDisplayName )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("tableBorderDxfId"), m_oTableBorderDxfId )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("ref"), m_oRef )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("headerRowCount"), m_oHeaderRowCount )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("totalsRowCount"), m_oTotalsRowCount )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("displayName"), m_oDisplayName )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("tableBorderDxfId"), m_oTableBorderDxfId )
|
||||
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
@ -433,7 +432,7 @@ namespace OOX
|
||||
nullable<SimpleTypes::CRelationshipId > m_oRef;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<> > m_oHeaderRowCount;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<> > m_oTotalsRowCount;
|
||||
nullable<std::wstring > m_oDisplayName;
|
||||
nullable<std::wstring > m_oDisplayName;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<> > m_oTableBorderDxfId;
|
||||
|
||||
nullable<CAutofilter > m_oAutoFilter;
|
||||
@ -582,8 +581,6 @@ namespace OOX
|
||||
virtual ~CTableFile()
|
||||
{
|
||||
}
|
||||
public:
|
||||
|
||||
virtual void read(const CPath& oPath)
|
||||
{
|
||||
//don't use this. use read(const CPath& oRootPath, const CPath& oFilePath)
|
||||
@ -645,6 +642,564 @@ namespace OOX
|
||||
{
|
||||
}
|
||||
};
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
class CQueryTableField : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTableField)
|
||||
|
||||
CQueryTableField(){}
|
||||
virtual ~CQueryTableField() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
writer.WriteString(L"<queryTableField");
|
||||
WritingStringNullableAttrEncodeXmlString(L"name", m_oName, m_oName.get());
|
||||
WritingStringNullableAttrInt(L"id", m_oId, m_oId->GetValue());
|
||||
WritingStringNullableAttrInt(L"tableColumnId", m_oTableColumnId, m_oTableColumnId->GetValue());
|
||||
|
||||
if (m_oRowNumbers.IsInit()) WritingStringAttrString(L"rowNumbers", *m_oRowNumbers ? L"1" : L"0");
|
||||
if (m_oFillFormulas.IsInit()) WritingStringAttrString(L"fillFormulas",*m_oFillFormulas ? L"1" : L"0");
|
||||
if (m_oDataBound.IsInit()) WritingStringAttrString(L"dataBound", *m_oDataBound ? L"1" : L"0");
|
||||
if (m_oClipped.IsInit()) WritingStringAttrString(L"clipped", *m_oClipped ? L"1" : L"0");
|
||||
|
||||
|
||||
writer.WriteString(L"/>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (_T("extLst") == sName)
|
||||
m_oExtLst = oReader;
|
||||
}
|
||||
}
|
||||
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTableField;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("tableColumnId"), m_oTableColumnId )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("name"), m_oName )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("rowNumbers"), m_oRowNumbers )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("fillFormulas"), m_oFillFormulas )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("dataBound"), m_oDataBound )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("clipped"), m_oClipped )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oId;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oTableColumnId;
|
||||
nullable<std::wstring> m_oName;
|
||||
|
||||
nullable_bool m_oRowNumbers;
|
||||
nullable_bool m_oFillFormulas;
|
||||
nullable_bool m_oDataBound;
|
||||
nullable_bool m_oClipped;
|
||||
|
||||
nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
|
||||
};
|
||||
class CQueryTableFields : public WritingElementWithChilds<CQueryTableField>
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTableFields)
|
||||
|
||||
CQueryTableFields(){}
|
||||
virtual ~CQueryTableFields() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
if(m_arrItems.empty()) return;
|
||||
|
||||
writer.WriteString(L"<queryTableFields");
|
||||
WritingStringAttrInt(L"count", (int)m_arrItems.size());
|
||||
writer.WriteString(L">");
|
||||
|
||||
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
||||
{
|
||||
if ( m_arrItems[i] )
|
||||
{
|
||||
m_arrItems[i]->toXML(writer);
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteString(L"</queryTableFields>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if ( L"queryTableField" == sName )
|
||||
m_arrItems.push_back(new CQueryTableField(oReader));
|
||||
}
|
||||
}
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTableFields;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("count"), m_oCount )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<> > m_oCount;
|
||||
};
|
||||
|
||||
class CQueryTableDeletedField : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTableDeletedField)
|
||||
|
||||
CQueryTableDeletedField(){}
|
||||
virtual ~CQueryTableDeletedField() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
writer.WriteString(L"<deletedField");
|
||||
WritingStringNullableAttrEncodeXmlString(L"name", m_oName, m_oName.get());
|
||||
writer.WriteString(L"/>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
}
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTableDeletedField;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("name"), m_oName )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
nullable<std::wstring> m_oName;
|
||||
};
|
||||
class CQueryTableDeletedFields : public WritingElementWithChilds<CQueryTableDeletedField>
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTableDeletedFields)
|
||||
|
||||
CQueryTableDeletedFields(){}
|
||||
virtual ~CQueryTableDeletedFields() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
if(m_arrItems.empty()) return;
|
||||
|
||||
writer.WriteString(L"<queryTableDeletedFields");
|
||||
WritingStringAttrInt(L"count", (int)m_arrItems.size());
|
||||
writer.WriteString(L">");
|
||||
|
||||
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
||||
{
|
||||
if ( m_arrItems[i] )
|
||||
{
|
||||
m_arrItems[i]->toXML(writer);
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteString(L"</queryTableDeletedFields>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if ( L"deletedField" == sName )
|
||||
m_arrItems.push_back(new CQueryTableDeletedField(oReader));
|
||||
}
|
||||
}
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTableFields;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("count"), m_oCount )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<> > m_oCount;
|
||||
};
|
||||
class CQueryTableRefresh : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTableRefresh)
|
||||
|
||||
CQueryTableRefresh(){}
|
||||
virtual ~CQueryTableRefresh() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
writer.WriteString(L"<queryTableRefresh");
|
||||
WritingStringNullableAttrInt(L"nextId", m_oNextId, m_oNextId->GetValue());
|
||||
WritingStringNullableAttrInt(L"unboundColumnsLeft", m_UnboundColumnsLeft, m_UnboundColumnsLeft->GetValue());
|
||||
WritingStringNullableAttrInt(L"unboundColumnsRight", m_UnboundColumnsRight, m_UnboundColumnsRight->GetValue());
|
||||
|
||||
if (m_FieldIdWrapped.IsInit()) WritingStringAttrString(L"fieldIdWrapped", *m_FieldIdWrapped ? L"1" : L"0");
|
||||
if (m_HeadersInLastRefresh.IsInit()) WritingStringAttrString(L"headersInLastRefresh", *m_HeadersInLastRefresh ? L"1" : L"0");
|
||||
if (m_PreserveSortFilterLayout.IsInit())WritingStringAttrString(L"preserveSortFilterLayout", *m_PreserveSortFilterLayout ? L"1" : L"0");
|
||||
if (m_oMinimumVersion.IsInit()) WritingStringAttrInt(L"minimumVersion", m_oMinimumVersion->GetValue());
|
||||
writer.WriteString(L">");
|
||||
|
||||
if (m_oQueryTableFields.IsInit())
|
||||
m_oQueryTableFields->toXML(writer);
|
||||
|
||||
if (m_oQueryTableDeletedFields.IsInit())
|
||||
m_oQueryTableDeletedFields->toXML(writer);
|
||||
|
||||
if (m_oSortState.IsInit())
|
||||
m_oSortState->toXML(writer);
|
||||
|
||||
writer.WriteString(L"</queryTableRefresh");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (_T("queryTableFields") == sName)
|
||||
m_oQueryTableFields = oReader;
|
||||
else if (_T("queryTableDeletedFields") == sName)
|
||||
m_oQueryTableDeletedFields = oReader;
|
||||
else if (_T("sortState") == sName)
|
||||
m_oSortState = oReader;
|
||||
else if (_T("extLst") == sName)
|
||||
m_oExtLst = oReader;
|
||||
}
|
||||
}
|
||||
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTableRefresh;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("id"), m_oNextId )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("minimumVersion"), m_oMinimumVersion )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("fieldIdWrapped"), m_FieldIdWrapped )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("headersInLastRefresh"), m_HeadersInLastRefresh )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("preserveSortFilterLayout"), m_PreserveSortFilterLayout )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("unboundColumnsLeft"), m_UnboundColumnsLeft )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("unboundColumnsRight"), m_UnboundColumnsRight )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oNextId;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinimumVersion;
|
||||
nullable_bool m_FieldIdWrapped;
|
||||
nullable_bool m_HeadersInLastRefresh;
|
||||
nullable_bool m_PreserveSortFilterLayout;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_UnboundColumnsLeft;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_UnboundColumnsRight;
|
||||
|
||||
nullable<CQueryTableFields> m_oQueryTableFields;
|
||||
nullable<CQueryTableDeletedFields> m_oQueryTableDeletedFields;
|
||||
nullable<CSortState> m_oSortState;
|
||||
nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
|
||||
};
|
||||
class CQueryTable : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CQueryTable)
|
||||
CQueryTable()
|
||||
{
|
||||
}
|
||||
virtual ~CQueryTable()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
|
||||
{
|
||||
}
|
||||
virtual void toXML2(NSStringUtils::CStringBuilder& writer, int nIndex) const
|
||||
{
|
||||
if(false == m_oName.IsInit()) return;
|
||||
|
||||
writer.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<queryTable \
|
||||
xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" \
|
||||
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
|
||||
mc:Ignorable=\"xr16\" \
|
||||
xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"");
|
||||
|
||||
if (m_oAdjustColumnWidth.IsInit()) WritingStringAttrString(L"adjustColumnWidth", *m_oAdjustColumnWidth ? L"1" : L"0");
|
||||
if (m_oApplyAlignmentFormats.IsInit()) WritingStringAttrString(L"applyAlignmentFormats", *m_oApplyAlignmentFormats ? L"1" : L"0");
|
||||
if (m_oApplyBorderFormats.IsInit()) WritingStringAttrString(L"applyBorderFormats", *m_oApplyBorderFormats ? L"1" : L"0");
|
||||
if (m_oApplyFontFormats.IsInit()) WritingStringAttrString(L"applyFontFormats", *m_oApplyFontFormats ? L"1" : L"0");
|
||||
if (m_oApplyNumberFormats.IsInit()) WritingStringAttrString(L"applyNumberFormats", *m_oApplyNumberFormats ? L"1" : L"0");
|
||||
if (m_oApplyPatternFormats.IsInit()) WritingStringAttrString(L"applyPatternFormats", *m_oApplyPatternFormats ? L"1" : L"0");
|
||||
if (m_oApplyWidthHeightFormats.IsInit()) WritingStringAttrString(L"applyWidthHeightFormats", *m_oApplyWidthHeightFormats ? L"1" : L"0");
|
||||
if (m_oBackgroundRefresh.IsInit()) WritingStringAttrString(L"backgroundRefresh", *m_oBackgroundRefresh ? L"1" : L"0");
|
||||
|
||||
WritingStringNullableAttrEncodeXmlString(L"name", m_oName, m_oName.get());
|
||||
WritingStringNullableAttrInt(L"connectionId", m_oConnectionId, m_oConnectionId->GetValue());
|
||||
WritingStringNullableAttrInt(L"autoFormatId", m_oAutoFormatId, m_oAutoFormatId->GetValue());
|
||||
|
||||
if (m_oDisableEdit.IsInit()) WritingStringAttrString(L"disableEdit", *m_oDisableEdit ? L"1" : L"0");
|
||||
if (m_oDisableRefresh.IsInit()) WritingStringAttrString(L"disableRefresh", *m_oDisableRefresh ? L"1" : L"0");
|
||||
if (m_oFillFormulas.IsInit()) WritingStringAttrString(L"fillFormulas", *m_oFillFormulas ? L"1" : L"0");
|
||||
if (m_oFirstBackgroundRefresh.IsInit()) WritingStringAttrString(L"firstBackgroundRefresh", *m_oFirstBackgroundRefresh ? L"1" : L"0");
|
||||
|
||||
WritingStringNullableAttrEncodeXmlString(L"growShrinkType", m_oGrowShrinkType, m_oGrowShrinkType.get());
|
||||
|
||||
if (m_oHeaders.IsInit()) WritingStringAttrString(L"headers", *m_oHeaders ? L"1" : L"0");
|
||||
if (m_oIntermediate.IsInit()) WritingStringAttrString(L"intermediate", *m_oIntermediate ? L"1" : L"0");
|
||||
if (m_oPreserveFormatting.IsInit()) WritingStringAttrString(L"preserveFormatting", *m_oPreserveFormatting ? L"1" : L"0");
|
||||
if (m_oRefreshOnLoad.IsInit()) WritingStringAttrString(L"refreshOnLoad", *m_oRefreshOnLoad ? L"1" : L"0");
|
||||
if (m_oRemoveDataOnSave.IsInit()) WritingStringAttrString(L"removeDataOnSave", *m_oRemoveDataOnSave ? L"1" : L"0");
|
||||
if (m_oRowNumbers.IsInit()) WritingStringAttrString(L"rowNumbers", *m_oRowNumbers ? L"1" : L"0");
|
||||
|
||||
writer.WriteString(L">");
|
||||
|
||||
if(m_oQueryTableRefresh.IsInit())
|
||||
m_oQueryTableRefresh->toXML(writer);
|
||||
if(m_oExtLst.IsInit())
|
||||
{
|
||||
writer.WriteString(m_oExtLst->toXMLWithNS(_T("")));
|
||||
}
|
||||
writer.WriteString(L"</queryTable>");
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if ( _T("queryTableRefresh") == sName )
|
||||
m_oQueryTableRefresh = oReader;
|
||||
else if (_T("extLst") == sName)
|
||||
m_oExtLst = oReader;
|
||||
}
|
||||
}
|
||||
virtual EElementType getType () const
|
||||
{
|
||||
return et_x_QueryTable;
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"adjustColumnWidth", m_oAdjustColumnWidth )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyAlignmentFormats", m_oApplyAlignmentFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyBorderFormats", m_oApplyBorderFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyFontFormats", m_oApplyFontFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyNumberFormats", m_oApplyNumberFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyPatternFormats", m_oApplyPatternFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"applyWidthHeightFormats", m_oApplyWidthHeightFormats )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"autoFormatId", m_oAutoFormatId )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"backgroundRefresh", m_oBackgroundRefresh )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"connectionId", m_oConnectionId )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"disableEdit", m_oDisableEdit )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"disableRefresh", m_oDisableRefresh )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"fillFormulas", m_oFillFormulas )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"firstBackgroundRefresh",m_oFirstBackgroundRefresh )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"growShrinkType", m_oGrowShrinkType )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"headers", m_oHeaders )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"intermediate", m_oIntermediate )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"name", m_oName )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"preserveFormatting", m_oPreserveFormatting )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"refreshOnLoad", m_oRefreshOnLoad )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"removeDataOnSave", m_oRemoveDataOnSave )
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, L"rowNumbers", m_oRowNumbers )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
nullable_bool m_oAdjustColumnWidth;
|
||||
nullable_bool m_oApplyAlignmentFormats;
|
||||
nullable_bool m_oApplyBorderFormats;
|
||||
nullable_bool m_oApplyFontFormats;
|
||||
nullable_bool m_oApplyNumberFormats;
|
||||
nullable_bool m_oApplyPatternFormats;
|
||||
nullable_bool m_oApplyWidthHeightFormats;
|
||||
nullable_bool m_oBackgroundRefresh;
|
||||
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oAutoFormatId;
|
||||
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oConnectionId;
|
||||
|
||||
nullable_bool m_oDisableEdit;
|
||||
nullable_bool m_oDisableRefresh;
|
||||
nullable_bool m_oFillFormulas;
|
||||
nullable_bool m_oFirstBackgroundRefresh;
|
||||
|
||||
nullable_string m_oGrowShrinkType;
|
||||
|
||||
nullable_bool m_oHeaders;
|
||||
nullable_bool m_oIntermediate;
|
||||
|
||||
nullable_string m_oName;
|
||||
|
||||
nullable_bool m_oPreserveFormatting;
|
||||
nullable_bool m_oRefreshOnLoad;
|
||||
nullable_bool m_oRemoveDataOnSave;
|
||||
nullable_bool m_oRowNumbers;
|
||||
|
||||
nullable<CQueryTableRefresh> m_oQueryTableRefresh;
|
||||
nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
|
||||
};
|
||||
class CQueryTableFile : public OOX::FileGlobalEnumerated, public OOX::IFileContainer
|
||||
{
|
||||
public:
|
||||
CQueryTableFile(OOX::Document* pMain) : OOX::FileGlobalEnumerated(pMain), OOX::IFileContainer(pMain)
|
||||
{
|
||||
m_bSpreadsheets = true;
|
||||
}
|
||||
CQueryTableFile(OOX::Document* pMain, const CPath& oRootPath, const CPath& oPath) : OOX::FileGlobalEnumerated(pMain), OOX::IFileContainer(pMain)
|
||||
{
|
||||
m_bSpreadsheets = true;
|
||||
read( oRootPath, oPath );
|
||||
}
|
||||
virtual ~CQueryTableFile()
|
||||
{
|
||||
}
|
||||
virtual void read(const CPath& oPath)
|
||||
{
|
||||
//don't use this. use read(const CPath& oRootPath, const CPath& oFilePath)
|
||||
CPath oRootPath;
|
||||
read(oRootPath, oPath);
|
||||
}
|
||||
virtual void read(const CPath& oRootPath, const CPath& oPath)
|
||||
{
|
||||
m_oReadPath = oPath;
|
||||
IFileContainer::Read( oRootPath, oPath );
|
||||
|
||||
XmlUtils::CXmlLiteReader oReader;
|
||||
|
||||
if ( !oReader.FromFile( oPath.GetPath() ) )
|
||||
return;
|
||||
|
||||
if ( !oReader.ReadNextNode() )
|
||||
return;
|
||||
|
||||
m_oQueryTable = oReader;
|
||||
}
|
||||
virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const
|
||||
{
|
||||
if(false == m_oQueryTable.IsInit()) return;
|
||||
|
||||
NSStringUtils::CStringBuilder sXml;
|
||||
int nGlobalNumber = OOX::FileGlobalEnumerated::GetGlobalNumber();
|
||||
|
||||
m_oQueryTable->toXML2(sXml, nGlobalNumber);
|
||||
|
||||
std::wstring sPath = oPath.GetPath();
|
||||
NSFile::CFileBinary::SaveToFile(sPath, sXml.GetData());
|
||||
|
||||
oContent.Registration( type().OverrideType(), oDirectory, oPath.GetFilename() );
|
||||
IFileContainer::Write( oPath, oDirectory, oContent );
|
||||
}
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::Spreadsheet::FileTypes::QueryTable;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
const CPath& GetReadPath()
|
||||
{
|
||||
return m_oReadPath;
|
||||
}
|
||||
|
||||
nullable<CQueryTable> m_oQueryTable;
|
||||
private:
|
||||
CPath m_oReadPath;
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
}
|
||||
};
|
||||
} //Spreadsheet
|
||||
} // namespace OOX
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ namespace Spreadsheet
|
||||
// writer.WriteString(end);
|
||||
#define WritingStringCommonDouble(start, val, end) \
|
||||
writer.WriteString(start); \
|
||||
writer.WriteString(OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(val)); \
|
||||
writer.WriteString(XmlUtils::DoubleToString(val)); \
|
||||
writer.WriteString(end);
|
||||
|
||||
|
||||
|
||||
@ -42,14 +42,14 @@ public:
|
||||
{
|
||||
m_dwMagicWord = 0xEDB88320;
|
||||
m_dwInitCrc = 0xFFFFFFFF;
|
||||
m_bInitTable = FALSE;
|
||||
m_bInitTable = false;
|
||||
}
|
||||
public:
|
||||
unsigned int Calc(const unsigned char* pStream, int nSize)
|
||||
unsigned int Calc(const unsigned char* pStream, unsigned int nSize)
|
||||
{
|
||||
InitCRCTable();
|
||||
unsigned int dwRes = m_dwInitCrc;
|
||||
for (int i=0;i<nSize;i++)
|
||||
for (unsigned int i=0;i<nSize;i++)
|
||||
{
|
||||
dwRes = m_arCRCTable[(dwRes ^ pStream[i])& 0xFF] ^ (dwRes >> 8);
|
||||
}
|
||||
@ -77,6 +77,7 @@ private:
|
||||
}
|
||||
m_arCRCTable[i] = dwTemp;
|
||||
}
|
||||
m_bInitTable = true;
|
||||
}
|
||||
|
||||
unsigned int m_dwMagicWord;
|
||||
|
||||
@ -439,6 +439,7 @@ namespace NSDirectory
|
||||
if (0 == attemps)
|
||||
{
|
||||
pcTemplate = L"";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return pcTemplate;
|
||||
|
||||
@ -1850,6 +1850,10 @@ bool CFontFile::IsBold()
|
||||
if (!m_pFace)
|
||||
return false;
|
||||
|
||||
TT_OS2* pOS2 = (TT_OS2*)FT_Get_Sfnt_Table(m_pFace, ft_sfnt_os2);
|
||||
if (pOS2 && pOS2->version != 0xFFFF && pOS2->usWeightClass >= 800)
|
||||
return true;
|
||||
|
||||
return ((m_pFace->style_flags & FT_STYLE_FLAG_BOLD) != 0) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2019
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -33,33 +33,12 @@
|
||||
#include "Timer.h"
|
||||
#include "time.h"
|
||||
|
||||
#ifdef _MAC
|
||||
#include "mach/mach.h"
|
||||
#include "mach/mach_time.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
//#define _CAN_USE_COM_THREADS
|
||||
#endif
|
||||
|
||||
namespace NSTimers
|
||||
{
|
||||
#ifdef _MAC
|
||||
static DWORD getUptimeInMilliseconds()
|
||||
{
|
||||
const int64_t kOneMillion = 1000 * 1000;
|
||||
static mach_timebase_info_data_t s_timebase_info;
|
||||
|
||||
if (s_timebase_info.denom == 0) {
|
||||
(void) mach_timebase_info(&s_timebase_info);
|
||||
}
|
||||
|
||||
// mach_absolute_time() returns billionth of seconds,
|
||||
// so divide by one million to get milliseconds
|
||||
return (DWORD)((mach_absolute_time() * s_timebase_info.numer) / (kOneMillion * s_timebase_info.denom));
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
// CLOCK_MONOTONIC defined ONLY since macOS 10.12!!! (crash on earlier version)
|
||||
DWORD GetTickCount()
|
||||
{
|
||||
|
||||
@ -34,6 +34,11 @@
|
||||
|
||||
#include "BaseThread.h"
|
||||
|
||||
#ifdef _MAC
|
||||
#include "mach/mach.h"
|
||||
#include "mach/mach_time.h"
|
||||
#endif
|
||||
|
||||
namespace NSTimers
|
||||
{
|
||||
KERNEL_DECL DWORD GetTickCount();
|
||||
@ -56,6 +61,31 @@ namespace NSTimers
|
||||
|
||||
virtual void OnTimer() = 0;
|
||||
};
|
||||
|
||||
inline static unsigned long getUptimeInMilliseconds()
|
||||
{
|
||||
#ifdef _IOS
|
||||
const int64_t kOneMillion = 1000 * 1000;
|
||||
static mach_timebase_info_data_t s_timebase_info;
|
||||
|
||||
if (s_timebase_info.denom == 0) {
|
||||
(void) mach_timebase_info(&s_timebase_info);
|
||||
}
|
||||
|
||||
// mach_absolute_time() returns billionth of seconds,
|
||||
// so divide by one million to get milliseconds
|
||||
return (unsigned long)((mach_absolute_time() * s_timebase_info.numer) / (kOneMillion * s_timebase_info.denom));
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
return (ts.tv_sec * 1000 + (DWORD)(ts.tv_nsec / 1000000));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -383,14 +383,16 @@ void CPdfRenderer::CCommandManager::Flush()
|
||||
oTextLine.Flush(pPage);
|
||||
lTextColor = pText->GetColor();
|
||||
TColor oColor = lTextColor;
|
||||
pPage->SetFillColor(oColor.r, oColor.g, oColor.b);
|
||||
pPage->SetFillColor(oColor.r, oColor.g, oColor.b);
|
||||
pPage->SetStrokeColor(oColor.r, oColor.g, oColor.b);
|
||||
}
|
||||
|
||||
if (nTextAlpha != pText->GetAlpha())
|
||||
{
|
||||
oTextLine.Flush(pPage);
|
||||
nTextAlpha = pText->GetAlpha();
|
||||
pPage->SetFillAlpha(nTextAlpha);
|
||||
pPage->SetFillAlpha(nTextAlpha);
|
||||
pPage->SetStrokeAlpha(nTextAlpha);
|
||||
}
|
||||
|
||||
if (fabs(dTextSpace - pText->GetSpace()) > 0.001)
|
||||
|
||||
Reference in New Issue
Block a user