summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-03 21:09:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-05 21:18:03 +0200
commit6616e886ae33e54d6048e2f8b635b5a358dccc01 (patch)
tree2009097c24ff00c89eb00f46c6f1bb50d94f8050 /svtools
parentacb923263e3a15f9cd8fda46d28a749c7496d113 (diff)
Improved loplugin:cstylecast to reference types: svtools
Change-Id: I7ac860cdf68e920834a65573a6f3344855840332
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfcache.cxx4
-rw-r--r--svtools/source/misc/transfer2.cxx12
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx2
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx2
4 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index fe31de3fb51e..4c8adaf767e2 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -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 );
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 5e9b8374895f..863d8c1133c9 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -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 );
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index fa5d0ca21bd0..fdbe172bbe26 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -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 ];
}
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index b2773971c6c4..8d9b5a2ae9e6 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -34,7 +34,7 @@ class ScrollBarBox;
namespace svt { namespace table
{
- struct MutableColumnMetrics : protected ColumnMetrics
+ struct MutableColumnMetrics : public ColumnMetrics
{
MutableColumnMetrics()
:ColumnMetrics()