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

......

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56978 954022d7-b5bf-4e40-9824-e11837661b57
parent 51a643fb
......@@ -16,7 +16,6 @@
#include "oox_shape_defines.h"
#include "Shapes\odf_shape_mapping.h"
#include "styles.h"
#include "style_table_properties.h"
......@@ -24,6 +23,8 @@
#include "style_paragraph_properties.h"
#include "style_graphic_properties.h"
namespace cpdoccore
{
namespace odf
......@@ -70,6 +71,8 @@ struct anchor_settings
_CP_OPT(anchor_type) anchor_type_;
_CP_OPT(style_wrap) style_wrap_;
void clear()
{
svg_x_ = boost::none;
......@@ -92,6 +95,8 @@ struct anchor_settings
fo_margin_top_ = boost::none;
fo_margin_right_ = boost::none;
fo_margin_bottom_ = boost::none;
style_wrap_ = boost::none;
}
};
......@@ -407,6 +412,8 @@ void odf_drawing_context::end_drawing()
draw->common_draw_attlists_.shape_with_text_and_styles_.common_draw_shape_with_styles_attlist_.common_text_spreadsheet_shape_attlist_.common_text_anchor_attlist_.type_ = impl_->anchor_settings_.anchor_type_;
//impl_->current_graphic_properties->content().common_text_anchor_attlist_.type_ = impl_->anchor_settings_.anchor_type_;
impl_->current_graphic_properties->content().style_wrap_ = impl_->anchor_settings_.style_wrap_;
///////////////////////////////////////////////////
impl_->drawing_list_.push_back(impl_->current_drawing_state_);
......@@ -898,6 +905,12 @@ void odf_drawing_context::set_horizontal_pos(double offset_pt)
{
impl_->anchor_settings_.style_horizontal_pos_svg_x_ = length(length(offset_pt,length::pt).get_value_unit(length::cm),length::cm);
}
void odf_drawing_context::set_wrap_style(style_wrap::type type)
{
impl_->anchor_settings_.style_wrap_ = style_wrap(type);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void odf_drawing_context::set_position(double x_pt, double y_pt)
{
......
......@@ -12,6 +12,7 @@
#include "office_elements_create.h"
#include "anchortype.h"
#include "stylewrap.h"
namespace cpdoccore {
namespace odf
......@@ -46,6 +47,8 @@ public:
void set_horizontal_pos(int align);
void set_horizontal_pos(double offset_pt);
void set_wrap_style(style_wrap::type style);
///////////////////////////////////////////////////////////////////////////////////////////////////////////
office_element_ptr & get_current_style_element() ;
......
......@@ -50,6 +50,15 @@ void odf_style_state::set_name(std::wstring & name)
style_->style_name_ = name;
}
void odf_style_state::set_display_name(std::wstring & name)
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return;
style_->style_display_name_ = name;
}
std::wstring & odf_style_state::get_name()
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
......
......@@ -49,6 +49,8 @@ public:
void set_parent_style_name(std::wstring & name) ;
void set_data_style_name(std::wstring & name);
void set_display_name(std::wstring & name);
//////////////////////////////////////////////////////////////////////////////////////////
style_text_properties * get_text_properties();
style_paragraph_properties * get_paragraph_properties() ;
......
......@@ -94,6 +94,10 @@ const wchar_t * text_line_break::name = L"line-break";
void text_line_break::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE_SIMPLE();
}
}
......
......@@ -27,6 +27,9 @@ namespace OOX
class CGroupShape;
class CShape;
class CPBdr;
class CHyperlink;
class CFldChar;
class CInstrText;
}
}
......@@ -88,7 +91,10 @@ namespace Oox2Odf
void convert(OOX::Logic::CRunProperty *oox_run_prop, odf::style_text_properties *text_properties);
void convert(OOX::Logic::CPBdr *oox_border, odf::style_paragraph_properties *paragraph_properties);
void convert(ComplexTypes::Word::CShading *oox_shading, odf::style_text_properties *text_properties );
void convert(OOX::Logic::CFldChar *oox_fld);
void convert(OOX::Logic::CInstrText *oox_instr);
void convert(OOX::Logic::CText *oox_text);
void convert(OOX::Logic::CHyperlink *oox_hyperlink);
void convert(OOX::Logic::CAlternateContent *oox_alt_content);
void convert(OOX::Logic::CDrawing *oox_drawing);
void convert(OOX::Drawing::CAnchor *oox_anchor);
......@@ -97,7 +103,7 @@ namespace Oox2Odf
void convert(OOX::Logic::CGroupShape *oox_group_shape);
void convert(OOX::Logic::CShape *oox_shape);
void convert(OOX::Drawing::CChart *oox_chart);
void convert(OOX::Drawing::CPicture *oox_chart);
void convert(OOX::Drawing::CPicture *oox_picture);
void convert(ComplexTypes::Word::CColor *color, _CP_OPT(odf::color) & odf_color);
void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf::length) & odf_size);
void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf::length_or_percent) & odf_size);
......
......@@ -1316,13 +1316,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCellStyle * cell_style, int oox_i
ods_context->styles_context()->create_style(style_name,odf::style_family::TableCell, automatic, root, oox_id);
odf::style* style = dynamic_cast<odf::style*>(ods_context->styles_context()->last_state().get_office_element().get());
if (!style)return;
if (style_name.length() > 0)ods_context->styles_context()->last_state().set_display_name(style_name);
int parent_id = cell_style->m_oXfId.IsInit() ? cell_style->m_oXfId->GetValue() : -1;
if (parent_id >=0)
style->style_parent_style_name_ = ods_context->styles_context()->find_odf_style_name(parent_id, odf::style_family::TableCell,true);
ods_context->styles_context()->last_state().set_parent_style_name(ods_context->styles_context()->find_odf_style_name(parent_id, odf::style_family::TableCell,true));
//m_oBuiltinId, m_oCustomBuiltin, m_oHidden, m_oILevel; ???????
}
......
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