Hi
We are getting the following exception when doing a save of a vsdx to svg using Diagram Java 19.1:
Exception in thread “main” java.lang.NullPointerException
at com.aspose.diagram.ga.l(Unknown Source)
at com.aspose.diagram.ga.p(Unknown Source)
at com.aspose.diagram.fo.c(Unknown Source)
at com.aspose.diagram.fo.b(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.on.a(Unknown Source)
at com.aspose.diagram.Diagram.a(Unknown Source)
at com.aspose.diagram.Diagram.save(Unknown Source)
at com.cognidox.cognidox.vsdx2svg.VSDX2SVG.main(VSDX2SVG.java:85)
Looking through the vsdx source, we have a shape like this in visio/pages/page1.xml:
<Shape ID="13" Type="Shape" LineStyle="1" FillStyle="1" TextStyle="3">
<Cell N="PinX" V="7.642319750095353"/>
<Cell N="PinY" V="2.818915864683579"/>
<Cell N="Width" V="2.85758350718981"/>
<Cell N="Height" V="0.5123942840478291"/>
<Cell N="LocPinX" V="1.428791753594905" F="Width*0.5"/>
<Cell N="LocPinY" V="0.2561971420239145" F="Height*0.5"/>
<Cell N="Angle" V="0"/>
<Cell N="FlipX" V="0"/>
<Cell N="FlipY" V="0"/>
<Cell N="ResizeMode" V="0"/>
<Cell N="DefaultTabStop" V="0.5"/>
<Cell N="FillForegnd" V="#ffffff" F="THEMEGUARD(RGB(255,255,255))"/>
<Cell N="FillPattern" V="1"/>
<Cell N="ShdwForegnd" V="#000000" F="THEMEGUARD(RGB(0,0,0))"/>
<Cell N="ShdwPattern" V="1"/>
<Cell N="ShdwForegndTrans" V="0"/>
<Cell N="ShapeShdwType" V="1"/>
<Cell N="ShapeShdwOffsetX" V="0"/>
<Cell N="ShapeShdwOffsetY" V="-0.05555555555555555"/>
<Cell N="ShapeShdwScaleFactor" V="0"/>
<Cell N="ShapeShdwBlur" V="0"/>
<Cell N="ShapeShdwShow" V="2"/>
<Cell N="LineGradientEnabled" V="0"/>
<Cell N="FillGradientEnabled" V="0"/>
<Cell N="RotateGradientWithShape" V="0"/>
<Cell N="UseGroupGradient" V="0"/>
<Cell N="GlowColor" V="#ffffff" F="THEMEGUARD(RGB(255,255,255))"/>
<Cell N="GlowColorTrans" V="0"/>
<Cell N="GlowSize" V="0" U="PT"/>
<Cell N="LineWeight" V="0.01388888888888889"/>
<Cell N="LineColor" V="#000000" F="THEMEGUARD(RGB(0,0,0))"/>
<Cell N="Rounding" V="0"/>
<Cell N="LineColorTrans" V="0"/>
<Section N="Character">
<Row IX="0">
<Cell N="Font" V="Arial"/>
<Cell N="Color" V="0"/>
<Cell N="Style" V="0"/>
<Cell N="Size" V="0.08333333333333333"/>
<Cell N="ComplexScriptFont" V="Arial"/>
</Row>
</Section>
<Section N="Paragraph">
<Row IX="0">
<Cell N="IndLeft" V="0.03958333333333333"/>
<Cell N="HorzAlign" V="0"/>
<Cell N="BulletFontSize" V="0.1666666666666667" U="DT"/>
</Row>
</Section>
<Section N="Geometry" IX="0">
<Cell N="NoFill" V="0"/>
<Cell N="NoLine" V="0"/>
<Cell N="NoShow" V="0"/>
<Cell N="NoSnap" V="0"/>
<Cell N="NoQuickDrag" V="0"/>
<Row T="RelMoveTo" IX="1">
<Cell N="X" V="0"/>
<Cell N="Y" V="0"/>
</Row>
<Row T="RelLineTo" IX="2">
<Cell N="X" V="1"/>
<Cell N="Y" V="0"/>
</Row>
<Row T="RelLineTo" IX="3">
<Cell N="X" V="1"/>
<Cell N="Y" V="1"/>
</Row>
<Row T="RelLineTo" IX="4">
<Cell N="X" V="0"/>
<Cell N="Y" V="1"/>
</Row>
<Row T="RelLineTo" IX="5">
<Cell N="X" V="0"/>
<Cell N="Y" V="0"/>
</Row>
</Section>
<Text><cp IX="0"/><pp IX="0"/>8.2.1 Customer communication
8.2.2 Determining the requirements related to products and services
8.2.3 Review of requirements related to products and services
8.2.4 Changes to requirements for products and services
</Text>
</Shape>
Simply removing <Section N=“Geometry” IX=“0”> block avoids the exception.
Any idea why the exception would happen and how it could be avoided?
Regards
Vittal