dbaccess/source/ui/dlg/RelationDlg.cxx |    2 +-
 sd/source/ui/func/futext.cxx           |    4 ++--
 svx/source/gallery2/galtheme.cxx       |   12 ++++++------
 vcl/quartz/salbmp.cxx                  |    2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 483ba975b40d99c931c22a63fc85e190922406a7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Sep 6 16:20:33 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Sep 7 14:05:50 2019 +0200

    remove some unnecessary casts
    
    Change-Id: I16aa2cdc3e92c3ea2661ebf0a528f72cbe193df9
    Reviewed-on: https://gerrit.libreoffice.org/78716
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx 
b/dbaccess/source/ui/dlg/RelationDlg.cxx
index 31a672f79454..19cb52e7276c 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -65,7 +65,7 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
     get(m_pPB_OK, "ok");
 
     // Copy connection
-    m_pConnData.reset( 
static_cast<ORelationTableConnectionData*>(pConnectionData->NewInstance()) );
+    m_pConnData.reset( pConnectionData->NewInstance() );
     m_pConnData->CopyFrom( *pConnectionData );
 
     Init(m_pConnData);
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index fdb04d4a7894..7005684dc8a0 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1283,9 +1283,9 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
         {
             SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
-            if( dynamic_cast< const SdrTextObj *>( pObj ) !=  nullptr)
+            if( auto pTextObj = dynamic_cast<SdrTextObj *>( pObj ))
             {
-                mxTextObj.reset( static_cast< SdrTextObj* >( pObj ) );
+                mxTextObj.reset( pTextObj );
             }
         }
     }
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index b053b3e6a8d4..e02802525313 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -521,11 +521,11 @@ void GalleryTheme::Actualize( const Link<const 
INetURLObject&, void>& rActualize
                     std::unique_ptr<SgaObject> pNewObj;
 
                     if ( SgaObjKind::Inet == pEntry->eObjKind )
-                        pNewObj.reset(static_cast<SgaObject*>(new 
SgaObjectINet( aGraphic, aURL )));
+                        pNewObj.reset(new SgaObjectINet( aGraphic, aURL ));
                     else if ( aGraphic.IsAnimated() )
-                        pNewObj.reset(static_cast<SgaObject*>(new 
SgaObjectAnim( aGraphic, aURL )));
+                        pNewObj.reset(new SgaObjectAnim( aGraphic, aURL ));
                     else
-                        pNewObj.reset(static_cast<SgaObject*>(new 
SgaObjectBmp( aGraphic, aURL )));
+                        pNewObj.reset(new SgaObjectBmp( aGraphic, aURL ));
 
                     if( !InsertObject( *pNewObj ) )
                         pEntry->mbDelete = true;
@@ -1066,13 +1066,13 @@ bool GalleryTheme::InsertURL(const INetURLObject& rURL, 
sal_uInt32 nInsertPos)
     if( nImportRet != GalleryGraphicImportRet::IMPORT_NONE )
     {
         if ( aGraphic.IsAnimated() )
-            pNewObj.reset(static_cast<SgaObject*>(new SgaObjectAnim( aGraphic, 
rURL )));
+            pNewObj.reset(new SgaObjectAnim( aGraphic, rURL ));
         else
-            pNewObj.reset(static_cast<SgaObject*>(new SgaObjectBmp( aGraphic, 
rURL )));
+            pNewObj.reset(new SgaObjectBmp( aGraphic, rURL ));
     }
 #if HAVE_FEATURE_AVMEDIA
     else if( ::avmedia::MediaWindow::isMediaURL( rURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO?*/ ) )
-        pNewObj.reset(static_cast<SgaObject*>(new SgaObjectSound( rURL )));
+        pNewObj.reset(new SgaObjectSound( rURL ));
 #endif
     if( pNewObj && InsertObject( *pNewObj, nInsertPos ) )
         bRet = true;
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index fea2f5c42314..ee6598f7e0b6 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -296,7 +296,7 @@ bool QuartzSalBitmap::AllocateUserData()
     if (!alloc)
     {
         SAL_WARN( "vcl.quartz", "bad_alloc: " << mnWidth << "x" << mnHeight << 
" (" << mnBytesPerRow * mnHeight << " bytes)");
-        m_pUserBuffer.reset( static_cast<sal_uInt8*>(nullptr) );
+        m_pUserBuffer.reset();
         mnBytesPerRow = 0;
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to