summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-02-11 12:41:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-02-11 12:41:24 +0000
commit9b5a0fd92230348b7c524305cdd249d0df709db0 (patch)
tree5cc175f38e408ff27329243c6f4e18f08b110e49 /oox
parenta6748fa1bd4cfa149cd577e3ce1fbff0567c0748 (diff)
(std|boost)::hash on a const char* hashes the pointer not the contents
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/export/shapes.hxx2
-rw-r--r--oox/source/export/shapes.cxx2
2 files changed, 1 insertions, 3 deletions
diff --git a/oox/inc/oox/export/shapes.hxx b/oox/inc/oox/export/shapes.hxx
index 528d7d7599fe..37e68613f6a5 100644
--- a/oox/inc/oox/export/shapes.hxx
+++ b/oox/inc/oox/export/shapes.hxx
@@ -61,8 +61,6 @@ private:
struct ShapeHash
{
- boost::hash<const char*> maHashFunction;
-
size_t operator()( const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > ) const;
};
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 3d46dc1a8a5e..624713cbc4d2 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -985,7 +985,7 @@ ShapeExport& ShapeExport::WriteUnknownShape( Reference< XShape > )
size_t ShapeExport::ShapeHash::operator()( const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > rXShape ) const
{
- return maHashFunction( USS( rXShape->getShapeType() ) );
+ return rXShape->getShapeType().hashCode();
}
sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape > rXShape )