mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix bug#72243
This commit is contained in:
@ -33,7 +33,8 @@ namespace MetaFile
|
||||
return;
|
||||
|
||||
std::swap(m_pParser, m_oSecondConditional.m_pParser);
|
||||
std::swap(m_oClip, m_oSecondConditional.m_oClip);
|
||||
|
||||
SwapClips(m_oClip, m_oSecondConditional.m_oClip);
|
||||
}
|
||||
|
||||
InterpretatorType CEmfInterpretatorSvg::GetType() const
|
||||
@ -1046,6 +1047,7 @@ namespace MetaFile
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_FRAMERGN(const TRectL &oBounds, unsigned int unIhBrush, int nWidth, int nHeight, const TRegionDataHeader &oRegionDataHeader, const std::vector<TRectL> &arRects)
|
||||
{
|
||||
m_bUpdatedClip = false;
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_OFFSETCLIP(double dX, double dY)
|
||||
@ -1493,6 +1495,17 @@ namespace MetaFile
|
||||
CInterpretatorSvgBase::PathClip(oPath, nClipMode, pTransform);
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::SwapClips(CSvgClip& oFirstClip, CSvgClip& oSecondClip)
|
||||
{
|
||||
if (oFirstClip.StartedClip())
|
||||
WriteNodeEnd(L"g");
|
||||
|
||||
if (oSecondClip.StartedClip())
|
||||
WriteNodeBegin(L"g", {{L"clip-path", L"url(#" + oSecondClip.GetClipId() + L')'}});
|
||||
|
||||
std::swap(oFirstClip, oSecondClip);
|
||||
}
|
||||
|
||||
TRectD CEmfInterpretatorSvg::TranslateRect(const TRectL &oRect) const
|
||||
{
|
||||
TRectD oNewRect(oRect.Left, oRect.Top, oRect.Right, oRect.Bottom);
|
||||
|
||||
@ -226,6 +226,8 @@ namespace MetaFile
|
||||
void SetTransform(double& dM11, double& dM12, double& dM21, double& dM22, double& dX, double& dY) override {};
|
||||
void GetTransform(double* pdM11, double* pdM12, double* pdM21, double* pdM22, double* pdX, double* pdY) override {};
|
||||
|
||||
void SwapClips(CSvgClip& oFirstClip, CSvgClip& oSecondClip);
|
||||
|
||||
TRectD TranslateRect(const TRectL &oRect) const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user