Kaydet (Commit) 1472935f authored tarafından Luboš Luňák's avatar Luboš Luňák

note how to find images using UNO, as it's not exactly easy to find out

Change-Id: If5440cae646a56fef4c054774705689e5512b8e4
üst a28f5713
......@@ -198,3 +198,23 @@ uno::Reference<container::XIndexAccess> bookmarks(bookmarksSupplier->getBookmark
uno::Reference<uno::XInterface> bookmark;
// get the bookmark by index
bookmarks->getByIndex(0) >>= bookmark;
=== Images
Embedded images seem to be accessed like this:
Basic:
image = ThisComponent.DrawPage.getByIndex(0)
graphic = image.Graphic
C++:
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPageSupplier> drawPageSupplier(textDocument, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> drawPage = drawPageSupplier->getDrawPage();
uno::Reference<drawing::XShape> image;
drawPage->getByIndex(0) >>= image;
uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> graphic;
imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment