mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
18 Commits
v5.3.0.178
...
v5.3.2.11
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ae3c6f2ea | |||
| 35bd2803a4 | |||
| e7bf661432 | |||
| 635265eaa2 | |||
| 7636ff79cc | |||
| ed1019a004 | |||
| 35c4d70cf5 | |||
| 0b987aeed2 | |||
| aefb229343 | |||
| eb9d69d1ec | |||
| 9670d021c2 | |||
| 79f18355fe | |||
| f86055c713 | |||
| ea82bea6f1 | |||
| 28f5b1251a | |||
| 39fbf06511 | |||
| 0821edca07 | |||
| 564b7f9c29 |
@ -63,8 +63,9 @@ public:
|
||||
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_attributes (const xml::attributes_wc_ptr & Attributes) = 0;
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
virtual void add_space (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -82,6 +82,11 @@ bool read_doc_element::read_sax( xml::sax * Reader )
|
||||
}
|
||||
break;
|
||||
case xml::typeWhitespace:
|
||||
{
|
||||
const std::wstring value = Reader->value();
|
||||
add_space(value);
|
||||
}
|
||||
break;
|
||||
case xml::typeText:
|
||||
{
|
||||
const std::wstring value = Reader->value();
|
||||
|
||||
@ -151,7 +151,6 @@ void serialize_wrap(std::wostream & strm, _docx_drawing const & val)
|
||||
break;
|
||||
case odf_types::style_wrap::Left:
|
||||
case odf_types::style_wrap::Right:
|
||||
case odf_types::style_wrap::Dynamic:
|
||||
serialize_wrap_square(strm, val);
|
||||
break;
|
||||
case odf_types::style_wrap::RunThrough:
|
||||
@ -160,6 +159,7 @@ void serialize_wrap(std::wostream & strm, _docx_drawing const & val)
|
||||
case odf_types::style_wrap::None:
|
||||
serialize_wrap_top_bottom(strm, val);
|
||||
break;
|
||||
case odf_types::style_wrap::Dynamic:
|
||||
default:
|
||||
CP_XML_NODE(L"wp:wrapTopAndBottom");
|
||||
break;
|
||||
|
||||
@ -74,6 +74,10 @@ void abstract_xml::add_text(const std::wstring & Text)
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
xml_content_.push_back( elm );
|
||||
}
|
||||
|
||||
void abstract_xml::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
xml_content_.push_back( elm );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,19 +46,17 @@ public:
|
||||
static const ElementType type = type_AbstractXml;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
|
||||
|
||||
public:
|
||||
abstract_xml() {};
|
||||
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
office_element_ptr_array xml_content_;
|
||||
};
|
||||
|
||||
|
||||
@ -324,10 +324,6 @@ void draw_text_box::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
|
||||
void draw_text_box::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
// draw:object
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * draw_object::ns = L"draw";
|
||||
|
||||
@ -271,7 +271,8 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_text(const std::wstring & Text){}
|
||||
virtual void add_space(const std::wstring & Text){}
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(draw_text_box);
|
||||
|
||||
@ -1451,7 +1451,7 @@ void draw_frame::docx_convert(oox::docx_conversion_context & Context)
|
||||
bool bImage = false;
|
||||
if (content_.empty() == false)
|
||||
{
|
||||
if (content_[0]->get_type() == typeDrawImage)
|
||||
if (content_[0]->get_type() == typeDrawImage || content_[0]->get_type() == typeDrawObject || content_[0]->get_type() == typeDrawObjectOle )
|
||||
bImage = true;
|
||||
}
|
||||
if (Context.get_drawing_context().get_current_level() > 0 && !Context.get_drawing_context().in_group() && !bImage)
|
||||
|
||||
@ -224,7 +224,11 @@ void presentation_footer_decl::add_attributes( const xml::attributes_wc_ptr & At
|
||||
}
|
||||
void presentation_footer_decl::add_text(const std::wstring & text)
|
||||
{
|
||||
text_ = text;
|
||||
text_ += text;
|
||||
}
|
||||
void presentation_footer_decl::add_space(const std::wstring & text)
|
||||
{
|
||||
text_ += text;
|
||||
}
|
||||
void presentation_footer_decl::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
@ -242,7 +246,11 @@ void presentation_date_time_decl::add_attributes( const xml::attributes_wc_ptr &
|
||||
}
|
||||
void presentation_date_time_decl::add_text(const std::wstring & text)
|
||||
{
|
||||
text_ = text;
|
||||
text_ += text;
|
||||
}
|
||||
void presentation_date_time_decl::add_space(const std::wstring & text)
|
||||
{
|
||||
text_ += text;
|
||||
}
|
||||
void presentation_date_time_decl::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
|
||||
@ -104,6 +104,7 @@ public:
|
||||
std::wstring text_;
|
||||
|
||||
private:
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
@ -131,6 +132,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
private:
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
|
||||
@ -52,9 +52,12 @@ std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream, bool bXmlEnc
|
||||
|
||||
void svg_desc::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_ = Text;
|
||||
text_ += Text;
|
||||
}
|
||||
void svg_desc::add_space(const std::wstring & Text)
|
||||
{
|
||||
text_ += Text;
|
||||
}
|
||||
|
||||
// svg:font-face-uri
|
||||
//---------------------------------------------------------------------------------------
|
||||
const wchar_t * svg_font_face_uri::ns = L"svg";
|
||||
@ -80,9 +83,6 @@ void svg_font_face_uri::add_child_element( xml::sax * Reader, const std::wstring
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
void svg_font_face_uri::add_text(const std::wstring & Text)
|
||||
{}
|
||||
|
||||
// svg:font-face-format
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * svg_font_face_format::ns = L"svg";
|
||||
@ -103,9 +103,6 @@ void svg_font_face_format::add_child_element( xml::sax * Reader, const std::wstr
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
void svg_font_face_format::add_text(const std::wstring & Text)
|
||||
{}
|
||||
|
||||
// svg:font-face-name
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * svg_font_face_name::ns = L"svg";
|
||||
@ -126,9 +123,6 @@ void svg_font_face_name::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
void svg_font_face_name::add_text(const std::wstring & Text)
|
||||
{}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -77,7 +77,6 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(svg_font_face_uri);
|
||||
|
||||
@ -100,6 +99,7 @@ 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){}
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(svg_desc);
|
||||
|
||||
@ -121,7 +121,6 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(svg_font_face_format);
|
||||
|
||||
@ -142,7 +141,6 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(svg_font_face_name);
|
||||
|
||||
|
||||
@ -75,7 +75,11 @@ void note_citation::add_text(const std::wstring & Text)
|
||||
office_element_ptr elm = text::create(Text) ;
|
||||
content_.push_back( elm );
|
||||
}
|
||||
|
||||
void note_citation::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::create(Text) ;
|
||||
content_.push_back( elm );
|
||||
}
|
||||
void note_citation::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
@ -113,6 +117,11 @@ void note_body::add_text(const std::wstring & Text)
|
||||
content_.push_back( elm );
|
||||
}
|
||||
|
||||
void note_body::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::create(Text) ;
|
||||
content_.push_back( elm );
|
||||
}
|
||||
void note_body::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
oox::StreamsManPtr prev = Context.get_stream_man();
|
||||
|
||||
@ -50,22 +50,20 @@ public:
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeTextNoteCitation;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
note_citation() {}
|
||||
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
std::wstring text_label_;
|
||||
office_element_ptr_array content_;
|
||||
std::wstring text_label_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
|
||||
@ -81,19 +79,18 @@ public:
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeTextNoteBody;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
public:
|
||||
note_body() {}
|
||||
|
||||
note_body() {}
|
||||
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_space(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
|
||||
@ -184,9 +184,7 @@ void number_style_base::add_child_element( xml::sax * Reader, const std::wstring
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
}
|
||||
void number_style_base::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
// number:number-style
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * number_number_style::ns = L"number";
|
||||
@ -211,7 +209,11 @@ void number_text::add_text(const std::wstring & Text)
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
|
||||
void number_text::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
// number:embedded-text
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * number_embedded_text::ns = L"number";
|
||||
@ -232,6 +234,11 @@ void number_embedded_text::add_text(const std::wstring & Text)
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
void number_embedded_text::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
void number_embedded_text::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
}
|
||||
@ -261,10 +268,6 @@ void number_number::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
void number_number::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
// number:scientific-number
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * number_scientific_number::ns = L"number";
|
||||
@ -304,7 +307,10 @@ void number_currency_symbol::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_.push_back(Text);
|
||||
}
|
||||
|
||||
void number_currency_symbol::add_space(const std::wstring & Text)
|
||||
{
|
||||
text_.push_back(Text);
|
||||
}
|
||||
void number_currency_symbol::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -342,7 +348,11 @@ void number_text_content::add_text(const std::wstring & Text)
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
|
||||
void number_text_content::add_space(const std::wstring & Text)
|
||||
{
|
||||
office_element_ptr elm = text::text::create(Text) ;
|
||||
text_.push_back( elm );
|
||||
}
|
||||
void number_text_content::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
}
|
||||
@ -443,9 +453,6 @@ void number_day::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_day::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
void number_day::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -475,9 +482,6 @@ void number_day_of_week::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_day_of_week::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_day_of_week::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
@ -508,10 +512,6 @@ void number_quarter::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
void number_quarter::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_quarter::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -544,9 +544,7 @@ void number_month::add_child_element( xml::sax * Reader, const std::wstring & Ns
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_month::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_month::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -589,9 +587,7 @@ void number_year::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_year::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_year::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -630,9 +626,6 @@ void number_hours::add_child_element( xml::sax * Reader, const std::wstring & Ns
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_hours::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_hours::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
@ -663,9 +656,7 @@ void number_minutes::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_minutes::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_minutes::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -696,9 +687,7 @@ void number_seconds::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_seconds::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_seconds::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -732,9 +721,7 @@ void number_am_pm::add_child_element( xml::sax * Reader, const std::wstring & Ns
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_am_pm::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_am_pm::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -760,9 +747,7 @@ void number_fraction::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
void number_fraction::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_fraction::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
@ -786,10 +771,6 @@ void number_fraction::oox_convert(oox::num_format_context & Context)
|
||||
}
|
||||
}
|
||||
|
||||
void number_scientific_number::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
void number_scientific_number::oox_convert(oox::num_format_context & Context)
|
||||
{
|
||||
std::wostream & strm = Context.output();
|
||||
|
||||
@ -58,8 +58,9 @@ public:
|
||||
std::wstring get_style_name() const;
|
||||
|
||||
private:
|
||||
virtual void add_text(const std::wstring &);
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element (xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
odf_types::common_data_style_attlist common_data_style_attlist_;
|
||||
|
||||
@ -182,12 +183,12 @@ public:
|
||||
virtual void oox_convert (oox::num_format_context & Context) = 0;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_text (const std::wstring &) = 0;
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
virtual void add_space (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -210,6 +211,7 @@ 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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_space (const std::wstring & Text);
|
||||
|
||||
office_element_ptr_array text_;
|
||||
};
|
||||
@ -234,7 +236,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
// number-number-attlist
|
||||
_CP_OPT(std::wstring) number_decimal_replacement_;
|
||||
@ -272,6 +275,7 @@ 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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_space (const std::wstring & Text);
|
||||
|
||||
_CP_OPT(int) number_position_;
|
||||
office_element_ptr_array text_;
|
||||
@ -297,16 +301,13 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
private:
|
||||
// number-scientific-number-attlist
|
||||
_CP_OPT(int) number_min_exponent_digits_;
|
||||
|
||||
// common-decimal-places-attlist
|
||||
_CP_OPT(int) number_decimal_places_;
|
||||
|
||||
// common-number-attlist
|
||||
_CP_OPT(int) number_min_integer_digits_;
|
||||
_CP_OPT(bool) number_grouping_;
|
||||
|
||||
@ -333,6 +334,7 @@ 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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_space (const std::wstring & Text);
|
||||
|
||||
_CP_OPT(std::wstring) number_language_;
|
||||
_CP_OPT(std::wstring) number_country_;
|
||||
@ -362,6 +364,7 @@ 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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_space (const std::wstring & Text);
|
||||
|
||||
office_element_ptr_array text_;
|
||||
|
||||
@ -387,7 +390,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
@ -414,7 +418,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
@ -441,7 +446,8 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
@ -467,7 +473,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(bool) number_textual_;
|
||||
_CP_OPT(bool) number_possessive_form_;
|
||||
@ -496,7 +503,8 @@ public:
|
||||
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);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
@ -518,15 +526,13 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
|
||||
void oox_convert(oox::num_format_context & Context);
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
public:
|
||||
void oox_convert(oox::num_format_context & Context);
|
||||
|
||||
private:
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
|
||||
@ -551,7 +557,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(std::wstring) number_calendar_;
|
||||
@ -578,7 +585,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(std::wstring) number_style_;
|
||||
_CP_OPT(int) number_decimal_places_;
|
||||
@ -606,7 +614,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(number_am_pm);
|
||||
@ -629,7 +638,8 @@ public:
|
||||
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);
|
||||
virtual void add_text (const std::wstring & Text);
|
||||
virtual void add_text (const std::wstring & Text) {}
|
||||
virtual void add_space (const std::wstring & Text) {}
|
||||
|
||||
_CP_OPT(int) number_min_integer_digits_;
|
||||
_CP_OPT(bool) number_grouping_;
|
||||
|
||||
@ -94,10 +94,7 @@ void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void content_xml_t::add_text(const std::wstring & Text)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,8 +59,9 @@ public:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
virtual void add_text(const std::wstring & Text) {}
|
||||
virtual void add_space(const std::wstring & Text) {}
|
||||
|
||||
friend class odf_document;
|
||||
|
||||
office_element_ptr content_;
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
#define MIN_SLIDE_TIME 5000.0
|
||||
|
||||
inline int sort (const long* a, const long* b) { return *a > *b ? 1 : -1; }
|
||||
//inline int sort (const long* a, const long* b) { return *a > *b ? 1 : -1; }
|
||||
|
||||
#if !defined(_WIN32) && !defined (_WIN64)
|
||||
|
||||
@ -440,7 +440,7 @@ namespace Animations
|
||||
|
||||
virtual ~ParaBuildContainer()
|
||||
{
|
||||
for ( long i = 0; i < (long)rgParaBuildLevel.size(); ++i )
|
||||
for ( size_t i = 0; i < rgParaBuildLevel.size(); ++i )
|
||||
RELEASEOBJECT (rgParaBuildLevel[i]);
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ namespace Animations
|
||||
|
||||
virtual ~BuildListContainer()
|
||||
{
|
||||
for ( long i = 0; i < (long)rgChildRec.size(); ++i )
|
||||
for ( size_t i = 0; i < rgChildRec.size(); ++i )
|
||||
RELEASEOBJECT (rgChildRec[i]);
|
||||
}
|
||||
|
||||
@ -1051,7 +1051,7 @@ namespace Animations
|
||||
}
|
||||
void ClearNodes ()
|
||||
{
|
||||
for ( long i = 0; i < (long)m_arrElements.size(); ++i )
|
||||
for ( size_t i = 0; i < m_arrElements.size(); ++i )
|
||||
{
|
||||
RELEASEOBJECT ( m_arrElements[i] );
|
||||
}
|
||||
@ -1399,7 +1399,7 @@ namespace Animations
|
||||
|
||||
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF12A; }
|
||||
|
||||
inline long GetObjectID ()
|
||||
inline _UINT32 GetObjectID ()
|
||||
{
|
||||
return clientVisualElement.m_oVisualShapeAtom.m_nObjectIdRef;
|
||||
}
|
||||
@ -2481,13 +2481,13 @@ namespace Animations
|
||||
|
||||
RELEASEOBJECT(rgSlave);
|
||||
|
||||
for ( long i = 0; i < (long)rgExtTimeNodeChildren.size(); ++i )
|
||||
for ( size_t i = 0; i < rgExtTimeNodeChildren.size(); ++i )
|
||||
RELEASEOBJECT ( rgExtTimeNodeChildren[i] );
|
||||
|
||||
for ( long i = 0; i < (long)timeCondition.size(); ++i )
|
||||
for ( size_t i = 0; i < timeCondition.size(); ++i )
|
||||
RELEASEOBJECT ( timeCondition[i] );
|
||||
|
||||
for ( long i = 0; i < (long)rgTimeModifierAtom.size(); ++i )
|
||||
for ( size_t i = 0; i < rgTimeModifierAtom.size(); ++i )
|
||||
RELEASEOBJECT ( rgTimeModifierAtom[i] );
|
||||
}
|
||||
|
||||
@ -2714,7 +2714,7 @@ namespace Animations
|
||||
//
|
||||
inline TimeModifierAtom* GetModifier (long Type)
|
||||
{
|
||||
for ( long i = 0; i < (long)rgTimeModifierAtom.size(); ++i )
|
||||
for ( size_t i = 0; i < rgTimeModifierAtom.size(); ++i )
|
||||
if (rgTimeModifierAtom[i]->type == Type)
|
||||
return rgTimeModifierAtom[i];
|
||||
|
||||
@ -3008,7 +3008,7 @@ namespace Animations
|
||||
|
||||
inline long GetBuild (long nShapeID)
|
||||
{
|
||||
for ( long i = 0; i < (long)m_arrBuilds.size(); ++i )
|
||||
for ( size_t i = 0; i < m_arrBuilds.size(); ++i )
|
||||
{
|
||||
if (m_arrBuilds[i].m_nShapeID == nShapeID)
|
||||
return m_arrBuilds[i].m_nBuildType;
|
||||
@ -3023,7 +3023,7 @@ namespace Animations
|
||||
{
|
||||
if ( pContainer->buildList )
|
||||
{
|
||||
for ( long i = 0; i < (long)pContainer->buildList->rgChildRec.size(); ++i )
|
||||
for ( size_t i = 0; i < pContainer->buildList->rgChildRec.size(); ++i )
|
||||
m_arrBuilds.push_back(EffectBuild(pContainer->buildList->rgChildRec[i]->buildAtom.shapeIdRef, pContainer->buildList->rgChildRec[i]->paraBuildAtom.buildLevel) );
|
||||
|
||||
return true;
|
||||
@ -3193,7 +3193,7 @@ namespace Animations
|
||||
}
|
||||
|
||||
//
|
||||
inline void AddAnimation (ExtTimeNodeContainer* pTimeNode, long nID)
|
||||
inline void AddAnimation (ExtTimeNodeContainer* pTimeNode, int nID)
|
||||
{
|
||||
CalculateTimeEffect (pTimeNode);
|
||||
|
||||
@ -3407,9 +3407,9 @@ namespace Animations
|
||||
|
||||
if (MediaCallEffect == m_oTopEffect.m_nEffectType)
|
||||
{
|
||||
if ((long)pContainer->rgExtTimeNodeChildren.size())
|
||||
if (!pContainer->rgExtTimeNodeChildren.empty())
|
||||
{
|
||||
ExtTimeNodeContainer* pChild = pContainer->rgExtTimeNodeChildren[0];
|
||||
ExtTimeNodeContainer* pChild = pContainer->rgExtTimeNodeChildren[0];
|
||||
if (pChild)
|
||||
{
|
||||
if (pChild->timeNodeAtom.m_bDurationProperty)
|
||||
@ -3474,7 +3474,7 @@ namespace Animations
|
||||
|
||||
if (26 == m_oTopEffect.m_nEffectID)
|
||||
{
|
||||
if ((long)m_arDurations.size() && (long)m_arBeginTimes.size() )
|
||||
if (!m_arDurations.empty() && !m_arBeginTimes.empty() )
|
||||
m_dEffectDuration = m_arDurations.at(m_arDurations.size()-1) + m_arBeginTimes.at(m_arBeginTimes.size()-1);
|
||||
}
|
||||
|
||||
@ -3563,7 +3563,7 @@ namespace Animations
|
||||
m_oTopEffect.m_nTextSequence = container.clientVisualElement.m_oVisualShapeAtom.m_nData1; // номер параграфа - не нормальзован
|
||||
m_oTopEffect.m_bRemoveEmptyBlocks = true;
|
||||
|
||||
for (long i = 0; i < (long)m_arParIndexer.size(); ++i)
|
||||
for (size_t i = 0; i < m_arParIndexer.size(); ++i)
|
||||
{
|
||||
if (m_oTopEffect.m_nTextSequence == m_arParIndexer.at(i))
|
||||
return;
|
||||
@ -3575,7 +3575,7 @@ namespace Animations
|
||||
|
||||
inline bool UpdateParagraph ()
|
||||
{
|
||||
if ((long)m_arParIndexer.size())
|
||||
if (!m_arParIndexer.empty())
|
||||
{
|
||||
//ATLTRACE ( _T("====================PARAGRAPH==========================================\n"));
|
||||
//qsort ( m_arParIndexer.GetData(), m_arParIndexer.size(), sizeof (long), (int(*)(const void*, const void*))sort );
|
||||
@ -3587,12 +3587,12 @@ namespace Animations
|
||||
Effects* arEffects = pPair->second;
|
||||
if (arEffects)
|
||||
{
|
||||
for (long i = 0; i < (long)arEffects->size(); ++i)
|
||||
for (size_t i = 0; i < arEffects->size(); ++i)
|
||||
{
|
||||
Effect& oEffect = arEffects->at(i);
|
||||
if (oEffect.m_nTextSequence >= 0)
|
||||
{
|
||||
for (long ind = 0; ind < (long)m_arParIndexer.size(); ++ind)
|
||||
for (size_t ind = 0; ind < m_arParIndexer.size(); ++ind)
|
||||
{
|
||||
if (oEffect.m_nTextSequence == m_arParIndexer.at(ind))
|
||||
{
|
||||
@ -3646,7 +3646,7 @@ namespace Animations
|
||||
}
|
||||
}
|
||||
|
||||
for (long i = 0; i < (long)pContainer->rgExtTimeNodeChildren.size(); ++i )
|
||||
for (size_t i = 0; i < pContainer->rgExtTimeNodeChildren.size(); ++i )
|
||||
{
|
||||
if (GetMediaID(pContainer->rgExtTimeNodeChildren [i]))
|
||||
return true;
|
||||
@ -3668,7 +3668,7 @@ namespace Animations
|
||||
}
|
||||
}
|
||||
|
||||
for (long i = 0; i < (long)pContainer->rgExtTimeNodeChildren.size(); ++i )
|
||||
for (size_t i = 0; i < pContainer->rgExtTimeNodeChildren.size(); ++i )
|
||||
{
|
||||
if (CNodeTiming::AfterPreviousNode == pContainer->rgExtTimeNodeChildren [i]->GetEffectNodeType ()) // нод с описанием эффекта
|
||||
return false;
|
||||
@ -3704,20 +3704,20 @@ namespace Animations
|
||||
TimeArray m_arDurations;
|
||||
TimeArray m_arBeginTimes;
|
||||
|
||||
std::wstring m_ComposeEffectMothionPath;
|
||||
std::wstring m_ComposeEffectMothionPath;
|
||||
bool m_HaveAfterEffect;
|
||||
|
||||
EffectsMap m_oAnimation;
|
||||
CParagraphBuilds m_oParagraphBuilds;
|
||||
|
||||
std::vector <long> m_arParIndexer;
|
||||
std::vector <_INT32> m_arParIndexer;
|
||||
|
||||
// media
|
||||
int m_nMediaID;
|
||||
int m_nMediaShapeID;
|
||||
int m_nMediaPush; // глубина поиска
|
||||
|
||||
std::vector <int> m_arrMedia;
|
||||
std::vector <_INT32> m_arrMedia;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -199,13 +199,13 @@ CColor CPPTElement::CorrectSysColor(int nColorCode, CElementPtr pElement, CTheme
|
||||
}
|
||||
void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideInfo* pWrapper, CSlide* pSlide, CProperties* pProperties)
|
||||
{
|
||||
long lCount = pProperties->m_lCount;
|
||||
size_t lCount = pProperties->m_lCount;
|
||||
switch (pElement->m_etType)
|
||||
{
|
||||
case PPT_FORMAT::etVideo:
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
for (size_t i = 0; i < lCount; ++i)
|
||||
{
|
||||
SetUpPropertyVideo(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
@ -215,7 +215,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypeTexture;
|
||||
pElement->m_bLine = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
for (size_t i = 0; i < lCount; ++i)
|
||||
{
|
||||
SetUpPropertyImage(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
@ -224,7 +224,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
case PPT_FORMAT::etAudio:
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
for (size_t i = 0; i < lCount; ++i)
|
||||
{
|
||||
SetUpPropertyAudio(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
@ -234,7 +234,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
pElement->m_bIsFilled = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
for (size_t i = 0; i < lCount; ++i)
|
||||
{
|
||||
SetUpProperty(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
@ -249,7 +249,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
pPPTShape->m_oCustomVML.SetAdjusts(&pPPTShape->m_arAdjustments);
|
||||
}
|
||||
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
for (size_t i = 0; i < lCount; ++i)
|
||||
{
|
||||
SetUpPropertyShape(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
@ -838,22 +838,22 @@ void CPPTElement::SetUpPropertyImage(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
}break;
|
||||
case cropFromTop:
|
||||
{
|
||||
image_element->m_lcropFromTop = pProperty->m_lValue;
|
||||
image_element->m_lcropFromTop = (_INT32)pProperty->m_lValue;
|
||||
image_element->m_bCropEnabled = true;
|
||||
}break;
|
||||
case cropFromBottom:
|
||||
{
|
||||
image_element->m_lcropFromBottom = pProperty->m_lValue;
|
||||
image_element->m_lcropFromBottom = (_INT32)pProperty->m_lValue;
|
||||
image_element->m_bCropEnabled = true;
|
||||
}break;
|
||||
case cropFromLeft:
|
||||
{
|
||||
image_element->m_lcropFromLeft = pProperty->m_lValue;
|
||||
image_element->m_lcropFromLeft = (_INT32)pProperty->m_lValue;
|
||||
image_element->m_bCropEnabled = true;
|
||||
}break;
|
||||
case cropFromRight:
|
||||
{
|
||||
image_element->m_lcropFromRight = pProperty->m_lValue;
|
||||
image_element->m_lcropFromRight = (_INT32)pProperty->m_lValue;
|
||||
image_element->m_bCropEnabled = true;
|
||||
}break;
|
||||
case pibFlags:
|
||||
|
||||
@ -1818,7 +1818,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
std::wstring strCoord1 = oNodeShape.GetAttributeOrValue(L"from");
|
||||
std::wstring strCoord2 = oNodeShape.GetAttributeOrValue(L"to");
|
||||
|
||||
if (strCoord1 != L"" && strCoord2 != L"")
|
||||
if (!strCoord1.empty() && !strCoord2.empty())
|
||||
{
|
||||
std::vector<std::wstring> oArray1;
|
||||
boost::algorithm::split(oArray1, strCoord1, boost::algorithm::is_any_of(L","), boost::algorithm::token_compress_on);
|
||||
@ -1905,7 +1905,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
int nOffsetX = _POINTS[0] - _x;
|
||||
int nOffsetY = _POINTS[1] - _y;
|
||||
|
||||
strStyleAdvenced = L";margin-left:" + std::to_wstring(_x) + L";margin-top:" + std::to_wstring(_y)
|
||||
strStyleAdvenced += L";margin-left:" + std::to_wstring(_x) + L";margin-top:" + std::to_wstring(_y)
|
||||
+ L";width:" + std::to_wstring(_r - _x) + L";height:" + std::to_wstring(_b - _y) + L";polyline_correct:true;";
|
||||
|
||||
double dKoefX = 21600.0 / (std::max)((_r - _x), 1);
|
||||
@ -3302,6 +3302,7 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
|
||||
std::map<std::wstring, std::wstring>::iterator pFind;
|
||||
|
||||
bool bIsInline = false;
|
||||
bool bIsMargin = false;
|
||||
|
||||
if (oProps.IsTop == true)
|
||||
{
|
||||
@ -3312,12 +3313,19 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
|
||||
{
|
||||
bIsInline = true;
|
||||
}
|
||||
|
||||
if (((oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.find(L"margin-left")) &&
|
||||
(oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.find(L"margin-top")))
|
||||
||
|
||||
((oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.find(L"left")) &&
|
||||
(oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.find(L"top"))))
|
||||
{
|
||||
bIsMargin = true;
|
||||
}
|
||||
pFind = oCssStyles.m_mapSettings.find(L"mso-position-horizontal-relative");
|
||||
if (oCssStyles.m_mapSettings.end() != pFind && (pFind->second == L"text" || pFind->second == L"char"))
|
||||
if (oCssStyles.m_mapSettings.end() != pFind && ((pFind->second == L"text" && !bIsMargin) || pFind->second == L"char"))
|
||||
{
|
||||
pFind = oCssStyles.m_mapSettings.find(L"mso-position-vertical-relative");
|
||||
if (oCssStyles.m_mapSettings.end() != pFind && (pFind->second == L"text" || pFind->second == L"line"))
|
||||
if (oCssStyles.m_mapSettings.end() != pFind && ((pFind->second == L"text" && !bIsMargin) || pFind->second == L"line"))
|
||||
{
|
||||
bIsInline = true;
|
||||
}
|
||||
@ -3355,7 +3363,13 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
|
||||
|
||||
if (oCssStyles.m_mapSettings.end() != pFind)
|
||||
{
|
||||
left = (LONG)(dKoefSize * parserPoint.FromString(pFind->second) + 0.5);
|
||||
std::vector<std::wstring> oArray1;
|
||||
boost::algorithm::split(oArray1, pFind->second, boost::algorithm::is_any_of(L","), boost::algorithm::token_compress_on);
|
||||
|
||||
for (size_t i = 0; i < oArray1.size(); i++)
|
||||
{
|
||||
left += (LONG)(dKoefSize * parserPoint.FromString(oArray1[i]) + 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
pFind = oCssStyles.m_mapSettings.find(L"margin-top");
|
||||
@ -3365,7 +3379,12 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
|
||||
|
||||
if (oCssStyles.m_mapSettings.end() != pFind)
|
||||
{
|
||||
top = (LONG)(dKoefSize * parserPoint.FromString(pFind->second) + 0.5);
|
||||
std::vector<std::wstring> oArray1;
|
||||
boost::algorithm::split(oArray1, pFind->second, boost::algorithm::is_any_of(L","), boost::algorithm::token_compress_on);
|
||||
for (size_t i = 0; i < oArray1.size(); i++)
|
||||
{
|
||||
top += (LONG)(dKoefSize * parserPoint.FromString(oArray1[i]) + 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -293,10 +293,10 @@ namespace PPT_FORMAT
|
||||
|
||||
bool m_bCropEnabled;
|
||||
|
||||
long m_lcropFromRight;
|
||||
long m_lcropFromLeft;
|
||||
long m_lcropFromTop;
|
||||
long m_lcropFromBottom;
|
||||
_INT32 m_lcropFromRight;
|
||||
_INT32 m_lcropFromLeft;
|
||||
_INT32 m_lcropFromTop;
|
||||
_INT32 m_lcropFromBottom;
|
||||
|
||||
bool m_bStretch;
|
||||
bool m_bTile;
|
||||
|
||||
@ -173,7 +173,7 @@ public:
|
||||
std::vector<CProperty> m_arProperties;
|
||||
// по идее - это instance, но нам так удобнее,
|
||||
// тем более это класс - не связанный с RecordHeader
|
||||
long m_lCount;
|
||||
size_t m_lCount;
|
||||
|
||||
CProperties() : m_arProperties()
|
||||
{
|
||||
@ -187,7 +187,7 @@ public:
|
||||
void FromStream(POLE::Stream* pStream, long lCount)
|
||||
{
|
||||
m_lCount = lCount;
|
||||
for (long lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
for (size_t lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
{
|
||||
CProperty elem;
|
||||
m_arProperties.push_back(elem);
|
||||
@ -195,7 +195,7 @@ public:
|
||||
}
|
||||
// теперь читаем дополнительную информацию
|
||||
// сортировано по pid'ам (но у нас пока просто по-порядку)
|
||||
for (long lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
for (size_t lIndex = 0; lIndex < m_lCount; ++lIndex)
|
||||
{
|
||||
m_arProperties[lIndex].ComplexFromStream(pStream);
|
||||
}
|
||||
@ -205,7 +205,7 @@ public:
|
||||
_UINT32 GetLen()
|
||||
{
|
||||
_UINT32 dwLen = 6 * m_lCount;
|
||||
for (long nIndex = 0; nIndex < m_lCount; ++nIndex)
|
||||
for (size_t nIndex = 0; nIndex < m_lCount; ++nIndex)
|
||||
{
|
||||
if (m_arProperties[nIndex].m_bComplex)
|
||||
{
|
||||
|
||||
@ -79,7 +79,7 @@ namespace PPTX
|
||||
XmlMacroReadNodeValueBase(oNode, _T("cp:revision"), revision);
|
||||
XmlMacroReadNodeValueBase(oNode, _T("dc:subject"), subject);
|
||||
XmlMacroReadNodeValueBase(oNode, _T("dc:title"), title);
|
||||
XmlMacroReadNodeValueBase(oNode, _T("cp:version"), title);
|
||||
XmlMacroReadNodeValueBase(oNode, _T("cp:version"), version);
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::CContentTypes& content)const
|
||||
{
|
||||
@ -217,7 +217,7 @@ namespace PPTX
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteNodeValue2(_T("dc:title"), title);
|
||||
pWriter->WriteNodeValue2(_T("dc:subject"), title);
|
||||
pWriter->WriteNodeValue2(_T("dc:subject"), subject);
|
||||
pWriter->WriteNodeValue2(_T("dc:creator"), creator);
|
||||
pWriter->WriteNodeValue2(_T("cp:keywords"), keywords);
|
||||
pWriter->WriteNodeValue2(_T("dc:description"), description);
|
||||
@ -242,9 +242,9 @@ namespace PPTX
|
||||
pWriter->WriteStringXML(*modified);
|
||||
pWriter->WriteNodeEnd(_T("dcterms:modified"));
|
||||
}
|
||||
pWriter->WriteNodeValue2(_T("cp:category"), revision);
|
||||
pWriter->WriteNodeValue2(_T("cp:contentStatus"), revision);
|
||||
pWriter->WriteNodeValue2(_T("cp:version"), revision);
|
||||
pWriter->WriteNodeValue2(_T("cp:category"), category);
|
||||
pWriter->WriteNodeValue2(_T("cp:contentStatus"), contentStatus);
|
||||
pWriter->WriteNodeValue2(_T("cp:version"), version);
|
||||
|
||||
pWriter->EndNode(_T("cp:coreProperties"));
|
||||
}
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
@echo off
|
||||
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
SET PLATFORM=win_32
|
||||
if defined ProgramFiles(x86) (
|
||||
SET PLATFORM=win_64
|
||||
)
|
||||
|
||||
if defined TARGET (
|
||||
SET PLATFORM=%TARGET%
|
||||
)
|
||||
|
||||
mkdir "%SCRIPTPATH%%PLATFORM%"
|
||||
cd "%SCRIPTPATH%%PLATFORM%"
|
||||
|
||||
Powershell.exe -executionpolicy remotesigned -file %SCRIPTPATH%download.ps1 http://d2ettrnqo7v976.cloudfront.net/cef/3163/%PLATFORM%/cef_binary.7z cef_binary.7z cef_binary
|
||||
setlocal
|
||||
|
||||
SET UNSIP_PROGRAMM="%ProgramFiles%\7-Zip\7z.exe"
|
||||
SET UNSIP_PROGRAMM2="%ProgramFiles(x86)%\7-Zip\7z.exe"
|
||||
@ -20,11 +11,48 @@ if exist %UNSIP_PROGRAMM2% (
|
||||
SET UNSIP_PROGRAMM=%UNSIP_PROGRAMM2%
|
||||
)
|
||||
|
||||
if exist "cef_binary" (
|
||||
echo "cef_binary.7z already extracted"
|
||||
) else (
|
||||
call %UNSIP_PROGRAMM% x "cef_binary.7z"
|
||||
mkdir build
|
||||
xcopy /Y /S cef_binary\Release\* build\
|
||||
xcopy /Y /S cef_binary\Resources\* build\
|
||||
if defined BUILD_PLATFORM (
|
||||
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:xp=%" (
|
||||
SET "BUILD_PLATFORMS=win_64 win_32 winxp_64 winxp_32"
|
||||
GOTO :found
|
||||
)
|
||||
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:all=%" (
|
||||
SET "BUILD_PLATFORMS=win_64 win_32"
|
||||
GOTO :found
|
||||
)
|
||||
)
|
||||
|
||||
SET "BUILD_PLATFORMS=win_32"
|
||||
if defined ProgramFiles(x86) (
|
||||
SET "BUILD_PLATFORMS=win_64"
|
||||
GOTO :found
|
||||
)
|
||||
if defined TARGET (
|
||||
SET "BUILD_PLATFORMS=%TARGET%"
|
||||
GOTO :found
|
||||
)
|
||||
|
||||
echo "error"
|
||||
GOTO :end
|
||||
|
||||
:found
|
||||
for %%a in (%BUILD_PLATFORMS%) do (
|
||||
echo "platform: %%a"
|
||||
mkdir "%SCRIPTPATH%%%a"
|
||||
cd "%SCRIPTPATH%%%a"
|
||||
Powershell.exe -executionpolicy remotesigned -file %SCRIPTPATH%download.ps1 http://d2ettrnqo7v976.cloudfront.net/cef/3163/%%a/cef_binary.7z cef_binary.7z cef_binary
|
||||
|
||||
if exist "cef_binary" (
|
||||
echo "cef_binary.7z already extracted"
|
||||
) else (
|
||||
call %UNSIP_PROGRAMM% x "cef_binary.7z"
|
||||
mkdir build
|
||||
xcopy /Y /S cef_binary\Release\* build\
|
||||
xcopy /Y /S cef_binary\Resources\* build\
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
endlocal
|
||||
|
||||
@echo on
|
||||
@ -1,64 +1,80 @@
|
||||
@echo off
|
||||
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
|
||||
setlocal
|
||||
|
||||
SET ICU_MAJOR_VER=58
|
||||
SET ICU_MINOR_VER=2
|
||||
|
||||
SET build_platform=win_32
|
||||
if defined ProgramFiles(x86) (
|
||||
SET build_platform=win_64
|
||||
)
|
||||
|
||||
if defined TARGET (
|
||||
SET build_platform=%TARGET%
|
||||
)
|
||||
|
||||
if "%build_platform%" == "win_32" (
|
||||
SET MACHINE=x86
|
||||
)
|
||||
|
||||
if "%build_platform%" == "win_64" (
|
||||
SET MACHINE=x64
|
||||
)
|
||||
|
||||
if not exist "%build_platform%" (
|
||||
md "%build_platform%"
|
||||
)
|
||||
|
||||
if not exist "%build_platform%\build" (
|
||||
md "%build_platform%\build"
|
||||
)
|
||||
|
||||
cd "%SCRIPTPATH%%build_platform%"
|
||||
|
||||
if exist "%SCRIPTPATH%%build_platform%\icu\" (
|
||||
echo "icu already exported"
|
||||
) else (
|
||||
svn export http://source.icu-project.org/repos/icu/tags/release-%ICU_MAJOR_VER%-%ICU_MINOR_VER%/icu4c ./icu
|
||||
)
|
||||
|
||||
SET VC=%ProgramFiles%\Microsoft Visual Studio 14.0\VC
|
||||
SET VC64=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC
|
||||
if exist %VC64% (
|
||||
SET VC=%VC64%
|
||||
)
|
||||
|
||||
call "%VC%\vcvarsall.bat" %MACHINE%
|
||||
|
||||
if "%build_platform%" == "win_64" (
|
||||
MSBuild.exe icu\source\allinone\allinone.sln /p:Configuration=Release /p:PlatformToolset=v140 /p:Platform="X64"
|
||||
) else (
|
||||
MSBuild.exe icu\source\allinone\allinone.sln /p:Configuration=Release /p:PlatformToolset=v140 /p:Platform="Win32"
|
||||
SET UNSIP_PROGRAMM="%ProgramFiles%\7-Zip\7z.exe"
|
||||
SET UNSIP_PROGRAMM2="%ProgramFiles(x86)%\7-Zip\7z.exe"
|
||||
if exist %UNSIP_PROGRAMM2% (
|
||||
SET UNSIP_PROGRAMM=%UNSIP_PROGRAMM2%
|
||||
)
|
||||
|
||||
if "%build_platform%" == "win_64" (
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\bin64\icudt%ICU_MAJOR_VER%.dll" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\bin64\icuuc%ICU_MAJOR_VER%.dll" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\lib64\icudt.lib" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\lib64\icuuc.lib" "%SCRIPTPATH%%build_platform%\build\"
|
||||
) else (
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\bin\icudt%ICU_MAJOR_VER%.dll" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\bin\icuuc%ICU_MAJOR_VER%.dll" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\lib\icudt.lib" "%SCRIPTPATH%%build_platform%\build\"
|
||||
XCOPY /Y "%SCRIPTPATH%%build_platform%\icu\lib\icuuc.lib" "%SCRIPTPATH%%build_platform%\build\"
|
||||
if defined BUILD_PLATFORM (
|
||||
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:all=%" (
|
||||
SET "BUILD_PLATFORMS=win_64 win_32"
|
||||
GOTO :found
|
||||
)
|
||||
)
|
||||
|
||||
SET "BUILD_PLATFORMS=win_32"
|
||||
if defined ProgramFiles(x86) (
|
||||
SET "BUILD_PLATFORMS=win_64"
|
||||
GOTO :found
|
||||
)
|
||||
if defined TARGET (
|
||||
SET "BUILD_PLATFORMS=%TARGET%"
|
||||
GOTO :found
|
||||
)
|
||||
|
||||
echo "error"
|
||||
GOTO :end
|
||||
|
||||
:found
|
||||
for %%a in (%BUILD_PLATFORMS%) do (
|
||||
cd "%SCRIPTPATH%"
|
||||
if not exist "%%a" (
|
||||
md "%%a"
|
||||
)
|
||||
if not exist "%%a\build" (
|
||||
md "%%a\build"
|
||||
)
|
||||
cd "%SCRIPTPATH%%%a"
|
||||
if exist "icu" (
|
||||
echo "icu already exported"
|
||||
) else (
|
||||
svn export http://source.icu-project.org/repos/icu/tags/release-%ICU_MAJOR_VER%-%ICU_MINOR_VER%/icu4c ./icu
|
||||
)
|
||||
|
||||
if "%%a" == "win_64" (
|
||||
call "%VC%\vcvarsall.bat" x64
|
||||
MSBuild.exe icu\source\allinone\allinone.sln /p:Configuration=Release /p:PlatformToolset=v140 /p:Platform="X64"
|
||||
XCOPY /Y "icu\bin64\icudt%ICU_MAJOR_VER%.dll" "build\"
|
||||
XCOPY /Y "icu\bin64\icuuc%ICU_MAJOR_VER%.dll" "build\"
|
||||
XCOPY /Y "icu\lib64\icudt.lib" "build\"
|
||||
XCOPY /Y "icu\lib64\icuuc.lib" "build\"
|
||||
) else (
|
||||
call "%VC%\vcvarsall.bat" x86
|
||||
MSBuild.exe icu\source\allinone\allinone.sln /p:Configuration=Release /p:PlatformToolset=v140 /p:Platform="Win32"
|
||||
XCOPY /Y "icu\bin\icudt%ICU_MAJOR_VER%.dll" "build\"
|
||||
XCOPY /Y "icu\bin\icuuc%ICU_MAJOR_VER%.dll" "build\"
|
||||
XCOPY /Y "icu\lib\icudt.lib" "build\"
|
||||
XCOPY /Y "icu\lib\icuuc.lib" "build\"
|
||||
)
|
||||
)
|
||||
cd "%SCRIPTPATH%"
|
||||
|
||||
:end
|
||||
endlocal
|
||||
|
||||
@echo on
|
||||
@ -20,4 +20,8 @@ call ninja -C out.gn/win_32/release
|
||||
call gn gen out.gn/win_32/debug --args="is_debug=true target_cpu=\"x86\" v8_target_cpu=\"x86\" v8_static_library=true is_component_build=false v8_use_snapshot=false is_clang=false"
|
||||
call ninja -C out.gn/win_32/debug
|
||||
|
||||
rem v8_use_snapshot=true v8_use_external_startup_data=true
|
||||
rem v8_use_snapshot=true v8_use_external_startup_data=true
|
||||
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:xp=%" (
|
||||
call %~dp0v8_xp\build.bat
|
||||
cd %~dp0
|
||||
)
|
||||
@ -24,3 +24,8 @@ call git checkout -b 6.0 -t branch-heads/6.0
|
||||
cd ../
|
||||
|
||||
call gclient sync --no-history
|
||||
|
||||
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:xp=%" (
|
||||
call v8_xp\fetch.bat
|
||||
cd %~dp0
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\win_tools-2_7_6_bin\python\bin;%PATH%
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\win_tools-2_7_13_chromium7_bin\python\bin;%PATH%
|
||||
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
SET GYP_MSVS_VERSION=2015
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ if exist "depot_tools" (
|
||||
call powershell -File .\fix-depot_tools.ps1
|
||||
)
|
||||
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\python276_bin;%PATH%
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\win_tools-2_7_13_chromium7_bin\python\bin;%PATH%
|
||||
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
SET GYP_MSVS_VERSION=2015
|
||||
|
||||
|
||||
@ -2490,6 +2490,7 @@ namespace SimpleTypes
|
||||
else if(L"5Arrows" == sValue) this->m_eValue = Arrows5;
|
||||
else if(L"5ArrowsGray" == sValue) this->m_eValue = Arrows5Gray;
|
||||
else if(L"5Quarters" == sValue) this->m_eValue = Quarters5;
|
||||
//..ext....
|
||||
else if(L"5Rating" == sValue) this->m_eValue = Rating5;
|
||||
else if(L"3Triangles" == sValue) this->m_eValue = Triangles3;
|
||||
else if(L"3Stars" == sValue) this->m_eValue = Stars3;
|
||||
|
||||
@ -513,7 +513,7 @@ const CIconSet CIconSet::Merge(const CIconSet& oPrev, const CIconSet& oCurrent)
|
||||
}
|
||||
bool CIconSet::isExtended ()
|
||||
{
|
||||
return (false == m_arrIconSets.empty());
|
||||
return (false == m_arrIconSets.empty() || (m_oIconSet.IsInit() && m_oIconSet->GetValue() > 15));
|
||||
}
|
||||
void CIconSet::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
|
||||
@ -37,6 +37,12 @@ CONFIG(debug, debug|release) {
|
||||
#PLATFORM
|
||||
win32 {
|
||||
CONFIG += core_windows
|
||||
|
||||
WINDOWS_VERSION_XP = $$(WINDOWS_VERSION_XP)
|
||||
!isEmpty(WINDOWS_VERSION_XP) {
|
||||
CONFIG += build_xp
|
||||
message(xp using)
|
||||
}
|
||||
}
|
||||
|
||||
DST_ARCH=$$QMAKE_TARGET.arch
|
||||
|
||||
@ -25,6 +25,10 @@ LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter -lkernel -lgraphics
|
||||
} else {
|
||||
DEFINES += V8_OS_XP
|
||||
DESTDIR=$$DESTDIR/xp
|
||||
OBJECTS_DIR = $$OBJECTS_DIR/xp
|
||||
MOC_DIR = $$MOC_DIR/xp
|
||||
RCC_DIR = $$RCC_DIR/xp
|
||||
UI_DIR = $$UI_DIR/xp
|
||||
include(../../Common/3dParty/v8/v8_xp/v8.pri)
|
||||
}
|
||||
|
||||
|
||||
@ -1626,6 +1626,25 @@ std::vector<std::wstring> CApplicationFonts::GetSetupFontFiles()
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
std::vector<std::wstring> oArray2 = NSDirectory::GetFiles(L"C:/Windows/Fonts", true);
|
||||
|
||||
wchar_t sUserName[1000];
|
||||
DWORD nUserNameLen = 1000 + 1;
|
||||
GetUserNameW(sUserName, &nUserNameLen);
|
||||
std::wstring strUserName(sUserName, nUserNameLen - 1);
|
||||
|
||||
NSDirectory::GetFiles2(L"C:\\Users\\" + strUserName + L"\\AppData\\Local\\Microsoft\\Windows\\Fonts", oArray2, true);
|
||||
|
||||
for (std::vector<std::wstring>::iterator i = oArray2.begin(); i != oArray2.end(); i++)
|
||||
{
|
||||
if (map_files.end() == map_files.find(*i))
|
||||
oArray.push_back(*i);
|
||||
}
|
||||
}
|
||||
|
||||
return oArray;
|
||||
#endif
|
||||
|
||||
|
||||
@ -107,6 +107,17 @@ namespace MetaFile
|
||||
|
||||
void Begin()
|
||||
{
|
||||
if (m_pFile)
|
||||
{
|
||||
TRect* pBounds = m_pFile->GetDCBounds();
|
||||
int nL = pBounds->nLeft;
|
||||
int nR = pBounds->nRight;
|
||||
int nT = pBounds->nTop;
|
||||
int nB = pBounds->nBottom;
|
||||
|
||||
m_dScaleX = (nR - nL <= 0) ? 1 : m_dW / (double)(nR - nL);
|
||||
m_dScaleY = (nB - nT <= 0) ? 1 : m_dH / (double)(nB - nT);
|
||||
}
|
||||
}
|
||||
void End()
|
||||
{
|
||||
|
||||
@ -144,7 +144,7 @@ namespace MetaFile
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
bool CMetaFile::DrawOnRenderer(IRenderer* pRenderer, double dX, double dY, double dWidth, double dHeight)
|
||||
{
|
||||
if (NULL == pRenderer)
|
||||
@ -176,7 +176,7 @@ namespace MetaFile
|
||||
}
|
||||
pRenderer->EndCommand(c_nImageType);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
void CMetaFile::Close()
|
||||
{
|
||||
m_oWmfFile.Close();
|
||||
@ -185,7 +185,7 @@ namespace MetaFile
|
||||
m_oSvgFile.Close();
|
||||
|
||||
m_lType = 0;
|
||||
};
|
||||
}
|
||||
int CMetaFile::GetType()
|
||||
{
|
||||
return m_lType;
|
||||
|
||||
@ -64,10 +64,7 @@ namespace MetaFile
|
||||
TRectD oBounds = oBoundsBox;
|
||||
if (IsPlaceable())
|
||||
{
|
||||
double dLogicalToMM = 25.4 / 72;
|
||||
if (m_oPlaceable.Inch > 0)
|
||||
dLogicalToMM /= m_oPlaceable.Inch;
|
||||
|
||||
double dLogicalToMM = (m_oPlaceable.Inch > 0 ? 25.4 / m_oPlaceable.Inch : 25.4 / 1440);
|
||||
oBounds *= dLogicalToMM;
|
||||
}
|
||||
else
|
||||
@ -111,100 +108,100 @@ namespace MetaFile
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.1 Bitmap records
|
||||
//-----------------------------------------------------------
|
||||
case META_BITBLT: Read_META_BITBLT(); break;
|
||||
case META_DIBBITBLT: Read_META_DIBBITBLT(); break;
|
||||
case META_DIBSTRETCHBLT: Read_META_DIBSTRETCHBLT(); break;
|
||||
case META_SETDIBTODEV: Read_META_SETDIBTODEV(); break;
|
||||
case META_STRETCHBLT: Read_META_STRETCHBLT(); break;
|
||||
case META_STRETCHDIB: Read_META_STRETCHDIB(); break;
|
||||
case META_BITBLT: Read_META_BITBLT(); break;
|
||||
case META_DIBBITBLT: Read_META_DIBBITBLT(); break;
|
||||
case META_DIBSTRETCHBLT: Read_META_DIBSTRETCHBLT(); break;
|
||||
case META_SETDIBTODEV: Read_META_SETDIBTODEV(); break;
|
||||
case META_STRETCHBLT: Read_META_STRETCHBLT(); break;
|
||||
case META_STRETCHDIB: Read_META_STRETCHDIB(); break;
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.2 Control records
|
||||
//-----------------------------------------------------------
|
||||
case META_EOF: bEof = true; break;
|
||||
case META_EOF: bEof = true; break;
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.3 Drawing records
|
||||
//-----------------------------------------------------------
|
||||
case META_ARC: Read_META_ARC(); break;
|
||||
case META_CHORD: Read_META_CHORD(); break;
|
||||
case META_ELLIPSE: Read_META_ELLIPSE(); break;
|
||||
case META_EXTFLOODFILL: Read_META_UNSUPPORTED(); break;
|
||||
case META_EXTTEXTOUT: Read_META_EXTTEXTOUT(); break;
|
||||
case META_FILLREGION: Read_META_FILLREGION(); break;
|
||||
case META_FLOODFILL: Read_META_UNSUPPORTED(); break;
|
||||
case META_FRAMEREGION: Read_META_FRAMEREGION(); break;
|
||||
case META_INVERTREGION: Read_META_INVERTREGION(); break;
|
||||
case META_LINETO: Read_META_LINETO(); break;
|
||||
case META_PAINTREGION: Read_META_PAINTREGION(); break;
|
||||
case META_PATBLT: Read_META_PATBLT(); break;
|
||||
case META_PIE: Read_META_PIE(); break;
|
||||
case META_POLYLINE: Read_META_POLYLINE(); break;
|
||||
case META_POLYGON: Read_META_POLYGON(); break;
|
||||
case META_POLYPOLYGON: Read_META_POLYPOLYGON(); break;
|
||||
case META_RECTANGLE: Read_META_RECTANGLE(); break;
|
||||
case META_ROUNDRECT: Read_META_ROUNDRECT(); break;
|
||||
case META_SETPIXEL: Read_META_SETPIXEL(); break;
|
||||
case META_TEXTOUT: Read_META_TEXTOUT(); break;
|
||||
case META_ARC: Read_META_ARC(); break;
|
||||
case META_CHORD: Read_META_CHORD(); break;
|
||||
case META_ELLIPSE: Read_META_ELLIPSE(); break;
|
||||
case META_EXTFLOODFILL: Read_META_UNSUPPORTED(); break;
|
||||
case META_EXTTEXTOUT: Read_META_EXTTEXTOUT(); break;
|
||||
case META_FILLREGION: Read_META_FILLREGION(); break;
|
||||
case META_FLOODFILL: Read_META_UNSUPPORTED(); break;
|
||||
case META_FRAMEREGION: Read_META_FRAMEREGION(); break;
|
||||
case META_INVERTREGION: Read_META_INVERTREGION(); break;
|
||||
case META_LINETO: Read_META_LINETO(); break;
|
||||
case META_PAINTREGION: Read_META_PAINTREGION(); break;
|
||||
case META_PATBLT: Read_META_PATBLT(); break;
|
||||
case META_PIE: Read_META_PIE(); break;
|
||||
case META_POLYLINE: Read_META_POLYLINE(); break;
|
||||
case META_POLYGON: Read_META_POLYGON(); break;
|
||||
case META_POLYPOLYGON: Read_META_POLYPOLYGON(); break;
|
||||
case META_RECTANGLE: Read_META_RECTANGLE(); break;
|
||||
case META_ROUNDRECT: Read_META_ROUNDRECT(); break;
|
||||
case META_SETPIXEL: Read_META_SETPIXEL(); break;
|
||||
case META_TEXTOUT: Read_META_TEXTOUT(); break;
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.4 Object records
|
||||
//-----------------------------------------------------------
|
||||
case META_CREATEBRUSHINDIRECT: Read_META_CREATEBRUSHINDIRECT(); break;
|
||||
case META_CREATEFONTINDIRECT: Read_META_CREATEFONTINDIRECT(); break;
|
||||
case META_CREATEPALETTE: Read_META_CREATEPALETTE(); break;
|
||||
case META_CREATEPATTERNBRUSH: Read_META_CREATEPATTERNBRUSH(); break;
|
||||
case META_CREATEPENINDIRECT: Read_META_CREATEPENINDIRECT(); break;
|
||||
case META_CREATEREGION: Read_META_CREATEREGION(); break;
|
||||
case META_DELETEOBJECT: Read_META_DELETEOBJECT(); break;
|
||||
case META_DIBCREATEPATTERNBRUSH: Read_META_DIBCREATEPATTERNBRUSH(); break;
|
||||
case META_SELECTCLIPREGION: Read_META_SELECTCLIPREGION(); break;
|
||||
case META_SELECTOBJECT: Read_META_SELECTOBJECT(); break;
|
||||
case META_SELECTPALETTE: Read_META_SELECTPALETTE(); break;
|
||||
case META_CREATEBRUSHINDIRECT: Read_META_CREATEBRUSHINDIRECT(); break;
|
||||
case META_CREATEFONTINDIRECT: Read_META_CREATEFONTINDIRECT(); break;
|
||||
case META_CREATEPALETTE: Read_META_CREATEPALETTE(); break;
|
||||
case META_CREATEPATTERNBRUSH: Read_META_CREATEPATTERNBRUSH(); break;
|
||||
case META_CREATEPENINDIRECT: Read_META_CREATEPENINDIRECT(); break;
|
||||
case META_CREATEREGION: Read_META_CREATEREGION(); break;
|
||||
case META_DELETEOBJECT: Read_META_DELETEOBJECT(); break;
|
||||
case META_DIBCREATEPATTERNBRUSH: Read_META_DIBCREATEPATTERNBRUSH(); break;
|
||||
case META_SELECTCLIPREGION: Read_META_SELECTCLIPREGION(); break;
|
||||
case META_SELECTOBJECT: Read_META_SELECTOBJECT(); break;
|
||||
case META_SELECTPALETTE: Read_META_SELECTPALETTE(); break;
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.5 State records
|
||||
//-----------------------------------------------------------
|
||||
case META_ANIMATEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_EXCLUDECLIPRECT: Read_META_EXCLUDECLIPRECT(); break;
|
||||
case META_INTERSECTCLIPRECT: Read_META_INTERSECTCLIPRECT(); break;
|
||||
case META_MOVETO: Read_META_MOVETO(); break;
|
||||
case META_OFFSETCLIPRGN: Read_META_OFFSETCLIPRGN(); break;
|
||||
case META_OFFSETVIEWPORTORG: Read_META_OFFSETVIEWPORTORG(); break;
|
||||
case META_OFFSETWINDOWORG: Read_META_OFFSETWINDOWORG(); break;
|
||||
case META_REALIZEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_RESIZEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_RESTOREDC: Read_META_RESTOREDC(); break;
|
||||
case META_SAVEDC: Read_META_SAVEDC(); break;
|
||||
case META_SCALEVIEWPORTEXT: Read_META_SCALEVIEWPORTEXT(); break;
|
||||
case META_SCALEWINDOWEXT: Read_META_SCALEWINDOWEXT(); break;
|
||||
case META_SETBKCOLOR: Read_META_SETBKCOLOR(); break;
|
||||
case META_SETBKMODE: Read_META_SETBKMODE(); break;
|
||||
case META_SETLAYOUT: Read_META_SETLAYOUT(); break;
|
||||
case META_SETMAPMODE: Read_META_SETMAPMODE(); break;
|
||||
case META_SETMAPPERFLAGS: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETPALENTRIES: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETPOLYFILLMODE: Read_META_SETPOLYFILLMODE(); break;
|
||||
case META_SETRELABS: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETROP2: Read_META_SETROP2(); break;
|
||||
case META_SETSTRETCHBLTMODE: Read_META_SETSTRETCHBLTMODE(); break;
|
||||
case META_SETTEXTALIGN: Read_META_SETTEXTALIGN(); break;
|
||||
case META_SETTEXTCHAREXTRA: Read_META_SETTEXTCHAREXTRA(); break;
|
||||
case META_SETTEXTCOLOR: Read_META_SETTEXTCOLOR(); break;
|
||||
case META_SETTEXTJUSTIFICATION: Read_META_SETTEXTJUSTIFICATION(); break;
|
||||
case META_SETVIEWPORTEXT: Read_META_SETVIEWPORTEXT(); break;
|
||||
case META_SETVIEWPORTORG: Read_META_SETVIEWPORTORG(); break;
|
||||
case META_SETWINDOWEXT: Read_META_SETWINDOWEXT(); break;
|
||||
case META_SETWINDOWORG: Read_META_SETWINDOWORG(); break;
|
||||
case META_ANIMATEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_EXCLUDECLIPRECT: Read_META_EXCLUDECLIPRECT(); break;
|
||||
case META_INTERSECTCLIPRECT: Read_META_INTERSECTCLIPRECT(); break;
|
||||
case META_MOVETO: Read_META_MOVETO(); break;
|
||||
case META_OFFSETCLIPRGN: Read_META_OFFSETCLIPRGN(); break;
|
||||
case META_OFFSETVIEWPORTORG: Read_META_OFFSETVIEWPORTORG(); break;
|
||||
case META_OFFSETWINDOWORG: Read_META_OFFSETWINDOWORG(); break;
|
||||
case META_REALIZEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_RESIZEPALETTE: Read_META_UNSUPPORTED(); break;
|
||||
case META_RESTOREDC: Read_META_RESTOREDC(); break;
|
||||
case META_SAVEDC: Read_META_SAVEDC(); break;
|
||||
case META_SCALEVIEWPORTEXT: Read_META_SCALEVIEWPORTEXT(); break;
|
||||
case META_SCALEWINDOWEXT: Read_META_SCALEWINDOWEXT(); break;
|
||||
case META_SETBKCOLOR: Read_META_SETBKCOLOR(); break;
|
||||
case META_SETBKMODE: Read_META_SETBKMODE(); break;
|
||||
case META_SETLAYOUT: Read_META_SETLAYOUT(); break;
|
||||
case META_SETMAPMODE: Read_META_SETMAPMODE(); break;
|
||||
case META_SETMAPPERFLAGS: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETPALENTRIES: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETPOLYFILLMODE: Read_META_SETPOLYFILLMODE(); break;
|
||||
case META_SETRELABS: Read_META_UNSUPPORTED(); break;
|
||||
case META_SETROP2: Read_META_SETROP2(); break;
|
||||
case META_SETSTRETCHBLTMODE: Read_META_SETSTRETCHBLTMODE(); break;
|
||||
case META_SETTEXTALIGN: Read_META_SETTEXTALIGN(); break;
|
||||
case META_SETTEXTCHAREXTRA: Read_META_SETTEXTCHAREXTRA(); break;
|
||||
case META_SETTEXTCOLOR: Read_META_SETTEXTCOLOR(); break;
|
||||
case META_SETTEXTJUSTIFICATION: Read_META_SETTEXTJUSTIFICATION(); break;
|
||||
case META_SETVIEWPORTEXT: Read_META_SETVIEWPORTEXT(); break;
|
||||
case META_SETVIEWPORTORG: Read_META_SETVIEWPORTORG(); break;
|
||||
case META_SETWINDOWEXT: Read_META_SETWINDOWEXT(); break;
|
||||
case META_SETWINDOWORG: Read_META_SETWINDOWORG(); break;
|
||||
//-----------------------------------------------------------
|
||||
// 2.3.6 State records
|
||||
//-----------------------------------------------------------
|
||||
case META_ESCAPE: Read_META_ESCAPE(); break;
|
||||
case META_ESCAPE: Read_META_ESCAPE(); break;
|
||||
//-----------------------------------------------------------
|
||||
// Неизвестные записи
|
||||
//-----------------------------------------------------------
|
||||
default:
|
||||
{
|
||||
//std::cout << ushType << " ";
|
||||
Read_META_UNKNOWN();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
//std::cout << ushType << " ";
|
||||
Read_META_UNKNOWN();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bEof)
|
||||
@ -236,23 +233,8 @@ namespace MetaFile
|
||||
m_oDCRect.nTop = pViewport->y;
|
||||
m_oDCRect.nRight = pViewport->w + pViewport->x;
|
||||
m_oDCRect.nBottom = pViewport->h + pViewport->y;
|
||||
|
||||
return &m_oDCRect;
|
||||
|
||||
unsigned short ushMapMode = m_pDC->GetMapMode();
|
||||
if (MM_ANISOTROPIC == ushMapMode || MM_ISOTROPIC == ushMapMode)
|
||||
{
|
||||
TWmfWindow* pViewport = m_pDC->GetViewport();
|
||||
|
||||
m_oDCRect.nLeft = pViewport->x;
|
||||
m_oDCRect.nTop = pViewport->y;
|
||||
m_oDCRect.nRight = pViewport->w + pViewport->x;
|
||||
m_oDCRect.nBottom = pViewport->h + pViewport->y;
|
||||
return &m_oDCRect;
|
||||
}
|
||||
else
|
||||
{
|
||||
return &m_oRect;
|
||||
}
|
||||
}
|
||||
double GetPixelHeight()
|
||||
{
|
||||
@ -321,7 +303,14 @@ namespace MetaFile
|
||||
}
|
||||
TXForm* GetTransform(int iGraphicsMode = GM_ADVANCED)
|
||||
{
|
||||
return m_pDC->GetTransform();
|
||||
TRect* pBounds = GetDCBounds();
|
||||
double dT = pBounds->nTop;
|
||||
double dL = pBounds->nLeft;
|
||||
|
||||
TXForm oShiftXForm(1, 0, 0, 1, -dL, -dT);
|
||||
m_oTransform.Copy(m_pDC->GetFinalTransform(iGraphicsMode));
|
||||
m_oTransform.Multiply(oShiftXForm, MWT_RIGHTMULTIPLY);
|
||||
return &m_oTransform;
|
||||
}
|
||||
unsigned int GetMiterLimit()
|
||||
{
|
||||
@ -359,24 +348,8 @@ namespace MetaFile
|
||||
|
||||
void TranslatePoint(short shX, short shY, double& dX, double &dY)
|
||||
{
|
||||
TWmfWindow* pWindow = m_pDC->GetWindow();
|
||||
TWmfWindow* pViewport = m_pDC->GetViewport();
|
||||
|
||||
dX = (double)((double)(shX - pWindow->x) * m_pDC->GetPixelWidth()) + pViewport->x;
|
||||
dY = (double)((double)(shY - pWindow->y) * m_pDC->GetPixelHeight()) + pViewport->y;
|
||||
|
||||
// Координаты приходят уже с примененной матрицей. Поэтому сначала мы умножаем на матрицу преобразования,
|
||||
// вычитаем начальные координаты и умножаем на обратную матрицу преобразования.
|
||||
TRect* pBounds = GetDCBounds();
|
||||
double dT = pBounds->nTop;
|
||||
double dL = pBounds->nLeft;
|
||||
|
||||
TEmfXForm* pInverse = GetInverseTransform();
|
||||
TEmfXForm* pTransform = GetTransform();
|
||||
pTransform->Apply(dX, dY);
|
||||
dX -= dL;
|
||||
dY -= dT;
|
||||
pInverse->Apply(dX, dY);
|
||||
dX = (double)shX;
|
||||
dY = (double)shY;
|
||||
}
|
||||
TRect GetBoundingBox()
|
||||
{
|
||||
@ -820,6 +793,9 @@ namespace MetaFile
|
||||
m_oStream >> m_oPlaceable.Inch;
|
||||
m_oStream >> m_oPlaceable.Reserved;
|
||||
m_oStream >> m_oPlaceable.Checksum;
|
||||
|
||||
m_pDC->SetViewportOrg(m_oPlaceable.BoundingBox.Left, m_oPlaceable.BoundingBox.Top);
|
||||
m_pDC->SetViewportExt(m_oPlaceable.BoundingBox.Right - m_oPlaceable.BoundingBox.Left, m_oPlaceable.BoundingBox.Bottom - m_oPlaceable.BoundingBox.Top);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -852,7 +828,7 @@ namespace MetaFile
|
||||
if (0x0100 != m_oHeader.Version && 0x0300 != m_oHeader.Version)
|
||||
return SetError();
|
||||
|
||||
// Если у нас не задан Output, значит мы считаем, что идет сканирование метафайла.
|
||||
// Если у нас не задан Output, значит мы считаем, что идет сканирование метафайла.
|
||||
// Во время сканирования мы регистрируем все точки и вычисляем BoundingBox
|
||||
if (m_pOutput)
|
||||
{
|
||||
@ -1627,6 +1603,8 @@ namespace MetaFile
|
||||
|
||||
TRect m_oBoundingBox;
|
||||
bool m_bFirstPoint;
|
||||
|
||||
TXForm m_oTransform;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -253,6 +253,8 @@ namespace MetaFile
|
||||
m_ushTextAlign = TA_TOP | TA_LEFT | TA_NOUPDATECP;
|
||||
m_ushCharSpacing = 0;
|
||||
m_oTransform.Init();
|
||||
m_oFinalTransform.Init();
|
||||
m_oFinalTransform2.Init();
|
||||
}
|
||||
CWmfDC::~CWmfDC()
|
||||
{
|
||||
@ -286,6 +288,7 @@ namespace MetaFile
|
||||
pNewDC->m_ushCharSpacing = m_ushCharSpacing;
|
||||
pNewDC->m_oTransform.Init();
|
||||
pNewDC->m_oClip = m_oClip;
|
||||
pNewDC->m_oFinalTransform.Copy(&m_oFinalTransform);
|
||||
|
||||
return pNewDC;
|
||||
}
|
||||
@ -363,53 +366,55 @@ namespace MetaFile
|
||||
|
||||
switch (m_ushMapMode)
|
||||
{
|
||||
case MM_TEXT: // 1 unit = 1pt
|
||||
{
|
||||
SetPixelWidth(1);
|
||||
SetPixelHeight(1);
|
||||
break;
|
||||
}
|
||||
case MM_LOMETRIC: // 1 unit = 0.1mm
|
||||
{
|
||||
double dPixel = 0.1 * 72 / 25.4;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_HIMETRIC: // 1 unit = 0.01mm
|
||||
{
|
||||
double dPixel = 0.01 * 72 / 25.4;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_LOENGLISH: // 1 unit = 0.01 inch
|
||||
{
|
||||
double dPixel = 0.01 * 72;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_HIENGLISH: // 1 unit = 0.001 inch
|
||||
{
|
||||
double dPixel = 0.001 * 72;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_TWIPS: // 1 unit = 1/1440 inch
|
||||
{
|
||||
SetPixelWidth(0.05);
|
||||
SetPixelHeight(0.05);
|
||||
break;
|
||||
}
|
||||
case MM_ISOTROPIC:
|
||||
case MM_ANISOTROPIC:
|
||||
{
|
||||
UpdatePixelMetrics();
|
||||
break;
|
||||
}
|
||||
case MM_TEXT: // 1 unit = 1pt
|
||||
{
|
||||
SetPixelWidth(1);
|
||||
SetPixelHeight(1);
|
||||
break;
|
||||
}
|
||||
case MM_LOMETRIC: // 1 unit = 0.1mm
|
||||
{
|
||||
double dPixel = 0.1 * 72 / 25.4;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_HIMETRIC: // 1 unit = 0.01mm
|
||||
{
|
||||
double dPixel = 0.01 * 72 / 25.4;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_LOENGLISH: // 1 unit = 0.01 inch
|
||||
{
|
||||
double dPixel = 0.01 * 72;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_HIENGLISH: // 1 unit = 0.001 inch
|
||||
{
|
||||
double dPixel = 0.001 * 72;
|
||||
SetPixelWidth(dPixel);
|
||||
SetPixelHeight(dPixel);
|
||||
break;
|
||||
}
|
||||
case MM_TWIPS: // 1 unit = 1/1440 inch
|
||||
{
|
||||
SetPixelWidth(0.05);
|
||||
SetPixelHeight(0.05);
|
||||
break;
|
||||
}
|
||||
case MM_ISOTROPIC:
|
||||
case MM_ANISOTROPIC:
|
||||
{
|
||||
UpdatePixelMetrics();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
unsigned int CWmfDC::GetMapMode()
|
||||
{
|
||||
@ -440,24 +445,28 @@ namespace MetaFile
|
||||
m_oWindow.x = shX;
|
||||
m_oWindow.y = shY;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetWindowExt(short shW, short shH)
|
||||
{
|
||||
m_oWindow.w = shW;
|
||||
m_oWindow.h = shH;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetWindowOff(short shX, short shY)
|
||||
{
|
||||
m_oWindow.x += shX;
|
||||
m_oWindow.y += shY;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetWindowScale(double dX, double dY)
|
||||
{
|
||||
m_oWindow.w = (short)(m_oWindow.w * dX);
|
||||
m_oWindow.h = (short)(m_oWindow.h * dY);
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
TWmfWindow* CWmfDC::GetViewport()
|
||||
{
|
||||
@ -468,24 +477,28 @@ namespace MetaFile
|
||||
m_oViewport.x = shX;
|
||||
m_oViewport.y = shY;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetViewportExt(short shW, short shH)
|
||||
{
|
||||
m_oViewport.w = shW;
|
||||
m_oViewport.h = shH;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetViewportOff(short shX, short shY)
|
||||
{
|
||||
m_oViewport.x += shX;
|
||||
m_oViewport.y += shY;
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
void CWmfDC::SetViewportScale(double dX, double dY)
|
||||
{
|
||||
m_oViewport.w = (short)(m_oViewport.w * dX);
|
||||
m_oViewport.h = (short)(m_oViewport.h * dY);
|
||||
UpdatePixelMetrics();
|
||||
UpdateFinalTransform();
|
||||
}
|
||||
bool CWmfDC::UpdatePixelMetrics()
|
||||
{
|
||||
@ -510,6 +523,23 @@ namespace MetaFile
|
||||
|
||||
return true;
|
||||
}
|
||||
void CWmfDC::UpdateFinalTransform()
|
||||
{
|
||||
TWmfWindow* pWindow = GetWindow();
|
||||
TWmfWindow* pViewPort = GetViewport();
|
||||
|
||||
TXForm oWindowXForm(1, 0, 0, 1, -pWindow->x, -pWindow->y);
|
||||
TXForm oViewportXForm((double)GetPixelWidth(), 0, 0, (double)GetPixelHeight(), pViewPort->x, pViewPort->y);
|
||||
|
||||
m_oFinalTransform.Init();
|
||||
m_oFinalTransform.Multiply(oWindowXForm, MWT_RIGHTMULTIPLY);
|
||||
m_oFinalTransform.Multiply(m_oTransform, MWT_RIGHTMULTIPLY);
|
||||
m_oFinalTransform.Multiply(oViewportXForm, MWT_RIGHTMULTIPLY);
|
||||
|
||||
m_oFinalTransform2.Init();
|
||||
m_oFinalTransform2.Multiply(oWindowXForm, MWT_RIGHTMULTIPLY);
|
||||
m_oFinalTransform2.Multiply(oViewportXForm, MWT_RIGHTMULTIPLY);
|
||||
}
|
||||
void CWmfDC::SetTextColor(TWmfColor& oColor)
|
||||
{
|
||||
m_oTextColor = oColor;
|
||||
@ -603,6 +633,13 @@ namespace MetaFile
|
||||
{
|
||||
return &m_oTransform;
|
||||
}
|
||||
TXForm* CWmfDC::GetFinalTransform(int iGraphicsMode)
|
||||
{
|
||||
if (GM_COMPATIBLE == iGraphicsMode)
|
||||
return &m_oFinalTransform2;
|
||||
|
||||
return &m_oFinalTransform;
|
||||
}
|
||||
unsigned int CWmfDC::GetMiterLimit()
|
||||
{
|
||||
return 0;
|
||||
@ -611,4 +648,4 @@ namespace MetaFile
|
||||
{
|
||||
return &m_oClip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,6 +129,7 @@ namespace MetaFile
|
||||
unsigned short GetCharSpacing();
|
||||
TXForm* GetTransform();
|
||||
TXForm* GetInverseTransform();
|
||||
TXForm* GetFinalTransform(int iGraphicsMode);
|
||||
unsigned int GetMiterLimit();
|
||||
CWmfClip* GetClip();
|
||||
|
||||
@ -137,6 +138,7 @@ namespace MetaFile
|
||||
void SetPixelWidth(double dW);
|
||||
void SetPixelHeight(double dH);
|
||||
bool UpdatePixelMetrics();
|
||||
void UpdateFinalTransform();
|
||||
|
||||
private:
|
||||
|
||||
@ -163,6 +165,8 @@ namespace MetaFile
|
||||
unsigned short m_ushTextAlign;
|
||||
unsigned short m_ushCharSpacing;
|
||||
TXForm m_oTransform;
|
||||
TXForm m_oFinalTransform;
|
||||
TXForm m_oFinalTransform2;
|
||||
CWmfClip m_oClip;
|
||||
};
|
||||
}
|
||||
|
||||
@ -5580,6 +5580,12 @@ namespace SVG
|
||||
|
||||
inline bool LoadFromFile (const std::wstring& strFile, Storage* model)
|
||||
{
|
||||
#if 0
|
||||
std::wstring sExt = NSFile::GetFileExtention(strFile);
|
||||
if (sExt != L"svg" && sExt != L"xml")
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (model)
|
||||
{
|
||||
m_model = model;
|
||||
@ -5613,19 +5619,26 @@ namespace SVG
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oXml;
|
||||
if (oXml.FromXmlString(sXml))
|
||||
{
|
||||
m_nLayerLevel = 0;
|
||||
if (!oXml.FromXmlString(sXml))
|
||||
return false;
|
||||
|
||||
if (Explore(oXml))
|
||||
{
|
||||
m_model->JoinXLinkReference();
|
||||
m_model->JoinClipPathLinks();
|
||||
m_model->JoinStyleLinks();
|
||||
std::wstring sNodeName = oXml.GetName();
|
||||
if (L"svg" != sNodeName &&
|
||||
L"g" != sNodeName &&
|
||||
L"xml" != sNodeName)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
m_nLayerLevel = 0;
|
||||
|
||||
if (Explore(oXml))
|
||||
{
|
||||
m_model->JoinXLinkReference();
|
||||
m_model->JoinClipPathLinks();
|
||||
m_model->JoinStyleLinks();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -5923,7 +5936,7 @@ namespace SVG
|
||||
if (!strXmlNode.empty())
|
||||
{
|
||||
if ('#' == strXmlNode.c_str()[0])
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@ -51,14 +51,26 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
class CHtmlFile_Private
|
||||
{
|
||||
public:
|
||||
bool m_bIsEpub;
|
||||
|
||||
public:
|
||||
CHtmlFile_Private()
|
||||
{
|
||||
m_bIsEpub = false;
|
||||
}
|
||||
};
|
||||
|
||||
CHtmlFile::CHtmlFile()
|
||||
{
|
||||
|
||||
m_internal = new CHtmlFile_Private();
|
||||
}
|
||||
|
||||
CHtmlFile::~CHtmlFile()
|
||||
{
|
||||
|
||||
RELEASEOBJECT(m_internal);
|
||||
}
|
||||
|
||||
static std::wstring GetSdkPath()
|
||||
@ -261,7 +273,20 @@ int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstr
|
||||
oBuilder.WriteEncodeXmlString(CorrectHtmlPath(sFilePath));
|
||||
else
|
||||
{
|
||||
std::wstring sTmpFile = NSFile::CFileBinary::CreateTempFileWithUniqueName(NSDirectory::GetTempPath(), L"HTM");
|
||||
std::wstring sTmpDir = L"";
|
||||
if (m_internal->m_bIsEpub)
|
||||
{
|
||||
// чтобы ссылки на картинки остались
|
||||
sTmpDir = NSFile::GetDirectoryName(sFilePath);
|
||||
if (!NSDirectory::Exists(sTmpDir))
|
||||
sTmpDir = NSDirectory::GetTempPath();
|
||||
}
|
||||
else
|
||||
{
|
||||
sTmpDir = NSDirectory::GetTempPath();
|
||||
}
|
||||
|
||||
std::wstring sTmpFile = NSFile::CFileBinary::CreateTempFileWithUniqueName(sTmpDir, L"HTM");
|
||||
if (NSFile::CFileBinary::Exists(sTmpFile))
|
||||
NSFile::CFileBinary::Remove(sTmpFile);
|
||||
|
||||
@ -665,7 +690,10 @@ int CHtmlFile::ConvertEpub(const std::wstring& sFolder, std::wstring& sMetaInfo,
|
||||
if (arHtmls.size() == 0)
|
||||
return 1;
|
||||
|
||||
return this->Convert(arHtmls, sDstfolder, sPathInternal);
|
||||
m_internal->m_bIsEpub = true;
|
||||
int nErr = this->Convert(arHtmls, sDstfolder, sPathInternal);
|
||||
m_internal->m_bIsEpub = false;
|
||||
return nErr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -42,9 +42,11 @@
|
||||
#define HTMLFILE_DECL_EXPORT Q_DECL_EXPORT
|
||||
#endif
|
||||
|
||||
class CHtmlFile_Private;
|
||||
class HTMLFILE_DECL_EXPORT CHtmlFile
|
||||
{
|
||||
private:
|
||||
CHtmlFile_Private* m_internal;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -828,6 +828,12 @@ namespace NSHtmlRenderer
|
||||
}
|
||||
HRESULT CASCSVGWriter::GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF)
|
||||
{
|
||||
*pdA = m_pTransform->sx();
|
||||
*pdB = m_pTransform->shy();
|
||||
*pdC = m_pTransform->shx();
|
||||
*pdD = m_pTransform->sy();
|
||||
*pdE = m_pTransform->tx();
|
||||
*pdF = m_pTransform->ty();
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CASCSVGWriter::ResetTransform(void)
|
||||
|
||||
@ -645,15 +645,18 @@ namespace PdfWriter
|
||||
}
|
||||
delete[] pA;
|
||||
|
||||
if (!m_pTransparencyGroup)
|
||||
{
|
||||
m_pTransparencyGroup = new CDictObject();
|
||||
m_pTransparencyGroup->Add("Type", "Group");
|
||||
m_pTransparencyGroup->Add("S", "Transparency");
|
||||
m_pTransparencyGroup->Add("CS", "DeviceRGB");
|
||||
}
|
||||
if (!IsPDFA())
|
||||
{
|
||||
if (!m_pTransparencyGroup)
|
||||
{
|
||||
m_pTransparencyGroup = new CDictObject();
|
||||
m_pTransparencyGroup->Add("Type", "Group");
|
||||
m_pTransparencyGroup->Add("S", "Transparency");
|
||||
m_pTransparencyGroup->Add("CS", "DeviceRGB");
|
||||
}
|
||||
|
||||
pPage->Add("Group", m_pTransparencyGroup);
|
||||
pPage->Add("Group", m_pTransparencyGroup);
|
||||
}
|
||||
double dWidth = pPage->GetWidth();
|
||||
double dHeight = pPage->GetHeight();
|
||||
|
||||
@ -662,7 +665,8 @@ namespace PdfWriter
|
||||
pXObject->Add("Type", "XObject");
|
||||
pXObject->Add("Subtype", "Form");
|
||||
pXObject->Add("BBox", CArrayObject::CreateBox(0, 0, dWidth, dHeight));
|
||||
pXObject->Add("Group", m_pTransparencyGroup);
|
||||
if (m_pTransparencyGroup)
|
||||
pXObject->Add("Group", m_pTransparencyGroup);
|
||||
CDictObject* pResources = new CDictObject();
|
||||
pXObject->Add("Resources", pResources);
|
||||
CDictObject* pResShadings = new CDictObject();
|
||||
|
||||
Reference in New Issue
Block a user