summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:44 +0200
commitcec7d0a908292d065e239024dee06c82ee16809b (patch)
tree7eadecf45f2b682f767812aef32c6d9fb3686b04 /editeng/source
parent1cb4a7554a21952a323f3e2bbf533b005daf4d00 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I0d15a14209768ef0292d9abdf00e8fa571cf90da
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/accessibility/AccessibleContextBase.cxx4
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/editsel.cxx4
-rw-r--r--editeng/source/editeng/eehtml.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx2
-rw-r--r--editeng/source/uno/unofdesc.cxx10
-rw-r--r--editeng/source/uno/unofield.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx8
-rw-r--r--editeng/source/uno/unotext2.cxx2
-rw-r--r--editeng/source/xml/xmltxtexp.cxx4
12 files changed, 23 insertions, 23 deletions
diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx
index 63960564345f..057fee4efcdc 100644
--- a/editeng/source/accessibility/AccessibleContextBase.cxx
+++ b/editeng/source/accessibility/AccessibleContextBase.cxx
@@ -254,7 +254,7 @@ sal_Int32 SAL_CALL
if (xChild.is())
{
uno::Reference<XAccessibleContext> xChildContext = xChild->getAccessibleContext();
- if (xChildContext == (XAccessibleContext*)this)
+ if (xChildContext == static_cast<XAccessibleContext*>(this))
return i;
}
}
@@ -414,7 +414,7 @@ void SAL_CALL AccessibleContextBase::addAccessibleEventListener (
{
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
- uno::Reference<uno::XInterface> x ((lang::XComponent *)this, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> x (static_cast<lang::XComponent *>(this), uno::UNO_QUERY);
rxListener->disposing (lang::EventObject (x));
}
else
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 4629ba56f1c3..3540877cc09b 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -388,7 +388,7 @@ void EditEngine::SetDefTab( sal_uInt16 nDefTab )
if ( pImpEditEngine->IsFormatted() )
{
pImpEditEngine->FormatFullDoc();
- pImpEditEngine->UpdateViews( (EditView*) 0 );
+ pImpEditEngine->UpdateViews( nullptr );
}
}
diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx
index 7c3f919faa2a..45a280b889e9 100644
--- a/editeng/source/editeng/editsel.cxx
+++ b/editeng/source/editeng/editsel.cxx
@@ -82,7 +82,7 @@ void EditSelFunctionSet::DeselectAll()
// class EditSelectionEngine
-EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (vcl::Window*)0 )
+EditSelectionEngine::EditSelectionEngine() : SelectionEngine( nullptr )
{
SetSelectionMode( RANGE_SELECTION );
EnableDrag( true );
@@ -96,7 +96,7 @@ void EditSelectionEngine::SetCurView( EditView* pNewView )
if ( pNewView )
SetWindow( pNewView->GetWindow() );
else
- SetWindow( (vcl::Window*)0 );
+ SetWindow( nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 70f3f2c46125..5988983c2613 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -540,7 +540,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
{
EditSelection aSel( aStartPaM, aEndPaM );
ImportInfo aImportInfo(HTMLIMP_SETATTR, this, mpEditEngine->CreateESelection(aSel));
- aImportInfo.pAttrs = (void*)&rItems;
+ aImportInfo.pAttrs = const_cast<SfxItemSet *>(&rItems);
mpEditEngine->CallImportHandler(aImportInfo);
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 49ead0483d8b..ba2276e995c4 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -206,7 +206,7 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
if ( IsFormatted() )
{
FormatFullDoc();
- UpdateViews( (EditView*) 0);
+ UpdateViews( nullptr);
}
}
@@ -227,7 +227,7 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
if ( IsFormatted() )
{
FormatFullDoc();
- UpdateViews( (EditView*) 0);
+ UpdateViews( nullptr);
}
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 5660bb40efba..bca39a4b191d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4179,7 +4179,7 @@ void ImpEditEngine::SetFlatMode( bool bFlat )
aEditDoc.CreateDefFont( !bFlat );
FormatFullDoc();
- UpdateViews( (EditView*) 0);
+ UpdateViews( nullptr);
if ( pActiveView )
pActiveView->ShowCursor();
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 67a574bac6e2..ca864e13abf1 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1516,7 +1516,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
break;
case RTF_BRDRSH: // Shadowed border
- rSet.Put( SvxShadowItem( aPardMap.nShadow, (Color*) 0, 60 /*3pt*/,
+ rSet.Put( SvxShadowItem( aPardMap.nShadow, nullptr, 60 /*3pt*/,
SVX_SHADOW_BOTTOMRIGHT ) );
break;
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index c5d85a19a8a8..e2cb103fb3fb 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -90,35 +90,35 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxFontHeightItem aFontHeightItem( 0, 100, EE_CHAR_FONTHEIGHT );
aTemp <<= (float)rDesc.Height;
- ((SfxPoolItem*)&aFontHeightItem)->PutValue( aTemp, MID_FONTHEIGHT|CONVERT_TWIPS );
+ static_cast<SfxPoolItem*>(&aFontHeightItem)->PutValue( aTemp, MID_FONTHEIGHT|CONVERT_TWIPS );
rSet.Put(aFontHeightItem);
}
{
SvxPostureItem aPostureItem( (FontItalic)0, EE_CHAR_ITALIC );
aTemp <<= rDesc.Slant;
- ((SfxPoolItem*)&aPostureItem)->PutValue( aTemp, MID_POSTURE );
+ static_cast<SfxPoolItem*>(&aPostureItem)->PutValue( aTemp, MID_POSTURE );
rSet.Put(aPostureItem);
}
{
SvxUnderlineItem aUnderlineItem( (FontUnderline)0, EE_CHAR_UNDERLINE );
aTemp <<= (sal_Int16)rDesc.Underline;
- ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE );
+ static_cast<SfxPoolItem*>(&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE );
rSet.Put( aUnderlineItem );
}
{
SvxWeightItem aWeightItem( (FontWeight)0, EE_CHAR_WEIGHT );
aTemp <<= rDesc.Weight;
- ((SfxPoolItem*)&aWeightItem)->PutValue( aTemp, MID_WEIGHT );
+ static_cast<SfxPoolItem*>(&aWeightItem)->PutValue( aTemp, MID_WEIGHT );
rSet.Put( aWeightItem );
}
{
SvxCrossedOutItem aCrossedOutItem( (FontStrikeout)0, EE_CHAR_STRIKEOUT );
aTemp <<= rDesc.Strikeout;
- ((SfxPoolItem*)&aCrossedOutItem)->PutValue( aTemp, MID_CROSS_OUT );
+ static_cast<SfxPoolItem*>(&aCrossedOutItem)->PutValue( aTemp, MID_CROSS_OUT );
rSet.Put( aCrossedOutItem );
}
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index d5df68a302d2..dd6bf4371947 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -934,7 +934,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const OUSt
}
if (nId != text::textfield::Type::UNSPECIFIED)
- xRet = (::cppu::OWeakObject * )new SvxUnoTextField( nId );
+ xRet = static_cast<cppu::OWeakObject *>(new SvxUnoTextField( nId ));
}
return xRet;
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index ed896e2e2ac8..4933369eeb68 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1557,7 +1557,7 @@ SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, bool bPortion /
:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ),
mbPortion( bPortion )
{
- xParentText = (text::XText*)&rParent;
+ xParentText = static_cast<text::XText*>(const_cast<SvxUnoTextBase *>(&rParent));
}
SvxUnoTextRange::~SvxUnoTextRange() throw()
@@ -1696,7 +1696,7 @@ uno::Any SAL_CALL SvxUnoTextBase::queryAggregation( const uno::Type & rType )
QUERYINT( text::XText );
QUERYINT( text::XSimpleText );
if( rType == cppu::UnoType<text::XTextRange>::get())
- return uno::makeAny(uno::Reference< text::XTextRange >((text::XText*)(this)));
+ return uno::makeAny(uno::Reference< text::XTextRange >(static_cast<text::XText*>(this)));
QUERYINT(container::XEnumerationAccess );
QUERYINT( container::XElementAccess );
QUERYINT( beans::XMultiPropertyStates );
@@ -1976,7 +1976,7 @@ uno::Reference< text::XText > SAL_CALL SvxUnoTextBase::getText()
SetSelection( aSelection );
}
- return (text::XText*)this;
+ return static_cast<text::XText*>(this);
}
uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::getStart()
@@ -2012,7 +2012,7 @@ uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumera
::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
SetSelection( aSelection );
- uno::Reference< container::XEnumeration > xEnum( (container::XEnumeration*) new SvxUnoTextContentEnumeration( *this ) );
+ uno::Reference< container::XEnumeration > xEnum( static_cast<container::XEnumeration*>(new SvxUnoTextContentEnumeration( *this )) );
return xEnum;
}
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 3c9cf39c3467..165d85d4561e 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -239,7 +239,7 @@ void SAL_CALL SvxUnoTextContent::dispose()
mbDisposing = true;
lang::EventObject aEvt;
- aEvt.Source = *(OWeakAggObject*) this;
+ aEvt.Source = *static_cast<OWeakAggObject*>(this);
maDisposeListeners.disposeAndClear(aEvt);
if( mxParentText.is() )
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 9ec93aef19f5..401472f27aff 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -234,7 +234,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co
|| aServiceSpecifier == "com.sun.star.text.TextField.DateTime"
)
{
- return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::DATE );
+ return static_cast<cppu::OWeakObject *>(new SvxUnoTextField( text::textfield::Type::DATE ));
}
return SvxUnoTextCreateTextField( aServiceSpecifier );
@@ -371,7 +371,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
const ESelection& rSel,
const OUString& rFileName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > & xHandler)
-: SvXMLExport( xContext, "", rFileName, xHandler, ((frame::XModel*)new SvxSimpleUnoModel()), FUNIT_CM ),
+: SvXMLExport( xContext, "", rFileName, xHandler, (static_cast<frame::XModel*>(new SvxSimpleUnoModel())), FUNIT_CM ),
maSelection( rSel )
{
SvxEditEngineSource aEditSource( pEditEngine );