From 1f4d84f40e00967084ac4b7845b1e3599bef5075 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Jun 2011 00:18:25 +0100 Subject: swap in the standard template for this --- unoxml/source/dom/node.cxx | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'unoxml/source/dom/node.cxx') diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index b4645bc0b578..8cbcfc534a7d 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -43,6 +43,8 @@ #include +#include + #include #include #include @@ -54,19 +56,9 @@ using namespace ::com::sun::star; - -namespace { - struct UnoTunnelId - : public ::rtl::StaticWithInit< Sequence, UnoTunnelId > - { - Sequence operator() () - { - Sequence ret(16); - rtl_createUuid( - reinterpret_cast(ret.getArray()), 0, sal_True); - return ret; - } - }; +namespace +{ + class theCNodeUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theCNodeUnoTunnelId > {}; } namespace DOM @@ -192,7 +184,7 @@ namespace DOM if (!xUnoTunnel.is()) { return 0; } CNode *const pCNode( reinterpret_cast< CNode* >( ::sal::static_int_cast< sal_IntPtr >( - xUnoTunnel->getSomething(UnoTunnelId::get())))); + xUnoTunnel->getSomething(theCNodeUnoTunnelId::get().getSeq())))); return pCNode; } @@ -1053,7 +1045,7 @@ namespace DOM throw (RuntimeException) { if ((rId.getLength() == 16) && - (0 == rtl_compareMemory(UnoTunnelId::get().getConstArray(), + (0 == rtl_compareMemory(theCNodeUnoTunnelId::get().getSeq().getConstArray(), rId.getConstArray(), 16))) { return ::sal::static_int_cast< sal_Int64 >( -- cgit