summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-03-15 09:57:46 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-03-15 04:11:02 +0100
commitd775ef360168271f429466bbc174ae7dec402f1d (patch)
tree8e2772f7031c3af3fdd45afc0576faab81ccd8ce /include
parent531036fa296b6bfca5ec93c4d7ef1264dc6e7b65 (diff)
change recursive ImageURL prop. search to use XGraphic
In two cases we need to traverse and gather all ImageURL properties and get the URL string and store the graphic content to a storage (like we do in xmloff filter). ImageURL property can now only store external URL and Graphic stores the embedded XGraphic, so this was changed to look into Graphic property first and then ImageURL. We also don't gather URL sting anymore so they need to be loaded to XGraphic when gathering them. Change-Id: I5f3f4be2b403b9589d72b8733df0c97109f2b65d Reviewed-on: https://gerrit.libreoffice.org/51308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/GraphicObject.hxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index 3025b48fee05..877df26f9289 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -25,6 +25,8 @@
#include <vcl/dllapi.h>
#include <o3tl/typed_flags_set.hxx>
+#include <com/sun/star/graphic/XGraphic.hpp>
+
#include <unordered_set>
enum class GraphicManagerDrawFlags
@@ -466,12 +468,6 @@ public:
static bool isGraphicObjectUniqueIdURL(OUString const & rURL);
- // will inspect an object ( e.g. a control ) for any 'ImageURL'
- // properties and return these in a vector. Note: this implementation
- // will cater for XNameContainer objects and deep inspect any containers
- // if they exist
- static void InspectForGraphicObjectImageURL( const css::uno::Reference< css::uno::XInterface >& rxIf, std::vector< OUString >& rvEmbedImgUrls );
-
// create CropScaling information
// fWidth, fHeight: object size
// f*Crop: crop values relative to original bitmap size
@@ -605,6 +601,24 @@ public:
);
};
+namespace vcl
+{
+namespace graphic
+{
+
+// Will search an object ( e.g. a control ) for any 'ImageURL' or 'Graphic'
+// properties and return graphics from the properties in a vector. ImageURL
+// will be loaded from the URL.
+//
+// Note: this implementation will cater for XNameContainer objects and deep inspect any containers
+// if they exist
+
+VCL_DLLPUBLIC void SearchForGraphics(css::uno::Reference<css::uno::XInterface> const & rxInterface,
+ std::vector<css::uno::Reference<css::graphic::XGraphic>> & raGraphicList);
+
+}
+} // end namespace vcl::graphic
+
#endif // INCLUDED_VCL_GRAPHICOBJECT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */