Kaydet (Commit) 470b2934 authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

üst 268fe75e
...@@ -478,7 +478,7 @@ OleComponent::~OleComponent() ...@@ -478,7 +478,7 @@ OleComponent::~OleComponent()
for ( FormatEtcList::iterator aIter = m_pNativeImpl->m_aFormatsList.begin(); for ( FormatEtcList::iterator aIter = m_pNativeImpl->m_aFormatsList.begin();
aIter != m_pNativeImpl->m_aFormatsList.end(); aIter != m_pNativeImpl->m_aFormatsList.end();
aIter++ ) ++aIter )
{ {
delete (*aIter); delete (*aIter);
(*aIter) = NULL; (*aIter) = NULL;
...@@ -500,7 +500,7 @@ FORMATETC* OleComponentNative_Impl::GetSupportedFormatForAspect( sal_uInt32 nReq ...@@ -500,7 +500,7 @@ FORMATETC* OleComponentNative_Impl::GetSupportedFormatForAspect( sal_uInt32 nReq
{ {
for ( FormatEtcList::iterator aIter = m_aFormatsList.begin(); for ( FormatEtcList::iterator aIter = m_aFormatsList.begin();
aIter != m_aFormatsList.end(); aIter != m_aFormatsList.end();
aIter++ ) ++aIter )
if ( (*aIter) && (*aIter)->dwAspect == nRequestedAspect ) if ( (*aIter) && (*aIter)->dwAspect == nRequestedAspect )
return (*aIter); return (*aIter);
......
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
DECL_LINK( executor, void* ); DECL_LINK( executor, void* );
sal_Bool isExecuted() { return m_bExecuted; } sal_Bool isExecuted() const { return m_bExecuted; }
}; };
#endif #endif
......
...@@ -117,7 +117,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( ...@@ -117,7 +117,7 @@ void SAL_CALL SaxNamespaceFilter::startElement(
catch ( SAXException& e ) catch ( SAXException& e )
{ {
e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); e.Message = ::rtl::OUString( getErrorLineString() + e.Message );
throw e; throw;
} }
::rtl::OUString aNamespaceElementName; ::rtl::OUString aNamespaceElementName;
...@@ -129,7 +129,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( ...@@ -129,7 +129,7 @@ void SAL_CALL SaxNamespaceFilter::startElement(
catch ( SAXException& e ) catch ( SAXException& e )
{ {
e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); e.Message = ::rtl::OUString( getErrorLineString() + e.Message );
throw e; throw;
} }
xDocumentHandler->startElement( aNamespaceElementName, pNewList ); xDocumentHandler->startElement( aNamespaceElementName, pNewList );
...@@ -148,7 +148,7 @@ void SAL_CALL SaxNamespaceFilter::endElement(const rtl::OUString& aName) ...@@ -148,7 +148,7 @@ void SAL_CALL SaxNamespaceFilter::endElement(const rtl::OUString& aName)
catch ( SAXException& e ) catch ( SAXException& e )
{ {
e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); e.Message = ::rtl::OUString( getErrorLineString() + e.Message );
throw e; throw;
} }
xDocumentHandler->endElement( aNamespaceElementName ); xDocumentHandler->endElement( aNamespaceElementName );
......
...@@ -398,8 +398,6 @@ throw( SAXException, RuntimeException ) ...@@ -398,8 +398,6 @@ throw( SAXException, RuntimeException )
nItemBits |= ::com::sun::star::ui::ItemStyle::ALIGN_LEFT; nItemBits |= ::com::sun::star::ui::ItemStyle::ALIGN_LEFT;
else if ( nHashCode == m_nHashCode_Style_AutoSize ) else if ( nHashCode == m_nHashCode_Style_AutoSize )
nItemBits |= ::com::sun::star::ui::ItemStyle::AUTO_SIZE; nItemBits |= ::com::sun::star::ui::ItemStyle::AUTO_SIZE;
else if ( nHashCode == m_nHashCode_Style_DropDown )
nItemBits |= ::com::sun::star::ui::ItemStyle::DROP_DOWN;
else if ( nHashCode == m_nHashCode_Style_Repeat ) else if ( nHashCode == m_nHashCode_Style_Repeat )
nItemBits |= ::com::sun::star::ui::ItemStyle::REPEAT; nItemBits |= ::com::sun::star::ui::ItemStyle::REPEAT;
else if ( nHashCode == m_nHashCode_Style_DropDownOnly ) else if ( nHashCode == m_nHashCode_Style_DropDownOnly )
......
...@@ -531,7 +531,7 @@ void NewMenuController::impl_setPopupMenu() ...@@ -531,7 +531,7 @@ void NewMenuController::impl_setPopupMenu()
} }
catch ( RuntimeException& e ) catch ( RuntimeException& e )
{ {
throw e; throw;
} }
catch ( Exception& ) catch ( Exception& )
{ {
......
...@@ -373,12 +373,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: ...@@ -373,12 +373,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
{ {
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Step", 4 )) if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Step", 4 ))
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat ))
aStep = bFloat ? ::rtl::OUString::valueOf( fValue ) : aStep = bFloat ? ::rtl::OUString::valueOf( fValue ) :
::rtl::OUString::valueOf( nValue ); ::rtl::OUString::valueOf( nValue );
...@@ -439,12 +438,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: ...@@ -439,12 +438,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
{ {
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "LowerLimit", 10 )) if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "LowerLimit", 10 ))
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat ))
aMin = bFloat ? ::rtl::OUString::valueOf( fValue ) : aMin = bFloat ? ::rtl::OUString::valueOf( fValue ) :
::rtl::OUString::valueOf( nValue ); ::rtl::OUString::valueOf( nValue );
...@@ -456,12 +454,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: ...@@ -456,12 +454,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
{ {
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "UpperLimit", 10 )) if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "UpperLimit", 10 ))
{ {
sal_Int32 nValue;
double fValue;
bool bFloat( false );
if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat ))
aMax = bFloat ? ::rtl::OUString::valueOf( fValue ) : aMax = bFloat ? ::rtl::OUString::valueOf( fValue ) :
::rtl::OUString::valueOf( nValue ); ::rtl::OUString::valueOf( nValue );
......
...@@ -1584,7 +1584,7 @@ void ToolBarManager::notifyRegisteredControllers( const rtl::OUString& aUIElemen ...@@ -1584,7 +1584,7 @@ void ToolBarManager::notifyRegisteredControllers( const rtl::OUString& aUIElemen
} }
catch ( RuntimeException& e ) catch ( RuntimeException& e )
{ {
throw e; throw;
} }
catch ( Exception& ) catch ( Exception& )
{ {
......
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