[Libreoffice-commits] core.git: 58 commits - avmedia/source basctl/source basebmp/source bridges/source chart2/source comphelper/source compilerplugins/clang connectivity/source cppcanvas/source cppuhelper/source cppu/source cui/source dbaccess/source desktop/source drawinglayer/source dtrans/source embeddedobj/source eventattacher/source extensions/source filter/source framework/inc hwpfilter/source i18npool/source include/com include/comphelper include/svtools l10ntools/source lingucomponent/source linguistic/source lotuswordpro/source mysqlc/source oox/source package/source reportdesign/source rsc/source sal/osl sal/rtl sax/source scaddins/source scripting/source sc/source sd/source sfx2/source shell/source sot/source starmath/source stoc/source store/source svl/source svtools/source svx/source sw/source testtools/source ucb/source unotools/source unoxml/source uui/source vcl/generic vcl/source vcl/unx xmlhelp/source xmloff/source xmlscript/source xmlsecurity/source

Stephan Bergmann sbergman at redhat.com
Tue Mar 31 04:20:11 PDT 2015


 avmedia/source/gstreamer/gstuno.cxx                                        |    2 
 avmedia/source/opengl/ogluno.cxx                                           |    2 
 avmedia/source/vlc/vlcuno.cxx                                              |    2 
 basctl/source/basicide/register.cxx                                        |    2 
 basebmp/source/bitmapdevice.cxx                                            |    2 
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx                           |    2 
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx             |   10 -
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx                       |    4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx                       |    4 
 bridges/source/cpp_uno/shared/bridge.cxx                                   |    4 
 bridges/source/cpp_uno/shared/component.cxx                                |    6 
 bridges/source/cpp_uno/shared/unointerfaceproxy.cxx                        |    2 
 bridges/source/jni_uno/jni_java2uno.cxx                                    |    4 
 bridges/source/jni_uno/jni_uno2java.cxx                                    |   10 -
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx              |    2 
 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx |    4 
 chart2/source/controller/main/ChartTransferable.cxx                        |    2 
 chart2/source/inc/CommonFunctors.hxx                                       |    6 
 comphelper/source/misc/anytostring.cxx                                     |    2 
 comphelper/source/misc/types.cxx                                           |   28 +--
 comphelper/source/property/propertycontainerhelper.cxx                     |    6 
 compilerplugins/clang/redundantcast.cxx                                    |   54 +++++-
 connectivity/source/commontools/dbexception.cxx                            |    6 
 connectivity/source/drivers/calc/Cservices.cxx                             |    2 
 connectivity/source/drivers/dbase/Dservices.cxx                            |    2 
 connectivity/source/drivers/evoab2/NServices.cxx                           |    2 
 connectivity/source/drivers/firebird/Services.cxx                          |    2 
 connectivity/source/drivers/flat/Eservices.cxx                             |    2 
 connectivity/source/drivers/hsqldb/Hservices.cxx                           |    2 
 connectivity/source/drivers/jdbc/jservices.cxx                             |    2 
 connectivity/source/drivers/kab/KServices.cxx                              |    2 
 connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx          |    4 
 connectivity/source/drivers/mysql/Yservices.cxx                            |    2 
 connectivity/source/drivers/odbc/oservices.cxx                             |    2 
 cppcanvas/source/uno/uno_mtfrenderer.cxx                                   |    2 
 cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx                        |    2 
 cppu/source/threadpool/current.cxx                                         |    4 
 cppu/source/uno/EnvStack.cxx                                               |   10 -
 cppu/source/uno/data.cxx                                                   |    2 
 cppu/source/uno/lbenv.cxx                                                  |    4 
 cppuhelper/source/exc_thrower.cxx                                          |    8 
 cppuhelper/source/implementationentry.cxx                                  |    2 
 cppuhelper/source/macro_expander.cxx                                       |    2 
 cppuhelper/source/tdmgr.cxx                                                |    4 
 cui/source/customize/cfg.cxx                                               |    2 
 cui/source/customize/cfgutil.cxx                                           |    4 
 cui/source/dialogs/cuicharmap.cxx                                          |    2 
 dbaccess/source/core/dataaccess/intercept.cxx                              |    2 
 dbaccess/source/ui/app/AppDetailView.cxx                                   |    8 
 dbaccess/source/ui/browser/dbexchange.cxx                                  |    2 
 dbaccess/source/ui/misc/ToolBoxHelper.cxx                                  |    2 
 dbaccess/source/ui/tabledesign/TableRowExchange.cxx                        |    2 
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx                 |    2 
 desktop/source/offacc/acceptor.cxx                                         |    2 
 drawinglayer/source/drawinglayeruno/drawinglayeruno.cxx                    |    2 
 dtrans/source/cnttype/mctfentry.cxx                                        |    2 
 embeddedobj/source/commonembedding/register.cxx                            |    6 
 embeddedobj/source/msole/oleregister.cxx                                   |    2 
 eventattacher/source/eventattacher.cxx                                     |    2 
 extensions/source/plugin/base/service.cxx                                  |    2 
 extensions/source/update/check/download.cxx                                |    4 
 filter/source/config/cache/registration.cxx                                |    2 
 filter/source/flash/swfuno.cxx                                             |    4 
 filter/source/flash/swfwriter1.cxx                                         |    2 
 filter/source/odfflatxml/OdfFlatXml.cxx                                    |    2 
 filter/source/pdf/impdialog.cxx                                            |    4 
 filter/source/pdf/pdfuno.cxx                                               |    6 
 filter/source/placeware/uno.cxx                                            |    2 
 filter/source/t602/filterenv.cxx                                           |    4 
 filter/source/xmlfilteradaptor/genericfilter.cxx                           |    2 
 filter/source/xsltdialog/xmlfilterdialogcomponent.cxx                      |    2 
 filter/source/xsltfilter/XSLTFilter.cxx                                    |    4 
 framework/inc/macros/registration.hxx                                      |    2 
 hwpfilter/source/hwpreader.hxx                                             |    2 
 i18npool/source/registerservices/registerservices.cxx                      |    2 
 i18npool/source/search/textsearch.cxx                                      |    2 
 include/com/sun/star/uno/Any.hxx                                           |   90 +++++-----
 include/com/sun/star/uno/genfunc.hxx                                       |    8 
 include/comphelper/extract.hxx                                             |    2 
 include/comphelper/uno3.hxx                                                |    4 
 include/svtools/brwbox.hxx                                                 |    2 
 l10ntools/source/xmlparse.cxx                                              |    2 
 lingucomponent/source/hyphenator/hyphen/hreg.cxx                           |    2 
 lingucomponent/source/spellcheck/spell/sreg.cxx                            |    2 
 lingucomponent/source/thesaurus/libnth/ntreg.cxx                           |    2 
 linguistic/source/lngreg.cxx                                               |   10 -
 lotuswordpro/source/filter/genericfilter.cxx                               |    2 
 mysqlc/source/mysqlc_services.cxx                                          |    2 
 oox/source/helper/binaryinputstream.cxx                                    |    2 
 oox/source/helper/binaryoutputstream.cxx                                   |    2 
 oox/source/ole/vbainputstream.cxx                                          |    2 
 package/source/manifest/UnoRegister.cxx                                    |    2 
 package/source/xstor/register.cxx                                          |    2 
 reportdesign/source/ui/report/ReportControllerObserver.cxx                 |    2 
 rsc/source/parser/rsckey.cxx                                               |    2 
 sal/osl/unx/file.cxx                                                       |    2 
 sal/rtl/math.cxx                                                           |    2 
 sax/source/fastparser/fastparser.cxx                                       |    6 
 sc/source/filter/excel/xestream.cxx                                        |    2 
 sc/source/filter/excel/xiescher.cxx                                        |    2 
 sc/source/filter/excel/xistream.cxx                                        |    4 
 sc/source/filter/oox/biffinputstream.cxx                                   |    2 
 sc/source/ui/optdlg/calcoptionsdlg.cxx                                     |    2 
 sc/source/ui/unoobj/appluno.cxx                                            |   46 ++---
 sc/source/ui/view/cellsh2.cxx                                              |    2 
 scaddins/source/analysis/analysis.cxx                                      |    2 
 scaddins/source/datefunc/datefunc.cxx                                      |    2 
 scaddins/source/pricing/pricing.cxx                                        |    2 
 scripting/source/protocolhandler/scripthandler.cxx                         |    2 
 sd/source/filter/html/htmlex.cxx                                           |    2 
 sd/source/ui/app/sdxfer.cxx                                                |    2 
 sd/source/ui/dlg/sdtreelb.cxx                                              |    6 
 sd/source/ui/sidebar/MasterPagesSelector.cxx                               |    2 
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx                       |    4 
 sd/source/ui/unoidl/facreg.cxx                                             |    2 
 sd/source/ui/view/viewshel.cxx                                             |    2 
 sfx2/source/appl/newhelp.cxx                                               |   28 +--
 sfx2/source/dialog/backingwindow.cxx                                       |    2 
 sfx2/source/doc/sfxbasemodel.cxx                                           |   14 -
 sfx2/source/sidebar/Deck.cxx                                               |    2 
 shell/source/all/xml_parser.cxx                                            |    4 
 sot/source/unoolestorage/register.cxx                                      |    2 
 starmath/source/detreg.cxx                                                 |    2 
 starmath/source/dialog.cxx                                                 |    2 
 starmath/source/register.cxx                                               |    2 
 stoc/source/corereflection/base.hxx                                        |    2 
 stoc/source/invocation_adapterfactory/iafactory.cxx                        |    6 
 stoc/source/javaloader/javaloader.cxx                                      |    2 
 stoc/source/proxy_factory/proxyfac.cxx                                     |    6 
 stoc/source/security/access_controller.cxx                                 |   12 -
 stoc/source/security/permissions.cxx                                       |   12 -
 stoc/source/servicemanager/servicemanager.cxx                              |    4 
 store/source/lockbyte.cxx                                                  |    2 
 svl/source/fsstor/fsfactory.cxx                                            |    2 
 svl/source/passwordcontainer/passwordcontainer.cxx                         |    2 
 svtools/source/misc/embedtransfer.cxx                                      |    2 
 svtools/source/misc/transfer.cxx                                           |   16 -
 svtools/source/uno/miscservices.cxx                                        |    2 
 svx/source/core/coreservices.cxx                                           |   12 -
 sw/source/core/bastyp/calc.cxx                                             |   22 +-
 sw/source/core/doc/docfmt.cxx                                              |    2 
 sw/source/core/txtnode/swfntcch.cxx                                        |    4 
 sw/source/filter/html/htmlforw.cxx                                         |   24 +-
 sw/source/filter/html/htmlplug.cxx                                         |    2 
 sw/source/filter/html/svxcss1.cxx                                          |   22 +-
 sw/source/ui/envelp/mailmrge.cxx                                           |    2 
 sw/source/ui/misc/glossary.cxx                                             |   12 -
 sw/source/ui/misc/srtdlg.cxx                                               |    2 
 sw/source/uibase/uno/unofreg.cxx                                           |    2 
 testtools/source/bridgetest/cppobj.cxx                                     |    2 
 ucb/source/cacher/cachedcontentresultset.cxx                               |    8 
 ucb/source/cacher/cacheserv.cxx                                            |    2 
 ucb/source/core/ucbserv.cxx                                                |    2 
 ucb/source/sorter/sortmain.cxx                                             |    2 
 ucb/source/ucp/cmis/cmis_provider.cxx                                      |    2 
 ucb/source/ucp/file/prov.cxx                                               |    2 
 ucb/source/ucp/ftp/ftpservices.cxx                                         |    2 
 ucb/source/ucp/ftp/ftpurl.cxx                                              |    2 
 ucb/source/ucp/gio/gio_provider.cxx                                        |    2 
 ucb/source/ucp/hierarchy/hierarchyservices.cxx                             |    2 
 ucb/source/ucp/package/pkgservices.cxx                                     |    2 
 ucb/source/ucp/tdoc/tdoc_services.cxx                                      |    2 
 ucb/source/ucp/webdav-neon/webdavservices.cxx                              |    2 
 unotools/source/ucbhelper/xtempfile.cxx                                    |    2 
 unoxml/source/service/services.cxx                                         |    2 
 uui/source/services.cxx                                                    |    2 
 vcl/generic/glyphs/gcach_ftyp.cxx                                          |   10 -
 vcl/generic/glyphs/graphite_serverfont.cxx                                 |    2 
 vcl/source/components/factory.cxx                                          |    2 
 vcl/source/control/button.cxx                                              |    2 
 vcl/source/gdi/bitmapex.cxx                                                |    2 
 vcl/source/gdi/font.cxx                                                    |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                                          |    2 
 vcl/source/gdi/regionband.cxx                                              |    2 
 vcl/source/opengl/OpenGLContext.cxx                                        |    4 
 vcl/source/window/syschild.cxx                                             |    2 
 vcl/unx/generic/gdi/cairotextrender.cxx                                    |    2 
 vcl/unx/gtk/a11y/atkaction.cxx                                             |    2 
 vcl/unx/gtk/a11y/atkcomponent.cxx                                          |    2 
 vcl/unx/gtk/a11y/atkeditabletext.cxx                                       |    2 
 vcl/unx/gtk/a11y/atkhypertext.cxx                                          |    2 
 vcl/unx/gtk/a11y/atkimage.cxx                                              |    2 
 vcl/unx/gtk/a11y/atkselection.cxx                                          |    2 
 vcl/unx/gtk/a11y/atktable.cxx                                              |    2 
 vcl/unx/gtk/a11y/atktext.cxx                                               |   10 -
 vcl/unx/gtk/a11y/atktextattributes.cxx                                     |    2 
 vcl/unx/gtk/a11y/atkutil.cxx                                               |    6 
 vcl/unx/gtk/a11y/atkvalue.cxx                                              |    2 
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx                                   |    4 
 vcl/unx/gtk/window/gtksalframe.cxx                                         |    8 
 xmlhelp/source/cxxhelp/provider/services.cxx                               |    2 
 xmloff/source/core/facreg.cxx                                              |    2 
 xmloff/source/style/impastpl.cxx                                           |   26 +-
 xmloff/source/transform/XMLFilterRegistration.cxx                          |    2 
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx                            |    2 
 xmlsecurity/source/component/registerservices.cxx                          |    2 
 xmlsecurity/source/framework/xsec_framework.cxx                            |   14 -
 xmlsecurity/source/xmlsec/nss/xsec_nss.cxx                                 |   10 -
 198 files changed, 510 insertions(+), 462 deletions(-)

New commits:
commit 90ed482496be0186e95c89e60035da555261de4e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:18:16 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I514e183571e4ac109f59c4bdfccdc553c36c26ee

diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx
index 007a638..ee731e2 100644
--- a/compilerplugins/clang/redundantcast.cxx
+++ b/compilerplugins/clang/redundantcast.cxx
@@ -36,10 +36,11 @@ bool isVoidPointer(QualType type) {
 }
 
 class RedundantCast:
-    public RecursiveASTVisitor<RedundantCast>, public loplugin::Plugin
+    public RecursiveASTVisitor<RedundantCast>, public loplugin::RewritePlugin
 {
 public:
-    explicit RedundantCast(InstantiationData const & data): Plugin(data) {}
+    explicit RedundantCast(InstantiationData const & data): RewritePlugin(data)
+    {}
 
     virtual void run() override {
         if (compiler.getLangOpts().CPlusPlus) {
@@ -49,6 +50,8 @@ public:
 
     bool VisitImplicitCastExpr(ImplicitCastExpr const * expr);
 
+    bool VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr const * expr);
+
     bool VisitCallExpr(CallExpr const * expr);
 
     bool VisitCXXDeleteExpr(CXXDeleteExpr const * expr);
@@ -159,6 +162,51 @@ bool RedundantCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) {
     return true;
 }
 
+bool RedundantCast::VisitCXXReinterpretCastExpr(
+    CXXReinterpretCastExpr const * expr)
+{
+    if (ignoreLocation(expr)
+        || !expr->getSubExpr()->getType()->isVoidPointerType())
+    {
+        return true;
+    }
+    auto t = expr->getType()->getAs<PointerType>();
+    if (t == nullptr || !t->getPointeeType()->isObjectType()) {
+        return true;
+    }
+    if (rewriter != nullptr) {
+        auto loc = expr->getLocStart();
+        while (compiler.getSourceManager().isMacroArgExpansion(loc)) {
+            loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
+        }
+        if (compat::isMacroBodyExpansion(compiler, loc)) {
+            auto loc2 = expr->getLocEnd();
+            while (compiler.getSourceManager().isMacroArgExpansion(loc2)) {
+                loc2 = compiler.getSourceManager().getImmediateMacroCallerLoc(
+                    loc2);
+            }
+            if (compat::isMacroBodyExpansion(compiler, loc2)) {
+                //TODO: check loc, loc2 are in same macro body expansion
+                loc = compiler.getSourceManager().getSpellingLoc(loc);
+            }
+        }
+        auto s = compiler.getSourceManager().getCharacterData(loc);
+        auto n = Lexer::MeasureTokenLength(
+            loc, compiler.getSourceManager(), compiler.getLangOpts());
+        std::string tok(s, n);
+        if (tok == "reinterpret_cast" && replaceText(loc, n, "static_cast")) {
+            return true;
+        }
+    }
+    report(
+        DiagnosticsEngine::Warning,
+        "reinterpret_cast from %0 to %1 can be simplified to static_cast",
+        expr->getExprLoc())
+        << expr->getSubExprAsWritten()->getType() << expr->getType()
+        << expr->getSourceRange();
+    return true;
+}
+
 bool RedundantCast::VisitCallExpr(CallExpr const * expr) {
     if (ignoreLocation(expr)) {
         return true;
@@ -229,7 +277,7 @@ bool RedundantCast::visitBinOp(BinaryOperator const * expr) {
     return true;
 }
 
-loplugin::Plugin::Registration<RedundantCast> X("redundantcast");
+loplugin::Plugin::Registration<RedundantCast> X("redundantcast", true);
 
 }
 
commit 698a6d4ab6e2f8485ed4e1d8322ac74c7087d621
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:18:04 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I374bfba6ee7470044a677b7351cd59aac2e1b042

diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx
index 8eb5d6a..722c291 100644
--- a/xmlsecurity/source/component/registerservices.cxx
+++ b/xmlsecurity/source/component/registerservices.cxx
@@ -50,7 +50,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xmlsecurity_component_getFactory( const sal_
     {
         // CertificateContainer
         xFactory = cppu::createOneInstanceFactory(
-            reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+            static_cast< lang::XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             CertificateContainer::impl_createInstance,
             CertificateContainer::impl_getStaticSupportedServiceNames() );
diff --git a/xmlsecurity/source/framework/xsec_framework.cxx b/xmlsecurity/source/framework/xsec_framework.cxx
index 75f64b7..8174a50 100644
--- a/xmlsecurity/source/framework/xsec_framework.cxx
+++ b/xmlsecurity/source/framework/xsec_framework.cxx
@@ -49,7 +49,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals(DecryptorImpl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             DecryptorImpl_createInstance, DecryptorImpl_getSupportedServiceNames() ) );
 
@@ -64,7 +64,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals(EncryptorImpl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             EncryptorImpl_createInstance, EncryptorImpl_getSupportedServiceNames() ) );
 
@@ -79,7 +79,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals(SignatureCreatorImpl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             SignatureCreatorImpl_createInstance, SignatureCreatorImpl_getSupportedServiceNames() ) );
 
@@ -94,7 +94,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals(SignatureVerifierImpl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             SignatureVerifierImpl_createInstance, SignatureVerifierImpl_getSupportedServiceNames() ) );
 
@@ -109,7 +109,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals(SAXEventKeeperImpl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString::createFromAscii( pImplName ),
             SAXEventKeeperImpl_createInstance, SAXEventKeeperImpl_getSupportedServiceNames() ) );
 
@@ -124,7 +124,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals( XMLSignatureTemplateImpl::impl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory = XMLSignatureTemplateImpl::impl_createFactory(
-                reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+                static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
 
         if (xFactory.is())
         {
@@ -137,7 +137,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsec_fw_component_getFactory(
     if ( pServiceManager && implName.equals( XMLEncryptionTemplateImpl::impl_getImplementationName()) )
     {
         Reference< XSingleServiceFactory > xFactory = XMLEncryptionTemplateImpl::impl_createFactory(
-                reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+                static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
 
         if (xFactory.is())
         {
diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
index e88678b..840c6b9 100644
--- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
@@ -52,25 +52,25 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
         if( SEInitializer_NssImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
         {
             xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 OUString::createFromAscii( pImplName ),
                 SEInitializer_NssImpl_createInstance, SEInitializer_NssImpl_getSupportedServiceNames() ) );
         }
         else if( XMLSignature_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
         {
-            xFactory = XMLSignature_NssImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+            xFactory = XMLSignature_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
         }
         else if( XMLSecurityContext_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
         {
-            xFactory = XMLSecurityContext_NssImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+            xFactory = XMLSecurityContext_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
         }
         else if( SecurityEnvironment_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
         {
-            xFactory = SecurityEnvironment_NssImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+            xFactory = SecurityEnvironment_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
         }
         else if( XMLEncryption_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
         {
-            xFactory = XMLEncryption_NssImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+            xFactory = XMLEncryption_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
         }
 #else
         if( ONSSInitializer_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
commit 6485183373a5b42c1741a9a51ac9d318b895c6dd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:59 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I8af2e7c7bb5e750c13dd9f7ef1fd3033ec9cdf9c

diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 5bb12a3..5763d71 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1066,7 +1066,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
                     addAttribute( XMLNS_DIALOGS_PREFIX ":control-implementation", sCtrlName );
         }
     }
-    addAttribute( XMLNS_DIALOGS_PREFIX ":id", * reinterpret_cast< const OUString * >( a.getValue() ) );
+    addAttribute( XMLNS_DIALOGS_PREFIX ":id", * static_cast< const OUString * >( a.getValue() ) );
     readShortAttr( "TabIndex", XMLNS_DIALOGS_PREFIX ":tab-index" );
 
     bool bEnabled = false;
commit c0755c8ee064bc1b4868de560232b3d604b2156b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:54 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: Ie25a2b8a84a146a5b988c6ef77127896d126e488

diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 60f2bee..2f2eb2b 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -53,7 +53,7 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImpl
     void * pRet = 0;
     if( pServiceManager )
     {
-        uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+        uno::Reference< lang::XMultiServiceFactory > xMSF( static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
 
         uno::Reference< lang::XSingleServiceFactory > xFactory;
 
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index a35f51b..83d42ca 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -106,41 +106,41 @@ data2string(void *data,
     case typelib_TypeClass_VOID:
         break;
     case typelib_TypeClass_BOOLEAN:
-        result.append((*reinterpret_cast<const sal_Bool*>(data) == sal_False ) ? OUString("false") : OUString("true"));
+        result.append((*static_cast<const sal_Bool*>(data) == sal_False ) ? OUString("false") : OUString("true"));
         break;
     case typelib_TypeClass_BYTE:
-        result.append(OUString::number((*reinterpret_cast<const sal_Int8*>(data))));
+        result.append(OUString::number((*static_cast<const sal_Int8*>(data))));
         break;
     case typelib_TypeClass_SHORT:
-        result.append(OUString::number((*reinterpret_cast<const sal_Int16*>(data))));
+        result.append(OUString::number((*static_cast<const sal_Int16*>(data))));
         break;
     case typelib_TypeClass_LONG:
-        result.append(OUString::number((*reinterpret_cast<const sal_Int32*>(data))));
+        result.append(OUString::number((*static_cast<const sal_Int32*>(data))));
         break;
     case typelib_TypeClass_HYPER:
-        result.append(OUString::number((*reinterpret_cast<const sal_Int64*>(data))));
+        result.append(OUString::number((*static_cast<const sal_Int64*>(data))));
         break;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        result.append(OUString::number((*reinterpret_cast<const sal_uInt16*>(data))));
+        result.append(OUString::number((*static_cast<const sal_uInt16*>(data))));
         break;
     case typelib_TypeClass_UNSIGNED_LONG:
-        result.append(OUString::number((*reinterpret_cast<const sal_uInt32*>(data)), 16));
+        result.append(OUString::number((*static_cast<const sal_uInt32*>(data)), 16));
         break;
     case typelib_TypeClass_UNSIGNED_HYPER:
-        result.append(OUString::number((*reinterpret_cast<const sal_uInt64*>(data)), 16));
+        result.append(OUString::number((*static_cast<const sal_uInt64*>(data)), 16));
         break;
     case typelib_TypeClass_FLOAT:
-        result.append(OUString::number((*reinterpret_cast<const float*>(data))));
+        result.append(OUString::number((*static_cast<const float*>(data))));
         break;
     case typelib_TypeClass_DOUBLE:
-        result.append(OUString::number((*reinterpret_cast<const double*>(data))));
+        result.append(OUString::number((*static_cast<const double*>(data))));
         break;
     case typelib_TypeClass_CHAR:
         result.append("U+");
-        result.append(OUString::number((*reinterpret_cast<const sal_uInt16*>(data))));
+        result.append(OUString::number((*static_cast<const sal_uInt16*>(data))));
         break;
     case typelib_TypeClass_STRING:
-        result.append(*reinterpret_cast<OUString*>(data));
+        result.append(*static_cast<OUString*>(data));
         break;
     case typelib_TypeClass_TYPE:
     case typelib_TypeClass_SEQUENCE:
@@ -152,7 +152,7 @@ data2string(void *data,
         result.append(struct2string(data, type->pType));
         break;
     case typelib_TypeClass_ENUM:
-        result.append(OUString::number((*reinterpret_cast<const sal_Int32*>(data))));
+        result.append(OUString::number((*static_cast<const sal_Int32*>(data))));
         break;
     default:
         assert(false); // this cannot happen I hope
diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx
index 1d273ec..c834c2e 100644
--- a/xmloff/source/transform/XMLFilterRegistration.cxx
+++ b/xmloff/source/transform/XMLFilterRegistration.cxx
@@ -95,7 +95,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * p
     {
         try
         {
-            uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+            uno::Reference< lang::XMultiServiceFactory > xMSF( static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
 
             const sal_Int32 nImplNameLen = strlen( pImplName );
 
commit 7b5924ff983ba992329c76fce6ebaf9cdab3a064
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:50 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I5c0e0fbb7ebb3bcb85dee363e77f6f7c47e815d8

diff --git a/xmlhelp/source/cxxhelp/provider/services.cxx b/xmlhelp/source/cxxhelp/provider/services.cxx
index 42b39be..204fbd7 100644
--- a/xmlhelp/source/cxxhelp/provider/services.cxx
+++ b/xmlhelp/source/cxxhelp/provider/services.cxx
@@ -34,7 +34,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpchelp_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-        reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+        static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
     if ( ::chelp::ContentProvider::getImplementationName_Static().
commit 62e798c4a520a8b96e9113e363b1f26767231636
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:42 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I65d76524847b57dcb17ee3f66e156ec1fd51b239

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 93a79b1..e7c7302 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -192,7 +192,7 @@ void FtFontFile::Unmap()
 // wrap FtFontInfo's table function
 const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, size_t *len)
 {
-    const FtFontInfo * pFontInfo = reinterpret_cast<const FtFontInfo*>(appFaceHandle);
+    const FtFontInfo * pFontInfo = static_cast<const FtFontInfo*>(appFaceHandle);
     typedef union {
         char m_c[5];
         unsigned int m_id;
@@ -1473,7 +1473,7 @@ extern "C" {
 // then uncomment the const-tokens in the function interfaces below
 static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs )
 {
-    PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs);
+    PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs);
 
     // move_to implies a new polygon => finish old polygon first
     rA.ClosePolygon();
@@ -1484,14 +1484,14 @@ static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs )
 
 static int FT_line_to( FT_Vector_CPtr p1, void* vpPolyArgs )
 {
-    PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs);
+    PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs);
     rA.AddPoint( p1->x, p1->y, POLY_NORMAL );
     return 0;
 }
 
 static int FT_conic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, void* vpPolyArgs )
 {
-    PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs);
+    PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs);
 
     // VCL's Polygon only knows cubic beziers
     const long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6;
@@ -1508,7 +1508,7 @@ static int FT_conic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, void* vpPolyArgs )
 
 static int FT_cubic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, FT_Vector_CPtr p3, void* vpPolyArgs )
 {
-    PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs);
+    PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs);
     rA.AddPoint( p1->x, p1->y, POLY_CONTROL );
     rA.AddPoint( p2->x, p2->y, POLY_CONTROL );
     rA.AddPoint( p3->x, p3->y, POLY_NORMAL );
diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index 3549c01..84cdcf8 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -32,7 +32,7 @@ float freetypeServerFontAdvance(const void* appFontHandle, gr_uint16 glyphId)
 {
     ServerFont * pServerFont =
         const_cast<ServerFont*>
-        (reinterpret_cast<const ServerFont*>(appFontHandle));
+        (static_cast<const ServerFont*>(appFontHandle));
     if (pServerFont)
     {
         return static_cast<float>(pServerFont->GetGlyphMetric(glyphId).GetCharWidth());
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index e2adb73..403232c 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -43,7 +43,7 @@ extern "C" {
         if( pXUnoSMgr )
         {
             Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr(
-                reinterpret_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pXUnoSMgr )
+                static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pXUnoSMgr )
                 );
             Reference< ::com::sun::star::lang::XSingleServiceFactory > xFactory;
             if( vcl_session_getImplementationName().equalsAscii( pImplementationName ) )
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 37c78ae..1e6c2e5 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -595,7 +595,7 @@ bool Button::set_property(const OString &rKey, const OString &rValue)
 
 sal_IntPtr Button::dispatchCommandHandler(void *, void *pCaller)
 {
-    const Button *pButton = reinterpret_cast<Button*>(pCaller);
+    const Button *pButton = static_cast<Button*>(pCaller);
     if (pButton == NULL)
         return 0;
 
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index ab451c3..7782bd4 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -801,7 +801,7 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference<
     {
         // 0 means get BitmapEx
         uno::Any aAny = xFastPropertySet->getFastPropertyValue( 0 );
-        std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue())));
+        std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *static_cast<const sal_Int64*>(aAny.getValue())));
         if( xBitmapEx )
         {
             *this = *xBitmapEx;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index fb7d136..8e3be59 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -944,7 +944,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
     Font aResult;
     if( ! identifyTrueTypeFont( i_pBuffer, i_nSize, aResult ) )
     {
-        const char* pStream = reinterpret_cast<const char*>(i_pBuffer);
+        const char* pStream = static_cast<const char*>(i_pBuffer);
         if( pStream && i_nSize > 100 &&
              *pStream == '%' && pStream[1] == '!' )
         {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f62fa73..a85e751 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6390,7 +6390,7 @@ const SEC_ASN1Template Accuracy_Template[] =
 
 size_t AppendToBuffer(char *ptr, size_t size, size_t nmemb, void *userdata)
 {
-    OStringBuffer *pBuffer = reinterpret_cast<OStringBuffer*>(userdata);
+    OStringBuffer *pBuffer = static_cast<OStringBuffer*>(userdata);
     pBuffer->append(ptr, size*nmemb);
 
     return size*nmemb;
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 0ef5034..2474092 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -1277,7 +1277,7 @@ sal_uInt32 RegionBand::getRectangleCount() const
 #ifdef DBG_UTIL
 const char* ImplDbgTestRegionBand(const void* pObj)
 {
-    const RegionBand* pRegionBand = reinterpret_cast< const RegionBand* >(pObj);
+    const RegionBand* pRegionBand = static_cast< const RegionBand* >(pObj);
 
     if(pRegionBand)
     {
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index ec1b255..1845716 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1157,7 +1157,7 @@ bool OpenGLContext::initWindow()
     m_pChildWindow->SetControlForeground();
     m_pChildWindow->SetControlBackground();
 
-    m_aGLWin.dpy = reinterpret_cast<Display*>(pChildSysData->pDisplay);
+    m_aGLWin.dpy = static_cast<Display*>(pChildSysData->pDisplay);
     m_aGLWin.win = pChildSysData->aWindow;
     m_aGLWin.screen = pChildSysData->nScreen;
 
@@ -1292,7 +1292,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
 #if !defined(LIBO_HEADLESS)
     const SystemEnvData* sysData(pParent->GetSystemData());
 
-    Display *dpy = reinterpret_cast<Display*>(sysData->pDisplay);
+    Display *dpy = static_cast<Display*>(sysData->pDisplay);
     Window win = sysData->aWindow;
 
     if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 50bdd7e..f82e274 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -158,7 +158,7 @@ void SystemChildWindow::EnableEraseBackground( bool bEnable )
 void SystemChildWindow::ImplTestJavaException( void* pEnv )
 {
 #if HAVE_FEATURE_JAVA
-    JNIEnv*     pJavaEnv = reinterpret_cast< JNIEnv* >( pEnv );
+    JNIEnv*     pJavaEnv = static_cast< JNIEnv* >( pEnv );
     jthrowable  jtThrowable = pJavaEnv->ExceptionOccurred();
 
     if( jtThrowable )
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 6d9d748..05e6096 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -258,7 +258,7 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
             const ImplFontOptions *pOptions = rFont.GetFontOptions().get();
             void *pPattern = pOptions ? pOptions->GetPattern(aFace, aId.mbEmbolden, aId.mbVerticalMetrics) : NULL;
             if (pPattern)
-                font_face = cairo_ft_font_face_create_for_pattern(reinterpret_cast<FcPattern*>(pPattern));
+                font_face = cairo_ft_font_face_create_for_pattern(static_cast<FcPattern*>(pPattern));
             if (!font_face)
                 font_face = cairo_ft_font_face_create_for_ft_face(reinterpret_cast<FT_Face>(aFace), rFont.GetLoadFlags());
             CairoFontsCache::CacheFont(font_face, aId);
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 01f2365..545630c 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -55,7 +55,7 @@ static accessibility::XAccessibleAction*
         if( !pWrap->mpAction && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleAction>::get() );
-            pWrap->mpAction = reinterpret_cast< accessibility::XAccessibleAction * > (any.pReserved);
+            pWrap->mpAction = static_cast< accessibility::XAccessibleAction * > (any.pReserved);
             pWrap->mpAction->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index 222f4b6..f40cfe0 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -36,7 +36,7 @@ static accessibility::XAccessibleComponent*
         if( !pWrap->mpComponent && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleComponent>::get() );
-            pWrap->mpComponent = reinterpret_cast< accessibility::XAccessibleComponent * > (any.pReserved);
+            pWrap->mpComponent = static_cast< accessibility::XAccessibleComponent * > (any.pReserved);
             pWrap->mpComponent->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkeditabletext.cxx b/vcl/unx/gtk/a11y/atkeditabletext.cxx
index 2918da6..8155c45 100644
--- a/vcl/unx/gtk/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk/a11y/atkeditabletext.cxx
@@ -37,7 +37,7 @@ static accessibility::XAccessibleEditableText*
         if( !pWrap->mpEditableText && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleEditableText>::get() );
-            pWrap->mpEditableText = reinterpret_cast< accessibility::XAccessibleEditableText * > (any.pReserved);
+            pWrap->mpEditableText = static_cast< accessibility::XAccessibleEditableText * > (any.pReserved);
             pWrap->mpEditableText->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx
index 6b6b419..909ee30 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -200,7 +200,7 @@ static accessibility::XAccessibleHypertext*
         if( !pWrap->mpHypertext && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleHypertext>::get() );
-            pWrap->mpHypertext = reinterpret_cast< accessibility::XAccessibleHypertext * > (any.pReserved);
+            pWrap->mpHypertext = static_cast< accessibility::XAccessibleHypertext * > (any.pReserved);
             pWrap->mpHypertext->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index 3471032..d8d220d 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -46,7 +46,7 @@ static accessibility::XAccessibleImage*
         if( !pWrap->mpImage && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleImage>::get() );
-            pWrap->mpImage = reinterpret_cast< accessibility::XAccessibleImage * > (any.pReserved);
+            pWrap->mpImage = static_cast< accessibility::XAccessibleImage * > (any.pReserved);
             pWrap->mpImage->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkselection.cxx b/vcl/unx/gtk/a11y/atkselection.cxx
index 016cb03..7e7f3fd 100644
--- a/vcl/unx/gtk/a11y/atkselection.cxx
+++ b/vcl/unx/gtk/a11y/atkselection.cxx
@@ -34,7 +34,7 @@ static accessibility::XAccessibleSelection*
         if( !pWrap->mpSelection && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleSelection>::get() );
-            pWrap->mpSelection = reinterpret_cast< accessibility::XAccessibleSelection * > (any.pReserved);
+            pWrap->mpSelection = static_cast< accessibility::XAccessibleSelection * > (any.pReserved);
             pWrap->mpSelection->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index 12b598b..3715263 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -65,7 +65,7 @@ static accessibility::XAccessibleTable*
         if( !pWrap->mpTable && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleTable>::get() );
-            pWrap->mpTable = reinterpret_cast< accessibility::XAccessibleTable * > (any.pReserved);
+            pWrap->mpTable = static_cast< accessibility::XAccessibleTable * > (any.pReserved);
             pWrap->mpTable->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 35187ba..2a919ee 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -154,7 +154,7 @@ static accessibility::XAccessibleText*
         if( !pWrap->mpText && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleText>::get() );
-            pWrap->mpText = reinterpret_cast< accessibility::XAccessibleText * > (any.pReserved);
+            pWrap->mpText = static_cast< accessibility::XAccessibleText * > (any.pReserved);
             pWrap->mpText->acquire();
         }
 
@@ -181,7 +181,7 @@ static accessibility::XAccessibleTextMarkup*
              */
             if( typelib_TypeClass_INTERFACE == any.pType->eTypeClass )
             {
-                pWrap->mpTextMarkup = reinterpret_cast< accessibility::XAccessibleTextMarkup * > (any.pReserved);
+                pWrap->mpTextMarkup = static_cast< accessibility::XAccessibleTextMarkup * > (any.pReserved);
                 if( pWrap->mpTextMarkup )
                     pWrap->mpTextMarkup->acquire();
             }
@@ -210,7 +210,7 @@ static accessibility::XAccessibleTextAttributes*
              */
             if( typelib_TypeClass_INTERFACE == any.pType->eTypeClass )
             {
-                pWrap->mpTextAttributes = reinterpret_cast< accessibility::XAccessibleTextAttributes * > (any.pReserved);
+                pWrap->mpTextAttributes = static_cast< accessibility::XAccessibleTextAttributes * > (any.pReserved);
                 pWrap->mpTextAttributes->acquire();
             }
         }
@@ -238,7 +238,7 @@ static accessibility::XAccessibleMultiLineText*
              */
             if( typelib_TypeClass_INTERFACE == any.pType->eTypeClass )
             {
-                pWrap->mpMultiLineText = reinterpret_cast< accessibility::XAccessibleMultiLineText * > (any.pReserved);
+                pWrap->mpMultiLineText = static_cast< accessibility::XAccessibleMultiLineText * > (any.pReserved);
                 pWrap->mpMultiLineText->acquire();
             }
         }
@@ -270,7 +270,7 @@ text_wrapper_get_text (AtkText *text,
     if( pData != NULL )
     {
         accessibility::TextSegment * pTextSegment =
-            reinterpret_cast <accessibility::TextSegment *> (pData);
+            static_cast <accessibility::TextSegment *> (pData);
 
         if( pTextSegment->SegmentStart == start_offset &&
             pTextSegment->SegmentEnd == end_offset )
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index afa89e0..283ff59 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -216,7 +216,7 @@ static accessibility::XAccessibleComponent*
         if( !pWrap->mpComponent && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleComponent>::get() );
-            pWrap->mpComponent = reinterpret_cast< accessibility::XAccessibleComponent * > (any.pReserved);
+            pWrap->mpComponent = static_cast< accessibility::XAccessibleComponent * > (any.pReserved);
             pWrap->mpComponent->acquire();
         }
 
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index c108bb4..5ffa45a 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -76,7 +76,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
     focus_notify_handler = 0;
 
     uno::Reference< accessibility::XAccessible > xAccessible = theNextFocusObject::get();
-    if( xAccessible.get() == reinterpret_cast < accessibility::XAccessible * > (data) )
+    if( xAccessible.get() == static_cast < accessibility::XAccessible * > (data) )
     {
         AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
         // Gail does not notify focus changes to NULL, so do we ..
@@ -100,7 +100,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
                     if ( typelib_TypeClass_INTERFACE == any.pType->eTypeClass &&
                          any.pReserved != 0 )
                     {
-                        wrapper_obj->mpText = reinterpret_cast< accessibility::XAccessibleText * > (any.pReserved);
+                        wrapper_obj->mpText = static_cast< accessibility::XAccessibleText * > (any.pReserved);
                         if ( wrapper_obj->mpText != 0 )
                         {
                             wrapper_obj->mpText->acquire();
@@ -599,7 +599,7 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
 
 sal_IntPtr WindowEventHandler(void *, void * p)
 {
-    VclSimpleEvent * pEvent = reinterpret_cast<VclSimpleEvent *>(p);
+    VclSimpleEvent * pEvent = static_cast<VclSimpleEvent *>(p);
     try
     {
         switch (pEvent->GetId())
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 7e1256e..50874b7 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -35,7 +35,7 @@ static accessibility::XAccessibleValue*
         if( !pWrap->mpValue && pWrap->mpContext )
         {
             uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleValue>::get() );
-            pWrap->mpValue = reinterpret_cast< accessibility::XAccessibleValue * > (any.pReserved);
+            pWrap->mpValue = static_cast< accessibility::XAccessibleValue * > (any.pReserved);
             pWrap->mpValue->acquire();
         }
 
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 4392f5d..796db52 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -744,7 +744,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
     // Convert to OOo
     for( GSList *pElem = pPathList; pElem; pElem = pElem->next)
     {
-        gchar *pURI = reinterpret_cast<gchar*>(pElem->data);
+        gchar *pURI = static_cast<gchar*>(pElem->data);
         aSelectedFiles[ nIndex ] = uritounicode(pURI);
 
         if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction )
@@ -1743,7 +1743,7 @@ void SalGtkFilePicker::SetCurFilter( const OUString& rFilter )
 
     for( GSList *iter = filters; !bFound && iter; iter = iter->next )
     {
-        GtkFileFilter* pFilter = reinterpret_cast<GtkFileFilter *>( iter->data );
+        GtkFileFilter* pFilter = static_cast<GtkFileFilter *>( iter->data );
         G_CONST_RETURN gchar * filtername = gtk_file_filter_get_name( pFilter );
         OUString sFilterName( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
 
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 9ca17bd..acf170f 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -580,7 +580,7 @@ static void hud_activated( gboolean hud_active, gpointer user_data )
     if ( hud_active )
     {
         SolarMutexGuard aGuard;
-        GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( user_data );
+        GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( user_data );
         GtkSalMenu* pSalMenu = reinterpret_cast< GtkSalMenu* >( pSalFrame->GetMenu() );
 
         if ( pSalMenu )
@@ -655,7 +655,7 @@ static const GActionEntry app_entries[] = {
 
 gboolean ensure_dbus_setup( gpointer data )
 {
-    GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( data );
+    GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
     GdkWindow* gdkWindow = widget_get_window( pSalFrame->getWindow() );
 
     if ( gdkWindow != NULL && g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) == NULL )
@@ -782,7 +782,7 @@ void on_registrar_available( GDBusConnection * /*connection*/,
 {
     SolarMutexGuard aGuard;
 
-    GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( user_data );
+    GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( user_data );
 
     SalMenu* pSalMenu = pSalFrame->GetMenu();
 
@@ -804,7 +804,7 @@ void on_registrar_unavailable( GDBusConnection * /*connection*/,
     SAL_INFO("vcl.unity", "on_registrar_unavailable");
 
     //pSessionBus = NULL;
-    GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( user_data );
+    GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( user_data );
 
     SalMenu* pSalMenu = pSalFrame->GetMenu();
 
commit 9676efca531290ebde3839c5246abdde159499cf
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:38 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I67d9b5d7a23f24cea64354efb6f3e08fa1fa59d4

diff --git a/uui/source/services.cxx b/uui/source/services.cxx
index ad0c328..40e2954 100644
--- a/uui/source/services.cxx
+++ b/uui/source/services.cxx
@@ -43,7 +43,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uui_component_getFactory(sal_Cha
     void * pRet = 0;
 
     Reference< XMultiServiceFactory > xSMgr(
-        reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+        static_cast< XMultiServiceFactory * >( pServiceManager ) );
     Reference< XSingleServiceFactory > xFactory;
 
 
commit 809f6d610dff5cfc931374dfb8fcd0a343d5488f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:34 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: Ia275bf01d6c72e01e9144a99121f4a9858e88c8a

diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx
index d2bb285..f3e015f 100644
--- a/unoxml/source/service/services.cxx
+++ b/unoxml/source/service/services.cxx
@@ -50,7 +50,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL unoxml_component_getFactory(const sal_Char *
         // Define variables which are used in following macros.
         Reference< XSingleServiceFactory > xFactory;
         Reference< XMultiServiceFactory >  xServiceManager(
-            reinterpret_cast< XMultiServiceFactory* >(pServiceManager));
+            static_cast< XMultiServiceFactory* >(pServiceManager));
 
         if (CDocumentBuilder::_getImplementationName().equalsAscii( pImplementationName )  )
         {
commit e39da32bacb97cd80fce2ced9bc368ce692d9a83
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:29 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I9e12cea5aba3b78e1f6ed284aedb7531d107edbf

diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index 20c9cc6..da8321a 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -466,7 +466,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL utl_component_getFactory(
 {
     void * pRet = 0;
     css::uno::Reference< css::lang::XMultiServiceFactory > xSMgr(
-        reinterpret_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) );
+        static_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) );
     css::uno::Reference< css::lang::XSingleComponentFactory > xFactory;
 
     if (OTempFileService::getImplementationName_Static().equalsAscii( pImplName ) )
commit be44ec8c28ce2af9644fcc58317dc1c9b20e2a21
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:19 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I4df86baf0106283c78942c40a4b5830dd9c91195

diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index fccb523..c1d6c5f 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -290,7 +290,7 @@ const Any& SAL_CALL CachedContentResultSet::CCRS_Cache
             m_xContentIdentifierMapping.clear();
     }
     const Sequence< Any >& rRow =
-        (* reinterpret_cast< const Sequence< Any > * >
+        (* static_cast< const Sequence< Any > * >
         (getRowAny( nRow ).getValue() ));
 
     if( nColumnIndex > rRow.getLength() )
@@ -312,7 +312,7 @@ const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache
             rRow <<= m_xContentIdentifierMapping->mapContentIdentifierString( aValue );
             remindMapped( nRow );
         }
-        return (* reinterpret_cast< const OUString * >
+        return (* static_cast< const OUString * >
                 (getRowAny( nRow ).getValue() ));
     }
     catch(const SQLException&)
@@ -335,7 +335,7 @@ const Reference< XContentIdentifier >& SAL_CALL CachedContentResultSet::CCRS_Cac
             rRow <<= m_xContentIdentifierMapping->mapContentIdentifier( aValue );
             remindMapped( nRow );
         }
-        return (* reinterpret_cast< const Reference< XContentIdentifier > * >
+        return (* static_cast< const Reference< XContentIdentifier > * >
                 (getRowAny( nRow ).getValue() ));
     }
     catch(const SQLException&)
@@ -358,7 +358,7 @@ const Reference< XContent >& SAL_CALL CachedContentResultSet::CCRS_Cache
             rRow <<= m_xContentIdentifierMapping->mapContent( aValue );
             remindMapped( nRow );
         }
-        return (* reinterpret_cast< const Reference< XContent > * >
+        return (* static_cast< const Reference< XContent > * >
                 (getRowAny( nRow ).getValue() ));
     }
     catch (const SQLException&)
diff --git a/ucb/source/cacher/cacheserv.cxx b/ucb/source/cacher/cacheserv.cxx
index ea63ddb..ac110d8 100644
--- a/ucb/source/cacher/cacheserv.cxx
+++ b/ucb/source/cacher/cacheserv.cxx
@@ -37,7 +37,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
     void * pRet = 0;
 
     Reference< XMultiServiceFactory > xSMgr(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+            static_cast< XMultiServiceFactory * >( pServiceManager ) );
     Reference< XSingleServiceFactory > xFactory;
 
 
diff --git a/ucb/source/core/ucbserv.cxx b/ucb/source/core/ucbserv.cxx
index df41eaa..3b33c85 100644
--- a/ucb/source/core/ucbserv.cxx
+++ b/ucb/source/core/ucbserv.cxx
@@ -36,7 +36,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
     void * pRet = 0;
 
     Reference< XMultiServiceFactory > xSMgr(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+            static_cast< XMultiServiceFactory * >( pServiceManager ) );
     Reference< XSingleServiceFactory > xFactory;
 
 
diff --git a/ucb/source/sorter/sortmain.cxx b/ucb/source/sorter/sortmain.cxx
index 75ca045..a1b5e1e 100644
--- a/ucb/source/sorter/sortmain.cxx
+++ b/ucb/source/sorter/sortmain.cxx
@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL srtrs1_component_getFactory(
     void * pRet = 0;
 
     Reference< XMultiServiceFactory > xSMgr(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+            static_cast< XMultiServiceFactory * >( pServiceManager ) );
     Reference< XSingleServiceFactory > xFactory;
 
 
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index dfe83a0..7fc710e 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -130,7 +130,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpcmis1_component_getFactory( c
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr
-        (reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+        (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
     if ( ::cmis::ContentProvider::getImplementationName_Static().equalsAscii( pImplName ) )
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 526c19a..5dc799c 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -53,7 +53,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory(
     void * pRet = 0;
 
     Reference< XMultiServiceFactory > xSMgr(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+            static_cast< XMultiServiceFactory * >( pServiceManager ) );
     Reference< XSingleServiceFactory > xFactory;
 
 
diff --git a/ucb/source/ucp/ftp/ftpservices.cxx b/ucb/source/ucp/ftp/ftpservices.cxx
index 7eed0e3..e70785a 100644
--- a/ucb/source/ucp/ftp/ftpservices.cxx
+++ b/ucb/source/ucp/ftp/ftpservices.cxx
@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpftp1_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-        reinterpret_cast< lang::XMultiServiceFactory * >(
+        static_cast< lang::XMultiServiceFactory * >(
             pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 75d7abe..8bbcfbd 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -102,7 +102,7 @@ extern "C" {
     int memory_write(void *buffer,size_t size,size_t nmemb,void *stream)
     {
         MemoryContainer *_stream =
-            reinterpret_cast<MemoryContainer*>(stream);
+            static_cast<MemoryContainer*>(stream);
 
         if(!_stream)
             return 0;
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index acc8f1e..4832f86 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -117,7 +117,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpgio1_component_getFactory( co
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr
-        (reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+        (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 #if !GLIB_CHECK_VERSION(2,36,0)
     g_type_init();
diff --git a/ucb/source/ucp/hierarchy/hierarchyservices.cxx b/ucb/source/ucp/hierarchy/hierarchyservices.cxx
index a3c60af..fad5698 100644
--- a/ucb/source/ucp/hierarchy/hierarchyservices.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyservices.cxx
@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucphier1_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-            reinterpret_cast< lang::XMultiServiceFactory * >(
+            static_cast< lang::XMultiServiceFactory * >(
                 pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
diff --git a/ucb/source/ucp/package/pkgservices.cxx b/ucb/source/ucp/package/pkgservices.cxx
index 1c15f42..da77c32 100644
--- a/ucb/source/ucp/package/pkgservices.cxx
+++ b/ucb/source/ucp/package/pkgservices.cxx
@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucppkg1_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-        reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+        static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
 
diff --git a/ucb/source/ucp/tdoc/tdoc_services.cxx b/ucb/source/ucp/tdoc/tdoc_services.cxx
index f0a8435..1051e35 100644
--- a/ucb/source/ucp/tdoc/tdoc_services.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_services.cxx
@@ -35,7 +35,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucptdoc1_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-            reinterpret_cast< lang::XMultiServiceFactory * >(
+            static_cast< lang::XMultiServiceFactory * >(
                 pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
diff --git a/ucb/source/ucp/webdav-neon/webdavservices.cxx b/ucb/source/ucp/webdav-neon/webdavservices.cxx
index e0c2cbf..8cf2475 100644
--- a/ucb/source/ucp/webdav-neon/webdavservices.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavservices.cxx
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory(
     void * pRet = 0;
 
     uno::Reference< lang::XMultiServiceFactory > xSMgr(
-            reinterpret_cast< lang::XMultiServiceFactory * >(
+            static_cast< lang::XMultiServiceFactory * >(
                 pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;
 
commit 90da412b2b5955ab6c014ff7bce5058ee5c3bc2d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:14 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: If19e6222cc7dea2a3a4692d2d4cb43ccc46243a2

diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index 28f13fc..a468d90 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -1186,7 +1186,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
     if (pServiceManager && rtl_str_compare( pImplName, IMPLNAME ) == 0)
     {
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+            static_cast< XMultiServiceFactory * >( pServiceManager ),
             OUString( IMPLNAME ),
             bridge_object::Test_Impl_create,
             bridge_object::getSupportedServiceNames() ) );
commit 4a69849e2fb50cbe3632209c28b9d638bbf878a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:08 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I83594c8b6cb1f317b55fe048111edd23f622e1ed

diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 0801e37..635fa18 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -150,23 +150,23 @@ extern "C" {
 static int SAL_CALL OperatorCompare( const void *pFirst, const void *pSecond)
 {
     int nRet = 0;
-    if( CALC_NAME == reinterpret_cast<const _CalcOp*>(pFirst)->eOp )
+    if( CALC_NAME == static_cast<const _CalcOp*>(pFirst)->eOp )
     {
-        if( CALC_NAME == reinterpret_cast<const _CalcOp*>(pSecond)->eOp )
-            nRet = reinterpret_cast<const _CalcOp*>(pFirst)->pUName->compareTo(
-                   *reinterpret_cast<const _CalcOp*>(pSecond)->pUName );
+        if( CALC_NAME == static_cast<const _CalcOp*>(pSecond)->eOp )
+            nRet = static_cast<const _CalcOp*>(pFirst)->pUName->compareTo(
+                   *static_cast<const _CalcOp*>(pSecond)->pUName );
         else
-            nRet = reinterpret_cast<const _CalcOp*>(pFirst)->pUName->compareToAscii(
-                   reinterpret_cast<const _CalcOp*>(pSecond)->pName );
+            nRet = static_cast<const _CalcOp*>(pFirst)->pUName->compareToAscii(
+                   static_cast<const _CalcOp*>(pSecond)->pName );
     }
     else
     {
-        if( CALC_NAME == reinterpret_cast<const _CalcOp*>(pSecond)->eOp )
-            nRet = -1 * reinterpret_cast<const _CalcOp*>(pSecond)->pUName->compareToAscii(
-                        reinterpret_cast<const _CalcOp*>(pFirst)->pName );
+        if( CALC_NAME == static_cast<const _CalcOp*>(pSecond)->eOp )
+            nRet = -1 * static_cast<const _CalcOp*>(pSecond)->pUName->compareToAscii(
+                        static_cast<const _CalcOp*>(pFirst)->pName );
         else
-            nRet = strcmp( reinterpret_cast<const _CalcOp*>(pFirst)->pName,
-                           reinterpret_cast<const _CalcOp*>(pSecond)->pName );
+            nRet = strcmp( static_cast<const _CalcOp*>(pFirst)->pName,
+                           static_cast<const _CalcOp*>(pSecond)->pName );
     }
     return nRet;
 }
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 367e386..a253811 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1003,7 +1003,7 @@ static bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
     if( pCNd == NULL)
         return true;
 
-    sw::DocumentContentOperationsManager::ParaRstFmt* pPara = reinterpret_cast<sw::DocumentContentOperationsManager::ParaRstFmt*>(pArgs);
+    sw::DocumentContentOperationsManager::ParaRstFmt* pPara = static_cast<sw::DocumentContentOperationsManager::ParaRstFmt*>(pArgs);
 
     SwTxtFmtColl* pFmt = static_cast<SwTxtFmtColl*>(pPara->pFmtColl);
     if ( pPara->bReset )
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index 109ce7a..b705bbf 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -45,7 +45,7 @@ SwFontObj::~SwFontObj()
 
 SwFontAccess::SwFontAccess( const void *pOwn, SwViewShell *pSh ) :
     SwCacheAccess( *pSwFontCache, pOwn,
-            reinterpret_cast<const SwTxtFmtColl*>(pOwn)->IsInSwFntCache() ),
+            static_cast<const SwTxtFmtColl*>(pOwn)->IsInSwFntCache() ),
     pShell( pSh )
 {
 }
@@ -57,7 +57,7 @@ SwFontObj *SwFontAccess::Get( )
 
 SwCacheObj *SwFontAccess::NewObj( )
 {
-    const_cast<SwTxtFmtColl*>(reinterpret_cast<const SwTxtFmtColl*>(pOwner))->SetInSwFntCache( true );
+    const_cast<SwTxtFmtColl*>(static_cast<const SwTxtFmtColl*>(pOwner))->SetInSwFntCache( true );
     return new SwFontObj( pOwner, pShell );
 }
 
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 0de1301..f2df878 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -465,7 +465,7 @@ void SwHTMLWriter::OutForm( bool bOn,
 
     uno::Any aTmp = xFormPropSet->getPropertyValue( "Name" );
     if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-        !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+        !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
     {
         sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
         Strm().WriteOString( sOut );
@@ -476,7 +476,7 @@ void SwHTMLWriter::OutForm( bool bOn,
 
     aTmp = xFormPropSet->getPropertyValue( "TargetURL" );
     if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-        !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+        !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
     {
         sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_action) + "=\"";
         Strm().WriteOString( sOut );
@@ -524,7 +524,7 @@ void SwHTMLWriter::OutForm( bool bOn,
 
     aTmp = xFormPropSet->getPropertyValue( "TargetFrame" );
     if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get()&&
-        !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+        !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
     {
         sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_target) + "=\"";
         Strm().WriteOString( sOut );
@@ -598,7 +598,7 @@ void SwHTMLWriter::OutHiddenControls(
 
             aTmp = xPropSet->getPropertyValue( "Name" );
             if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-                !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+                !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
             {
                 sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
                 Strm().WriteOString( sOut );
@@ -608,7 +608,7 @@ void SwHTMLWriter::OutHiddenControls(
             }
             aTmp = xPropSet->getPropertyValue( "HiddenValue" );
             if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-                !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+                !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
             {
                 sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_value) + "=\"";
                 Strm().WriteOString( sOut );
@@ -778,7 +778,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
 
             aTmp = xPropSet->getPropertyValue( "Label" );
             if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-                !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+                !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
             {
                 sValue = *static_cast<OUString const *>(aTmp.getValue());
             }
@@ -888,7 +888,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
                 {
                     aTmp = xPropSet->getPropertyValue( "DefaultText" );
                     if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-                        !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+                        !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
                     {
                         sValue = *static_cast<OUString const *>(aTmp.getValue());
                     }
@@ -935,7 +935,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
 
     aTmp = xPropSet->getPropertyValue("Name");
     if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-        !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+        !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
     {
         sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
         rWrt.Strm().WriteOString( sOut );
@@ -965,7 +965,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
     {
         aTmp = xPropSet->getPropertyValue( "ImageURL" );
         if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-            !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+            !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
         {
             sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_src) + "=\"";
             rWrt.Strm().WriteOString( sOut );
@@ -1073,7 +1073,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
         {
             aTmp = xPropSet->getPropertyValue( "FontName" );
             if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-                !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+                !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
             {
                 vcl::Font aFixedFont( OutputDevice::GetDefaultFont(
                                     DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US,
@@ -1233,7 +1233,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
         OUString sVal;
         aTmp = xPropSet->getPropertyValue( "DefaultText" );
         if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get()&&
-            !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+            !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
         {
             sVal = *static_cast<OUString const *>(aTmp.getValue());
         }
@@ -1256,7 +1256,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
     {
         aTmp = xPropSet->getPropertyValue("Label");
         if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
-            !reinterpret_cast<const OUString*>(aTmp.getValue())->isEmpty() )
+            !static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
         {
             sValue = *static_cast<OUString const *>(aTmp.getValue());
             HTMLOutFuncs::Out_String( rWrt.Strm(), sValue,
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index f6890bf..96670fb 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1290,7 +1290,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
             aMediaDescriptor["FilterOptions"] <<= OUString("SkipHeaderFooter");
             aMediaDescriptor["OutputStream"] <<= xOutputStream;
             xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
-            OString aData(reinterpret_cast<const char*>(aStream.GetData()), aStream.GetSize());
+            OString aData(static_cast<const char*>(aStream.GetData()), aStream.GetSize());
             // Wrap output in a <span> tag to avoid 'HTML parser error: Unexpected end tag: p'
             HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span);
             rWrt.Strm().WriteCharPtr(aData.getStr());
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 2bea7b5..2f97dc1 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -3137,23 +3137,23 @@ extern "C"
 static int SAL_CALL CSS1PropEntryCompare( const void *pFirst, const void *pSecond)
 {
     int nRet;
-    if( reinterpret_cast<const CSS1PropEntry*>(pFirst)->pFunc )
+    if( static_cast<const CSS1PropEntry*>(pFirst)->pFunc )
     {
-        if( reinterpret_cast<const CSS1PropEntry*>(pSecond)->pFunc )
-            nRet = strcmp( reinterpret_cast<const CSS1PropEntry*>(pFirst)->sName ,
-                    reinterpret_cast<const CSS1PropEntry*>(pSecond)->sName );
+        if( static_cast<const CSS1PropEntry*>(pSecond)->pFunc )
+            nRet = strcmp( static_cast<const CSS1PropEntry*>(pFirst)->sName ,
+                    static_cast<const CSS1PropEntry*>(pSecond)->sName );
         else
-            nRet = -1 * reinterpret_cast<const CSS1PropEntry*>(pSecond)->pName->compareToAscii(
-                            reinterpret_cast<const CSS1PropEntry*>(pFirst)->sName );
+            nRet = -1 * static_cast<const CSS1PropEntry*>(pSecond)->pName->compareToAscii(
+                            static_cast<const CSS1PropEntry*>(pFirst)->sName );
     }
     else
     {
-        if( reinterpret_cast<const CSS1PropEntry*>(pSecond)->pFunc )
-            nRet = reinterpret_cast<const CSS1PropEntry*>(pFirst)->pName->compareToAscii(
-                        reinterpret_cast<const CSS1PropEntry*>(pSecond)->sName );
+        if( static_cast<const CSS1PropEntry*>(pSecond)->pFunc )
+            nRet = static_cast<const CSS1PropEntry*>(pFirst)->pName->compareToAscii(
+                        static_cast<const CSS1PropEntry*>(pSecond)->sName );
         else
-            nRet = reinterpret_cast<const CSS1PropEntry*>(pFirst)->pName->compareTo(
-                        *reinterpret_cast<const CSS1PropEntry*>(pSecond)->pName );
+            nRet = static_cast<const CSS1PropEntry*>(pFirst)->pName->compareTo(
+                        *static_cast<const CSS1PropEntry*>(pSecond)->pName );
     }
 
     return nRet;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 8808098..7316fb8 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -397,7 +397,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
 
     for( sal_Int32 nFilter = 0; nFilter < m_pFilterLB->GetEntryCount(); ++nFilter )
     {
-        OUString* pData = reinterpret_cast< OUString* >( m_pFilterLB->GetEntryData(nFilter) );
+        OUString* pData = static_cast< OUString* >( m_pFilterLB->GetEntryData(nFilter) );
         delete pData;
     }
     delete pImpl;
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 4e398a8..ffecd29 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -257,7 +257,7 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
     {
         OUString aName(pBox->GetEntryText(pEntry));
         m_pNameED->SetText(aName);
-        m_pShortNameEdit->SetText(*reinterpret_cast<OUString*>(pEntry->GetUserData()));
+        m_pShortNameEdit->SetText(*static_cast<OUString*>(pEntry->GetUserData()));
         m_pInsertBtn->Enable( !bIsDocReadOnly);
         ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText());
     }
@@ -325,7 +325,7 @@ SvTreeListEntry* SwGlossaryDlg::DoesBlockExist(const OUString& rBlock,
             SvTreeListEntry* pChild = m_pCategoryBox->GetEntry( pEntry, i );
             if (rBlock == m_pCategoryBox->GetEntryText(pChild) &&
                 (rShort.isEmpty() ||
-                 rShort==*reinterpret_cast<OUString*>(pChild->GetUserData()))
+                 rShort==*static_cast<OUString*>(pChild->GetUserData()))
                )
             {
                 return pChild;
@@ -479,7 +479,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
             SvTreeListEntry* pNewEntry = m_pCategoryBox->InsertEntry(
                     pNewNameDlg->GetNewName(), m_pCategoryBox->GetParent(pEntry));
             pNewEntry->SetUserData(new OUString(pNewNameDlg->GetNewShort()));
-            delete reinterpret_cast<OUString*>(pEntry->GetUserData());
+            delete static_cast<OUString*>(pEntry->GetUserData());
             m_pCategoryBox->GetModel()->Remove(pEntry);
             m_pCategoryBox->Select(pNewEntry);
             m_pCategoryBox->MakeVisible(pNewEntry);
@@ -830,7 +830,7 @@ void SwGlTreeListBox::Clear()
     while(pEntry)
     {
         if(GetParent(pEntry))
-            delete reinterpret_cast<OUString*>(pEntry->GetUserData());
+            delete static_cast<OUString*>(pEntry->GetUserData());
         else
             delete static_cast<GroupUserData*>(pEntry->GetUserData());
         pEntry = Next(pEntry);
@@ -877,7 +877,7 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
                 }
             }
             else
-                sMsg = *reinterpret_cast<OUString*>(pEntry->GetUserData());
+                sMsg = *static_cast<OUString*>(pEntry->GetUserData());
             Help::ShowQuickHelp( this, aItemRect, sMsg,
                         QUICKHELP_LEFT|QUICKHELP_VCENTER );
         }
@@ -968,7 +968,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
 
         pDlg->pGlossaryHdl->SetCurGroup(sSourceGroup);
         OUString sTitle(GetEntryText(pEntry));
-        OUString sShortName(*reinterpret_cast<OUString*>(pEntry->GetUserData()));
+        OUString sShortName(*static_cast<OUString*>(pEntry->GetUserData()));
 
         GroupUserData* pDestData = static_cast<GroupUserData*>(pDestParent->GetUserData());
         OUString sDestName = pDestData->sGroupName
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index dba258b..3c58114 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -73,7 +73,7 @@ static void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
     const sal_Int32 nEnd = rLstBox.GetEntryCount();
     for( sal_Int32 n = 0; n < nEnd; ++n )
     {
-        delete reinterpret_cast<OUString *>(rLstBox.GetEntryData( n ));
+        delete static_cast<OUString *>(rLstBox.GetEntryData( n ));
     }
     rLstBox.Clear();
 }
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index 4ad389b..9b455f3 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -50,7 +50,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
     if( pServiceManager )
     {
         uno::Reference< XMultiServiceFactory > xMSF(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
+            static_cast< XMultiServiceFactory * >( pServiceManager ) );
 
         uno::Reference< XSingleServiceFactory > xFactory;
 
commit a5d6cd83d7cac1fde630ac1211354242cbe4e085
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:17:04 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I571893a8340ee0f4a0de393395b5eef7a4795451

diff --git a/svx/source/core/coreservices.cxx b/svx/source/core/coreservices.cxx
index 998a2eb..dc52b9f 100644
--- a/svx/source/core/coreservices.cxx
+++ b/svx/source/core/coreservices.cxx
@@ -44,7 +44,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::ExtrusionDepthController_getImplementationName(),
                 ::svx::ExtrusionDepthController_createInstance,
                 ::svx::ExtrusionDepthController_getSupportedServiceNames() );
@@ -52,7 +52,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::ExtrusionDirectionControl_getImplementationName(),
                 ::svx::ExtrusionDirectionControl_createInstance,
                 ::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
@@ -60,7 +60,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::ExtrusionLightingControl_getImplementationName(),
                 ::svx::ExtrusionLightingControl_createInstance,
                 ::svx::ExtrusionLightingControl_getSupportedServiceNames() );
@@ -68,7 +68,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::ExtrusionSurfaceControl_getImplementationName(),
                 ::svx::ExtrusionSurfaceControl_createInstance,
                 ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
@@ -76,7 +76,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         else if( ::svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::FontworkAlignmentControl_getImplementationName(),
                 ::svx::FontworkAlignmentControl_createInstance,
                 ::svx::FontworkAlignmentControl_getSupportedServiceNames() );
@@ -84,7 +84,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
         else if( ::svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
         {
             xFactory = ::cppu::createSingleFactory(
-                reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+                static_cast< XMultiServiceFactory * >( pServiceManager ),
                 ::svx::FontworkCharacterSpacingControl_getImplementationName(),
                 ::svx::FontworkCharacterSpacingControl_createInstance,
                 ::svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
commit 0da9460bf0b78e252402d98b609cd988162867b0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:57 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: If4bc1b998952ff2f86124e68d108869d7749ea5b

diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index a3171da..009b424 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -835,7 +835,7 @@ private:
 
 inline const DataFlavorExVector& BrowseBox::GetDataFlavors() const
 {
-    return *reinterpret_cast<DataFlavorExVector*>(implGetDataFlavors());
+    return *static_cast<DataFlavorExVector*>(implGetDataFlavors());
 }
 
 #endif
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index b6d9102..b571816 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -165,7 +165,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo
                     const GDIMetaFile& aMetaFile = m_pGraphic->GetGDIMetaFile();
                     const_cast<GDIMetaFile*>(&aMetaFile)->Write( aMemStm );
                     uno::Any aAny;
-                    aAny <<= uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ),
+                    aAny <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ),
                                                     aMemStm.Seek( STREAM_SEEK_TO_END ) );
                     SetAny( aAny, rFlavor );
                     bRet = true;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 9de9349..70ec0f6 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -361,7 +361,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
 
                         if( GraphicConverter::Export( aDstStm, aGraphic, CVT_EMF ) == ERRCODE_NONE )
                         {
-                            maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ),
+                            maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
                                                                      aDstStm.Seek( STREAM_SEEK_TO_END ) ) );
                             bDone = true;
                         }
@@ -391,7 +391,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
                         // taking wmf without file header
                         if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, false ) )
                         {
-                            maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ),
+                            maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
                                                                      aDstStm.Seek( STREAM_SEEK_TO_END ) ) );
                             bDone = true;
                         }
@@ -769,7 +769,7 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavo
             //}
         }
 
-        maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+        maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
     }
 
     return( maAny.hasValue() );
@@ -784,7 +784,7 @@ bool TransferableHelper::SetGDIMetaFile( const GDIMetaFile& rMtf, const DataFlav
         SvMemoryStream aMemStm( 65535, 65535 );
 
         ( (GDIMetaFile&) rMtf ).Write( aMemStm );
-        maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+        maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
     }
 
     return( maAny.hasValue() );
@@ -801,7 +801,7 @@ bool TransferableHelper::SetGraphic( const Graphic& rGraphic, const DataFlavor&
         aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
         aMemStm.SetCompressMode( SvStreamCompressFlags::NATIVE );
         WriteGraphic( aMemStm, rGraphic );
-        maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+        maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
     }
 
     return( maAny.hasValue() );
@@ -815,7 +815,7 @@ bool TransferableHelper::SetImageMap( const ImageMap& rIMap, const ::com::sun::s
 
     aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
     rIMap.Write( aMemStm, OUString() );
-    maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+    maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
 
     return( maAny.hasValue() );
 }
@@ -830,7 +830,7 @@ bool TransferableHelper::SetTransferableObjectDescriptor( const TransferableObje
     SvMemoryStream aMemStm( 1024, 1024 );
 
     WriteTransferableObjectDescriptor( aMemStm, rDesc );
-    maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Tell() );
+    maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Tell() );
 
     return( maAny.hasValue() );
  }
@@ -935,7 +935,7 @@ bool TransferableHelper::SetINetImage( const INetImage& rINtImg,
     aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
     rINtImg.Write( aMemStm, SotExchange::GetFormat( rFlavor ) );
 
-    maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+    maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
 
     return( maAny.hasValue() );
 }
diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx
index 3801ce7..26a2d7d 100644
--- a/svtools/source/uno/miscservices.cxx
+++ b/svtools/source/uno/miscservices.cxx
@@ -62,7 +62,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory(
     void * pResult = 0;
     if (_pServiceManager)
     {
-        Reference< XMultiServiceFactory > xSMgr(reinterpret_cast< XMultiServiceFactory * >(_pServiceManager));
+        Reference< XMultiServiceFactory > xSMgr(static_cast< XMultiServiceFactory * >(_pServiceManager));
 
         pResult = cppu::component_getFactoryHelper(pImplementationName,
                 _pServiceManager,
commit b95b9cc29817ab19ffd1bafacba5a54b433ab41f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:51 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I7e0e4982611d2680d657f99eb2359db1f80e4f96

diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 44d9842..5fa5339 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -191,7 +191,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fsstorage_component_getFactory (
         if (FSStorageFactory::impl_staticGetImplementationName().equalsAscii(pImplementationName))
         {
             xFactory = cppu::createOneInstanceFactory (
-                reinterpret_cast< lang::XMultiServiceFactory* >(pServiceManager),
+                static_cast< lang::XMultiServiceFactory* >(pServiceManager),
                 FSStorageFactory::impl_staticGetImplementationName(),
                 FSStorageFactory::impl_staticCreateSelfInstance,
                 FSStorageFactory::impl_staticGetSupportedServiceNames() );
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 8d2243f..b6b2d52 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1451,7 +1451,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL passwordcontainer_component_getFactory (
         if (PasswordContainer::impl_getStaticImplementationName().equalsAscii(pImplementationName))
         {
             xFactory = PasswordContainer::impl_createFactory (
-                reinterpret_cast< XMultiServiceFactory* >(pServiceManager));
+                static_cast< XMultiServiceFactory* >(pServiceManager));
         }
         if (xFactory.is())
         {
commit a74aa43afb2accad7fc149282706b721f6b0f4eb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:47 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: Ie38450a082dc840714051ad65c297886038e68f3

diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index da6170c..25d481f 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -766,7 +766,7 @@ storeError MemoryLockBytes::setSize_Impl (sal_uInt32 nSize)
 {
     if (nSize != m_nSize)
     {
-        sal_uInt8 * pData = reinterpret_cast<sal_uInt8*>(rtl_reallocateMemory (m_pData, nSize));
+        sal_uInt8 * pData = static_cast<sal_uInt8*>(rtl_reallocateMemory (m_pData, nSize));
         if (pData != 0)
         {
             if (nSize > m_nSize)
commit b3105952fbb04f51d8f1c310f0055219b94f2ee9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:43 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: Ib3610f9d244b15f8f752c0f781600f5c7e7a944f

diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx
index d81cf76..6846277 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -387,7 +387,7 @@ inline bool extract(
         }
         else if (rObj.getValueTypeClass() == css::uno::TypeClass_TYPE)
         {
-            rDest = pRefl->forType( reinterpret_cast< const css::uno::Type * >( rObj.getValue() )->getTypeLibType() );
+            rDest = pRefl->forType( static_cast< const css::uno::Type * >( rObj.getValue() )->getTypeLibType() );
             return rDest.is();
         }
     }
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index d2e3567..b8d4682 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -275,7 +275,7 @@ bool AdapterImpl::coerce_assign(
                 // set runtime exception
                 constructRuntimeException(
                     pOutExc, "type coercion failed: " +
-                    reinterpret_cast< Exception const * >(
+                    static_cast< Exception const * >(
                         p_exc->pData )->Message );
             }
             ::uno_any_destruct( p_exc, 0 );
@@ -330,7 +330,7 @@ static void handleInvokExc( uno_Any * pDest, uno_Any * pSource )
     {
         // unwrap invocation target exception
         uno_Any * target_exc =
-            &reinterpret_cast< reflection::InvocationTargetException * >(
+            &static_cast< reflection::InvocationTargetException * >(
                 pSource->pData )->TargetException;
         ::uno_type_any_construct(
             pDest, target_exc->pData, target_exc->pType, 0 );
@@ -773,7 +773,7 @@ static inline AdapterImpl * lookup_adapter(
     t_ptr_set::const_iterator const iEnd( adapters_set.end() );
     while (iEnd != iPos)
     {
-        AdapterImpl * that = reinterpret_cast< AdapterImpl * >( *iPos );
+        AdapterImpl * that = static_cast< AdapterImpl * >( *iPos );
         // iterate through all types if that is a matching adapter
         sal_Int32 nPosTypes;
         for ( nPosTypes = nTypes; nPosTypes--; )
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index a3bb06f..8c8a0a5 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -247,7 +247,7 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL
                 throw RuntimeException(
                     "javaloader error - no type information for XImplementationLoader");
 
-            m_javaLoader = css::uno::Reference<XImplementationLoader>(reinterpret_cast<XImplementationLoader *>(
+            m_javaLoader = css::uno::Reference<XImplementationLoader>(static_cast<XImplementationLoader *>(
                             java_curr.mapInterface(joJavaLoader, pType_XImplementationLoader)));
             pJNIEnv->DeleteLocalRef( joJavaLoader );
             if(!m_javaLoader.is())
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 9e60c95..85f11f6 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -134,7 +134,7 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface(
         UnoInterfaceReference ret;
         if (ret_val.pType->eTypeClass == typelib_TypeClass_INTERFACE)
         {
-            ret.set( *reinterpret_cast< uno_Interface ** >(ret_val.pData),
+            ret.set( *static_cast< uno_Interface ** >(ret_val.pData),
                      SAL_NO_ACQUIRE );
             typelib_typedescriptionreference_release( ret_val.pType );
         }
@@ -203,7 +203,7 @@ static void SAL_CALL binuno_proxy_free(
 {
     (void) pEnv; // avoid warning about unused parameter
     binuno_Proxy * proxy = static_cast< binuno_Proxy * >(
-        reinterpret_cast< uno_Interface * >( pProxy ) );
+        static_cast< uno_Interface * >( pProxy ) );
     OSL_ASSERT( proxy->m_root->m_factory->m_uno_env.get()->pExtEnv == pEnv );
     delete proxy;
 }
@@ -254,7 +254,7 @@ static void SAL_CALL binuno_proxy_dispatch(
         try
         {
             Type const & rType =
-                *reinterpret_cast< Type const * >( pArgs[ 0 ] );
+                *static_cast< Type const * >( pArgs[ 0 ] );
             Any ret( that->m_root->queryInterface( rType ) );
             uno_type_copyAndConvertData(
                 pReturn, &ret, ::getCppuType( &ret ).getTypeLibType(),
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index a50fb99..e772b9f 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -276,12 +276,12 @@ static inline Reference< security::XAccessControlContext > getDynamicRestriction
             if ( typeName == "com.sun.star.security.XAccessControlContext" )
             {
                 return Reference< security::XAccessControlContext >(
-                    *reinterpret_cast< security::XAccessControlContext ** const >( acc.pData ) );
+                    *static_cast< security::XAccessControlContext ** const >( acc.pData ) );
             }
             else // try to query
             {
                 return Reference< security::XAccessControlContext >::query(
-                    *reinterpret_cast< XInterface ** const >( acc.pData ) );
+                    *static_cast< XInterface ** const >( acc.pData ) );
             }
         }
     }
@@ -530,14 +530,14 @@ static void dumpPermissions(
 
 inline void AccessController::clearPostPoned()
 {
-    delete reinterpret_cast< t_rec_vec * >( m_rec.getData() );
+    delete static_cast< t_rec_vec * >( m_rec.getData() );
     m_rec.setData( 0 );
 }
 
 void AccessController::checkAndClearPostPoned()
 {
     // check postponed permissions
-    boost::scoped_ptr< t_rec_vec > rec( reinterpret_cast< t_rec_vec * >( m_rec.getData() ) );
+    boost::scoped_ptr< t_rec_vec > rec( static_cast< t_rec_vec * >( m_rec.getData() ) );
     m_rec.setData( 0 ); // takeover ownership
     OSL_ASSERT( rec.get() );
     if (rec.get())
@@ -646,7 +646,7 @@ PermissionCollection AccessController::getEffectivePermissions(
 
     // call on policy
     // iff this is a recurring call for the default user, then grant all permissions
-    t_rec_vec * rec = reinterpret_cast< t_rec_vec * >( m_rec.getData() );
+    t_rec_vec * rec = static_cast< t_rec_vec * >( m_rec.getData() );
     if (rec) // tls entry exists => this is recursive call
     {
         if (demanded_perm.hasValue())
@@ -756,7 +756,7 @@ PermissionCollection AccessController::getEffectivePermissions(
     {
         // dont check postponed, just cleanup
         clearPostPoned();
-        delete reinterpret_cast< t_rec_vec * >( m_rec.getData() );
+        delete static_cast< t_rec_vec * >( m_rec.getData() );
         m_rec.setData( 0 );
         throw;
     }
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 85f8e02..d6f0f79 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -493,17 +493,17 @@ PermissionCollection::PermissionCollection(
         if (perm_type.equals( cppu::UnoType<io::FilePermission>::get()))
         {
             m_head = new FilePermission(
-                *reinterpret_cast< io::FilePermission const * >( perm.pData ), m_head );
+                *static_cast< io::FilePermission const * >( perm.pData ), m_head );
         }
         else if (perm_type.equals( cppu::UnoType<connection::SocketPermission>::get()))
         {
             m_head = new SocketPermission(
-                *reinterpret_cast< connection::SocketPermission const * >( perm.pData ), m_head );
+                *static_cast< connection::SocketPermission const * >( perm.pData ), m_head );
         }
         else if (perm_type.equals( cppu::UnoType<security::RuntimePermission>::get()))
         {
             m_head = new RuntimePermission(
-                *reinterpret_cast< security::RuntimePermission const * >( perm.pData ), m_head );
+                *static_cast< security::RuntimePermission const * >( perm.pData ), m_head );
         }
         else if (perm_type.equals( cppu::UnoType<security::AllPermission>::get()))
         {
@@ -578,7 +578,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
     if (demanded_type.equals( cppu::UnoType<io::FilePermission>::get()))
     {
         FilePermission demanded(
-            *reinterpret_cast< io::FilePermission const * >( perm.pData ) );
+            *static_cast< io::FilePermission const * >( perm.pData ) );
         if (__implies( m_head, demanded ))
         {
 #ifdef __DIAGNOSE
@@ -591,7 +591,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
     else if (demanded_type.equals( cppu::UnoType<connection::SocketPermission>::get()))
     {
         SocketPermission demanded(
-            *reinterpret_cast< connection::SocketPermission const * >( perm.pData ) );
+            *static_cast< connection::SocketPermission const * >( perm.pData ) );
         if (__implies( m_head, demanded ))
         {
 #ifdef __DIAGNOSE
@@ -604,7 +604,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
     else if (demanded_type.equals( cppu::UnoType<security::RuntimePermission>::get()))
     {
         RuntimePermission demanded(
-            *reinterpret_cast< security::RuntimePermission const * >( perm.pData ) );
+            *static_cast< security::RuntimePermission const * >( perm.pData ) );
         if (__implies( m_head, demanded ))
         {
 #ifdef __DIAGNOSE
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index fd318eb..a543da9 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -1152,7 +1152,7 @@ sal_Bool OServiceManager::has( const Any & Element )
     else if (Element.getValueTypeClass() == TypeClass_STRING)
     {
         OUString const & implName =
-            *reinterpret_cast< OUString const * >(Element.getValue());
+            *static_cast< OUString const * >(Element.getValue());
         MutexGuard aGuard( m_mutex );
         return m_ImplementationNameMap.find( implName ) !=
             m_ImplementationNameMap.end();
@@ -1231,7 +1231,7 @@ void OServiceManager::remove( const Any & Element )
     else if (Element.getValueTypeClass() == TypeClass_STRING)
     {
         OUString const & implName =
-            *reinterpret_cast< OUString const * >(Element.getValue());
+            *static_cast< OUString const * >(Element.getValue());
         MutexGuard aGuard( m_mutex );
         HashMap_OWString_Interface::const_iterator const iFind(
             m_ImplementationNameMap.find( implName ) );
commit c96f4e5684d3e7f145dcee5e3eeafd7491671d9b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:39 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: Ica7659b636d1277716153ef39025cf539b355fb2

diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx
index 356428c..1ce1296 100644
--- a/starmath/source/detreg.cxx
+++ b/starmath/source/detreg.cxx
@@ -44,7 +44,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL smd_component_getFactory( const sal_Char* pI
     {
         // Define variables which are used in following macros.
         Reference< XSingleServiceFactory >   xFactory                                                                                                ;
-        Reference< XMultiServiceFactory >    xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+        Reference< XMultiServiceFactory >    xServiceManager( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
 
         if( SmFilterDetect::impl_getStaticImplementationName().equalsAscii( pImplementationName ) )
         {
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index c4a400c..5c8e3cc 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1778,7 +1778,7 @@ IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
     sal_Int32 nPos = pFontsSubsetLB->GetSelectEntryPos();
     if (LISTBOX_ENTRY_NOTFOUND != nPos)
     {
-        const Subset* pSubset = reinterpret_cast<const Subset*> (pFontsSubsetLB->GetEntryData( nPos ));
+        const Subset* pSubset = static_cast<const Subset*> (pFontsSubsetLB->GetEntryData( nPos ));
         if (pSubset)
         {
             pCharsetDisplay->SelectCharacter( pSubset->GetRangeMin() );
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index 063872a..8bd00e8 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -49,7 +49,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sm_component_getFactory( const sal_Char* pIm
     {
         // Define variables which are used in following macros.
         Reference< XSingleServiceFactory >   xFactory                                                                                                ;
-        Reference< XMultiServiceFactory >    xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+        Reference< XMultiServiceFactory >    xServiceManager( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
 
         if( SmXMLImport_getImplementationName().equalsAscii( pImplementationName ))
         {
commit 03b2b85262244ad6e4c48f0a78d8ec008062d75b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 31 13:16:35 2015 +0200

    Reduce to static_cast any reinterpret_cast from void pointers
    
    Change-Id: I413b3716b3c5bda204619e8b1ff2b724f95a5c38

diff --git a/sot/source/unoolestorage/register.cxx b/sot/source/unoolestorage/register.cxx
index ad88bc0..df55fa0 100644
--- a/sot/source/unoolestorage/register.cxx
+++ b/sot/source/unoolestorage/register.cxx
@@ -39,7 +39,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sot_component_getFactory(
 
     if ( pServiceManager && aImplName.equals( OLESimpleStorage::impl_staticGetImplementationName() ) )
     {
-        xFactory= ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory*>( pServiceManager ),
+        xFactory= ::cppu::createSingleFactory( static_cast< lang::XMultiServiceFactory*>( pServiceManager ),

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list