PPTX style inheritance

Does anyone know how character styles are inherited in a pptx file? I know this happens at least:

  • Local details ( a:rPr )
  • Paragraph local details ( a:pPr/a:defRPr )
  • Paragraph Form Form ( a:lstStyle/a:lvlXpPr/a:defRPr )
  • Paragraph props from the layout?
  • The main paragraph p:txStyles/(p:titleStyle|p:bodyStyle|p:otherStyle)/a:lvlXpPr/a:defRPr slides ( p:txStyles/(p:titleStyle|p:bodyStyle|p:otherStyle)/a:lvlXpPr/a:defRPr )
  • Slide theme ( a:objectDefaults/(a:spDef|a:lnDef|a:txDef)/a:lstStyle/a:lvlXpPr/a:defRPr )
  • Default presentation ( p:defaultTextStyle/a:lvlXpPr/a:defRPr )

But, when I compare it with the results of other applications, it does not match. For technical reasons, I cannot use a library that already does this for me, I read xml myself. The apache POI source has some TODO: markings TODO: in their respective areas, and it's hard for me to understand the LibreOffice code.

Edit: To explain further, I want to find the absolute startup properties, not the relative startup properties. On might think so: you have some transparencies for the projector. I want to see the image created on all pages, not just the local one.

+7
c # xml text powerpoint
source share
1 answer

I believe by writing inheritance in this context. You mean that one style is based on another. It seems that you can use the BasedOn property to test this programmatically.

I found an article about this with sample code that automatically determines the hierarchy of styles in the selected document. You can find it here: https://blogs.msdn.microsoft.com/ericwhite/2010/03/29/testing-for-base-styles-in-open-xml-wordprocessingml-documents/ . The code is written for Word files (DOCX), but I suppose it should be very similar to PowerPoint (PPTX). If you have any problems using the code for the PPTX file, let me know and I will try to help.

According to this information https://msdn.microsoft.com/en-us/library/office/gg188064.aspx#sectionSection5 , "character styles" can only refer to the type of run elements and cannot be referenced in paragraphs.

Here you can also find an article on style inheritance: https://blogs.msdn.microsoft.com/ericwhite/2009/10/28/open-xml-wordprocessingml-style-inheritance-post-4/

While it does not provide an answer to your question directly, it contains some additional information related to the inheritance of styles, so it may seem useful to you.

0
source share

All Articles