Merge pull request 'Fix bug #54422' (#135) from fix/bug54422 into release/v8.3.0

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/135
This commit is contained in:
Elena Subbotina
2024-12-14 09:01:38 +00:00
3 changed files with 65 additions and 0 deletions

View File

@ -133,6 +133,11 @@ public:
_CP_OPT(double) default_column_width;
bool optimal_column_width;
_CP_OPT(odf_types::length) default_cell_padding_left;
_CP_OPT(odf_types::length) default_cell_padding_right;
_CP_OPT(odf_types::length) default_cell_padding_top;
_CP_OPT(odf_types::length) default_cell_padding_bottom;
std::wstring default_cell_properties; // для предустановки ..
private:
@ -447,6 +452,23 @@ std::wstring odf_table_context::get_column_cell_properties()
return default_cell_props;
}
void odf_table_context::set_default_cell_paddings(_CP_OPT(odf_types::length) left, _CP_OPT(odf_types::length) right, _CP_OPT(odf_types::length) top, _CP_OPT(odf_types::length) bottom)
{
impl_->default_cell_padding_left = left;
impl_->default_cell_padding_right = right;
impl_->default_cell_padding_top = top;
impl_->default_cell_padding_bottom = bottom;
}
void odf_table_context::get_default_cell_paddings(_CP_OPT(odf_types::length)& left, _CP_OPT(odf_types::length)& right, _CP_OPT(odf_types::length)& top, _CP_OPT(odf_types::length)& bottom)
{
left = impl_->default_cell_padding_left;
right = impl_->default_cell_padding_right;
top = impl_->default_cell_padding_top;
bottom = impl_->default_cell_padding_bottom;
}
void odf_table_context::set_default_row_height(double height)
{
impl_->default_row_height = height;

View File

@ -83,6 +83,17 @@ public:
void set_default_cell_properties(const std::wstring &style_name);
std::wstring get_default_cell_properties();
std::wstring get_column_cell_properties();
void set_default_cell_paddings(
_CP_OPT(odf_types::length) left,
_CP_OPT(odf_types::length) right,
_CP_OPT(odf_types::length) top,
_CP_OPT(odf_types::length) bottom);
void get_default_cell_paddings(
_CP_OPT(odf_types::length)& left,
_CP_OPT(odf_types::length)& right,
_CP_OPT(odf_types::length)& top,
_CP_OPT(odf_types::length)& bottom);
_CP_OPT(double) get_table_width();
_CP_OPT(double) get_table_height();