diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-13 19:57:16 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-18 11:39:30 +0900 |
commit | a88a8ca0d2b3f5a807ade539ef7609aa31b6742c (patch) | |
tree | da07b24cdc811a3107430c47439f93409d98cc89 /xmloff/source/style/StyleMap.cxx | |
parent | 211c12b9c64facd1c12f637a5229bd6a6feb032a (diff) |
xmloff: cleanup StyleMap
Change-Id: I487ab62f412512b0437e6b46a01a3be7c88f5760
Diffstat (limited to 'xmloff/source/style/StyleMap.cxx')
-rw-r--r-- | xmloff/source/style/StyleMap.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
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<sal_Int8>& StyleMap::getUnoTunnelId() throw() { return theStyleMapUnoTunnelId::get().getSeq(); } -StyleMap* StyleMap::getImplementation( Reference< XInterface > xInt ) throw() +StyleMap* StyleMap::getImplementation(Reference<XInterface> xInterface) throw() { - Reference< XUnoTunnel > xUT( xInt, UNO_QUERY ); - if( xUT.is() ) - return reinterpret_cast<StyleMap *>( - xUT->getSomething( StyleMap::getUnoTunnelId() ) ); - else - return 0; + Reference<XUnoTunnel> xUnoTunnel(xInterface, UNO_QUERY); + if (xUnoTunnel.is()) + { + return reinterpret_cast<StyleMap*>(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<sal_Int8>& 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<sal_Int64>( this ); + return reinterpret_cast<sal_Int64>(this); } + return 0; } |