summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-04-13 19:57:16 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-04-18 11:39:30 +0900
commita88a8ca0d2b3f5a807ade539ef7609aa31b6742c (patch)
treeda07b24cdc811a3107430c47439f93409d98cc89
parent211c12b9c64facd1c12f637a5229bd6a6feb032a (diff)
xmloff: cleanup StyleMap
Change-Id: I487ab62f412512b0437e6b46a01a3be7c88f5760
-rw-r--r--xmloff/source/style/StyleMap.cxx48
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;
}