Merge branch 'fix/bug56564' of git.onlyoffice.com:ONLYOFFICE/core into fix/bug56564

This commit is contained in:
Timofey Derevyankin
2025-08-28 11:30:09 +03:00
2 changed files with 3 additions and 28 deletions

View File

@ -112,19 +112,8 @@ void tabs_context::add(const odf_reader::office_element_ptr & element, double ma
if (tab_stop)
{
tab_stop->margin_left = margin_left;
auto type = tab_stop->style_type_ ? tab_stop->style_type_->get_type() : odf_types::style_type::Left;
double pos;
if( type == odf_types::style_type::Right )
{
pos = tab_stop->style_position_.get_value_unit(odf_types::length::pt);
}
else
{
pos = margin_left + tab_stop->style_position_.get_value_unit(odf_types::length::pt);
}
double pos = margin_left + tab_stop->style_position_.get_value_unit(odf_types::length::pt);
std::map<int, odf_reader::office_element_ptr>::iterator pFind = clear_tabs.find((int)pos);

View File

@ -215,21 +215,7 @@ void calc_tab_stops(const style_instance * styleInstance, oox::tabs_context & co
context.reset();
for (size_t j = 0; j < tab_stops->content_.size(); j++)
{
odf_reader::style_tab_stop *tab = dynamic_cast<odf_reader::style_tab_stop*>(tab_stops->content_[j].get());
if( tab )
{
auto type = tab->style_type_ ? tab->style_type_->get_type() : odf_types::style_type::Left;
if( type == odf_types::style_type::Right )
{
context.add(tab_stops->content_[j], 0);
}
else
{
context.add(tab_stops->content_[j], margin_left);
}
}
context.add(tab_stops->content_[j], margin_left);
}
}
}