diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 11:28:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 11:28:05 +0200 |
commit | d8ba942b99b8d8853afaefac5b211a8f297519ff (patch) | |
tree | 7e3f5112cd1d8576463c8d656634df918cee0e43 /shell/source/backends | |
parent | 8c8bdc6091b7373dcf9ccf98fe1b8e7af914c9a4 (diff) |
loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Id45e303225602e401a5c3b640185bf476c94a0bb
Diffstat (limited to 'shell/source/backends')
-rw-r--r-- | shell/source/backends/kde4be/kde4access.cxx | 14 | ||||
-rw-r--r-- | shell/source/backends/kdebe/kdeaccess.cxx | 14 | ||||
-rw-r--r-- | shell/source/backends/macbe/macbackend.mm | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/shell/source/backends/kde4be/kde4access.cxx b/shell/source/backends/kde4be/kde4access.cxx index 33a778957f2b..f2a849db7b96 100644 --- a/shell/source/backends/kde4be/kde4access.cxx +++ b/shell/source/backends/kde4be/kde4access.cxx @@ -57,7 +57,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { aClientProgram = "kmail"; else aClientProgram = aClientProgram.section(SPACE, 0, 0); - sClientProgram = (const sal_Unicode *) aClientProgram.utf16(); + sClientProgram = reinterpret_cast<const sal_Unicode *>(aClientProgram.utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sClientProgram ) ); } else if (id == "SourceViewFontHeight") @@ -77,7 +77,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { aFixedFont = KGlobalSettings::fixedFont(); aFontName = aFixedFont.family(); - sFontName = (const sal_Unicode *) aFontName.utf16(); + sFontName = reinterpret_cast<const sal_Unicode *>(aFontName.utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sFontName ) ); } else if (id == "EnableATToolSupport") @@ -93,7 +93,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { OUString sDocumentsURL; if ( aDocumentsDir.endsWith(QChar('/')) ) aDocumentsDir.truncate ( aDocumentsDir.length() - 1 ); - sDocumentsDir = (const sal_Unicode *) aDocumentsDir.utf16(); + sDocumentsDir = reinterpret_cast<const sal_Unicode *>(aDocumentsDir.utf16()); osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData ); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sDocumentsURL ) ); @@ -119,7 +119,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aFTPProxy.isEmpty() ) { KUrl aProxy(aFTPProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().utf16(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -171,7 +171,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aHTTPProxy.isEmpty() ) { KUrl aProxy(aHTTPProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().utf16(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -223,7 +223,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aHTTPSProxy.isEmpty() ) { KUrl aProxy(aHTTPSProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().utf16(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -271,7 +271,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { OUString sNoProxyFor; aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON ); - sNoProxyFor = (const sal_Unicode *) aNoProxyFor.utf16(); + sNoProxyFor = reinterpret_cast<const sal_Unicode *>(aNoProxyFor.utf16()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sNoProxyFor ) ); } diff --git a/shell/source/backends/kdebe/kdeaccess.cxx b/shell/source/backends/kdebe/kdeaccess.cxx index b7de82a312be..2088ebc33eff 100644 --- a/shell/source/backends/kdebe/kdeaccess.cxx +++ b/shell/source/backends/kdebe/kdeaccess.cxx @@ -53,7 +53,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { aClientProgram = "kmail"; else aClientProgram = aClientProgram.section(SPACE, 0, 0); - sClientProgram = (const sal_Unicode *) aClientProgram.ucs2(); + sClientProgram = reinterpret_cast<const sal_Unicode *>(aClientProgram.ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sClientProgram ) ); } else if (id == "SourceViewFontHeight") @@ -73,7 +73,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { aFixedFont = KGlobalSettings::fixedFont(); aFontName = aFixedFont.family(); - sFontName = (const sal_Unicode *) aFontName.ucs2(); + sFontName = reinterpret_cast<const sal_Unicode *>(aFontName.ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sFontName ) ); } else if (id == "EnableATToolSupport") @@ -89,7 +89,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { OUString sDocumentsURL; if ( aDocumentsDir.endsWith(QChar('/')) ) aDocumentsDir.truncate ( aDocumentsDir.length() - 1 ); - sDocumentsDir = (const sal_Unicode *) aDocumentsDir.ucs2(); + sDocumentsDir = reinterpret_cast<const sal_Unicode *>(aDocumentsDir.ucs2()); osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData ); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sDocumentsURL ) ); @@ -115,7 +115,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aFTPProxy.isEmpty() ) { KURL aProxy(aFTPProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -167,7 +167,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aHTTPProxy.isEmpty() ) { KURL aProxy(aHTTPProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -219,7 +219,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { if ( !aHTTPSProxy.isEmpty() ) { KURL aProxy(aHTTPSProxy); - OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2(); + OUString sProxy = reinterpret_cast<const sal_Unicode *>(aProxy.host().ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } @@ -267,7 +267,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { OUString sNoProxyFor; aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON ); - sNoProxyFor = (const sal_Unicode *) aNoProxyFor.ucs2(); + sNoProxyFor = reinterpret_cast<const sal_Unicode *>(aNoProxyFor.ucs2()); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sNoProxyFor ) ); } diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm index 57b0a21c735b..f2fff034c781 100644 --- a/shell/source/backends/macbe/macbackend.mm +++ b/shell/source/backends/macbe/macbackend.mm @@ -184,7 +184,7 @@ rtl::OUString CFStringToOUString(const CFStringRef sOrig) { CFRelease(sOrig); - return rtl::OUString::createFromAscii((sal_Char*)sBuffer); + return rtl::OUString::createFromAscii(sBuffer); } rtl::OUString GetOUString( NSString* pStr ) |