Commit d43a3f37 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54737 954022d7-b5bf-4e40-9824-e11837661b57
parent 28de4150
...@@ -942,6 +942,22 @@ ...@@ -942,6 +942,22 @@
<Filter <Filter
Name="styles" Name="styles"
> >
<File
RelativePath=".\OdfFormat\header_footer.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\header_footer.h"
>
</File>
<File
RelativePath=".\OdfFormat\style_map.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\style_map.h"
>
</File>
<File <File
RelativePath=".\OdfFormat\style_table_properties.cpp" RelativePath=".\OdfFormat\style_table_properties.cpp"
> >
...@@ -950,6 +966,22 @@ ...@@ -950,6 +966,22 @@
RelativePath=".\OdfFormat\style_table_properties.h" RelativePath=".\OdfFormat\style_table_properties.h"
> >
</File> </File>
<File
RelativePath=".\OdfFormat\styles.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\styles.h"
>
</File>
<File
RelativePath=".\OdfFormat\styles_list.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\styles_list.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="odf text" Name="odf text"
......
#include "precompiled_cpodf.h"
#include "header_footer.h"
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/serialize.h>
namespace cpdoccore {
namespace odf {
/// style-header-footer-properties
const wchar_t * style_header_footer_properties::ns = L"style";
const wchar_t * style_header_footer_properties::name = L"header-footer-properties";
void style_header_footer_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
CP_CREATE_ELEMENT(style_background_image_);
}
else
{
not_applicable_element(L"style-header-footer-properties", Ns, Name);
}
}
void header_footer_content::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
{
CP_CREATE_ELEMENT_SIMPLE(content_);
}
}
}
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "common_attlists.h"
namespace cpdoccore {
namespace odf {
/// style:header-footer-properties-attlist
class style_header_footer_properties_attlist
{
public:
_CP_OPT(length) svg_height_;
_CP_OPT(length) fo_min_height_;
common_horizontal_margin_attlist common_horizontal_margin_attlist_;
common_vertical_margin_attlist common_vertical_margin_attlist_;
common_margin_attlist common_margin_attlist_;
common_border_attlist common_border_attlist_;
common_border_line_width_attlist common_border_line_width_attlist_;
common_padding_attlist common_padding_attlist_;
common_background_color_attlist common_background_color_attlist_;
common_shadow_attlist common_shadow_attlist_;
_CP_OPT(bool) style_dynamic_spacing_;
};
/// style:header-footer-properties
class style_header_footer_properties : public office_element_impl<style_header_footer_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleHeaderFooterProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void serialize(std::wostream & strm){}
style_header_footer_properties_attlist style_header_footer_properties_attlist_;
office_element_ptr style_background_image_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_header_footer_properties);
/// common:style-header-footer-attlist
class common_style_header_footer_attlist
{
public:
bool style_display_; // default true
};
/// header:footer-content
class header_footer_content
{
public:
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
office_element_ptr_array content_;
};
}
}
#include "precompiled_cpodf.h"
#include "style_map.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
namespace cpdoccore {
namespace odf {
// style:map
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_map::ns = L"style";
const wchar_t * style_map::name = L"map";
void style_map::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
}
}
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "style_ref.h"
namespace cpdoccore {
namespace odf {
/// \brief style:map
class style_map : public office_element_impl<style_map>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleMap;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void serialize(std::wostream & strm){}
std::wstring style_condition_;
style_ref style_name_;
std::wstring style_base_cell_address_;
style_ref style_apply_style_name_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_map);
}
}
This diff is collapsed.
This diff is collapsed.
#include "precompiled_cpodf.h"
#include "styles_list.h"
#include <cpdoccore/xml/serialize.h>
//#include "style_text_properties.h"
#include <cpdoccore/xml/simple_xml_writer.h>
namespace cpdoccore {
namespace odf {
using xml::xml_char_wc;
// text:list-style
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * text_list_style::ns = L"text";
const wchar_t * text_list_style::name = L"list-style";
void text_list_style::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"text" == Ns && L"list-level-style-number" == Name)
CP_CREATE_ELEMENT(text_list_style_content_);
else if (L"text" == Ns && L"list-level-style-bullet" == Name)
CP_CREATE_ELEMENT(text_list_style_content_);
else
{
CP_NOT_APPLICABLE_ELM();
}
}
// text:list-level-style-number
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * text_list_level_style_number::ns = L"text";
const wchar_t * text_list_level_style_number::name = L"list-level-style-number";
void text_list_level_style_number::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_);
else if (L"style" == Ns && L"text-properties" == Name)
CP_CREATE_ELEMENT(style_text_properties_);
else
{
CP_NOT_APPLICABLE_ELM();
}
}
// style:list-level-properties
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_list_level_properties::ns = L"style";
const wchar_t * style_list_level_properties::name = L"list-level-properties";
void style_list_level_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if CP_CHECK_NAME(L"style", L"list-level-label-alignment")
{
CP_CREATE_ELEMENT(style_list_level_label_alignment_);
}
else
{
CP_NOT_APPLICABLE_ELM();
}
}
// style:list-level-label-alignment
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_list_level_label_alignment::ns = L"style";
const wchar_t * style_list_level_label_alignment::name = L"list-level-label-alignment";
void style_list_level_label_alignment::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
// text:list-level-style-bullet
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * text_list_level_style_bullet::ns = L"text";
const wchar_t * text_list_level_style_bullet::name = L"list-level-style-bullet";
void text_list_level_style_bullet::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_);
else if (L"style" == Ns && L"text-properties" == Name)
CP_CREATE_ELEMENT(style_text_properties_);
else
{
CP_NOT_APPLICABLE_ELM();
}
}
}
}
#pragma once
#include <iosfwd>
#include <string>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "common_attlists.h"
namespace cpdoccore {
namespace odf {
class text_list_style_attr
{
public:
const std::wstring & get_style_name() { return style_name_; }
std::wstring style_name_;
optional<std::wstring>::Type style_display_name_;
optional<bool>::Type text_consecutive_numbering_;
};
/// \class text_list_style
/// text:list-style (text-list-style)
class text_list_style : public office_element_impl<text_list_style>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextListStyle;
CPDOCCORE_DEFINE_VISITABLE();
const std::wstring & get_style_name() { return text_list_style_attr_.get_style_name(); }
office_element_ptr_array & get_content() { return text_list_style_content_; }
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void serialize(std::wostream & strm){}
text_list_style_attr text_list_style_attr_;
office_element_ptr_array text_list_style_content_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_list_style);
/// \class text_list_level_style_number_attr
/// text-list-level-style-number-attr
class text_list_level_style_number_attr
{
public:
text_list_level_style_number_attr() : text_display_levels_(1), text_start_value_(1) {}
optional<style_ref>::Type text_style_name_;
common_num_format_attlist common_num_format_attlist_;
common_num_format_prefix_suffix_attlist common_num_format_prefix_suffix_attlist_;
unsigned int text_display_levels_;
unsigned int text_start_value_;
friend class text_list_level_style_number;
};
/// text-list-level-style-attr
class text_list_level_style_attr
{
public:
text_list_level_style_attr() : text_level_(0) {}
unsigned int get_text_level() const { return text_level_; }
unsigned int text_level_;
};
/// \class style_list_level_properties
/// style:list-level-properties (style-list-level-properties)
class style_list_level_properties : public office_element_impl<style_list_level_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleListLevelProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void serialize(std::wostream & strm){}
friend class text_list_level_style_number;
friend class text_list_level_style_bullet;
const common_text_align & get_common_text_align() const { return common_text_align_; }
common_text_align common_text_align_;
optional<length>::Type text_space_before_;
optional<length>::Type text_min_label_width_;
optional<length>::Type text_min_label_distance_;
optional<std::wstring>::Type style_font_name_;
optional<length>::Type fo_width_;
optional<length>::Type fo_height_;
common_vertical_rel_attlist common_vertical_rel_attlist_;
common_vertical_pos_attlist common_vertical_pos_attlist_;
office_element_ptr style_list_level_label_alignment_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_list_level_properties);
/// \class style_list_level_label_alignment
/// style:list-level-label-alignment (style-list-level-label-alignment)
class style_list_level_label_alignment : public office_element_impl<style_list_level_label_alignment>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleListLevelLabelAlignment;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void serialize(std::wostream & strm){}
const _CP_OPT(length) & get_fo_text_indent() const { return fo_text_indent_; }
const _CP_OPT(length) & get_fo_margin_left() const { return fo_margin_left_; }
const _CP_OPT(length) & get_text_list_tab_stop_position() const { return text_list_tab_stop_position_; }
_CP_OPT(std::wstring) text_label_followed_by_;
_CP_OPT(length) text_list_tab_stop_position_;
_CP_OPT(length) fo_text_indent_;
_CP_OPT(length) fo_margin_left_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_list_level_label_alignment);
/// \class text_list_level_style_number
/// text:list-level-style-number
class text_list_level_style_number : public office_element_impl<text_list_level_style_number>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextListLevelStyleNumber;
CPDOCCORE_DEFINE_VISITABLE();
office_element_ptr style_list_level_properties_;
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void serialize(std::wostream & strm){}
text_list_level_style_attr text_list_level_style_attr_;
text_list_level_style_number_attr text_list_level_style_number_attr_;
office_element_ptr style_text_properties_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_list_level_style_number);
/// \class text_list_level_style_bullet_attr
/// text-list-level-style-bullet-attr
class text_list_level_style_bullet_attr
{
public:
_CP_OPT(style_ref) text_style_name_;
optional<wchar_t>::Type text_bullet_char_;
common_num_format_prefix_suffix_attlist common_num_format_prefix_suffix_attlist_;
optional<percent>::Type text_bullet_relative_size_;
};
/// \class text_list_level_style_bullet
/// text:list-level-style-bullet
class text_list_level_style_bullet : public office_element_impl<text_list_level_style_bullet>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextListLevelStyleBullet;
CPDOCCORE_DEFINE_VISITABLE();
office_element_ptr style_list_level_properties_;
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void serialize(std::wostream & strm){}
text_list_level_style_attr text_list_level_style_attr_;
text_list_level_style_bullet_attr text_list_level_style_bullet_attr_;
office_element_ptr style_text_properties_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_list_level_style_bullet);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment