summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-21 14:29:42 +0200
committerNoel Grandin <noel@peralex.com>2014-10-23 12:36:15 +0200
commite2548315bfa103f114cc629a5b99b48f7542e9ac (patch)
treeae419aa521163ccaa56e15ea3c0c754036e32e0e /forms
parentd4ca0cc293e060e68237f251173d951eceb7898f (diff)
loplugin: cstylecast
Change-Id: Iad39bce8e7562821bc8fbf8156ea56aedc19c7d6
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx12
-rw-r--r--forms/source/component/Edit.cxx6
-rw-r--r--forms/source/component/File.cxx2
-rw-r--r--forms/source/component/Filter.cxx2
-rw-r--r--forms/source/component/Grid.cxx2
-rw-r--r--forms/source/component/clickableimage.cxx2
-rw-r--r--forms/source/component/formcontrolfont.cxx2
-rw-r--r--forms/source/richtext/richtextmodel.cxx2
8 files changed, 15 insertions, 15 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 2744b34e967c..1fe10693e8ae 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -184,7 +184,7 @@ public:
EventObject* OFormSubmitResetThread::cloneEvent(
const EventObject *pEvt ) const
{
- return new ::com::sun::star::awt::MouseEvent( *(::com::sun::star::awt::MouseEvent *)pEvt );
+ return new ::com::sun::star::awt::MouseEvent( *static_cast<const ::com::sun::star::awt::MouseEvent *>(pEvt) );
}
@@ -195,9 +195,9 @@ void OFormSubmitResetThread::processEvent(
bool _bSubmit)
{
if (_bSubmit)
- ((ODatabaseForm *)pCompImpl)->submit_impl(_rControl, *static_cast<const ::com::sun::star::awt::MouseEvent*>(_pEvt), true);
+ static_cast<ODatabaseForm *>(pCompImpl)->submit_impl(_rControl, *static_cast<const ::com::sun::star::awt::MouseEvent*>(_pEvt), true);
else
- ((ODatabaseForm *)pCompImpl)->reset_impl(true);
+ static_cast<ODatabaseForm *>(pCompImpl)->reset_impl(true);
}
@@ -2175,7 +2175,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
bool bCanceled = false;
while (aIter.hasMoreElements() && !bCanceled)
{
- if (!((XSubmitListener*)aIter.next())->approveSubmit(aEvt))
+ if (!static_cast<XSubmitListener*>(aIter.next())->approveSubmit(aEvt))
bCanceled = true;
}
@@ -2968,7 +2968,7 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction
aGuard.clear();
while (aIter.hasMoreElements())
- ((XLoadListener*)aIter.next())->reloading(aEvent);
+ static_cast<XLoadListener*>(aIter.next())->reloading(aEvent);
aGuard.reset();
}
@@ -2990,7 +2990,7 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction
::cppu::OInterfaceIteratorHelper aIter(m_aLoadListeners);
aGuard.clear();
while (aIter.hasMoreElements())
- ((XLoadListener*)aIter.next())->reloaded(aEvent);
+ static_cast<XLoadListener*>(aIter.next())->reloaded(aEvent);
// if we are on the insert row, we have to reset all controls
// to set the default values
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index f2e049edca25..e543fd6a56cc 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -499,7 +499,7 @@ void OEditModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutS
// but for compatibility, we need to use an "old" aggregate for writing and reading
Reference< XPropertySet > xFakedAggregate(
- getContext()->getServiceManager()->createInstanceWithContext( (OUString)VCL_CONTROLMODEL_EDIT, getContext() ),
+ getContext()->getServiceManager()->createInstanceWithContext( OUString(VCL_CONTROLMODEL_EDIT), getContext() ),
UNO_QUERY
);
OSL_ENSURE( xFakedAggregate.is(), "OEditModel::writeAggregate: could not create an old EditControlModel!" );
@@ -521,7 +521,7 @@ void OEditModel::readAggregate( const Reference< XObjectInputStream >& _rxInStre
// but for compatibility, we need to use an "old" aggregate for writing and reading
Reference< XPropertySet > xFakedAggregate(
- getContext()->getServiceManager()->createInstanceWithContext( (OUString)VCL_CONTROLMODEL_EDIT, getContext() ),
+ getContext()->getServiceManager()->createInstanceWithContext( OUString(VCL_CONTROLMODEL_EDIT), getContext() ),
UNO_QUERY
);
Reference< XPersistObject > xFakedPersist( xFakedAggregate, UNO_QUERY );
@@ -578,7 +578,7 @@ void OEditModel::read(const Reference<XObjectInputStream>& _rxInStream) throw (
&& (getString(aDefaultControl) == STARDIV_ONE_FORM_CONTROL_TEXTFIELD )
)
{
- m_xAggregateSet->setPropertyValue( PROPERTY_DEFAULTCONTROL, makeAny( (OUString)STARDIV_ONE_FORM_CONTROL_EDIT ) );
+ m_xAggregateSet->setPropertyValue( PROPERTY_DEFAULTCONTROL, makeAny( OUString(STARDIV_ONE_FORM_CONTROL_EDIT) ) );
// Older as well as current versions should understand this : the former knew only the STARDIV_ONE_FORM_CONTROL_EDIT,
// the latter are registered for both STARDIV_ONE_FORM_CONTROL_EDIT and STARDIV_ONE_FORM_CONTROL_TEXTFIELD.
}
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index bf2e35ff6f02..5274b1cf35d8 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -246,7 +246,7 @@ void SAL_CALL OFileControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE
EventObject aEvt(static_cast<XWeak*>(this));
bool bContinue = true;
while (aIter.hasMoreElements() && bContinue)
- bContinue =((XResetListener*)aIter.next())->approveReset(aEvt);
+ bContinue = static_cast<XResetListener*>(aIter.next())->approveReset(aEvt);
if (bContinue)
{
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 11d0b7388d9b..3b566e9ca67d 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -377,7 +377,7 @@ namespace frm
aEvt.Source = *this;
::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners );
while( aIt.hasMoreElements() )
- ((XTextListener *)aIt.next())->textChanged( aEvt );
+ static_cast<XTextListener *>(aIt.next())->textChanged( aEvt );
}
#endif
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index b158c35d1897..bb5469bbcd9a 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -352,7 +352,7 @@ void SAL_CALL OGridControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE
EventObject aEvt(static_cast<XWeak*>(this));
bool bContinue = true;
while (aIter.hasMoreElements() && bContinue)
- bContinue =((XResetListener*)aIter.next())->approveReset(aEvt);
+ bContinue = static_cast<XResetListener*>(aIter.next())->approveReset(aEvt);
if (bContinue)
{
_reset();
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index c2729b1eb271..71ad12e50887 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -867,7 +867,7 @@ namespace frm
const Reference<XControl>&,
bool )
{
- ((OClickableImageBaseControl *)pCompImpl)->actionPerformed_Impl( true, *(MouseEvent *)pEvt );
+ static_cast<OClickableImageBaseControl *>(pCompImpl)->actionPerformed_Impl( true, *static_cast<const MouseEvent *>(pEvt) );
}
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index 5f7d3ebe4c1d..474e3d4f048b 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -516,7 +516,7 @@ namespace frm
{
EmptyFontDescriptor aEmpty;
if ( PROPERTY_ID_FONT == _nHandle )
- return makeAny( (FontDescriptor)aEmpty );
+ return makeAny( FontDescriptor(aEmpty) );
return lcl_extractFontDescriptorAggregate( _nHandle, aEmpty );
}
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index af5ec75c98aa..95431f8975f6 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -452,7 +452,7 @@ namespace frm
break;
case PROPERTY_ID_DEFAULTCONTROL:
- aDefault <<= (OUString)FRM_SUN_CONTROL_RICHTEXTCONTROL;
+ aDefault <<= OUString(FRM_SUN_CONTROL_RICHTEXTCONTROL);
break;
case PROPERTY_ID_HELPTEXT: