Merge pull request 'Fix bug 78772' (#681) from fix/bug78772 into release/v9.3.0

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/681
This commit is contained in:
Oleg Korshul
2026-02-18 15:05:22 +00:00
2 changed files with 43 additions and 39 deletions

View File

@ -42,7 +42,7 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = round;
Path = L"wr-21600,,21600,43200,,,21600,21600nfewr-21600,,21600,43200,,,21600,21600l,21600nsxe";
Path = L"wr-21600,,21600,43200,,,21600,21600nfe";
Formulas.push_back( L"val #2");
Formulas.push_back( L"val #3");

View File

@ -1068,50 +1068,44 @@ public:
{
case ODRAW::rtLineTo:
{
for (_UINT16 j = 0; j < m_arSegments[i].m_nCount; ++j)
{
if (valuePointer + 1 > m_arPoints.size())
{
break;
if (valuePointer + 1 > m_arPoints.size())
{
break;
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[0].x);
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[0].y);
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[0].x);
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[0].y);
++valuePointer;
}
else
{
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
++valuePointer;
}
else
{
strVmlPath += L"l";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
++valuePointer;
}
}
++valuePointer;
}
}break;
case ODRAW::rtCurveTo:
{
for (_UINT16 j = 0; j < m_arSegments[i].m_nCount; ++j)
{
if (valuePointer + 3 > m_arPoints.size())
break;
strVmlPath += L"c";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 1].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 1].y );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 2].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 2].y );
valuePointer += 3;
}
if (valuePointer + 3 > m_arPoints.size())
break;
strVmlPath += L"c";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer].y );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 1].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 1].y );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 2].x );
strVmlPath += L",";
strVmlPath += std::to_wstring(m_arPoints[valuePointer + 2].y );
valuePointer += 3;
}break;
case ODRAW::rtMoveTo:
{
@ -1126,6 +1120,16 @@ public:
}
}
break;
case ODRAW::rtNoFill:
{
strVmlPath += L"nf";
}
break;
case ODRAW::rtNoStroke:
{
strVmlPath += L"ns";
}
break;
case ODRAW::rtClose:
{
strVmlPath += L"x";