Bug Hunting Session
Bug 33395 - BackGraphic embeding
Summary: BackGraphic embeding
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.3.0 RC4
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 23:18 UTC by bugzilla33
Modified: 2011-01-24 06:37 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla33 2011-01-23 23:18:25 UTC
service: com.sun.star.style.PageProperties

please add new Properties:

1. BackGraphic (type: com.sun.star.graphic.XGraphic)
2. HeaderBackGraphic (type: com.sun.star.graphic.XGraphic)
3. FooterBackGraphic (type: com.sun.star.graphic.XGraphic)

It should be possible to embed a background with 
com.sun.star.graphic.GraphicProvider using queryGraphic method.
Currently there is no way to embed the image background.
Only links (BackGraphicURL, HeaderBackGraphicURL, FooterBackGraphicURL) by 
which the backgrounds are not saved in a odt files.

Please refer to the Graphic property from
http://api.openoffice.org/docs/common/ref/com/sun/star/text/TextGraphicObject.html
Comment 1 Noel Power 2011-01-24 05:20:58 UTC
first this isn't at all a bug, it is at most an enhancement request. But... in this case there is actually no need for an enhancement, there is already a framework in place for handling embedded graphics with the existing api. E.g. if you set the page background to an image ( and don't set it to be a link ) you will see the value of the BackGraphicUrl property will be something like..

vnd.sun.star.GraphicObject:1000000000000800000006008E87321C

you need to look into the http://api.openoffice.org/docs/common/ref/com/sun/star/graphic/GraphicObject.html and http://api.openoffice.org/docs/common/ref/com/sun/star/graphic/XGraphicObject.html. Using the Graphic object service will allow you to create an XGraphicObject that is associated with a 'vnd.sun.star.GraphicObject' scheme URL. Setting the BackGraphicURL, HeaderBackGraphicURL, FooterBackGraphicURL with such and embedded graphic url should do what you require ( if I understood correctly ) Closing the bug ( assuming that using embedded graphics is your intention )
Comment 2 bugzilla33 2011-01-24 06:37:45 UTC
Thanks for the detailed solution. It works.