diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-03-31 17:27:01 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-04-10 08:33:55 +0200 |
commit | ea3d755ac949c1b6dada5c341e018f8c23f5d395 (patch) | |
tree | 086b3573d3e2f64fd918df4996d1f00ad9aa863b /vcl/inc/impgraph.hxx | |
parent | 94185507ed11bf6e2e2e9fa47c247680ae1edb36 (diff) |
vcl: detach usage and remove GraphicManager and GraphicCache
Also remove some GraphicObjectTest because they call into
GraphicManager which now doesn't exist anymore.
Change-Id: Ia434736d8611df629af3e897c878a7fb8bbe4706
Reviewed-on: https://gerrit.libreoffice.org/52243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc/impgraph.hxx')
-rw-r--r-- | vcl/inc/impgraph.hxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 6c76275abbb2..834113130bbe 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -31,9 +31,35 @@ class GfxLink; struct ImpSwapFile; class GraphicConversionParameters; +class GraphicID +{ +private: + sal_uInt32 mnID1; + sal_uInt32 mnID2; + sal_uInt32 mnID3; + BitmapChecksum mnID4; + +public: + GraphicID(ImpGraphic& rGraphic); + + bool operator==(const GraphicID& rID) const + { + return rID.mnID1 == mnID1 && rID.mnID2 == mnID2 && + rID.mnID3 == mnID3 && rID.mnID4 == mnID4; + } + + bool IsEmpty() const + { + return 0 == mnID4; + } + + OString getIDString() const; +}; + class ImpGraphic final { friend class Graphic; + friend class GraphicID; private: @@ -51,6 +77,7 @@ private: VectorGraphicDataPtr maVectorGraphicData; css::uno::Sequence<sal_Int8> maPdfData; OUString msOriginURL; + std::unique_ptr<GraphicID> mpGraphicID; private: @@ -81,6 +108,13 @@ private: msOriginURL = rOriginURL; } + OString getUniqueID() + { + if (!mpGraphicID) + mpGraphicID.reset(new GraphicID(*this)); + return mpGraphicID->getIDString(); + } + void ImplCreateSwapInfo(); void ImplClearGraphics(); void ImplClear(); |