diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-05-18 19:18:02 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-05-18 19:24:54 +0200 |
commit | 1472935fd74c289717cd7783d99bc99d82d7866d (patch) | |
tree | 36eea454c623a1934560a2498ce0afb30aafaeab /sw/qa | |
parent | a28f5713a7e91b5d99cc0e63470db1512b997320 (diff) |
note how to find images using UNO, as it's not exactly easy to find out
Change-Id: If5440cae646a56fef4c054774705689e5512b8e4
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/README | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/README b/sw/qa/extras/README index eb259558bdcd..49dc9aab07f9 100644 --- a/sw/qa/extras/README +++ b/sw/qa/extras/README @@ -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; |