Merge pull request 'fix bug #78986' (#570) from fix/bug78986 into hotfix/v9.2.1

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/570
This commit is contained in:
Elena Subbotina
2025-12-15 18:09:15 +00:00
3 changed files with 10 additions and 6 deletions

View File

@ -730,6 +730,7 @@ namespace ODRAW
Gdiplus::RectF Rect;
double LinearAngle;
int Focus;
std::vector<std::pair<CColor, double>> ColorsPosition;
@ -815,6 +816,7 @@ namespace ODRAW
TextureMode = c_BrushTextureModeStretch;
LinearAngle = 0;
Focus = 0;
TexturePath = L"";

View File

@ -349,17 +349,18 @@ std::wstring PPT::CShapeWriter::ConvertBrush(CBrush & brush)
brush_writer.WriteString(L"</a:gsLst>");
brush_writer.WriteString(L"<a:lin ang=\"");
{
if (brush.LinearAngle < -180) brush.LinearAngle += 180;
if (brush.LinearAngle > 180) brush.LinearAngle -= 180;
double val = 360 - brush.LinearAngle;
val += 90;
double val = (90 - brush.LinearAngle) ;
if (val < 0) val = 0;
if (val > 360) val -= 360;
if (val < 0) val += 360;
if (val >= 360) val -= 360;
std::wstring str = std::to_wstring((int)(val * 60000));
brush_writer.WriteString(str);
}
brush_writer.WriteString(L"\" scaled=\"1\"/>");
brush_writer.WriteString(L"\"");
//brush_writer.WriteString(L" scaled = \"1\"");
brush_writer.WriteString(L"/>");
brush_writer.WriteString(L"</a:gradFill>");
}
else if(brush.Type == c_BrushTypePattern)

View File

@ -513,6 +513,7 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
}break;
case fillFocus://relative position of the last color in the shaded fill
{
pElement->m_oBrush.Focus = pProperty->m_lValue;
}break;
case fillShadePreset:
{//value (int) from 0x00000088 through 0x0000009F or complex