loplugin:unusedmethods unused return value in forms

Change-Id: I9da3e72ca12e040e7fb5bea7ccaa071edfd34f27
This commit is contained in:
Noel Grandin
2016-01-11 13:13:33 +02:00
parent 7a65837349
commit aa4dc89352
8 changed files with 15 additions and 28 deletions

View File

@@ -1924,7 +1924,7 @@ void OBoundControlModel::resetField()
m_nFieldType = DataType::OTHER; m_nFieldType = DataType::OTHER;
} }
bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) void OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
{ {
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::connectToField: invalid call (have an external binding)!" ); OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::connectToField: invalid call (have an external binding)!" );
// if there's a connection to the database // if there's a connection to the database
@@ -1992,7 +1992,7 @@ bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
} }
} }
return hasField(); hasField();
} }
void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet ) void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet )

View File

@@ -180,11 +180,6 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
} }
} }
bool OGroup::operator==( const OGroup& rGroup ) const
{
return m_aGroupName.equals(rGroup.GetGroupName());
}
Sequence< Reference<XControlModel> > OGroup::GetControlModels() const Sequence< Reference<XControlModel> > OGroup::GetControlModels() const
{ {
sal_Int32 nLen = m_aCompArray.size(); sal_Int32 nLen = m_aCompArray.size();

View File

@@ -145,8 +145,6 @@ public:
explicit OGroup(const OUString& rGroupName); explicit OGroup(const OUString& rGroupName);
virtual ~OGroup(); virtual ~OGroup();
bool operator==( const OGroup& rGroup ) const;
OUString GetGroupName() const { return m_aGroupName; } OUString GetGroupName() const { return m_aGroupName; }
css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > GetControlModels() const; css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > GetControlModels() const;

View File

@@ -1106,7 +1106,7 @@ protected:
void initFromField( const css::uno::Reference< css::sdbc::XRowSet>& _rxForm ); void initFromField( const css::uno::Reference< css::sdbc::XRowSet>& _rxForm );
private: private:
bool connectToField( const css::uno::Reference< css::sdbc::XRowSet>& _rxForm ); void connectToField( const css::uno::Reference< css::sdbc::XRowSet>& _rxForm );
void resetField(); void resetField();
/** does a new validation of the control value /** does a new validation of the control value

View File

@@ -1448,17 +1448,17 @@ namespace frm
} }
bool FormOperations::impl_moveLeft_throw( ) const void FormOperations::impl_moveLeft_throw( ) const
{ {
OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveLeft_throw: no cursor!" ); OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveLeft_throw: no cursor!" );
if ( !impl_hasCursor_nothrow() ) if ( !impl_hasCursor_nothrow() )
return false; return;
sal_Bool bRecordInserted = sal_False; sal_Bool bRecordInserted = sal_False;
bool bSuccess = impl_commitCurrentRecord_throw( &bRecordInserted ); bool bSuccess = impl_commitCurrentRecord_throw( &bRecordInserted );
if ( !bSuccess ) if ( !bSuccess )
return false; return;
if ( bRecordInserted ) if ( bRecordInserted )
{ {
@@ -1479,22 +1479,20 @@ namespace frm
else else
m_xCursor->previous(); m_xCursor->previous();
} }
return true;
} }
bool FormOperations::impl_moveRight_throw( ) const void FormOperations::impl_moveRight_throw( ) const
{ {
OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveRight_throw: no cursor!" ); OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveRight_throw: no cursor!" );
if ( !impl_hasCursor_nothrow() ) if ( !impl_hasCursor_nothrow() )
return false; return;
sal_Bool bRecordInserted = sal_False; sal_Bool bRecordInserted = sal_False;
bool bSuccess = impl_commitCurrentRecord_throw( &bRecordInserted ); bool bSuccess = impl_commitCurrentRecord_throw( &bRecordInserted );
if ( !bSuccess ) if ( !bSuccess )
return false; return;
if ( bRecordInserted ) if ( bRecordInserted )
{ {
@@ -1508,8 +1506,6 @@ namespace frm
else else
(void)m_xCursor->next(); (void)m_xCursor->next();
} }
return true;
} }

View File

@@ -254,7 +254,7 @@ namespace frm
@precond @precond
canMoveLeft() canMoveLeft()
*/ */
bool impl_moveLeft_throw() const; void impl_moveLeft_throw() const;
/** moves our cursor one position to the right, caring for different possible /** moves our cursor one position to the right, caring for different possible
cursor states. cursor states.
@@ -264,7 +264,7 @@ namespace frm
@precond @precond
canMoveRight() canMoveRight()
*/ */
bool impl_moveRight_throw( ) const; void impl_moveRight_throw( ) const;
/** impl-version of commitCurrentRecord, which can be called without caring for /** impl-version of commitCurrentRecord, which can be called without caring for
an output parameter, and within const-contexts an output parameter, and within const-contexts

View File

@@ -95,14 +95,14 @@ const OUString PathExpression::_getExpressionForEvaluation() const
return sExpr; return sExpr;
} }
bool PathExpression::evaluate( const EvaluationContext& rContext ) void PathExpression::evaluate( const EvaluationContext& rContext )
{ {
// for simple expression we don't need to re-bind (if we were bound before) // for simple expression we don't need to re-bind (if we were bound before)
// (we will evaluate empty expressions, since they are interpreted as ".") // (we will evaluate empty expressions, since they are interpreted as ".")
if( mxResult.is() && isSimpleExpression() ) if( mxResult.is() && isSimpleExpression() )
return true; return;
bool bResult = _evaluate( rContext, _getExpressionForEvaluation() ); _evaluate( rContext, _getExpressionForEvaluation() );
// clear old result, and copy new // clear old result, and copy new
maNodes.clear(); maNodes.clear();
@@ -115,8 +115,6 @@ bool PathExpression::evaluate( const EvaluationContext& rContext )
for( sal_Int32 n = 0; n < nLength; n++ ) for( sal_Int32 n = 0; n < nLength; n++ )
maNodes.push_back( xNodeList->item( n ) ); maNodes.push_back( xNodeList->item( n ) );
} }
return bResult;
} }

View File

@@ -65,7 +65,7 @@ public:
/// evaluate the expression relative to the content node. /// evaluate the expression relative to the content node.
bool evaluate( const xforms::EvaluationContext& rContext ); void evaluate( const xforms::EvaluationContext& rContext );
// get the result of this expression as node/node list/... // get the result of this expression as node/node list/...