Kaydet (Commit) 3195fce9 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

hash implementation for Graphic objects, for set/map use

Change-Id: I58547ad90d1aba6b1734a547c8138d1476c4b813
Reviewed-on: https://gerrit.libreoffice.org/49072Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 62222b40
......@@ -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: */
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