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

loplugin:cstylecast: deal with remaining pointer casts

Change-Id: I6ea774c635335106a7a8ddc4214c20bdf3f021ba
üst 84bf617f
......@@ -377,7 +377,7 @@ sal_Int32 AccessibleDialogControlShape::getAccessibleIndexInParent( ) throw (Ru
if ( xChild.is() )
{
Reference< XAccessibleContext > xChildContext = xChild->getAccessibleContext();
if ( xChildContext == (XAccessibleContext*)this )
if ( xChildContext == static_cast<XAccessibleContext*>(this) )
{
nIndexInParent = i;
break;
......
......@@ -109,7 +109,7 @@ void setTextEngineText (ExtTextEngine& rEngine, OUString const& aStr)
{
rEngine.SetText(OUString());
OString aUTF8Str = OUStringToOString( aStr, RTL_TEXTENCODING_UTF8 );
SvMemoryStream aMemStream( (void*)aUTF8Str.getStr(), aUTF8Str.getLength(),
SvMemoryStream aMemStream( const_cast<char *>(aUTF8Str.getStr()), aUTF8Str.getLength(),
StreamMode::READ );
aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
aMemStream.SetLineDelimiter( LINEEND_LF );
......@@ -2862,7 +2862,7 @@ void CodeCompleteWindow::ResizeAndPositionListBox()
if( pListBox->GetEntryCount() >= 1 )
{// if there is at least one element inside
// calculate basic position: under the current line
Rectangle aRect = ( (TextEngine*) pParent->GetEditEngine() )->PaMtoEditCursor( pParent->GetEditView()->GetSelection().GetEnd() , false );
Rectangle aRect = static_cast<TextEngine*>(pParent->GetEditEngine())->PaMtoEditCursor( pParent->GetEditView()->GetSelection().GetEnd() , false );
long nViewYOffset = pParent->GetEditView()->GetStartDocPos().Y();
Point aPos = aRect.BottomRight();// this variable will be used later (if needed)
aPos.Y() = (aPos.Y() - nViewYOffset) + nBasePad;
......
......@@ -1364,7 +1364,7 @@ void DialogWindow::InitSettings(bool bFont, bool bForeground, bool bBackground)
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > DialogWindow::CreateAccessible()
{
return (::com::sun::star::accessibility::XAccessible*) new AccessibleDialogWindow( this );
return static_cast<com::sun::star::accessibility::XAccessible*>(new AccessibleDialogWindow( this ));
}
char const* DialogWindow::GetHid () const
......
......@@ -363,7 +363,7 @@ bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
// if selected object was hit, drag object
if ( pHdl!=NULL || rView.IsMarkedHit(aPos, nHitLog) )
rView.BegDragObj(aPos, (OutputDevice*) NULL, pHdl, nDrgLog);
rView.BegDragObj(aPos, nullptr, pHdl, nDrgLog);
else if ( rView.AreObjectsMarked() )
rView.UnmarkAll();
......@@ -461,7 +461,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
// hit selected object?
if ( pHdl!=NULL || rView.IsMarkedHit(aMDPos, nHitLog) )
{
rView.BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
rView.BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
}
else
{
......@@ -485,7 +485,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
// drag object
pHdl = rView.PickHandle(aMDPos);
rView.BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
rView.BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
}
else
{
......
......@@ -921,7 +921,7 @@ SdrObject* DlgEdObj::getFullDragClone() const
// no need to really add the clone for dragging, it's a temporary
// object
SdrObject* pObj = new SdrUnoObj(OUString());
*pObj = *((const SdrUnoObj*)this);
*pObj = *(static_cast<const SdrUnoObj*>(this));
return pObj;
}
......
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