diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-02 00:18:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-02 00:18:25 +0100 |
commit | 1f4d84f40e00967084ac4b7845b1e3599bef5075 (patch) | |
tree | f936facc98f27c5e1b6c3a50c598349de56cb8bf /unoxml/source/dom | |
parent | 59290634d6402bed7867575a57808f12e9a03937 (diff) |
swap in the standard template for this
Diffstat (limited to 'unoxml/source/dom')
-rw-r--r-- | unoxml/source/dom/node.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
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 <com/sun/star/xml/sax/FastToken.hpp> +#include <comphelper/servicehelper.hxx> + #include <document.hxx> #include <attr.hxx> #include <childlist.hxx> @@ -54,19 +56,9 @@ using namespace ::com::sun::star; - -namespace { - struct UnoTunnelId - : public ::rtl::StaticWithInit< Sequence<sal_Int8>, UnoTunnelId > - { - Sequence<sal_Int8> operator() () - { - Sequence<sal_Int8> ret(16); - rtl_createUuid( - reinterpret_cast<sal_uInt8*>(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 >( |