Hi devs,

When importing an office document using the "Add > Page from Office" 
menu the page title is given by 
org.xwiki.officeimporter.document.XDOMOfficeDocument#getTitle() which 
looks for the first heading (org.xwiki.rendering.block.HeaderBlock) in 
the document content.

This is fine most of the time, but if the title of the office document 
is not set using heading style (e.g. a custom defined style is used 
instead) then:

(1) The page title is wrong.
(2) The first heading is hidden because it equals the page title. This 
is very bad when there is text before the first heading.

WDYT about modifying XDOMOfficeDocument#getTitle() to take into account 
the first paragraph also when looking for the page title?

Note that I have many Word documents with this problem so fixing them to 
use heading style for their titles is not a good option for me.

Thanks,
Marius
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to