From 6913cae8f3173acb41b2e6102be9fc7cdb76840f Mon Sep 17 00:00:00 2001 From: Kamil Kerimov Date: Tue, 28 Jan 2025 06:09:12 +0500 Subject: [PATCH] Fix bug #72414 --- .../Format/style_paragraph_properties_docx.cpp | 4 +++- OdfFile/Reader/Format/text_elements.cpp | 13 +------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/OdfFile/Reader/Format/style_paragraph_properties_docx.cpp b/OdfFile/Reader/Format/style_paragraph_properties_docx.cpp index 0e6166a87c..370b815d02 100644 --- a/OdfFile/Reader/Format/style_paragraph_properties_docx.cpp +++ b/OdfFile/Reader/Format/style_paragraph_properties_docx.cpp @@ -517,7 +517,9 @@ void style_tab_stop::docx_convert(oox::docx_conversion_context & Context, bool c length def_tab = length(1.0, length::cm);// в ms значение 0.8 не корректно оО - double tab_pos = 20.0 * style_position_.get_value_unit(length::pt); + double tab_pos_offset = (!Context.get_paragraph_state() || Context.is_table_content()) ? margin_left : 0; + + double tab_pos = 20.0 * style_position_.get_value_unit(length::pt) + tab_pos_offset; double min_tab_pos = 20.0 * def_tab.get_value_unit(length::pt) ; if (tab_pos < min_tab_pos) diff --git a/OdfFile/Reader/Format/text_elements.cpp b/OdfFile/Reader/Format/text_elements.cpp index 8e4677f9d7..0dbb2c3f8f 100644 --- a/OdfFile/Reader/Format/text_elements.cpp +++ b/OdfFile/Reader/Format/text_elements.cpp @@ -270,7 +270,6 @@ void paragraph::process_list_bullet_style(oox::docx_conversion_context& Context) if (!span_style_content) return; - std::wstringstream ss; style_text_properties* text_props = span_style_content->get_style_text_properties(); if (text_props) @@ -280,20 +279,10 @@ void paragraph::process_list_bullet_style(oox::docx_conversion_context& Context) style_instance* paragraph_style = Context.root()->odf_context().styleContainer().style_by_name(attrs_.text_style_name_, style_family::Paragraph, false); if (paragraph_style && paragraph_style->content()) { - paragraph_style->content()->get_style_text_properties(true)->content_.apply_from(text_props->content_); + paragraph_style->content()->get_style_text_properties(true)->content_.fo_color_ = text_props->content_.fo_color_; } } - - const _CP_OPT(odf_types::font_weight)& font_weight = text_props->content_.fo_font_weight_; - const _CP_OPT(odf_types::font_style)& font_style = text_props->content_.fo_font_style_; - - if (font_weight && font_weight->get_type() == odf_types::font_weight::WBold) - ss << ""; - if (font_style && font_style->get_type() == odf_types::font_style::Italic) - ss << ""; } - - Context.get_text_tracked_context().dumpRPrInsDel_ = ss.str(); } void paragraph::docx_convert(oox::docx_conversion_context & Context, _CP_OPT(std::wstring) next_element_style_name)