Skip to content

Commit

Permalink
Merge pull request 'For bug #72496' (#207) from fix/bug72496 into rel…
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Feb 3, 2025
2 parents 9ab884a + 4a384ed commit 6caca87
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions OdfFile/Reader/Format/table_pptx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void table_table_row::pptx_convert(oox::pptx_conversion_context & Context)
{
int height = 0;

const style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name( styleName , style_family::TableRow,false);
const style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name( styleName , style_family::TableRow,true);

if ((inst) && (inst->content()) && (inst->content()->get_style_table_row_properties()))
{
Expand Down Expand Up @@ -244,7 +244,7 @@ void table_table::pptx_convert(oox::pptx_conversion_context & Context)
_Wostream << L" firstCol=\"1\"";
_Wostream << ">";

style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name( tableStyleName , style_family::Table,false);
style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name( tableStyleName , style_family::Table,true);

if ((inst) && (inst->content()))
{
Expand Down Expand Up @@ -352,7 +352,8 @@ void table_table_column::pptx_convert(oox::pptx_conversion_context & Context)
{
const std::wstring colStyleName = attlist_.table_style_name_.get();

style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name( colStyleName , style_family::TableColumn,false );
style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name(colStyleName, style_family::TableColumn, true);

if ((inst) && (inst->content()))
{
//column properies
Expand Down Expand Up @@ -395,20 +396,20 @@ void table_table_cell::pptx_convert(oox::pptx_conversion_context & Context)
style_name = Context.get_table_context().get_default_cell_style();
if (!style_name.empty())
{
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, false);
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, true);
if (style_inst) style_instances.push_back(style_inst);
}

style_name = Context.get_table_context().get_default_cell_style_col(Context.get_table_context().current_column());
if (!style_name.empty())
{
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, false);
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, true);
if (style_inst)style_instances.push_back(style_inst);
}
style_name = Context.get_table_context().get_template_row_style_name();
if (!style_name.empty() && !Context.get_table_context().template_is_first_column() && !Context.get_table_context().template_is_last_column())
{
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, false);
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, true);
if (style_inst)style_instances.push_back(style_inst);
}

Expand All @@ -417,15 +418,15 @@ void table_table_cell::pptx_convert(oox::pptx_conversion_context & Context)
style_name = Context.get_table_context().get_default_cell_style_row();
if (!style_name.empty())
{
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, false);
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, true);
if (style_inst) style_instances.push_back(style_inst);
}
}

style_name = attlist_.table_style_name_.get_value_or(L"");
if (!style_name.empty())
{
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, false);
style_inst = Context.root()->odf_context().styleContainer().style_by_name(style_name, style_family::TableCell, true);
if (style_inst) style_instances.push_back(style_inst);
}

Expand Down

0 comments on commit 6caca87

Please sign in to comment.