mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #63735
This commit is contained in:
@ -3254,11 +3254,20 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
|
|||||||
|
|
||||||
else if (oox_anchor->m_oPositionV->m_oPosOffset.IsInit())
|
else if (oox_anchor->m_oPositionV->m_oPosOffset.IsInit())
|
||||||
{
|
{
|
||||||
|
// relfromvBottomMargin = 0,
|
||||||
|
// relfromvInsideMargin = 1,
|
||||||
|
// relfromvLine = 2,
|
||||||
|
// relfromvMargin = 3,
|
||||||
|
// relfromvOutsideMargin = 4,
|
||||||
|
// relfromvPage = 5,
|
||||||
|
// relfromvParagraph = 6,
|
||||||
|
// relfromvTopMargin = 7
|
||||||
switch (vert_rel)
|
switch (vert_rel)
|
||||||
{
|
{
|
||||||
|
case 2: anchor_type_x = anchor_type::Char; break;
|
||||||
|
case 5: anchor_type_y = anchor_type::Page; break;
|
||||||
case 3:
|
case 3:
|
||||||
case 6: anchor_type_y = anchor_type::Paragraph; break;
|
case 6: anchor_type_y = anchor_type::Paragraph; break;
|
||||||
case 5: anchor_type_y = anchor_type::Page; break;
|
|
||||||
}
|
}
|
||||||
odt_context->drawing_context()->set_vertical_pos(oox_anchor->m_oPositionV->m_oPosOffset->ToPoints());
|
odt_context->drawing_context()->set_vertical_pos(oox_anchor->m_oPositionV->m_oPosOffset->ToPoints());
|
||||||
}
|
}
|
||||||
@ -3276,9 +3285,19 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
|
|||||||
else if (oox_anchor->m_oPositionH->m_oPosOffset.IsInit())
|
else if (oox_anchor->m_oPositionH->m_oPosOffset.IsInit())
|
||||||
{
|
{
|
||||||
odt_context->drawing_context()->set_horizontal_pos(oox_anchor->m_oPositionH->m_oPosOffset->ToPoints());
|
odt_context->drawing_context()->set_horizontal_pos(oox_anchor->m_oPositionH->m_oPosOffset->ToPoints());
|
||||||
|
// relfromhCharacter = 0,
|
||||||
|
// relfromhColumn = 1,
|
||||||
|
// relfromhInsideMargin = 2,
|
||||||
|
// relfromhLeftMargin = 3,
|
||||||
|
// relfromhMargin = 4,
|
||||||
|
// relfromhOutsideMargin = 5,
|
||||||
|
// relfromhPage = 6,
|
||||||
|
// relfromhRightMargin = 7
|
||||||
switch (horiz_rel)
|
switch (horiz_rel)
|
||||||
{
|
{
|
||||||
case 1:
|
case 0: anchor_type_x = anchor_type::Char; break;
|
||||||
|
case 1: anchor_type_x = anchor_type::Frame; break;
|
||||||
|
case 4:
|
||||||
case 2: anchor_type_x = anchor_type::Paragraph; break;
|
case 2: anchor_type_x = anchor_type::Paragraph; break;
|
||||||
case 6: anchor_type_x = anchor_type::Page; break;
|
case 6: anchor_type_x = anchor_type::Page; break;
|
||||||
}
|
}
|
||||||
@ -3287,8 +3306,13 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
|
|||||||
odt_context->drawing_context()->set_horizontal_pos(SimpleTypes::alignhLeft);
|
odt_context->drawing_context()->set_horizontal_pos(SimpleTypes::alignhLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (anchor_type_x && anchor_type_y) && (*anchor_type_x == *anchor_type_y))
|
if (anchor_type_x && anchor_type_y)
|
||||||
|
{
|
||||||
|
if (*anchor_type_x == *anchor_type_y)
|
||||||
odt_context->drawing_context()->set_anchor(*anchor_type_x);
|
odt_context->drawing_context()->set_anchor(*anchor_type_x);
|
||||||
|
else if (*anchor_type_x == anchor_type::Frame && *anchor_type_y == anchor_type::Paragraph)
|
||||||
|
odt_context->drawing_context()->set_anchor(anchor_type::Char);
|
||||||
|
}
|
||||||
|
|
||||||
bool wrap_set = false;
|
bool wrap_set = false;
|
||||||
if (oox_anchor->m_oWrapSquare.IsInit())
|
if (oox_anchor->m_oWrapSquare.IsInit())
|
||||||
|
|||||||
@ -550,19 +550,10 @@ void odf_drawing_context::set_anchor_drawing()
|
|||||||
if (!impl_->current_level_.back().bDrawElement) return;
|
if (!impl_->current_level_.back().bDrawElement) return;
|
||||||
if (!impl_->current_level_.back().graphic_properties) return;
|
if (!impl_->current_level_.back().graphic_properties) return;
|
||||||
|
|
||||||
impl_->current_level_.back().graphic_properties->common_vertical_pos_attlist_.style_vertical_pos_ = impl_->anchor_settings_.style_vertical_pos_;
|
set_anchor_drawing(impl_->current_level_.back().graphic_properties);
|
||||||
impl_->current_level_.back().graphic_properties->common_horizontal_pos_attlist_.style_horizontal_pos_ = impl_->anchor_settings_.style_horizontal_pos_;
|
}
|
||||||
|
void odf_drawing_context::set_anchor_drawing(graphic_format_properties *graphic_properties)
|
||||||
impl_->current_level_.back().graphic_properties->common_vertical_rel_attlist_.style_vertical_rel_ = impl_->anchor_settings_.style_vertical_rel_;
|
{
|
||||||
impl_->current_level_.back().graphic_properties->common_horizontal_rel_attlist_.style_horizontal_rel_ = impl_->anchor_settings_.style_horizontal_rel_;
|
|
||||||
|
|
||||||
impl_->current_level_.back().graphic_properties->common_horizontal_margin_attlist_.fo_margin_left_ = impl_->anchor_settings_.fo_margin_left_;
|
|
||||||
impl_->current_level_.back().graphic_properties->common_vertical_margin_attlist_.fo_margin_top_ = impl_->anchor_settings_.fo_margin_top_;
|
|
||||||
impl_->current_level_.back().graphic_properties->common_horizontal_margin_attlist_.fo_margin_right_ = impl_->anchor_settings_.fo_margin_right_;
|
|
||||||
impl_->current_level_.back().graphic_properties->common_vertical_margin_attlist_.fo_margin_bottom_ = impl_->anchor_settings_.fo_margin_bottom_;
|
|
||||||
|
|
||||||
impl_->current_level_.back().graphic_properties->style_run_through_ = impl_->anchor_settings_.run_through_;
|
|
||||||
|
|
||||||
int index = impl_->current_drawing_state_.index_base < 0 ? 0 : impl_->current_drawing_state_.index_base;
|
int index = impl_->current_drawing_state_.index_base < 0 ? 0 : impl_->current_drawing_state_.index_base;
|
||||||
draw_base* draw = impl_->current_drawing_state_.elements_.empty() ? NULL : dynamic_cast<draw_base*>(impl_->current_drawing_state_.elements_[index].elm.get());
|
draw_base* draw = impl_->current_drawing_state_.elements_.empty() ? NULL : dynamic_cast<draw_base*>(impl_->current_drawing_state_.elements_[index].elm.get());
|
||||||
|
|
||||||
@ -570,13 +561,28 @@ void odf_drawing_context::set_anchor_drawing()
|
|||||||
{
|
{
|
||||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_text_anchor_attlist_.type_ = impl_->anchor_settings_.anchor_type_;
|
draw->common_draw_attlists_.shape_with_text_and_styles_.common_text_anchor_attlist_.type_ = impl_->anchor_settings_.anchor_type_;
|
||||||
}
|
}
|
||||||
else // libra падает
|
else if (graphic_properties) // libra падает
|
||||||
{
|
{
|
||||||
impl_->current_level_.back().graphic_properties->style_wrap_ = impl_->anchor_settings_.style_wrap_;
|
graphic_properties->style_wrap_ = impl_->anchor_settings_.style_wrap_;
|
||||||
impl_->current_level_.back().graphic_properties->style_wrap_contour_ = impl_->anchor_settings_.style_wrap_contour_;
|
graphic_properties->style_wrap_contour_ = impl_->anchor_settings_.style_wrap_contour_;
|
||||||
impl_->current_level_.back().graphic_properties->style_wrap_contour_mode_ = impl_->anchor_settings_.style_wrap_contour_mode_;
|
graphic_properties->style_wrap_contour_mode_ = impl_->anchor_settings_.style_wrap_contour_mode_;
|
||||||
impl_->current_level_.back().graphic_properties->style_number_wrapped_paragraphs_ = impl_->anchor_settings_.style_number_wrapped_paragraphs_;
|
graphic_properties->style_number_wrapped_paragraphs_ = impl_->anchor_settings_.style_number_wrapped_paragraphs_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!graphic_properties) return;
|
||||||
|
|
||||||
|
graphic_properties->common_vertical_pos_attlist_.style_vertical_pos_ = impl_->anchor_settings_.style_vertical_pos_;
|
||||||
|
graphic_properties->common_horizontal_pos_attlist_.style_horizontal_pos_ = impl_->anchor_settings_.style_horizontal_pos_;
|
||||||
|
|
||||||
|
graphic_properties->common_vertical_rel_attlist_.style_vertical_rel_ = impl_->anchor_settings_.style_vertical_rel_;
|
||||||
|
graphic_properties->common_horizontal_rel_attlist_.style_horizontal_rel_ = impl_->anchor_settings_.style_horizontal_rel_;
|
||||||
|
|
||||||
|
graphic_properties->common_horizontal_margin_attlist_.fo_margin_left_ = impl_->anchor_settings_.fo_margin_left_;
|
||||||
|
graphic_properties->common_vertical_margin_attlist_.fo_margin_top_ = impl_->anchor_settings_.fo_margin_top_;
|
||||||
|
graphic_properties->common_horizontal_margin_attlist_.fo_margin_right_ = impl_->anchor_settings_.fo_margin_right_;
|
||||||
|
graphic_properties->common_vertical_margin_attlist_.fo_margin_bottom_ = impl_->anchor_settings_.fo_margin_bottom_;
|
||||||
|
|
||||||
|
graphic_properties->style_run_through_ = impl_->anchor_settings_.run_through_;
|
||||||
}
|
}
|
||||||
void odf_drawing_context::end_drawing()
|
void odf_drawing_context::end_drawing()
|
||||||
{
|
{
|
||||||
@ -911,7 +917,6 @@ bool odf_drawing_context::change_text_box_2_wordart()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
|
|
||||||
odf_element_state state = impl_->current_drawing_state_.elements_[sz_state - 2];
|
odf_element_state state = impl_->current_drawing_state_.elements_[sz_state - 2];
|
||||||
state.elm = draw_elm;
|
state.elm = draw_elm;
|
||||||
|
|
||||||
@ -929,6 +934,10 @@ bool odf_drawing_context::change_text_box_2_wordart()
|
|||||||
impl_->current_drawing_state_.oox_shape_preset_ = 2031;//plain text
|
impl_->current_drawing_state_.oox_shape_preset_ = 2031;//plain text
|
||||||
|
|
||||||
if (sz == 2) impl_->root_element_ = draw_elm;
|
if (sz == 2) impl_->root_element_ = draw_elm;
|
||||||
|
|
||||||
|
set_anchor_drawing(impl_->current_graphic_properties);
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
draw_rect* s = dynamic_cast<draw_rect*>(impl_->current_drawing_state_.elements_.back().elm.get());
|
draw_rect* s = dynamic_cast<draw_rect*>(impl_->current_drawing_state_.elements_.back().elm.get());
|
||||||
@ -974,9 +983,10 @@ bool odf_drawing_context::change_text_box_2_wordart()
|
|||||||
impl_->current_drawing_state_.oox_shape_preset_ = 2031;//plain text
|
impl_->current_drawing_state_.oox_shape_preset_ = 2031;//plain text
|
||||||
|
|
||||||
if (sz == 1) impl_->root_element_ = draw_elm;
|
if (sz == 1) impl_->root_element_ = draw_elm;
|
||||||
|
|
||||||
|
set_anchor_drawing(impl_->current_graphic_properties);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1957,7 +1967,7 @@ void odf_drawing_context::set_horizontal_rel(int from)
|
|||||||
switch(from)
|
switch(from)
|
||||||
{
|
{
|
||||||
case 0: type = horizontal_rel::Char; break; // relfromhCharacter = 0,
|
case 0: type = horizontal_rel::Char; break; // relfromhCharacter = 0,
|
||||||
case 1: type = horizontal_rel::Paragraph; break; // relfromhColumn = 1,
|
case 1: type = horizontal_rel::Char; break; // relfromhColumn = 1,
|
||||||
case 2: type = horizontal_rel::Paragraph; break; // relfromhInsideMargin = 2, ???
|
case 2: type = horizontal_rel::Paragraph; break; // relfromhInsideMargin = 2, ???
|
||||||
case 3: type = horizontal_rel::PageStartMargin; break; // relfromhLeftMargin = 3,
|
case 3: type = horizontal_rel::PageStartMargin; break; // relfromhLeftMargin = 3,
|
||||||
case 4: type = horizontal_rel::PageContent; break; // relfromhMargin = 4, ??? //ParagraphStartMargin
|
case 4: type = horizontal_rel::PageContent; break; // relfromhMargin = 4, ??? //ParagraphStartMargin
|
||||||
|
|||||||
@ -116,6 +116,7 @@ public:
|
|||||||
void end_drawing_background(odf_types::common_draw_fill_attlist & common_draw_attlist);
|
void end_drawing_background(odf_types::common_draw_fill_attlist & common_draw_attlist);
|
||||||
|
|
||||||
void set_anchor_drawing();
|
void set_anchor_drawing();
|
||||||
|
void set_anchor_drawing(graphic_format_properties* graphic_properties);
|
||||||
|
|
||||||
size_t get_group_level();
|
size_t get_group_level();
|
||||||
void start_group();
|
void start_group();
|
||||||
|
|||||||
@ -67,6 +67,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaInitialCreator;
|
static const ElementType type = typeOfficeMetaInitialCreator;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_initial_creator);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_initial_creator);
|
||||||
@ -78,6 +82,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaKeyword;
|
static const ElementType type = typeOfficeMetaKeyword;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_keyword);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_keyword);
|
||||||
@ -89,6 +97,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaCreationDate;
|
static const ElementType type = typeOfficeMetaCreationDate;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_creation_date);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_creation_date);
|
||||||
@ -100,6 +112,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaGenerator;
|
static const ElementType type = typeOfficeMetaGenerator;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_generator);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_generator);
|
||||||
@ -111,6 +127,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaTemplate;
|
static const ElementType type = typeOfficeMetaTemplate;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_template);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_template);
|
||||||
@ -122,6 +142,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeOfficeMetaEditingCycles;
|
static const ElementType type = typeOfficeMetaEditingCycles;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(meta_editing_cycles);
|
CP_REGISTER_OFFICE_ELEMENT2(meta_editing_cycles);
|
||||||
@ -134,6 +158,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcCreator;
|
static const ElementType type = typeDcCreator;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_creator);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_creator);
|
||||||
@ -145,6 +173,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcDescription;
|
static const ElementType type = typeDcDescription;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_description);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_description);
|
||||||
@ -156,6 +188,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcLanguage;
|
static const ElementType type = typeDcLanguage;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_language);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_language);
|
||||||
@ -167,6 +203,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcDate;
|
static const ElementType type = typeDcDate;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_date);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_date);
|
||||||
@ -178,6 +218,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcTitle;
|
static const ElementType type = typeDcTitle;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_title);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_title);
|
||||||
@ -189,6 +233,10 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
static const ElementType type = typeDcSubject;
|
static const ElementType type = typeDcSubject;
|
||||||
|
|
||||||
|
virtual ElementType get_type() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(dc_subject);
|
CP_REGISTER_OFFICE_ELEMENT2(dc_subject);
|
||||||
|
|||||||
@ -97,12 +97,10 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeOfficeChangeInfo;
|
static const ElementType type = typeOfficeChangeInfo;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element( const office_element_ptr & child_element);
|
virtual void add_child_element( const office_element_ptr & child_element);
|
||||||
|
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
office_element_ptr dc_date_;
|
office_element_ptr dc_date_;
|
||||||
office_element_ptr dc_creator_;
|
office_element_ptr dc_creator_;
|
||||||
|
|||||||
@ -135,9 +135,7 @@ public:
|
|||||||
|
|
||||||
office_element_ptr text_list_header_;
|
office_element_ptr text_list_header_;
|
||||||
office_element_ptr_array text_list_items_;
|
office_element_ptr_array text_list_items_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_list);
|
CP_REGISTER_OFFICE_ELEMENT2(text_list);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
@ -149,13 +147,11 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextSoftPageBreak;
|
static const ElementType type = typeTextSoftPageBreak;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_soft_page_break);
|
CP_REGISTER_OFFICE_ELEMENT2(text_soft_page_break);
|
||||||
|
|
||||||
class text_section_attr
|
class text_section_attr
|
||||||
@ -190,9 +186,7 @@ public:
|
|||||||
|
|
||||||
office_element_ptr text_section_source_;
|
office_element_ptr text_section_source_;
|
||||||
office_element_ptr_array content_;
|
office_element_ptr_array content_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_section);
|
CP_REGISTER_OFFICE_ELEMENT2(text_section);
|
||||||
|
|
||||||
class text_section_source_attr
|
class text_section_source_attr
|
||||||
@ -267,7 +261,6 @@ public:
|
|||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
|
|
||||||
office_element_ptr_array index_content_main_;
|
office_element_ptr_array index_content_main_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_index_body);
|
CP_REGISTER_OFFICE_ELEMENT2(text_index_body);
|
||||||
@ -289,7 +282,6 @@ public:
|
|||||||
|
|
||||||
text_section_attr text_section_attr_;
|
text_section_attr text_section_attr_;
|
||||||
office_element_ptr_array index_content_main_;
|
office_element_ptr_array index_content_main_;
|
||||||
|
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_index_title);
|
CP_REGISTER_OFFICE_ELEMENT2(text_index_title);
|
||||||
|
|
||||||
@ -302,8 +294,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextUnknownChange;
|
static const ElementType type = typeTextUnknownChange;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -325,7 +315,6 @@ public:
|
|||||||
|
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_insertion);
|
CP_REGISTER_OFFICE_ELEMENT2(text_insertion);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
@ -339,7 +328,6 @@ public:
|
|||||||
|
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
};
|
};
|
||||||
|
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_deletion);
|
CP_REGISTER_OFFICE_ELEMENT2(text_deletion);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
@ -354,7 +342,6 @@ public:
|
|||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
|
|
||||||
_CP_OPT(std::wstring) text_style_name_; //не по снецификации ... но КАК сохранить то что было изменено в формате?????
|
_CP_OPT(std::wstring) text_style_name_; //не по снецификации ... но КАК сохранить то что было изменено в формате?????
|
||||||
|
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_format_change);
|
CP_REGISTER_OFFICE_ELEMENT2(text_format_change);
|
||||||
|
|
||||||
@ -367,7 +354,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextTrackedChanges;
|
static const ElementType type = typeTextTrackedChanges;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -387,7 +373,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextChangedRegion;
|
static const ElementType type = typeTextChangedRegion;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -405,11 +390,8 @@ public:
|
|||||||
static const wchar_t * ns;
|
static const wchar_t * ns;
|
||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
|
|
||||||
|
|
||||||
static const ElementType type = typeTextChange;
|
static const ElementType type = typeTextChange;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element) {}
|
virtual void add_child_element ( const office_element_ptr & child_element) {}
|
||||||
|
|
||||||
@ -467,8 +449,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextTableIndex;
|
static const ElementType type = typeTextTableIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -491,8 +471,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIllustrationIndex;
|
static const ElementType type = typeTextIllustrationIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -515,8 +493,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextAlphabeticalIndex;
|
static const ElementType type = typeTextAlphabeticalIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -539,8 +515,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextUserIndex;
|
static const ElementType type = typeTextUserIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -563,8 +537,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextBibliography;
|
static const ElementType type = typeTextBibliography;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -605,7 +577,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextCommonEntryTemplate;
|
static const ElementType type = typeTextCommonEntryTemplate;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -626,7 +597,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextBibliographyEntryTemplate;
|
static const ElementType type = typeTextBibliographyEntryTemplate;
|
||||||
|
|
||||||
|
|
||||||
virtual void serialize(std::wostream & _Wostream);
|
virtual void serialize(std::wostream & _Wostream);
|
||||||
|
|
||||||
_CP_OPT(std::wstring) bibliography_type_;//article, book, email, ...
|
_CP_OPT(std::wstring) bibliography_type_;//article, book, email, ...
|
||||||
@ -641,7 +611,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexTitleTemplate;
|
static const ElementType type = typeTextIndexTitleTemplate;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -662,7 +631,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextSequenceDecl;
|
static const ElementType type = typeTextSequenceDecl;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -684,7 +652,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextSequenceDecls;
|
static const ElementType type = typeTextSequenceDecls;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -704,7 +671,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextTableOfContentSource;
|
static const ElementType type = typeTextTableOfContentSource;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -733,7 +699,6 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
|
|
||||||
static const ElementType type = typeTextTableOfContentEntryTemplate;
|
static const ElementType type = typeTextTableOfContentEntryTemplate;
|
||||||
|
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_table_of_content_entry_template);
|
CP_REGISTER_OFFICE_ELEMENT2(text_table_of_content_entry_template);
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
@ -768,7 +733,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryChapter;
|
static const ElementType type = typeTextIndexEntryChapter;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -786,7 +750,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryLinkEnd;
|
static const ElementType type = typeTextIndexEntryLinkEnd;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -804,7 +767,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryLinkStart;
|
static const ElementType type = typeTextIndexEntryLinkStart;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -822,7 +784,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryPageNumber;
|
static const ElementType type = typeTextIndexEntryPageNumber;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -840,7 +801,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntrySpan;
|
static const ElementType type = typeTextIndexEntrySpan;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -858,7 +818,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryTabStop;
|
static const ElementType type = typeTextIndexEntryTabStop;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -876,7 +835,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIndexEntryText;
|
static const ElementType type = typeTextIndexEntryText;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name){}
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element){}
|
virtual void add_child_element ( const office_element_ptr & child_element){}
|
||||||
|
|
||||||
@ -894,7 +852,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextIllustrationIndexSource;
|
static const ElementType type = typeTextIllustrationIndexSource;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -921,7 +878,6 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
|
|
||||||
static const ElementType type = typeTextIllustrationIndexEntryTemplate;
|
static const ElementType type = typeTextIllustrationIndexEntryTemplate;
|
||||||
|
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_illustration_index_entry_template);
|
CP_REGISTER_OFFICE_ELEMENT2(text_illustration_index_entry_template);
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
@ -935,7 +891,6 @@ public:
|
|||||||
|
|
||||||
static const ElementType type = typeTextUserIndexSource;
|
static const ElementType type = typeTextUserIndexSource;
|
||||||
|
|
||||||
|
|
||||||
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
virtual void create_child_element (const std::wstring & Ns, const std::wstring & Name);
|
||||||
virtual void add_child_element ( const office_element_ptr & child_element);
|
virtual void add_child_element ( const office_element_ptr & child_element);
|
||||||
|
|
||||||
@ -969,7 +924,6 @@ public:
|
|||||||
static const wchar_t * name;
|
static const wchar_t * name;
|
||||||
|
|
||||||
static const ElementType type = typeTextUserIndexEntryTemplate;
|
static const ElementType type = typeTextUserIndexEntryTemplate;
|
||||||
|
|
||||||
};
|
};
|
||||||
CP_REGISTER_OFFICE_ELEMENT2(text_user_index_entry_template);
|
CP_REGISTER_OFFICE_ELEMENT2(text_user_index_entry_template);
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user