summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:50 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:50 +0200
commit04b9ff9a8842bc23306c38f9bd1af7cd941d0eb8 (patch)
tree6b0beb6b27ce6b7441d70b5702f6d3dcffbacff2
parent9e1e8858d12ab76ce928b1f499e2de210a6e443d (diff)
loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ic77431126be9259bf6381243d1ee682d687c493e
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx2
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx28
-rw-r--r--sd/source/ui/view/drviews9.cxx2
-rw-r--r--sd/source/ui/view/drviewse.cxx10
6 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index c7bfef93e4e2..15d4dd30a894 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1214,7 +1214,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
sal_Int16 nDepth, nMask, nNumberingRule[ 10 ];
sal_uInt32 nTextOfs = pPara->nTextOfs;
sal_uInt32 nTabs = pPara->maTabStop.getLength();
- const ::com::sun::star::style::TabStop* pTabStop = ( const ::com::sun::star::style::TabStop* )pPara->maTabStop.getConstArray();
+ const ::com::sun::star::style::TabStop* pTabStop = pPara->maTabStop.getConstArray();
for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i )
{
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 1987b0589c11..e815e07dba22 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3010,7 +3010,7 @@ bool HtmlExport::CreateImageNumberFile()
sal_uLong nErr = aFile.createStream(aFull, pStr);
if(nErr == 0)
{
- pStr->WriteCharPtr( (const char *)"1" );
+ pStr->WriteCharPtr( "1" );
nErr = aFile.close();
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index b201d9e63d8f..51ea22c892ec 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -568,7 +568,7 @@ void incomingCallback( void *userRefCon,
BluetoothServer* pServer = static_cast<BluetoothServer*>(userRefCon);
- IOBluetoothRFCOMMChannel* channel = [IOBluetoothRFCOMMChannel withRFCOMMChannelRef:(IOBluetoothRFCOMMChannelRef)objectRef];
+ IOBluetoothRFCOMMChannel* channel = [IOBluetoothRFCOMMChannel withRFCOMMChannelRef:reinterpret_cast<IOBluetoothRFCOMMChannelRef>(objectRef)];
OSXBluetoothWrapper* socket = new OSXBluetoothWrapper( channel);
Communicator* pCommunicator = new Communicator( socket );
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index e9c5f008ab56..d4ed8fab0a6f 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -633,7 +633,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( rReq.GetSlot() == SID_CHANGEBEZIER )
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedToPathObj(false);
}
else
@@ -644,7 +644,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedToPolyObj(false);
}
}
@@ -676,7 +676,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedToPathObj(true);
Invalidate(SID_CONVERT_TO_CONTOUR);
@@ -704,7 +704,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
// create SdrGrafObj from metafile/bitmap
Graphic aGraphic;
@@ -2184,7 +2184,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->CombineMarkedObjects(false);
}
Cancel();
@@ -2221,7 +2221,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->MergeMarkedObjects(SDR_MERGE_MERGE);
}
Cancel();
@@ -2242,7 +2242,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->MergeMarkedObjects(SDR_MERGE_SUBSTRACT);
}
Cancel();
@@ -2263,7 +2263,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->MergeMarkedObjects(SDR_MERGE_INTERSECT);
}
Cancel();
@@ -2275,7 +2275,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if ( mpDrawView->IsDismantlePossible(false) )
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->DismantleMarkedObjects(false);
}
Cancel();
@@ -2292,7 +2292,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->CombineMarkedObjects(true);
}
Cancel();
@@ -2309,17 +2309,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if ( mpDrawView->IsBreak3DObjPossible() )
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->Break3DObj();
}
else if ( mpDrawView->IsDismantlePossible(true) )
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->DismantleMarkedObjects(true);
}
else if ( mpDrawView->IsImportMtfPossible() )
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const size_t nAnz=rMarkList.GetMarkCount();
@@ -2391,7 +2391,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
mpDrawView->SdrEndTextEdit();
}
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedObjTo3D(true);
}
}
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index b6e814a4a048..9f3c356eda46 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -727,7 +727,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
;
}
- mpDrawView->SetAttributes (*(const SfxItemSet *) pAttr.get());
+ mpDrawView->SetAttributes (*const_cast<const SfxItemSet *>(pAttr.get()));
rReq.Ignore ();
}
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index d7bc78f8b75a..516f4877852f 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -338,7 +338,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
)->Execute() == RET_YES )
{
// implicit transformation into bezier
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedToPathObj(false);
}
}
@@ -375,7 +375,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
)->Execute() == RET_YES )
{
// implicit transformation into bezier
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
mpDrawView->ConvertMarkedToPathObj(false);
}
}
@@ -853,7 +853,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_PASTE:
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
if(HasCurrentFunction())
{
@@ -870,7 +870,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_PASTE_UNFORMATTED:
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
if(HasCurrentFunction())
{
@@ -894,7 +894,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- WaitObject aWait( (Window*)GetActiveWindow() );
+ WaitObject aWait( GetActiveWindow() );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) );
const SfxItemSet* pReqArgs = rReq.GetArgs();
SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;