From a88a8ca0d2b3f5a807ade539ef7609aa31b6742c Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 13 Apr 2015 19:57:16 +0900 Subject: xmloff: cleanup StyleMap Change-Id: I487ab62f412512b0437e6b46a01a3be7c88f5760 --- xmloff/source/style/StyleMap.cxx | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'xmloff/source/style/StyleMap.cxx') diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx index 05cd078231c8..339f8e8e20c2 100644 --- a/xmloff/source/style/StyleMap.cxx +++ b/xmloff/source/style/StyleMap.cxx @@ -24,53 +24,53 @@ #include "StyleMap.hxx" -using namespace ::osl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; +using namespace osl; +using namespace css::uno; +using namespace css::lang; - -StyleMap::StyleMap() +namespace { -} +class theStyleMapUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theStyleMapUnoTunnelId> +{}; +} // end anonymous namespace -StyleMap::~StyleMap() +StyleMap::StyleMap() { } -namespace +StyleMap::~StyleMap() { - class theStyleMapUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theStyleMapUnoTunnelId> {}; } // XUnoTunnel & co -const Sequence< sal_Int8 > & StyleMap::getUnoTunnelId() throw() +const Sequence& StyleMap::getUnoTunnelId() throw() { return theStyleMapUnoTunnelId::get().getSeq(); } -StyleMap* StyleMap::getImplementation( Reference< XInterface > xInt ) throw() +StyleMap* StyleMap::getImplementation(Reference xInterface) throw() { - Reference< XUnoTunnel > xUT( xInt, UNO_QUERY ); - if( xUT.is() ) - return reinterpret_cast( - xUT->getSomething( StyleMap::getUnoTunnelId() ) ); - else - return 0; + Reference xUnoTunnel(xInterface, UNO_QUERY); + if (xUnoTunnel.is()) + { + return reinterpret_cast(xUnoTunnel->getSomething(StyleMap::getUnoTunnelId())); + } + + return 0; } // XUnoTunnel -sal_Int64 SAL_CALL StyleMap::getSomething( - const Sequence< sal_Int8 >& rId ) - throw( RuntimeException, std::exception ) +sal_Int64 SAL_CALL StyleMap::getSomething(const Sequence& rId) + throw(RuntimeException, std::exception) { - if( rId.getLength() == 16 && - 0 == memcmp( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && + memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0) { - return reinterpret_cast( this ); + return reinterpret_cast(this); } + return 0; } -- cgit