CrazyIter 4 yıl önce
ebeveyn
işleme
a4f3d56115

+ 4 - 4
TEAMModelOS.Service/Services/PowerPoint/Implement/HtexService.cs

@@ -1343,8 +1343,8 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                 }
                 // type: none, triangle, stealth, diamond, oval, arrow
 
-                if ((headEndNodeAttrs != null && (headEndNodeAttrs.GetTextByPath("@type").Value == "triangle" || (headEndNodeAttrs.GetTextByPath("@type").Value == "arrow")) ||
-                    (tailEndNodeAttrs != null && (tailEndNodeAttrs.GetTextByPath("@type").Value == "triangle" || (tailEndNodeAttrs.GetTextByPath("@type").Value == "arrow")))))
+                if ((headEndNodeAttrs != null && headEndNodeAttrs.GetTextByPath("@type") !=null&& (headEndNodeAttrs.GetTextByPath("@type").Value == "triangle" || (headEndNodeAttrs.GetTextByPath("@type").Value == "arrow")) ||
+                    (tailEndNodeAttrs != null && tailEndNodeAttrs.GetTextByPath("@type") != null && (tailEndNodeAttrs.GetTextByPath("@type").Value == "triangle" || (tailEndNodeAttrs.GetTextByPath("@type").Value == "arrow")))))
                 {
                   //  var triangleMarker = "<marker id='markerTriangle_" + order + "' viewBox='0 0 10 10' refX='1' refY='5' markerWidth='5' markerHeight='5' stroke='" + shapeBorder.Color + "' fill='" + shapeBorder.Color +
                              //       "' orient='auto-start-reverse' markerUnits='strokeWidth'><path d='M 0 0 L 10 5 L 0 10 z' /></marker>";
@@ -1523,8 +1523,8 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                         //StrokeWidth = shapeBorder.Width + "",
                         //StrokeDasharray = shapeBorder.Stroke,
                         d=d,
-                        start=headEndNodeAttrs!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
-                        end=tailEndNodeAttrs!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
+                        start=headEndNodeAttrs!=null&&headEndNodeAttrs.GetTextByPath("@type")!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
+                        end=tailEndNodeAttrs!=null&&tailEndNodeAttrs.GetTextByPath("@type")!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
                     }
                 };
                 shapeSvg.svgShape = shapes;

+ 6 - 6
TEAMModelOS.Service/Services/PowerPoint/Implement/ShapeSvg.cs

@@ -2801,8 +2801,8 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                 // StrokeWidth = border.Width + "",
                 // StrokeDasharray = border.Stroke,
                 d=d,
-                start=headEndNodeAttrs!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
-                end=tailEndNodeAttrs!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
+                 start=headEndNodeAttrs!=null&&headEndNodeAttrs.GetTextByPath("@type")!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
+                end=tailEndNodeAttrs!=null&&tailEndNodeAttrs.GetTextByPath("@type")!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
                 //MarkerStart="url(#markerTriangle_" + shpId + ")",
                 //MarkerEnd="url(#markerTriangle_" + shpId + ")"
             } };
@@ -4556,8 +4556,8 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                 // StrokeWidth = border.Width + "",
                 // StrokeDasharray = border.Stroke,
                 points=points,
-                 start=headEndNodeAttrs!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
-                end=tailEndNodeAttrs!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
+                 start=headEndNodeAttrs!=null&&headEndNodeAttrs.GetTextByPath("@type")!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
+                end=tailEndNodeAttrs!=null&&tailEndNodeAttrs.GetTextByPath("@type")!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
             } };
             return new Svg { /*SvgData = result,*/ svgShape = shapes };
         }
@@ -7076,8 +7076,8 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                // Stroke = "#" + border.Color,
                 // StrokeWidth = border.Width + "",
                 // StrokeDasharray = border.Stroke,
-                start=headEndNodeAttrs!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
-                end=tailEndNodeAttrs!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
+                start=headEndNodeAttrs!=null&&headEndNodeAttrs.GetTextByPath("@type")!=null?headEndNodeAttrs.GetTextByPath("@type").Value:null,
+                end=tailEndNodeAttrs!=null&&tailEndNodeAttrs.GetTextByPath("@type")!=null?tailEndNodeAttrs.GetTextByPath("@type").Value:null,
                 x1=X1,
                 x2=X2,
                 y1=Y1,