PPTX - finding out if text is displayed with OpenXML

I could not find a single indicator that could tell me whether the text in the txBody tag is marked or not, can you tell me which indicator I should use to understand whether the text is marked or simple?

-Thanks

+4
source share
1 answer

In the txBody tag, you can find the tags "a: buFont" and "buChar" to help you identify that the text is marked. eg.

<a:buFont typeface="Arial" pitchFamily="34" charset="0"/> <a:buChar char="β€’"/> 

Update:

Hi, +1 I learned a lot for publishing this question.

After googling, I found a link that addresses a similar problem, the answer from Adamm clears this,

"Okay, so I think I figured it out. Basically, if formatting is specified in the layout or slide, it goes to the wizard, and if its form 'title' or 'ctrTitle' uses formatting in and by default it is lvl1. That the same goes for text that is not in the form of a heading, formatting is used for them by default and if lvl is not specified, by default it is equal to lvl1. And also another tip, although it doesn’t correspond to my original question, there is one more txStyle in slideMaster which is used for text in a form that is not in txBody. "

Now the slide in your pptx uses the "Office Theme", and the text that interests you is in the form of a format in the slide design. Labeled text is inherited from the slideMaster1.xml file in SlideMasters.

As mentioned in the above quote, buletted text is inherited from "a: lvl1pPr" from "p: bodyStyle" in the slideMaster1.xml file, you can also see that the level 2 bullet has a "-" for the office by default Theme slide master there .

I tried to confirm this by changing the value of char = "β€’" to ">" to see that the value ">" was changed in the next line

 <p:bodyStyle> <a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"> <a:spcBef> <a:spcPct val="20000"/> </a:spcBef> <a:buFont typeface="Arial" pitchFamily="34" charset="0"/> <a:buChar char="β€’"/> .... 

Now, if you want to change it programmatically, you can do it from Slide Wizard 1. But the only problem here: when we change the marked style here (for example, above), it changes for all the slides, as well as for the future slides that you create with the same topic in its ppt.

Hope this helps.

Sincerely.

+3
source

Source: https://habr.com/ru/post/1403024/


All Articles