Kaydet (Commit) 6616e886 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Improved loplugin:cstylecast to reference types: svtools

Change-Id: I7ac860cdf68e920834a65573a6f3344855840332
üst acb92326
......@@ -258,7 +258,7 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
}
if( rGraphic.IsLink() )
maGfxLink = ( (Graphic&) rGraphic ).GetLink();
maGfxLink = rGraphic.GetLink();
else
maGfxLink = GfxLink();
......@@ -1001,7 +1001,7 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj )
if( pEntry->GetID().IsEmpty() )
{
ReleaseGraphicObject( rObj );
AddGraphicObject( rObj, (Graphic&) rObj.GetGraphic(), nullptr, nullptr );
AddGraphicObject( rObj, const_cast<Graphic&>(rObj.GetGraphic()), nullptr, nullptr );
}
else
pEntry->GraphicObjectWasSwappedIn( rObj );
......
......@@ -133,11 +133,11 @@ void SAL_CALL DropTargetHelper::DropTargetListener::drop( const DropTargetDropEv
// accepted action as the execute action in the call to ::ExecuteDrop
aAcceptEvent.mnAction = aExecuteEvt.mnAction;
aAcceptEvent.maPosPixel = aExecuteEvt.maPosPixel;
(DropTargetEvent&)( aAcceptEvent.maDragEvent ) = (DropTargetEvent&) rDTDE;
( (DropTargetDragEvent&)( aAcceptEvent.maDragEvent ) ).DropAction = rDTDE.DropAction;
( (DropTargetDragEvent&)( aAcceptEvent.maDragEvent ) ).LocationX = rDTDE.LocationX;
( (DropTargetDragEvent&)( aAcceptEvent.maDragEvent ) ).LocationY = rDTDE.LocationY;
( (DropTargetDragEvent&)( aAcceptEvent.maDragEvent ) ).SourceActions = rDTDE.SourceActions;
static_cast<DropTargetEvent&>(const_cast<DropTargetDragEvent&>( aAcceptEvent.maDragEvent )) = rDTDE;
const_cast<DropTargetDragEvent&>( aAcceptEvent.maDragEvent ).DropAction = rDTDE.DropAction;
const_cast<DropTargetDragEvent&>( aAcceptEvent.maDragEvent ).LocationX = rDTDE.LocationX;
const_cast<DropTargetDragEvent&>( aAcceptEvent.maDragEvent ).LocationY = rDTDE.LocationY;
const_cast<DropTargetDragEvent&>( aAcceptEvent.maDragEvent ).SourceActions = rDTDE.SourceActions;
aAcceptEvent.mbLeaving = false;
aAcceptEvent.mbDefault = aExecuteEvt.mbDefault;
......@@ -373,7 +373,7 @@ bool TransferDataContainer::GetData(
// test first the list
for( ; aIter != aEnd; ++aIter )
{
TDataCntnrEntry_Impl& rEntry = (TDataCntnrEntry_Impl&)*aIter;
TDataCntnrEntry_Impl& rEntry = *aIter;
if( nFmtId == rEntry.nId )
{
bFnd = SetAny( rEntry.aAny );
......
......@@ -1737,7 +1737,7 @@ namespace svt { namespace table
{
ENSURE_OR_RETURN( ( i_column >= 0 ) && ( i_column < m_pModel->getColumnCount() ),
"TableControl_Impl::getColumnMetrics: illegal column index!", ColumnMetrics() );
return (ColumnMetrics const &)m_aColumnWidths[ i_column ];
return m_aColumnWidths[ i_column ];
}
......
......@@ -34,7 +34,7 @@ class ScrollBarBox;
namespace svt { namespace table
{
struct MutableColumnMetrics : protected ColumnMetrics
struct MutableColumnMetrics : public ColumnMetrics
{
MutableColumnMetrics()
:ColumnMetrics()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment