c# - Getting the placeholder values with Open XML SDK 2.0 -


I am trying to drill through a shape in a PowerPoint slide to get the placeholder values ​​of the shape . The shape on the shapes looks like this:

  & lt; P: sp & gt; & Lt; P: nvSpPr & gt; & Lt; P: cNvPr id = "10" name = "text placeholder 2" /> & Lt; P: cNvSpPr & gt; & Lt; A: spLocks noGrp = "1" /> & Lt; / P: cNvSpPr & gt; & Lt; p: nvPr & gt; & Lt; P: pH type = "body" sz = "quarter" idx = "13" is CustomPrompt = "1" /> & Lt; / P: nvPr & gt; & Lt; / P: nvSpPr & gt; & Lt; P: spPr & gt; & Lt; A: xfrm & gt; & Lt; A: off x = "457200" y = "3276601" /> & Lt; A: ext cx = "8229600" cy = "838199" /> & Lt; / A: xfrm & gt; & Lt; A: PriestGame Prix = "Rect" & gt; & Lt; a: avLst / & gt; & Lt; / A: prstGeom & gt; & Lt; / p: spPr & gt; & Lt; p: txBody & gt; & Lt; A: bodyPr lIns = "91421" tIns = "45710" rIns = "91421" bIns = "45710" /> & Lt; a: lstStyle & gt; & Lt; A: lvl1pPr Merl = "0" Indent = "0" algn = "ctr" & gt; & Lt; A: buFontTx / & gt; & Lt; a: buNone / & gt; & Lt; A: defRPr sz = "2400" b = "1" base line = "0" & ​​gt; & Lt; A: solidFill & gt; & Lt; A: schemeClr val = "tx1" /> & Lt; / A: solidFill & gt; & Lt; A: Latin typeface = "+ mj-lt" /> & Lt; A: cs typefaces = "aerial" pitchfamille = "34" charset = "0" /> & Lt; / A: defRPr & gt; & Lt; / A: lvl1pPr & gt; & Lt; / A: lstStyle & gt; & Lt; A: p & gt; & Lt; A: ppr lvl = "0" /> & Lt; A: r & gt; & Lt; A: rp lang = "en-us" dirty = "0" smtClean = "0" /> & Lt; A: t & gt; Click to enter course title & lt; / A: t & gt; & Lt; / A: r> & Lt; / A: p & gt; & Lt; / p: txBody & gt; & Lt; / P: SP & gt;   

In the part I am interested in appearing like this:

  & lt; P: nvPr & gt; & Lt; P: pH type = "body" sz = "quarter" idx = "13" is CustomPrompt = "1" /> & Lt; / p: nvPr & gt; I am trying to get the  idx  value (13, in this case)   

The statement that I am using seems to be so far (I'm saying "so far" because I do not have to tell it):

  Var index = shape.NonVisualShapeProperties.NonVisualShapeDrawingProperties & Lt; - ???   

At this point in the code, I have the size that I want, I can not understand how to get placeholder value to use Open Office SDK. I think I can treat it as a plain old XML and get it by the element name, but I thought it would be built in some way in the OOxML SDK.

Finally, find out how to do this:

Index = int .Parse (shape.NonVisualShapeProperties.ApplicationNonVisualDrawingProperties.PlaceholderShape.Index);

I was using NonVisualShapeDrawingProperties when I should have been using ApplicationNonVisualDrawingProperties .

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -