poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yegor Kozlov <yegor.koz...@dinom.ru>
Subject Re: XSLF simple question (tutorial getTitle)
Date Wed, 07 Dec 2011 08:02:04 GMT
On Wed, Dec 7, 2011 at 7:25 AM, Nick Burch <nick.burch@alfresco.com> wrote:
> On Tue, 6 Dec 2011, Yegor Kozlov wrote:
>>
>> try the latest build from trunk and use XSSFSlide#getTitle()
>
>
> On a related note, it's worth pointing out that the Slide Name (as shown in
> slide sorter etc) isn't stored on the slide itself. Instead, it's in the
> app.xml docProps, which we do provide access to but isn't hooked into the
> XSLF Slide code, so you'll have to do a bit of work yourself. (Or just stick
> with the title!)
>

Not really.  app.xml stores cached slide names - the purpose is to
quickly examine contents of a .pptx file without parsing it. The real
title is stored in slide.xml in a title or centeredTitle placeholder.
That is, you need to parse slide.xml and fetch a shape having either

<p:ph type="title"/>

or

<p:ph type="centeredTitle"/>

and take its string value.

Using app.xml to read titles is dodgy. Although app.xml and slides are
usually synchronized, it is not always so. If a slide does not have a
title then app.xml contains a default value which may be "PowerPoint
Presentation" or "Default Design" or other value, it depends on the
application that saves the file. Also, when you set or change slide
title in XSLF then app.xml is not updated.

Yegor


> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message