summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-03-31 00:06:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-03-31 07:27:24 +0200
commit184be2d1352c5d3f3aa1e276d26c463c6e49b302 (patch)
tree65ee35397f445b264dcb05d0087aed60000f0e75 /dtrans
parentf42d729e41da918bc496d5feb5861a09737c438a (diff)
tdf#120703 PVS: remove redundant static casts
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/clipb/wcbentry.cxx3
-rw-r--r--dtrans/source/win32/dnd/source.cxx3
-rw-r--r--dtrans/source/win32/dnd/target.cxx5
3 files changed, 5 insertions, 6 deletions
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
index d295bf00447c..2a316470f8d3 100644
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ b/dtrans/source/win32/clipb/wcbentry.cxx
@@ -42,7 +42,8 @@ namespace
Reference< XInterface > createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( comphelper::getComponentContext(rServiceManager), "" ) ) );
+ return static_cast<XClipboard*>(
+ new CWinClipboard(comphelper::getComponentContext(rServiceManager), ""));
}
}
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 45337ec764c4..772eeb0ccb00 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -96,8 +96,7 @@ void DragSource::StartDragImpl(
// to the IDropSource interface implemented in this class (but only
// while this function executes). The source context is also used
// in DragSource::QueryContinueDrag.
- m_currentContext= static_cast<XDragSourceContext*>( new SourceContext(
- this, listener ) );
+ m_currentContext = new SourceContext(this, listener);
// Convert the XTransferable data object into an IDataObject object;
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 494119c11f57..552e3700d3d3 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -312,8 +312,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj,
// will be DROPEFFECT_NONE throughout
m_nLastDropAction= ACTION_DEFAULT | ACTION_MOVE;
- m_currentDragContext= static_cast<XDropTargetDragContext*>( new TargetDragContext(
- this ) );
+ m_currentDragContext = new TargetDragContext(this);
//--> TRA
@@ -451,7 +450,7 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/,
m_bDropComplete= false;
m_nCurrentDropAction= getFilteredActions( grfKeyState, *pdwEffect);
- m_currentDropContext= static_cast<XDropTargetDropContext*>( new TargetDropContext( this ) );
+ m_currentDropContext = new TargetDropContext(this);
if( m_nCurrentDropAction)
{
DropTargetDropEvent e;