From 2ed318df0f18c48b3380790b4ada1d58738faca3 Mon Sep 17 00:00:00 2001 From: ElenaSubbotina Date: Mon, 1 Sep 2025 15:41:29 +0300 Subject: [PATCH] fix bug #76417 --- .../ASCOfficeDrawingConverter.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp b/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp index 5290d32ac5..b746864e23 100644 --- a/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp +++ b/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp @@ -4878,9 +4878,9 @@ void CDrawingConverter::CheckEffectShape(PPTX::Logic::SpTreeElem* oElem, XmlUtil nullable oColor2; nullable_string oId; nullable oMatrix; - SimpleTypes::CTrueFalse oObscured; - SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage oOffset; - SimpleTypes::Vml::CVml_Vector2D_Units_Or_Percentage oOffset2; + nullable oObscured; + nullable oOffset; + nullable oOffset2; nullable oOpacity; nullable oOrigin; SimpleTypes::CShadowType oType; @@ -4921,16 +4921,16 @@ void CDrawingConverter::CheckEffectShape(PPTX::Logic::SpTreeElem* oElem, XmlUtil pEffectLst->outerShdw->Color.Color->Modifiers.push_back(oMod); } - double offsetX = oOffset.IsXinPoints() ? oOffset.GetX() : 0; - double offsetY = oOffset.IsYinPoints() ? oOffset.GetY() : 0; - - double dist = sqrt(offsetX * offsetX + offsetY * offsetY); - double dir = (offsetX != 0) ? atan(offsetY / offsetX) * 180. / 3.1415926 : 0; - if (offsetX < 0) dir += 180; - if (dir < 0) dir += 360; - - if (dist > 0 && dir > 0) + if (oOffset.IsInit()) { + double offsetX = oOffset->IsXinPoints() ? oOffset->GetX() : 0; + double offsetY = oOffset->IsYinPoints() ? oOffset->GetY() : 0; + + double dist = sqrt(offsetX * offsetX + offsetY * offsetY); + double dir = ((offsetX != 0) ? atan(offsetY / offsetX) : 1) * 180. / 3.1415926; + if (offsetX < 0) dir += 180; + if (dir < 0) dir += 360; + pEffectLst->outerShdw->dist = dist * (635 * 20); pEffectLst->outerShdw->dir = (int)(dir * 60000); }