Skip to content

Commit

Permalink
Merge pull request 'Fix bug #72375' (#163) from fix/bug72375 into rel…
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaSubbotina committed Jan 20, 2025
2 parents dc777f4 + 07bf7a4 commit 18e359c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions OdfFile/Reader/Format/draw_frame_docx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,15 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, union_comm
drawing->styleHorizontalPos = graphicProperties->common_horizontal_pos_attlist_.style_horizontal_pos_;
drawing->styleVerticalPos = graphicProperties->common_vertical_pos_attlist_.style_vertical_pos_;
drawing->styleVerticalRel = graphicProperties->common_vertical_rel_attlist_.style_vertical_rel_;

if (graphicProperties->style_mirror_)
{
bool flipV = graphicProperties->style_mirror_->find(L"vertical") != std::wstring::npos;
bool flipH = graphicProperties->style_mirror_->find(L"horizontal") != std::wstring::npos;

drawing->additional.push_back(odf_reader::_property(L"flipV", flipV));
drawing->additional.push_back(odf_reader::_property(L"flipH", flipH));
}
}
if (!drawing->styleVerticalRel && anchor)
{
Expand Down
7 changes: 7 additions & 0 deletions OdfFile/Writer/Format/odf_drawing_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3328,6 +3328,13 @@ void odf_drawing_context::end_image()
else
impl_->current_graphic_properties->style_mirror_ = std::wstring(L"horizontal");
}
if (impl_->current_drawing_state_.flipV_)
{
if (impl_->current_graphic_properties->style_mirror_)
impl_->current_graphic_properties->style_mirror_ = *impl_->current_graphic_properties->style_mirror_ + std::wstring(L" vertical");
else
impl_->current_graphic_properties->style_mirror_ = std::wstring(L"vertical");
}
end_element();
end_frame();
}
Expand Down

0 comments on commit 18e359c

Please sign in to comment.