SystemDependentData_CairoPath needs to check stroke values
so we don't accidentally re-use invalid data Change-Id: Ia971dde953044c68f17caab2000ae8089a267096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181181 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
@@ -1155,10 +1155,17 @@ bool CairoCommon::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
|
||||
|
||||
if (pSystemDependentData_CairoPath)
|
||||
{
|
||||
auto strokeEquals
|
||||
= [](const std::vector<double>& rStroke1, const std::vector<double>* pStroke2) -> bool {
|
||||
if (!pStroke2)
|
||||
return rStroke1.empty();
|
||||
return rStroke1 == *pStroke2;
|
||||
};
|
||||
// check data validity
|
||||
if (nullptr == pSystemDependentData_CairoPath->getCairoPath()
|
||||
|| pSystemDependentData_CairoPath->getNoJoin() != bNoJoin
|
||||
|| pSystemDependentData_CairoPath->getAntiAlias() != bAntiAlias
|
||||
|| !strokeEquals(pSystemDependentData_CairoPath->getStroke(), pStroke)
|
||||
|| bPixelSnapHairline /*tdf#124700*/)
|
||||
{
|
||||
// data invalid, forget
|
||||
|
Reference in New Issue
Block a user