mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #61633
This commit is contained in:
@ -4740,7 +4740,8 @@ void DocxConverter::convert(OOX::Logic::CTc *oox_table_cell)
|
||||
}
|
||||
}
|
||||
|
||||
odt_context->start_table_cell( oox_table_cell->m_nNumCol, covered, convert(oox_table_cell->m_pTableCellProperties, oox_table_cell->m_nNumCol + 1));
|
||||
bool styled = convert(oox_table_cell->m_pTableCellProperties, oox_table_cell->m_nNumCol + 1);
|
||||
odt_context->start_table_cell( oox_table_cell->m_nNumCol, covered, styled);
|
||||
|
||||
if (oox_table_cell->m_pTableCellProperties)
|
||||
{
|
||||
@ -4911,7 +4912,7 @@ void DocxConverter::convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer
|
||||
}
|
||||
bool DocxConverter::convert(OOX::Logic::CTableProperty *oox_table_pr, bool base_styled)
|
||||
{
|
||||
if (oox_table_pr && oox_table_pr->m_oTblBorders.IsInit())
|
||||
if ((oox_table_pr && oox_table_pr->m_oTblBorders.IsInit()) || base_styled)
|
||||
{//напрямую задать cell_prop на саму таблицу низя - тока как default-cell-style-name на columns & row
|
||||
|
||||
//общие свойства ячеек
|
||||
@ -5024,25 +5025,23 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
|
||||
{
|
||||
switch(oox_table_cell_pr->m_oTextDirection->m_oVal->GetValue())
|
||||
{
|
||||
case SimpleTypes::textdirectionRl:
|
||||
{
|
||||
table_cell_properties->content_.common_writing_mode_attlist_.loext_writing_mode_ = odf_types::writing_mode::TbRl;
|
||||
}break;
|
||||
case SimpleTypes::textdirectionTb :
|
||||
{
|
||||
table_cell_properties->content_.common_writing_mode_attlist_.loext_writing_mode_ = odf_types::writing_mode::LrTb;
|
||||
table_cell_properties->content_.style_direction_ = odf_types::direction(odf_types::direction::Ltr);
|
||||
}break;
|
||||
case SimpleTypes::textdirectionLr ://повернутость буковок
|
||||
table_cell_properties->content_.common_writing_mode_attlist_.loext_writing_mode_ = odf_types::writing_mode::BtLr;
|
||||
case SimpleTypes::textdirectionLrV :
|
||||
case SimpleTypes::textdirectionTbV :
|
||||
case SimpleTypes::textdirectionRlV :
|
||||
{
|
||||
table_cell_properties->content_.style_direction_ = odf_types::direction(odf_types::direction::Ttb);
|
||||
odf_writer::style_text_properties *text_cell_properties = odt_context->styles_context()->last_state()->get_text_properties();
|
||||
if (text_cell_properties)
|
||||
{
|
||||
text_cell_properties->content_.style_text_rotation_angle_ = 90;
|
||||
text_cell_properties->content_.style_text_rotation_scale_ = odf_types::text_rotation_scale::LineHeight;
|
||||
}
|
||||
}break;
|
||||
case SimpleTypes::textdirectionRl ://rtl
|
||||
break;
|
||||
}
|
||||
}
|
||||
convert(oox_table_cell_pr->m_oTcBorders.GetPointer() , table_cell_properties);
|
||||
|
||||
@ -219,6 +219,7 @@ void style_table_cell_properties_attlist::serialize(std::wostream & _Wostream ,c
|
||||
common_background_color_attlist_.serialize(CP_GET_XML_NODE());
|
||||
common_border_attlist_.serialize(CP_GET_XML_NODE());
|
||||
common_border_line_width_attlist_.serialize(CP_GET_XML_NODE());
|
||||
common_writing_mode_attlist_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
CP_XML_ATTR_OPT(L"style:diagonal-tl-br", style_diagonal_tl_br_);
|
||||
CP_XML_ATTR_OPT(L"style:diagonal-tl-br-widths", style_diagonal_tl_br_widths_);
|
||||
@ -247,6 +248,7 @@ void style_table_cell_properties_attlist::apply_from(const style_table_cell_prop
|
||||
common_shadow_attlist_.apply_from(Other.common_shadow_attlist_);
|
||||
common_background_color_attlist_.apply_from(Other.common_background_color_attlist_);
|
||||
common_border_attlist_.apply_from(Other.common_border_attlist_);
|
||||
common_writing_mode_attlist_.apply_from(Other.common_writing_mode_attlist_);
|
||||
|
||||
_CP_APPLY_PROP(style_diagonal_tl_br_, Other.style_diagonal_tl_br_);
|
||||
_CP_APPLY_PROP(style_diagonal_tl_br_widths_, Other.style_diagonal_tl_br_widths_);
|
||||
|
||||
@ -201,6 +201,7 @@ public:
|
||||
odf_types::common_shadow_attlist common_shadow_attlist_;
|
||||
odf_types::common_background_color_attlist common_background_color_attlist_;
|
||||
odf_types::common_border_attlist common_border_attlist_;
|
||||
odf_types::common_writing_mode_attlist common_writing_mode_attlist_;
|
||||
|
||||
_CP_OPT(std::wstring) style_diagonal_tl_br_;
|
||||
_CP_OPT(odf_types::border_widths) style_diagonal_tl_br_widths_;
|
||||
|
||||
Reference in New Issue
Block a user