mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 06:22:44 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62950 954022d7-b5bf-4e40-9824-e11837661b57
214 lines
6.9 KiB
C++
214 lines
6.9 KiB
C++
#pragma once
|
|
|
|
#include "draw_base.h"
|
|
|
|
namespace cpdoccore {
|
|
namespace odf_writer {
|
|
|
|
/// draw-image-attlist
|
|
class draw_image_attlist
|
|
{
|
|
public:
|
|
_CP_OPT(std::wstring) draw_filter_name_;
|
|
|
|
void serialize(CP_ATTR_NODE);
|
|
};
|
|
//draw-frame-attlist
|
|
class draw_frame_attlist
|
|
{
|
|
public:
|
|
_CP_OPT(std::wstring) draw_copy_of_;
|
|
|
|
void serialize(CP_ATTR_NODE);
|
|
};
|
|
//draw-chart-attlist
|
|
class draw_chart_attlist
|
|
{
|
|
public:
|
|
|
|
//_CP_OPT(std::wstring) draw_filter_name_;
|
|
void serialize(CP_ATTR_NODE);
|
|
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
class draw_image : public office_element_impl<draw_image>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawImage;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
draw_image_attlist draw_image_attlist_;
|
|
odf_types::common_xlink_attlist common_xlink_attlist_;
|
|
|
|
office_element_ptr office_binary_data_;
|
|
office_element_ptr_array content_;
|
|
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_image)
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//îáúåêò ðèñîâàíèÿ íå íóæåí .. íóæíî òîëüêî ìåñòî äëÿ ôðýéìà - ñàì ÷àðò â äðóãîì ìåñòå
|
|
class draw_chart : public office_element_impl<draw_chart>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawChart;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
draw_chart_attlist draw_chart_attlist_;
|
|
odf_types::common_xlink_attlist common_xlink_attlist_;
|
|
|
|
//office_element_ptr title_;
|
|
office_element_ptr_array content_;
|
|
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_chart)
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
class draw_frame : public draw_base
|
|
{ //äëÿ draw-text-box, draw-image, draw-object, draw-object-ole, draw-applet, draw-floating-frame, draw-plugin
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawFrame;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
int idx_in_owner ;
|
|
|
|
odf_types::presentation_shape_attlist presentation_shape_attlist_;
|
|
draw_frame_attlist draw_frame_attlist_;
|
|
|
|
office_element_ptr office_event_listeners_; // â content ïåðåíåñòè íåëüçÿ - èíà÷å ñîáûòè áóäåò äîáàâëÿòüñÿ íå ê ýòîìó îáúåêòó à ñëåäóþùåìó
|
|
office_element_ptr draw_glue_point_;
|
|
office_element_ptr draw_image_map_;
|
|
//office_element_ptr draw_chart_map_;
|
|
|
|
office_element_ptr draw_contour_; // draw-contour-polygon or draw-contour-path
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_frame)
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
class draw_g : public office_element_impl<draw_g>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawG;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
odf_types::union_common_draw_attlists common_draw_attlists_;
|
|
|
|
office_element_ptr_array content_;
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_g)
|
|
// draw-text-box-attlist
|
|
class draw_text_box_attlist
|
|
{
|
|
public:
|
|
_CP_OPT(std::wstring) draw_chain_next_name_;
|
|
_CP_OPT(odf_types::length) draw_corner_radius_;
|
|
_CP_OPT(odf_types::length_or_percent) fo_min_width_;
|
|
_CP_OPT(odf_types::length_or_percent) fo_min_height_;
|
|
_CP_OPT(odf_types::length_or_percent) fo_max_width_;
|
|
_CP_OPT(odf_types::length_or_percent) fo_max_height_;
|
|
|
|
void serialize(CP_ATTR_NODE);
|
|
};
|
|
|
|
|
|
class draw_text_box : public office_element_impl<draw_text_box>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawTextBox;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
draw_text_box_attlist draw_text_box_attlist_;
|
|
office_element_ptr_array content_;
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_text_box)
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// draw:object
|
|
class draw_object : public office_element_impl<draw_object>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawObject;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
odf_types::common_xlink_attlist common_xlink_attlist_;
|
|
//draw:notify-on-update-of-ranges
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_object)
|
|
|
|
// draw:object-ole
|
|
class draw_object_ole : public office_element_impl<draw_object>
|
|
{
|
|
public:
|
|
static const wchar_t * ns;
|
|
static const wchar_t * name;
|
|
static const xml::NodeType xml_type = xml::typeElement;
|
|
static const ElementType type = typeDrawObjectOle;
|
|
CPDOCCORE_DEFINE_VISITABLE()
|
|
|
|
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
|
virtual void add_child_element( const office_element_ptr & child_element);
|
|
|
|
virtual void serialize(std::wostream & _Wostream);
|
|
|
|
odf_types::common_xlink_attlist common_xlink_attlist_;
|
|
_CP_OPT(std::wstring) draw_class_id_;
|
|
};
|
|
|
|
CP_REGISTER_OFFICE_ELEMENT2(draw_object_ole)
|
|
|
|
}
|
|
}
|