diff options
-rw-r--r-- | include/vcl/graph.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index ad5471ca439e..f0a528c84b42 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -191,6 +191,11 @@ public: BitmapChecksum GetChecksum() const; + SAL_DLLPRIVATE std::size_t getHash() const + { + return reinterpret_cast<std::size_t>(ImplGetImpGraphic()); + } + public: std::shared_ptr<GraphicReader>& GetContext(); @@ -227,6 +232,19 @@ public: static css::uno::Sequence<sal_Int8> getUnoTunnelId(); }; +namespace std { + +template <> +struct hash<Graphic> +{ + std::size_t operator()(Graphic const & rGraphic) const + { + return rGraphic.getHash(); + } +}; + +} // end namespace std + #endif // INCLUDED_VCL_GRAPH_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |