Skip to content

Commit

Permalink
Merge pull request 'Fix bug #72857' (#208) from fix/bug72857 into rel…
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Feb 3, 2025
2 parents 6caca87 + 8da1a10 commit 8a991ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions OdfFile/Reader/Converter/oox_drawing_fills.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ namespace oox {
{
type = -1;
opacity = boost::none;
image_opacity = boost::none;

gradient.reset();
hatch.reset();
Expand Down
7 changes: 6 additions & 1 deletion OdfFile/Reader/Format/draw_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@ void Compute_GradientFill(draw_gradient* gradient_style, oox::oox_gradient_fill_
fill->angle = -90 - gradient_style->draw_angle_->get_value();

if (fill->angle < 0)
fill->angle += 360;
{
int fullRotations = std::ceil(-fill->angle / 360.0f);

fill->angle += 360 * fullRotations;
}


for (size_t i = 0; i < gradient_style->content_.size(); ++i)
{
Expand Down

0 comments on commit 8a991ae

Please sign in to comment.