Skip to content

Commit

Permalink
Fix bug #72857
Browse files Browse the repository at this point in the history
  • Loading branch information
kom-a committed Jan 28, 2025
1 parent ab660cb commit 8da1a10
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 8da1a10

Please sign in to comment.