You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/07/03 14:50:42 UTC

[Bug 63541] NullPointerException from XSLFSimpleShape.getAnchor for empty xfrm tags

https://bz.apache.org/bugzilla/show_bug.cgi?id=63541

--- Comment #1 from petoalbert32@gmail.com ---
As for the possible fix: I could wrap the mentioned block of code in a
conditional statement with condition xfrm.isOffSet(), but it seems that xfrm is
also used from other places, and I am not sure how to interpret a shape like
this conceptually. 

I could not even reproduce it from an editor, but by manually inserting the
following shape into slide1.xml:

<p:sp>
  <p:nvSpPr>
    <p:cNvPr id="119" name="Invalid shape"/>
    <p:cNvSpPr/>
    <p:nvPr/>
  </p:nvSpPr>
  <p:spPr>
    <a:xfrm/>
    <a:custGeom>
      <a:avLst/>
      <a:gdLst/>
      <a:ahLst/>
      <a:cxnLst/>
      <a:rect l="l" t="t" r="r" b="b"/>
      <a:pathLst>
        <a:path/>
      </a:pathLst>
    </a:custGeom>
    <a:solidFill/>
    <a:ln>
      <a:solidFill/>
      <a:prstDash/>
    </a:ln>
  </p:spPr>
  <p:txBody>
    <a:bodyPr rtlCol="0" anchor="ctr"/>
    <a:lstStyle/>
    <a:p>
      <a:pPr algn="ctr"/>
      <a:endParaRPr lang="en-US" altLang="zh-CN"/>
    </a:p>
  </p:txBody>
</p:sp>

Is this valid at all? It seems that other tools can handle it.
Is there a better solution than explicitly checking for the presence of offset
everywhere where we use it?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org