Lines 36-41
Link Here
|
36 |
|
36 |
|
37 |
#include <boost/shared_ptr.hpp> |
37 |
#include <boost/shared_ptr.hpp> |
38 |
#include <boost/current_function.hpp> |
38 |
#include <boost/current_function.hpp> |
|
|
39 |
#include <boost/functional/hash.hpp> |
39 |
|
40 |
|
40 |
#include <functional> |
41 |
#include <functional> |
41 |
#include <cstdlib> |
42 |
#include <cstdlib> |
Lines 71-94
Link Here
|
71 |
|
72 |
|
72 |
typedef ::boost::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; |
73 |
typedef ::boost::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; |
73 |
|
74 |
|
74 |
// xxx todo: remove with boost::hash when 1.33 is available |
|
|
75 |
template <typename T> |
75 |
template <typename T> |
76 |
struct hash : ::std::unary_function<T, ::std::size_t> |
|
|
77 |
{ |
78 |
::std::size_t operator()( T const& val ) const { |
79 |
return hash_value(val); |
80 |
} |
81 |
}; |
82 |
template <typename T> |
83 |
inline ::std::size_t hash_value( T * const& p ) |
76 |
inline ::std::size_t hash_value( T * const& p ) |
84 |
{ |
77 |
{ |
85 |
::std::size_t d = static_cast< ::std::size_t >( |
78 |
::std::size_t d = static_cast< ::std::size_t >( |
86 |
reinterpret_cast< ::std::ptrdiff_t >(p) ); |
79 |
reinterpret_cast< ::std::ptrdiff_t >(p) ); |
87 |
return d + (d >> 3); |
80 |
return d + (d >> 3); |
88 |
} |
81 |
} |
89 |
|
82 |
} |
90 |
// xxx todo: shift to namespace com::sun::star::uno when |
83 |
} |
91 |
// 1.33 is available |
84 |
|
|
|
85 |
namespace com { namespace sun { namespace star { namespace uno { |
92 |
template <typename T> |
86 |
template <typename T> |
93 |
inline ::std::size_t hash_value( |
87 |
inline ::std::size_t hash_value( |
94 |
::com::sun::star::uno::Reference<T> const& x ) |
88 |
::com::sun::star::uno::Reference<T> const& x ) |
Lines 98-106
Link Here
|
98 |
::com::sun::star::uno::Reference< |
92 |
::com::sun::star::uno::Reference< |
99 |
::com::sun::star::uno::XInterface> const xRoot( |
93 |
::com::sun::star::uno::XInterface> const xRoot( |
100 |
x, ::com::sun::star::uno::UNO_QUERY ); |
94 |
x, ::com::sun::star::uno::UNO_QUERY ); |
101 |
return hash<void *>()(xRoot.get()); |
95 |
return boost::hash<void *>()(xRoot.get()); |
102 |
} |
96 |
} |
|
|
97 |
} } } } |
103 |
|
98 |
|
|
|
99 |
namespace slideshow { |
100 |
|
101 |
namespace internal { |
104 |
/** Cycle mode of intrinsic animations |
102 |
/** Cycle mode of intrinsic animations |
105 |
*/ |
103 |
*/ |
106 |
enum CycleMode |
104 |
enum CycleMode |
Lines 394-400
Link Here
|
394 |
|
392 |
|
395 |
basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize, |
393 |
basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize, |
396 |
const boost::shared_ptr<UnoView>& pView ); |
394 |
const boost::shared_ptr<UnoView>& pView ); |
397 |
} |
|
|
398 |
} |
399 |
|
395 |
|
|
|
396 |
} // namespace internal |
397 |
} //namespace slideshow |
398 |
|
400 |
#endif /* INCLUDED_SLIDESHOW_TOOLS_HXX */ |
399 |
#endif /* INCLUDED_SLIDESHOW_TOOLS_HXX */ |