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

(1.0.1.175): ASCOfficeOdfFile

22841 (расширение использования стилей для мастер-слайдов)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53966 954022d7-b5bf-4e40-9824-e11837661b57
parent 10b61984
......@@ -2,6 +2,6 @@
//1
//0
//1
//174
#define INTVER 1,0,1,174
#define STRVER "1,0,1,174\0"
//176
#define INTVER 1,0,1,176
#define STRVER "1,0,1,176\0"
......@@ -100,6 +100,8 @@ void pptx_conversion_context::process_master_pages()
{
odf::presentation_masters_instance & masters = root()->odf_context().styleContainer().presentation_masters();
process_masters_ = true;
//áåðåì òîëüêî àêòóàëüíûå
for (int master_index =0; master_index < masters.content.size();master_index++)
{
......@@ -115,6 +117,7 @@ void pptx_conversion_context::process_master_pages()
end_master();
}
process_masters_ = false;
}
void pptx_conversion_context::process_styles()
......@@ -145,7 +148,7 @@ void pptx_conversion_context::start_document()
odf::text_format_properties_content textFormatProperties = calc_text_properties_content(instances);
odf::paragraph_format_properties parFormatProperties = calc_paragraph_properties_content(instances);
process_masters_ = false;
}
void pptx_conversion_context::end_document()
......
......@@ -87,7 +87,8 @@ public:
//void start_hyperlink(const std::wstring & styleName);
//void end_hyperlink(std::wstring const & href);
bool process_masters_;
void process_master_pages();
void process_layouts();
void process_styles();
......
......@@ -477,7 +477,7 @@ void pptx_text_context::Impl::dump_run()
CP_XML_NODE(L"a:t")
{
// CP_XML_ATTR(L"xml:space", L"preserve");
CP_XML_ATTR(L"xml:space", L"preserve");
CP_XML_STREAM() << content;
}
}
......
......@@ -19,7 +19,7 @@ void apply_line_width(_CP_OPT(line_width) & A, const _CP_OPT(line_width) & B)
)
)
{
const double mul = B->get_percent().get_value();
const double mul = B->get_percent().get_value()/100.;
// TODO
switch(A->get_type())
{
......
......@@ -103,10 +103,10 @@ void draw_frame::pptx_convert(oox::pptx_conversion_context & Context)
const std::wstring baseStyleName = common_draw_attlist_.common_draw_style_name_attlist_.presentation_style_name_.get_value_or(style_ref(L"")).style_name();
odf::style_instance* grStyleInst =
Context.root()->odf_context().styleContainer().style_by_name(grStyleName, odf::style_family::Graphic,false/*process_headers_footers_*/);
Context.root()->odf_context().styleContainer().style_by_name(grStyleName, odf::style_family::Graphic,Context.process_masters_);
odf::style_instance* baseStyleInst =
Context.root()->odf_context().styleContainer().style_by_name(baseStyleName, odf::style_family::Presentation,false/*process_headers_footers_*/);
Context.root()->odf_context().styleContainer().style_by_name(baseStyleName, odf::style_family::Presentation,Context.process_masters_);
if (baseStyleInst)//
{
......
......@@ -347,6 +347,7 @@ const wchar_t * draw_enhanced_geometry::name = L"enhanced-geometry";
void draw_enhanced_geometry::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
draw_enhanced_geometry_attlist_.add_attributes(Attributes);
CP_APPLY_ATTR(L"svg:viewBox", svg_viewbox_);
}
typedef shared_ptr<draw_handle> draw_handle_ptr;
......
......@@ -384,6 +384,7 @@ public:
_CP_OPT(int) sub_type_;
_CP_OPT(int) draw_type_oox_index_;
_CP_OPT(std::wstring) svg_viewbox_;
typedef std::pair<std::wstring,std::wstring> pair_string_value;
......
......@@ -80,10 +80,10 @@ void draw_shape::common_pptx_convert(oox::pptx_conversion_context & Context)
const std::wstring baseStyleName = common_draw_attlist_.common_draw_style_name_attlist_.presentation_style_name_.get_value_or(style_ref(L"")).style_name();
odf::style_instance* grStyleInst =
Context.root()->odf_context().styleContainer().style_by_name(grStyleName, odf::style_family::Graphic,false/*process_headers_footers_*/);
Context.root()->odf_context().styleContainer().style_by_name(grStyleName, odf::style_family::Graphic,Context.process_masters_);
odf::style_instance* baseStyleInst =
Context.root()->odf_context().styleContainer().style_by_name(baseStyleName, odf::style_family::Presentation,false/*process_headers_footers_*/);
Context.root()->odf_context().styleContainer().style_by_name(baseStyleName, odf::style_family::Presentation,Context.process_masters_);
if (baseStyleInst)//
{
......
......@@ -246,7 +246,8 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
{
if (fo_line_height_->get_type() == line_width::Percent)
{
w_line = boost::lexical_cast<std::wstring>( (int)( 0.5 + fo_line_height_->get_percent().get_value() *1000. ) );
double percent = fo_line_height_->get_percent().get_value();
w_line = boost::lexical_cast<std::wstring>( (int)( 0.5 + percent *1000. ) );
w_lineRule = L"a:spcPct";
}
//else if(fo_line_height_->get_type() == line_width::Normal)
......
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