diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-17 18:23:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 09:06:47 +0100 |
commit | 87b9d323a26183131a1f9e6f0fab00a10ccda0ef (patch) | |
tree | 3a0bb8e07b689e4b2561687d98ad6ea9dae1c7fe | |
parent | c79fe32dadf83bf9f9b85c9d0a2589fe5c4f4cbd (diff) |
Some more loplugin:cstylecast: desktop
Change-Id: I1aeba8e1a8452d0329244d85c7c8cbd55353582f
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/dp_persmap.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 2 | ||||
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 39e9034600ea..03dc39477fac 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -260,7 +260,7 @@ OUString CreateMD5FromString( const OUString& aMsg ) rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 ); if ( handle ) { - const sal_uInt8* pData = (const sal_uInt8*)aMsg.getStr(); + const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMsg.getStr()); sal_uInt32 nSize = ( aMsg.getLength() * sizeof( sal_Unicode )); sal_uInt32 nMD5KeyLen = rtl_digest_queryLength( handle ); boost::scoped_array<sal_uInt8> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]); diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index eb47be61d22b..a8acf90d8391 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -203,8 +203,8 @@ bool PersistentMap::readAll() if( m_MapFile.readLine( aValLine) != osl::File::E_None) return false; // decode key and value strings - const OString aKeyName = decodeString( (sal_Char*)aKeyLine.getConstArray(), aKeyLine.getLength()); - const OString aValName = decodeString( (sal_Char*)aValLine.getConstArray(), aValLine.getLength()); + const OString aKeyName = decodeString( reinterpret_cast<char const *>(aKeyLine.getConstArray()), aKeyLine.getLength()); + const OString aValName = decodeString( reinterpret_cast<char const *>(aValLine.getConstArray()), aValLine.getLength()); // insert key-value pair into map add( aKeyName, aValName ); // check end-of-file status @@ -391,7 +391,7 @@ bool PersistentMap::importFromBDB() break; if( (pCur[0] != 0x01) || (pCur[1] != 0xFF)) continue; - const OString aVal( (sal_Char*)pVal, pCur - pVal); + const OString aVal( reinterpret_cast<char const *>(pVal), pCur - pVal); // get the key-candidate const sal_uInt8* pKey = pCur + 1; while( ++pCur < pEnd) @@ -399,7 +399,7 @@ bool PersistentMap::importFromBDB() break; if( (pCur < pEnd) && (*pCur > 0x01)) continue; - const OString aKey( (sal_Char*)pKey, pCur - pKey); + const OString aKey( reinterpret_cast<char const *>(pKey), pCur - pKey); --pCur; // prepare for next round by rewinding to end of key-string // add the key/value pair diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 82bd1c03ae46..292d0bfd724d 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -406,7 +406,7 @@ void DescriptionInfoset::checkBlacklist() const m_context->getServiceManager()->createInstanceWithContext("com.sun.star.xml.dom.DocumentBuilder", m_context), css::uno::UNO_QUERY_THROW); - css::uno::Sequence< sal_Int8 > byteSeq((const sal_Int8*)xmlDependencies.getStr(), xmlDependencies.getLength()); + css::uno::Sequence< sal_Int8 > byteSeq(reinterpret_cast<const sal_Int8*>(xmlDependencies.getStr()), xmlDependencies.getLength()); css::uno::Reference< css::io::XInputStream> inputstream( css::io::SequenceInputStream::createStreamFromSequence(m_context, byteSeq), css::uno::UNO_QUERY_THROW); diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 85b729c862f1..a84672904a0d 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -209,9 +209,10 @@ sal_Bool Acceptor::supportsService(OUString const & ServiceName) Reference< XInterface > Acceptor::impl_getInstance( const Reference< XMultiServiceFactory >& aFactory ) { try { - return (XComponent*) new Acceptor( comphelper::getComponentContext(aFactory) ); + return static_cast<cppu::OWeakObject *>( + new Acceptor(comphelper::getComponentContext(aFactory))); } catch ( const Exception& ) { - return (XComponent*) NULL; + return css::uno::Reference<css::uno::XInterface>(); } } |