new loplugin unnecessaryparen

Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec
Reviewed-on: https://gerrit.libreoffice.org/39549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-07-05 08:32:57 +02:00
parent ec1de6895d
commit 4b2262ab5b
209 changed files with 504 additions and 407 deletions

View File

@ -643,7 +643,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
{
ArrayWrapper aWrap;
NativeObjectWrapper aNativeObjectWrapper;
if ( (aValue >>= aWrap) )
if ( aValue >>= aWrap )
{
SbxDimArray* pArray = nullptr;
Sequence< sal_Int32 > indices;
@ -662,10 +662,10 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
pVar->PutEmpty();
break;
}
else if ( (aValue >>= aNativeObjectWrapper) )
else if ( aValue >>= aNativeObjectWrapper )
{
sal_uInt32 nIndex = 0;
if( (aNativeObjectWrapper.ObjectId >>= nIndex) )
if( aNativeObjectWrapper.ObjectId >>= nIndex )
{
SbxObject* pObj = lcl_getNativeObject( nIndex );
pVar->PutObject( pObj );
@ -680,7 +680,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
if( pInst && pInst->IsCompatibility() )
{
oleautomation::Date aDate;
if( (aValue >>= aDate) )
if( aValue >>= aDate )
{
pVar->PutDate( aDate.Value );
break;
@ -688,7 +688,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
else
{
oleautomation::Decimal aDecimal;
if( (aValue >>= aDecimal) )
if( aValue >>= aDecimal )
{
pVar->PutDecimal( aDecimal );
break;
@ -696,7 +696,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
else
{
oleautomation::Currency aCurrency;
if( (aValue >>= aCurrency) )
if( aValue >>= aCurrency )
{
pVar->PutCurrency( aCurrency.Value );
break;

View File

@ -922,7 +922,7 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
if ( nArgCount >= 3 )
{
nStartPos = rPar.Get(3)->GetLong();
if( (nStartPos <= 0 && nStartPos != -1))
if( nStartPos <= 0 && nStartPos != -1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
nStartPos = -1;

View File

@ -1144,7 +1144,7 @@ void SbiRuntime::PushForEach()
// XEnumerationAccess?
Any aAny = pUnoObj->getUnoAny();
Reference< XEnumerationAccess > xEnumerationAccess;
if( (aAny >>= xEnumerationAccess) )
if( aAny >>= xEnumerationAccess )
{
p->xEnumeration = xEnumerationAccess->createEnumeration();
p->eForType = ForType::EachXEnumeration;

View File

@ -1175,7 +1175,7 @@ Lbl_OpIsDouble:
// result is always a Date, if '-' the result is only
// a Date if one of lhs or rhs ( but not both ) is already
// a Date
if( ( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) )
if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
{
if( eOp == SbxPLUS || ( ( eOp == SbxMINUS ) && ( GetType() != rOp.GetType() ) ) )
aL.eType = SbxDATE;

View File

@ -67,7 +67,7 @@ namespace canvas
for( sal_Int32 i=0; i<rArgs.getLength(); ++i )
{
beans::PropertyValue aProp;
if( (rArgs[i] >>= aProp) )
if( rArgs[i] >>= aProp )
{
if ( aProp.Name == "Colors" )
{

View File

@ -175,7 +175,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
rSubIncrements.realloc( 1 );
double fStepHelp = 0;
if( (rOuterValue >>= fStepHelp) )
if( rOuterValue >>= fStepHelp )
{
double fStepMain = 0;
if( AxisHelper::isLogarithmic(aScaleData.Scaling) )
@ -265,7 +265,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
case SCALE_PROP_AXIS_TYPE:
{
sal_Int32 nType = 0;
if( (rOuterValue >>= nType) )
if( rOuterValue >>= nType )
{
if( nType == css::chart::ChartAxisType::AUTOMATIC )
{

View File

@ -475,8 +475,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
switch( nWhichId )
{
case SCHATTR_AXIS_AUTO_MAX:
if( (static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue() ))
if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Maximum.clear();
bSetScale = true;
@ -500,8 +499,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
break;
case SCHATTR_AXIS_AUTO_MIN:
if( (static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue() ))
if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Minimum.clear();
bSetScale = true;
@ -528,8 +526,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
{
bool bWasLogarithm = AxisHelper::isLogarithmic( aScale.Scaling );
if( (static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue() ))
if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
// logarithm is true
if( ! bWasLogarithm )
@ -673,7 +670,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
break;
case SCHATTR_AXIS_AUTO_TIME_RESOLUTION:
if( (static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue() ))
if( static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue() )
{
aScale.TimeIncrement.TimeResolution.clear();
bSetScale = true;
@ -695,8 +692,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
case SCHATTR_AXIS_AUTO_ORIGIN:
{
if( (static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue() ))
if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Origin.clear();
bSetScale = true;

View File

@ -258,8 +258,8 @@ bool ErrorBarItemConverter::ApplySpecialItem(
bool bShowPos(false), bShowNeg(false);
lcl_getErrorIndicatorValues( xErrorBarProp, bShowPos, bShowNeg );
if( ( bShowPos != bNewIndPos ||
bShowNeg != bNewIndNeg ))
if( bShowPos != bNewIndPos ||
bShowNeg != bNewIndNeg )
{
xErrorBarProp->setPropertyValue( "ShowPositiveError" , uno::Any( bNewIndPos ));
xErrorBarProp->setPropertyValue( "ShowNegativeError" , uno::Any( bNewIndNeg ));

View File

@ -1464,7 +1464,7 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, sal_uInt32 nColor)
sal_uInt32 nPreColor = maBarColorMap[nId];
maBarColorMap[nId] = nColor;
//if has manul event, just record the color and process manul event first
if ((maRenderEvent != EVENT_NONE))
if (maRenderEvent != EVENT_NONE)
{
return;
}

View File

@ -0,0 +1,20 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
bool foo(int);
int main()
{
int x = 1;
x = ((2)); // expected-error {{parentheses around parentheses [loplugin:unnecessaryparen]}}
if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if [loplugin:unnecessaryparen]}}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

View File

@ -0,0 +1,84 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <cassert>
#include <string>
#include <iostream>
#include <fstream>
#include <set>
#include <clang/AST/CXXInheritance.h>
#include "compat.hxx"
#include "plugin.hxx"
/**
look for unnecessary parentheses
*/
namespace {
class UnnecessaryParen:
public RecursiveASTVisitor<UnnecessaryParen>, public loplugin::Plugin
{
public:
explicit UnnecessaryParen(InstantiationData const & data): Plugin(data) {}
virtual void run() override
{
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
bool VisitParenExpr(const ParenExpr *);
bool VisitIfStmt(const IfStmt *);
};
bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
{
if (ignoreLocation(parenExpr))
return true;
if (parenExpr->getLocStart().isMacroID())
return true;
auto subParenExpr = dyn_cast<ParenExpr>(parenExpr->getSubExpr());
if (subParenExpr) {
if (subParenExpr->getLocStart().isMacroID())
return true;
report(
DiagnosticsEngine::Warning, "parentheses around parentheses",
parenExpr->getLocStart())
<< parenExpr->getSourceRange();
}
return true;
}
bool UnnecessaryParen::VisitIfStmt(const IfStmt* ifStmt)
{
if (ignoreLocation(ifStmt))
return true;
if (auto parenExpr = dyn_cast<ParenExpr>(ifStmt->getCond())) {
if (parenExpr->getLocStart().isMacroID())
return true;
// assignments need extra parentheses or they generate a compiler warning
auto binaryOp = dyn_cast<BinaryOperator>(parenExpr->getSubExpr());
if (binaryOp && binaryOp->getOpcode() == BO_Assign)
return true;
report(
DiagnosticsEngine::Warning, "parentheses immediately inside if",
ifStmt->getLocStart())
<< ifStmt->getSourceRange();
}
return true;
}
loplugin::Plugin::Registration< UnnecessaryParen > X("unnecessaryparen", true);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -151,10 +151,10 @@ namespace dbtools
static bool implIsLeapYear(sal_Int32 _nYear)
{
return ( ( ((_nYear % 4) == 0)
return ( ((_nYear % 4) == 0)
&& ((_nYear % 100) != 0)
)
)
|| ((_nYear % 400) == 0)
;
}

View File

@ -1175,17 +1175,17 @@ catch(const Exception&)
bool canInsert(const Reference< XPropertySet>& _rxCursorSet)
{
return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0));
return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0);
}
bool canUpdate(const Reference< XPropertySet>& _rxCursorSet)
{
return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0));
return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0);
}
bool canDelete(const Reference< XPropertySet>& _rxCursorSet)
{
return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0));
return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0);
}
Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent)

View File

@ -288,14 +288,14 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
OSQLParseNode* pLHS = parseTree->getChild( 0 );
OSQLParseNode* pRHS = parseTree->getChild( 2 );
if ( ( !( SQL_ISRULE( pLHS, column_ref ) ) // on the LHS, we accept a column or a constant int value
if ( ( ! SQL_ISRULE( pLHS, column_ref ) // on the LHS, we accept a column or a constant int value
&& ( pLHS->getNodeType() != SQLNodeType::IntNum )
)
|| ( ( pRHS->getNodeType() != SQLNodeType::String ) // on the RHS, certain literals are acceptable
&& ( pRHS->getNodeType() != SQLNodeType::IntNum )
&& ( pRHS->getNodeType() != SQLNodeType::ApproxNum )
&& !( SQL_ISTOKEN( pRHS, TRUE ) )
&& !( SQL_ISTOKEN( pRHS, FALSE ) )
&& ! SQL_ISTOKEN( pRHS, TRUE )
&& ! SQL_ISTOKEN( pRHS, FALSE )
)
|| ( ( pLHS->getNodeType() == SQLNodeType::IntNum ) // an int on LHS requires an int on RHS
&& ( pRHS->getNodeType() != SQLNodeType::IntNum )
@ -386,7 +386,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
// We currently can't handle a 'NOT LIKE' when there are '%'
m_pConnection->throwGenericSQLException(STR_QUERY_NOT_LIKE_TOO_COMPLEX,*this);
}
else if( (aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) ) )
else if( aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) )
{ // One occurrence of '%' matches...
if ( aMatchString.startsWith(OUStringLiteral1(WILDCARD)) )
pResult = createTest( aColumnName, E_BOOK_QUERY_ENDS_WITH, aMatchString.copy( 1 ) );

View File

@ -365,7 +365,7 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1);
// Ascending or Descending?
m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
m_aOrderbyAscending.push_back(SQL_ISTOKEN(pAscendingDescending,DESC) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
}
void OStatement_Base::construct(const OUString& sql)

View File

@ -83,7 +83,7 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode)
pCompiler->execute( pColumnRef );
m_aSelectionEvaluations.push_back( TPredicates(pCompiler,pInterpreter) );
}
else if ( ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 ) )
else if ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 )
{
m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,nullptr);
}

View File

@ -143,7 +143,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
{
execute(pPredicateNode->getChild(1));
}
else if ((SQL_ISRULE(pPredicateNode,search_condition) || (SQL_ISRULE(pPredicateNode,boolean_term)))
else if ((SQL_ISRULE(pPredicateNode,search_condition) || SQL_ISRULE(pPredicateNode,boolean_term))
&& // AND/OR-linkage:
pPredicateNode->count() == 3)
{

View File

@ -291,7 +291,7 @@ namespace connectivity
{
OUString sStrippedName = removeOldURLPrefix(sOrgName);
if ( ((_nMode & ElementModes::WRITE) != ElementModes::WRITE ) )
if ( (_nMode & ElementModes::WRITE) != ElementModes::WRITE )
{
bool bIsStream = true;
try

View File

@ -716,7 +716,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
analyseWhereClause( parseTree->getChild( 1 ), *subExpression );
queryExpression.addExpression( subExpression );
}
else if ((SQL_ISRULE(parseTree,search_condition) || (SQL_ISRULE(parseTree,boolean_term)))
else if ((SQL_ISRULE(parseTree,search_condition) || SQL_ISRULE(parseTree,boolean_term))
&& parseTree->count() == 3) // Handle AND/OR
{
// TODO - Need to take care or AND, for now match is always OR
@ -777,7 +777,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
{
OSL_ENSURE(parseTree->count() == 2, "Error parsing LIKE predicate");
if ( !(SQL_ISRULE(parseTree->getChild(0), column_ref)) )
if ( !SQL_ISRULE(parseTree->getChild(0), column_ref) )
{
m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_INVALID_LIKE_COLUMN, *this );
}

View File

@ -466,7 +466,7 @@ void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef,
m_aOrderbyColumnNumber.push_back(xColLocate->findColumn(aColumnName));
// Ascending or Descending?
m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
m_aOrderbyAscending.push_back(SQL_ISTOKEN(pAscendingDescending,DESC) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
}

View File

@ -2008,7 +2008,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, bool
pPart2->replace(pNot, pNotNot);
delete pNot;
}
else if(bNegate && (SQL_ISRULE(pSearchCondition,like_predicate)))
else if(bNegate && SQL_ISRULE(pSearchCondition,like_predicate))
{
OSQLParseNode* pNot = pSearchCondition->getChild( 1 )->getChild( 0 );
OSQLParseNode* pNotNot = nullptr;

View File

@ -949,8 +949,8 @@ void PropertySetMixinImpl::dispose() {
css::uno::Any PropertySetMixinImpl::queryInterface(css::uno::Type const & type)
{
if (((m_impl->implements & IMPLEMENTS_PROPERTY_SET) != 0
&& type == css::beans::XPropertySet::static_type()))
if ((m_impl->implements & IMPLEMENTS_PROPERTY_SET) != 0
&& type == css::beans::XPropertySet::static_type())
{
css::uno::Reference< css::uno::XInterface > ifc(
static_cast< css::beans::XPropertySet * >(this));

View File

@ -576,8 +576,8 @@ void SfxConfigGroupListBox::FillScriptList(const css::uno::Reference< css::scrip
OUString uiName = theChild->getName();
if ( bIsRootNode )
{
if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
theChild->getName().equals( currentDocTitle ) ) ) )
if ( ! (theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
theChild->getName().equals( currentDocTitle ) ) )
{
bDisplay=false;
}

View File

@ -1287,7 +1287,7 @@ bool ORowSetCache::insertRow(std::vector< Any >& o_aBookmarks)
{
moveToBookmark(aBookmark);
// update the cached values
ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get();
ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
@ -1343,7 +1343,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,std::vector<
if ( moveToBookmark(aBookmark) )
{
// update the cached values
ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get();
ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{

View File

@ -93,7 +93,7 @@ namespace dbaccess
const Type* pEnd = pIter + aTypes.getLength();
for(;pIter != pEnd ;++pIter)
{
if( (*pIter != aAlterType || m_xViewAccess.is()) )
if( *pIter != aAlterType || m_xViewAccess.is() )
aOwnTypes.push_back(*pIter);
}

View File

@ -320,9 +320,12 @@ Sequence< Type > SAL_CALL OColumns::getTypes( )
}
else
{
nSize = ((m_pTable && m_pTable->isNew()) ? 0 :
((m_bDropColumn ?
(m_bAddColumn ? 0 : 1) : (m_bAddColumn ? 1 : 2))));
if (m_pTable && m_pTable->isNew())
nSize = 0;
else if (m_bDropColumn)
nSize = m_bAddColumn ? 0 : 1;
else
nSize = m_bAddColumn ? 1 : 2;
bDropFound = (m_pTable && m_pTable->isNew()) || m_bDropColumn;
bAppendFound = (m_pTable && m_pTable->isNew()) || m_bAddColumn;
}

View File

@ -1028,7 +1028,7 @@ void SbaXDataBrowserController::disposing(const EventObject& Source)
removeModelListeners(getControlModel());
// the form's model ?
if ((getRowSet() == Source.Source))
if (getRowSet() == Source.Source)
disposingFormModel(Source);
// from a single column model ?

View File

@ -1755,7 +1755,9 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
if (xDataSource.is())
{
sal_Int32 nType = ::comphelper::getINT32(xDataSource->getPropertyValue(PROPERTY_COMMAND_TYPE));
aReturn.bEnabled = aReturn.bEnabled && ((::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) || (nType == css::sdb::CommandType::QUERY)));
aReturn.bEnabled = aReturn.bEnabled &&
( ::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) ||
(nType == css::sdb::CommandType::QUERY) );
}
}
catch(DisposedException&)

View File

@ -214,7 +214,7 @@ namespace dbaui
long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
bool bRet = !( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1))
|| (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0)));
return bRet && EditBrowseBox::IsTabAllowed(bForward);

View File

@ -1678,7 +1678,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo )
if (aIter == rFields.end())
{
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false );
if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo
if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy is inherited from rInfo
pTmp->SetGroupBy(false);
}
}

View File

@ -152,7 +152,7 @@ void SAL_CALL LimitBoxController::statusChanged(
{
m_pLimitBox->Enable();
sal_Int64 nLimit = 0;
if ( (rEvent.State >>= nLimit) )
if ( rEvent.State >>= nLimit )
{
m_pLimitBox->SetValue( nLimit );
}

View File

@ -1613,7 +1613,7 @@ static std::vector< CommentStrip > getComment( const OUString& rQuery )
{
if ((pCopy[i]=='-' && pCopy[i+1]=='-') || (pCopy[i]=='/' && pCopy[i+1]=='/'))
bComment = true;
else if ((pCopy[i]=='/' && pCopy[i+1]=='*'))
else if (pCopy[i]=='/' && pCopy[i+1]=='*')
bComment2 = true;
}
}

View File

@ -420,7 +420,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
aDispatches.push_back( DispatchHolder( aURL, xDispatcher ));
}
}
else if ( ( aName.startsWith( "service:" ) ) )
else if ( aName.startsWith( "service:" ) )
{
// TODO: the dispatch has to be done for loadComponentFromURL as well. Please ask AS for more details.
URL aURL ;

View File

@ -117,7 +117,7 @@ bool IsUserWordbook( const OUString& rFile )
static std::size_t nVerOOo7Len = sal::static_int_cast< std::size_t >(strlen( pVerOOo7 ));
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
pMagicHeader[ nVerOOo7Len ] = '\0';
if ((pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len))
if (pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len)
{
if ( !strcmp(pMagicHeader, pVerOOo7) )
bRet = true;

View File

@ -598,8 +598,8 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
aDrawRect.Bottom() += (nProgressHeight - pSpl->_barheight)/2;
}
if ((rRenderContext.DrawNativeControl(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,
ControlState::ENABLED, aValue, pSpl->_sProgressText)))
if (rRenderContext.DrawNativeControl(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,
ControlState::ENABLED, aValue, pSpl->_sProgressText))
{
return;
}

View File

@ -980,11 +980,10 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
long nOnePixel = pOutWin->PixelToLogic( Size( 1, 0 ) ).Width();
if ( /* pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() || */
( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
if ( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
( aEditCursor.Bottom() - nOnePixel <= GetVisDocBottom() ) &&
( aEditCursor.Left() + nOnePixel >= GetVisDocLeft() ) &&
( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) ) )
( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) )
{
tools::Rectangle aCursorRect = GetWindowPos( aEditCursor );
GetCursor()->SetPos( aCursorRect.TopLeft() );

View File

@ -4133,7 +4133,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
pPortion->nFirstLineOffset = nUpper;
}
if ( ( nPortion != (GetParaPortions().Count()-1) ) )
if ( nPortion != (GetParaPortions().Count()-1) )
{
pPortion->nHeight += GetYValue( rULItem.GetLower() ); // not in the last
}

View File

@ -3471,7 +3471,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
|| ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) )
{
if ( nEsc && ( ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) ) )
if ( nEsc && ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) )
{
// Paint the high/low without underline,
// Display the Underline on the

View File

@ -1490,7 +1490,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
bool bIsStart = false;
if ( bMultipleDoc )
bIsStart = true; // Accessible from the front or from behind ...
else if ( ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart ) )
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(),
@ -1857,7 +1857,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
{
if ( aCurSel.Max().GetNode() == pLastNode )
{
if ( ( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
if ( aCurSel.Max().GetIndex() >= pLastNode->Len() )
break;
}
}
@ -2363,7 +2363,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
EditPaM aLastEnd( aSel.Max() );
aSel = WordRight( aSel.Max(), i18n::WordType::DICTIONARY_WORD );
if ( bChanged && ( aSel.Min().GetNode() == pNode ) &&
( ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) ) )
( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) )
{
// If two words are separated by more than one blank, it
// can happen that when splitting a Wrongs the start of

View File

@ -1800,7 +1800,7 @@ SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& r
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
// fdo#46112: double does not necessarily mean symmetric
// for backwards compatibility
bGuessWidth = ((SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle)) &&
bGuessWidth = (SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle) &&
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
}

View File

@ -783,7 +783,7 @@ void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, bool bI
{
DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
if( (i < SVX_MAX_NUM) )
if( i < SVX_MAX_NUM )
{
bool bReplace = !aFmtsSet[i];
if (!bReplace)

View File

@ -279,9 +279,8 @@ INSINGLECHAR:
break;
default:
{
if( /*( '{' == GetStackPtr( -1 )->nTokenId ) ||*/
( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
'{' == GetStackPtr( -2 )->nTokenId ) )
if( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
'{' == GetStackPtr( -2 )->nTokenId )
SkipGroup();
}
break;
@ -890,10 +889,9 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
bCrsrBack = nNd != pInsPos->GetNodeIdx();
}
if( ( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
if( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
( pOld->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
pOld->nSttCnt <= pInsPos->GetCntIdx() ))
)
pOld->nSttCnt <= pInsPos->GetCntIdx() ) )
{
if( !bCrsrBack )
{

View File

@ -330,7 +330,7 @@ bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet)
{
sal_Int32 nPriv = 0;
_rxCursorSet->getPropertyValue("Privileges") >>= nPriv;
return ((_rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0));
return _rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0;
}
bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XFormController>& xController)

View File

@ -256,7 +256,7 @@ namespace pcr
void SAL_CALL OFileUrlControl::setValue( const Any& _rValue )
{
OUString sURL;
if ( ( _rValue >>= sURL ) )
if ( _rValue >>= sURL )
{
if ( sURL.startsWith( "vnd.sun.star.GraphicObject:" ) )
getTypedControlWindow()->DisplayURL( getTypedControlWindow()->GetPlaceHolder() );

View File

@ -358,7 +358,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
nFontType = pFontEntry->nFontType;
aFontDescriptor.Name = OUString::createFromAscii( reinterpret_cast<char*>(pFontEntry->pFontName) );
}
aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * 1.50 ) );
aFontDescriptor.Height = sal_Int16( mpCGM->pElement->nCharacterHeight * 1.50 );
if ( nFontType & 1 )
aFontDescriptor.Slant = awt::FontSlant_ITALIC;
if ( nFontType & 2 )

View File

@ -6193,10 +6193,9 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
&& (
( eShapeType == mso_sptTextSimple )
|| ( eShapeType == mso_sptTextBox )
|| ( ( ( eShapeType == mso_sptRectangle )
|| ( eShapeType == mso_sptRectangle )
|| ( eShapeType == mso_sptRoundRectangle )
)
) ) )
) )
{
aInfo.bReplaceByFly = true;
}

View File

@ -808,7 +808,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
// try to load some ppt text
PPTTextObj aTextObj( rSt, static_cast<SdrPowerPointImport&>(*this), rPersistEntry, &rObjData );
if ( ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) )
if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
{
bool bVerticalText = false;
// and if the text object is not empty, it must be applied to pRet, the object we

View File

@ -1994,11 +1994,11 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
if( nType == MetaActionType::COMMENT )
{
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
if( ( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") ) )
if( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") )
{
bIsTextShapeStarted = true;
}
else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) )
{
bIsTextShapeStarted = false;
}

View File

@ -3345,7 +3345,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
else if( !mrExport.IsUsePositionedCharacters() && ( nWriteFlags & SVGWRITER_WRITE_TEXT ) )
{
if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_BEGIN" ) ) )
if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_BEGIN" ) )
{
if( pxShape )
{
@ -3380,11 +3380,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
}
else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) )
{
maTextWriter.endTextShape();
}
else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOP" ) ) )
else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOP" ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == MetaActionType::COMMENT ) &&
@ -3417,7 +3417,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOL" ) ) )
else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOL" ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == MetaActionType::COMMENT ) &&

View File

@ -259,7 +259,7 @@ void SAL_CALL DispatchRecorder::AppendToBuffer( const css::uno::Any& aValue, OUS
{
// character variables are recorded as strings, back conversion must be handled in client code
aArgumentBuffer.append("\"");
if ( (*nVal == '\"') )
if ( *nVal == '\"' )
// encode \" to \"\"
aArgumentBuffer.append(*nVal);
aArgumentBuffer.append(*nVal);

View File

@ -762,8 +762,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
// There is no dispatch mechanism for the special window list menu items,
// because they are handled directly through XFrame->activate!!!
// Don't update dispatches for special file menu items.
if ( !(( pMenuItemHandler->nItemId >= START_ITEMID_WINDOWLIST &&
pMenuItemHandler->nItemId < END_ITEMID_WINDOWLIST )))
if ( !( pMenuItemHandler->nItemId >= START_ITEMID_WINDOWLIST &&
pMenuItemHandler->nItemId < END_ITEMID_WINDOWLIST ) )
{
Reference< XDispatch > xMenuItemDispatch;

View File

@ -323,7 +323,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text,
sal_uInt32 ch=0;
while (numberOfChange > 0 && iterateCodePoints(Text, nStartPos, -1, ch) >= 0) {
if ((((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch))))
if (((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch)))
numberOfChange--;
else if (nStartPos == 0) {
return -1;

View File

@ -944,8 +944,8 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START;
nNext < cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES; ++nNext)
{
sal_Int16 nHere = ::std::min( ((aIter != aFormatIndexSet.end() ? *aIter :
cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES)),
sal_Int16 nHere = ::std::min( (aIter != aFormatIndexSet.end() ? *aIter :
cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES),
cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES);
if (aIter != aFormatIndexSet.end()) ++aIter;
for ( ; nNext < nHere; ++nNext)

View File

@ -50,7 +50,7 @@ public:
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nVal = nNewVal;
}
bool GetFlag( sal_uInt8 nFlag ) const { return ( (nVal & ( 1<<nFlag))); }
bool GetFlag( sal_uInt8 nFlag ) const { return (nVal & ( 1<<nFlag)); }
};
#endif

View File

@ -36,7 +36,7 @@
const sal_uInt16 XML_NAMESPACE_XMLNS = (USHRT_MAX-2);
const sal_uInt16 XML_NAMESPACE_NONE = (USHRT_MAX-1);
const sal_uInt16 XML_NAMESPACE_UNKNOWN = (USHRT_MAX);
const sal_uInt16 XML_NAMESPACE_UNKNOWN = USHRT_MAX;
const sal_uInt16 XML_NAMESPACE_UNKNOWN_FLAG = 0x8000;
class NameSpaceEntry : public cppu::OWeakObject

View File

@ -335,7 +335,7 @@ OUString ODataInputStream::readUTF()
char2 = (sal_uInt8)readByte();
char3 = (sal_uInt8)readByte();
if( (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) ) {
if( ((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80) ) {
throw WrongFormatException( );
}
pStr[nStrLen++] = (sal_Unicode(c & 0x0F) << 12) |
@ -1155,7 +1155,7 @@ Reference< XPersistObject > OObjectInputStream::readObject()
// Read the length of the object
sal_Int32 nObjLen = readLong();
if( ( 0 == nId && 0 != nObjLen ) )
if( 0 == nId && 0 != nObjLen )
{
throw WrongFormatException();
}

View File

@ -205,7 +205,7 @@ void LwpGraphicObject::Read()
void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
{
if ((m_sServerContextFormat[1]=='s'&&m_sServerContextFormat[2]=='d'&&m_sServerContextFormat[3]=='w'))
if (m_sServerContextFormat[1]=='s'&&m_sServerContextFormat[2]=='d'&&m_sServerContextFormat[3]=='w')
{
std::vector< rtl::Reference<XFFrame> >::iterator iter;
for (iter = m_vXFDrawObjects.begin(); iter != m_vXFDrawObjects.end(); ++iter)
@ -239,7 +239,7 @@ void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
pCont->Add(pImage);
}
else if((m_sServerContextFormat[1]=='t'&&m_sServerContextFormat[2]=='e'&&m_sServerContextFormat[3]=='x'))
else if(m_sServerContextFormat[1]=='t'&&m_sServerContextFormat[2]=='e'&&m_sServerContextFormat[3]=='x')
{
XFConvertEquation(pCont);
}
@ -603,7 +603,7 @@ void LwpGraphicObject::CreateGrafObject()
fBottom = fB;
}
};
LwpRect aFrameRect(-fOffsetX, (fDisFrameWidth-fOffsetX), (-fOffsetY), ((fDisFrameHeight-fOffsetY)));
LwpRect aFrameRect(-fOffsetX, (fDisFrameWidth-fOffsetX), (-fOffsetY), (fDisFrameHeight-fOffsetY));
LwpRect aImageRect(0, fSclGrafWidth, 0, fSclGrafHeight);
LwpRect aCropRect;

View File

@ -332,10 +332,10 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
rtl::Reference<LwpVirtualLayout> xFrameLayout(dynamic_cast<LwpVirtualLayout*>(xLayout->GetChildHead().obj().get()));
while (xFrameLayout.is())
{
if((xFrameLayout->IsAnchorPage()
&&(xFrameLayout->IsFrame()
if( xFrameLayout->IsAnchorPage()
&& (xFrameLayout->IsFrame()
|| xFrameLayout->IsSuperTable()
|| xFrameLayout->IsGroupHead())))
|| xFrameLayout->IsGroupHead()) )
{
xFrameLayout->DoXFConvert(pCont);
}

View File

@ -1043,7 +1043,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getProp
void OResultSet::checkColumnIndex(sal_Int32 index)
{
if ((index < 1 || index > (int) fieldCount)) {
if (index < 1 || index > (int) fieldCount) {
/* static object for efficiency or thread safety is a problem ? */
throw SQLException("index out of range", *this, rtl::OUString(), 1, Any());
}

View File

@ -1412,7 +1412,7 @@ void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
uno::Any rValue = xBitmap->getByName( sFillBitmapName );
OUString sBitmapURL;
if( (rValue >>= sBitmapURL) )
if( rValue >>= sBitmapURL )
{
WriteBlipFill( xPropSet, sBitmapURL, XML_a, true, true );
}
@ -1438,7 +1438,7 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
{
uno::Reference< container::XNameAccess > xGradient( xFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY );
uno::Any rValue = xGradient->getByName( sFillGradientName );
if( (rValue >>= aGradient) )
if( rValue >>= aGradient )
{
mpFS->startElementNS( XML_a, XML_gradFill, FSEND );
WriteGradientFill( aGradient );

View File

@ -165,7 +165,7 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
bool bHasMember = false;
uno::Sequence< sal_Int8 > aMember1;
sal_Int32 nMember1 = 0;
if ( ( aSequence1[nInd].Value >>= aMember1 ) )
if ( aSequence1[nInd].Value >>= aMember1 )
{
for ( sal_Int32 nInd2 = 0; nInd2 < aSequence2.getLength(); nInd2++ )
{
@ -179,7 +179,7 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
}
}
}
else if ( ( aSequence1[nInd].Value >>= nMember1 ) )
else if ( aSequence1[nInd].Value >>= nMember1 )
{
for ( sal_Int32 nInd2 = 0; nInd2 < aSequence2.getLength(); nInd2++ )
{

View File

@ -552,7 +552,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
for( int ind = 0; ind < aArguments.getLength(); ind++ )
{
OUString aParamUrl;
if ( ( aArguments[ind] >>= aParamUrl ))
if ( aArguments[ind] >>= aParamUrl )
{
m_eMode = e_IMode_URL;
try
@ -615,17 +615,17 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
bHaveZipFile = false;
}
}
else if ( ( aArguments[ind] >>= m_xStream ) )
else if ( aArguments[ind] >>= m_xStream )
{
// a writable stream can implement both XStream & XInputStream
m_eMode = e_IMode_XStream;
m_xContentStream = m_xStream->getInputStream();
}
else if ( ( aArguments[ind] >>= m_xContentStream ) )
else if ( aArguments[ind] >>= m_xContentStream )
{
m_eMode = e_IMode_XInputStream;
}
else if ( ( aArguments[ind] >>= aNamedValue ) )
else if ( aArguments[ind] >>= aNamedValue )
{
if ( aNamedValue.Name == "RepairPackage" )
aNamedValue.Value >>= m_bForceRecovery;

View File

@ -173,7 +173,7 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno::
{
uno::Reference < XUnoTunnel > xRef;
aElement >>= xRef;
if ( ( aElement >>= xRef ) )
if ( aElement >>= xRef )
{
sal_Int64 nTest;
ZipPackageEntry *pEntry;

View File

@ -1219,7 +1219,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
if ( !( aValue >>= aNewKey ) )
{
OUString sTempString;
if ( ( aValue >>= sTempString ) )
if ( aValue >>= sTempString )
{
sal_Int32 nPathLength = sTempString.getLength();
Sequence < sal_Int8 > aSequence ( nPathLength );

View File

@ -198,11 +198,11 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
}
};
if ( ( aArguments[0] >>= aParamURL ) )
if ( aArguments[0] >>= aParamURL )
{
openInputStream();
}
else if ( (aArguments[0] >>= xStream ) )
else if ( aArguments[0] >>= xStream )
{
// a writable stream can implement both XStream & XInputStream
m_xContentStream = xStream->getInputStream();

View File

@ -584,11 +584,11 @@ void ODesignView::alignMarkedObjects(ControlModification _nControlModification,b
bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent)
{
if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
if ( m_pPropWin && m_pPropWin->HasChildPathFocus() )
return false;
if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
if ( m_pAddField && m_pAddField->HasChildPathFocus() )
return false;
if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
if ( m_pReportExplorer && m_pReportExplorer->HasChildPathFocus() )
return false;
return m_aScrollWindow->handleKeyEvent(_rEvent);
}

View File

@ -328,9 +328,9 @@ bool OScrollWindowHelper::EventNotify( NotifyEvent& rNEvt )
{
const CommandEvent* pCommandEvent = rNEvt.GetCommandEvent();
if ( pCommandEvent &&
( ((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
(pCommandEvent->GetCommand() == CommandEventId::StartAutoScroll) ||
(pCommandEvent->GetCommand() == CommandEventId::AutoScroll))) )
(pCommandEvent->GetCommand() == CommandEventId::AutoScroll)) )
{
ScrollBar* pHScrBar = nullptr;
ScrollBar* pVScrBar = nullptr;

View File

@ -89,7 +89,7 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc )
{
if( '@' == **(ppArgv +i) ){ // when @, then response file
if( nullptr == (fFile = fopen( (*(ppArgv +i)) +1, "r" )) )
return( (*(ppArgv +i)) );
return *(ppArgv +i);
nItems = fread( &szBuffer[ 0 ], 1, sizeof( char ), fFile );
while( nItems )
{

View File

@ -1045,7 +1045,7 @@ SAL_CALL rtl_arena_free (
prev = segment->m_sprev;
/* entire span free when prev is a span, and next is either a span or a list head */
if (((prev->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN)) &&
if ((prev->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN) &&
((next->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN) ||
(next->m_type == RTL_ARENA_SEGMENT_TYPE_HEAD)) )
{

View File

@ -101,8 +101,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare )( const IMPL_RTL_STRCODE* pStr1,
else
{
sal_Int32 nRet;
while ( ((nRet = ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr1)))-
((sal_Int32)(IMPL_RTL_USTRCODE(*pStr2)))) == 0) &&
while ( ((nRet = ((sal_Int32)IMPL_RTL_USTRCODE(*pStr1))-
((sal_Int32)IMPL_RTL_USTRCODE(*pStr2))) == 0) &&
*pStr2 )
{
pStr1++;
@ -148,8 +148,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare_WithLength )( const IMPL_RTL_STRCOD
while( (--nCount >= 0) && (*++pStr1 == *++pStr2) ) ;
if( nCount >= 0 )
nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1 )))
- ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2 )));
nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ))
- ((sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ));
return nRet;
}
@ -193,8 +193,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( shortenedCompare_WithLength )( const IMPL_R
while ( (nShortenedLength > 0) &&
(pStr1 < pStr1End) && (pStr2 < pStr2End) )
{
nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1 )))-
((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2 )));
nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ))-
((sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ));
if ( nRet )
return nRet;
@ -227,8 +227,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( reverseCompare_WithLength )( const IMPL_RTL
{
pStr1Run--;
pStr2Run--;
nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1Run )))-
((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2Run )));
nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1Run ))-
((sal_Int32)IMPL_RTL_USTRCODE( *pStr2Run ));
if ( nRet )
return nRet;
}

View File

@ -73,7 +73,7 @@ static sal_Size ImplUnicodeToDummy( const sal_Unicode* pSrcBuf, sal_Size nSrcCha
char* pEndDestBuf;
const sal_Unicode* pEndSrcBuf;
if ( ((nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_MASK) == RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR) )
if ( (nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_MASK) == RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR )
{
*pInfo |= RTL_UNICODETOTEXT_INFO_ERROR |
RTL_UNICODETOTEXT_INFO_UNDEFINED;

View File

@ -287,7 +287,7 @@ const OString DummyTokenHandler::namespacePrefixes[] = { "", "w", "Player" };
Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken )
{
OString aUtf8Token;
if ( ( ( nToken & 0xffff0000 ) != 0 ) ) //namespace
if ( ( nToken & 0xffff0000 ) != 0 ) //namespace
{
sal_uInt32 nNamespaceToken = ( nToken >> 16 ) - 1;
if ( nNamespaceToken < SAL_N_ELEMENTS(namespacePrefixes) )

View File

@ -182,7 +182,7 @@ bool XMLFile2UTFConverter::isEncodingRecognizable( const Sequence< sal_Int8 > &s
bCheckIfFirstClosingBracketExsists = true;
}
else if( ('<' == pSource[0] || '<' == pSource[2] ) &&
( ('?' == pSource[4] || '?' == pSource[6] ) ) )
('?' == pSource[4] || '?' == pSource[6] ) )
{
// check for utf-16
bCheckIfFirstClosingBracketExsists = true;

View File

@ -1063,7 +1063,7 @@ readDurationComponent(const OUString & rString,
sal_Int32 & io_rnPos, sal_Int32 & io_rnTemp, bool & io_rbTimePart,
sal_Int32 & o_rnTarget, const sal_Unicode c)
{
if ((io_rnPos < rString.getLength()))
if (io_rnPos < rString.getLength())
{
if (c == rString[io_rnPos])
{

View File

@ -1135,7 +1135,7 @@ XclImpDecrypterRef lclReadFilepass8_Strong(XclImpStream& rStream)
sal_uInt32 nHeaderSize = rStream.ReaduInt32();
sal_uInt32 actualHeaderSize = sizeof(info.header);
if( (nHeaderSize < actualHeaderSize) )
if( nHeaderSize < actualHeaderSize )
return xDecr;
info.header.flags = rStream.ReaduInt32();

View File

@ -2269,7 +2269,7 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const
XclImpCheckBoxObj::DoProcessControl( rPropSet );
// TODO: grouping
XclImpOptionButtonObj* pTbxObj = dynamic_cast< XclImpOptionButtonObj* >( GetObjectManager().GetSheetDrawing( GetTab() ).FindDrawObj( mnNextInGroup ).get() );
if ( ( pTbxObj && pTbxObj->mnFirstInGroup ) )
if ( pTbxObj && pTbxObj->mnFirstInGroup )
{
// Group has terminated
// traverse each RadioButton in group and

View File

@ -927,7 +927,7 @@ void PageSettingsConverter::writePageSettingsProperties(
awt::Size aSize;
bool bValid = false;
if( (0 < rModel.mnPaperSize) )
if( 0 < rModel.mnPaperSize )
{
const msfilter::util::ApiPaperSize& rPaperSize = msfilter::util::PaperSizeConv::getApiSizeForMSPaperSizeIndex( rModel.mnPaperSize );
aSize = awt::Size( rPaperSize.mnWidth, rPaperSize.mnHeight );

View File

@ -1379,10 +1379,10 @@ ApiBorderData::ApiBorderData() :
bool ApiBorderData::hasAnyOuterBorder() const
{
return
( ( lcl_isBorder( maTop ) && maTop.OuterLineWidth > 0 ) ) ||
( ( lcl_isBorder( maBottom ) && maBottom.OuterLineWidth > 0 ) ) ||
( ( lcl_isBorder( maLeft ) && maLeft.OuterLineWidth > 0 ) ) ||
( ( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 ) );
( lcl_isBorder( maTop ) && maTop.OuterLineWidth > 0 ) ||
( lcl_isBorder( maBottom ) && maBottom.OuterLineWidth > 0 ) ||
( lcl_isBorder( maLeft ) && maLeft.OuterLineWidth > 0 ) ||
( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 );
}
namespace {

View File

@ -66,7 +66,7 @@ ErrCode ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL )
{
ScEEParseEntry* pE = maList.back();
if ( // Completely empty
( ( pE->aSel.nStartPara == pE->aSel.nEndPara
( pE->aSel.nStartPara == pE->aSel.nEndPara
&& pE->aSel.nStartPos == pE->aSel.nEndPos
)
|| // Empty paragraph
@ -75,7 +75,6 @@ ErrCode ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL )
&& pE->aSel.nEndPos == 0
)
)
)
{ // Don't take over the last paragraph
maList.pop_back();
}

View File

@ -1203,7 +1203,7 @@ void Sc10Import::LoadPatternCollection()
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
sal_Int16 Margin = std::max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) )
if( ( OJustify & ojBottomTop ) == ojBottomTop )
rItemSet.Put( SvxMarginItem( 20, Margin, 20, Margin, ATTR_MARGIN ) );
else
rItemSet.Put( SvxMarginItem( Margin, 20, Margin, 20, ATTR_MARGIN ) );

View File

@ -1195,7 +1195,7 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos,
}
if( cellExists(rCurrentPos) )
{
if( ( !(bIsCovered) || isEmptyOrNote(rXMLImport.GetDocument(), rCurrentPos) ) )
if( !bIsCovered || isEmptyOrNote(rXMLImport.GetDocument(), rCurrentPos) )
{
switch (nCellType)
{

View File

@ -4931,7 +4931,7 @@ void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uIn
if( nullptr != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown(static_cast<const SvXMLAttrContainerItem *>(pItem));
if( (pUnknown->GetAttrCount() > 0) )
if( pUnknown->GetAttrCount() > 0 )
{
sal_uInt16 nIdx(pUnknown->GetFirstNamespaceIndex());
while( USHRT_MAX != nIdx )

View File

@ -146,7 +146,7 @@ struct ScShapeDataLess
{
uno::Any aPropAny = xProps->getPropertyValue(msLayerId);
sal_Int16 nLayerID = 0;
if( (aPropAny >>= nLayerID) )
if( aPropAny >>= nLayerID )
{
if (SdrLayerID(nLayerID) == SC_LAYER_BACK)
bResult = true;
@ -1557,7 +1557,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpChildrenShapes)
mpChildrenShapes->SetDrawBroadcaster();
}
else if ((rHint.GetId() == SfxHintId::ScAccEnterEditMode)) // this event comes only on creating edit field of a cell
else if (rHint.GetId() == SfxHintId::ScAccEnterEditMode) // this event comes only on creating edit field of a cell
{
if (mpViewShell->GetViewData().GetEditActivePart() == meSplitPos)
{

View File

@ -1435,7 +1435,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
{
xAccessible = GetNotesChildren()->GetChild(nIndex - aCount.nBackShapes - aCount.nHeaders);
}
else if ( (nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters) )
else if ( nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters )
{
if ( !mpFooter.is() )
{

View File

@ -218,7 +218,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
{
SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
if (pOleObj->GetObjRef().is() &&
((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
(pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
//TODO/LATER: why different slots in Draw and Calc?
rSet.DisableItem(SID_ORIGINALSIZE);
}

View File

@ -69,7 +69,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno:
throw uno::RuntimeException("Object failure, can't access chart implementation" );
uno::Reference< beans::XPropertySet > xAxisPropertySet;
if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue)))
if ((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue))
{
if ((nAxisGroup != xlPrimary) && (nAxisGroup != xlSecondary))
DebugHelper::runtimeexception(ERRCODE_BASIC_METHOD_FAILED);

View File

@ -41,7 +41,7 @@ ScVbaCondition< Ifc... >::retrieveAPIOperator( const uno::Any& _aOperator)
{
sheet::ConditionOperator aRetAPIOperator = sheet::ConditionOperator_NONE;
sal_Int32 nOperator = 0;
if ( (_aOperator >>= nOperator ) )
if ( _aOperator >>= nOperator )
{
switch(nOperator)
{
@ -96,7 +96,7 @@ void
ScVbaCondition< Ifc... >::setFormula1( const uno::Any& _aFormula1)
{
OUString sFormula;
if ( (_aFormula1 >>= sFormula ))
if ( _aFormula1 >>= sFormula )
{
mxSheetCondition->setFormula1( sFormula );
table::CellRangeAddress aCellRangeAddress = mxAddressable->getRangeAddress();

View File

@ -211,7 +211,7 @@ static double lcl_Round2DecPlaces( double nVal )
{
nVal = (nVal * (double)100);
long tmp = static_cast<long>(nVal);
if ( ( ( nVal - tmp ) >= 0.5 ) )
if ( ( nVal - tmp ) >= 0.5 )
++tmp;
nVal = tmp;
nVal = nVal/100;
@ -4476,7 +4476,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
// Use the normal uno api, sometimes e.g. when you want to use ALL as the filter
// we can't use refresh as the uno interface doesn't have a concept of ALL
// in this case we just call the core calc functionality -
if ( ( Field >>= nField ) )
if ( Field >>= nField )
{
bool bAll = false;
bool bAcceptCriteria2 = true;

View File

@ -2004,7 +2004,7 @@ void implWriteCharToBuffer( OUStringBuffer& aBuf, sal_Unicode cu, bool bKey )
}
// ISO/IEC 8859-1 range according to:
// http://en.wikipedia.org/wiki/ISO/IEC_8859-1
else if( (cu >= 0x20 && cu <= 0x7e) )
else if( cu >= 0x20 && cu <= 0x7e )
//TODO: Check why (cu >= 0xa0 && cu <= 0xFF)
//is encoded in sample properties files
//else if( (cu >= 0x20 && cu <= 0x7e) ||

View File

@ -911,20 +911,15 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj )
nPropertyFlags |= nCharAttr & 0x217; // not all attributes ar inherited
else
{
if ( /* ( rPortion.mnCharAttrHard & 1 ) || */
( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Bold, nCharAttr ) ) )
if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Bold, nCharAttr ) )
nPropertyFlags |= 1;
if ( /* ( rPortion.mnCharAttrHard & 2 ) || */
( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Italic, nCharAttr ) ) )
if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Italic, nCharAttr ) )
nPropertyFlags |= 2;
if ( /* ( rPortion.mnCharAttrHard & 4 ) || */
( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Underline, nCharAttr ) ) )
if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Underline, nCharAttr ) )
nPropertyFlags |= 4;
if ( /* ( rPortion.mnCharAttrHard & 0x10 ) || */
( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Shadow, nCharAttr ) ) )
if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Shadow, nCharAttr ) )
nPropertyFlags |= 0x10;
if ( /* ( rPortion.mnCharAttrHard & 0x200 ) || */
( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Embossed, nCharAttr ) ) )
if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Embossed, nCharAttr ) )
nPropertyFlags |= 512;
}
if ( rTextObj.HasExtendedBullets() )
@ -1292,7 +1287,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
sal_uInt32 nWidth = 1;
if ( nTabs )
nWidth += (sal_Int32)( ( ( pTabStop[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize ) );
nWidth += (sal_Int32)( ( pTabStop[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize );
nWidth *= nDefaultTabSize;
for ( i = 0; i < nDefaultTabs; i++, nWidth += nDefaultTabSize )
pRuleOut->WriteUInt32( nWidth );
@ -1867,10 +1862,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
css::awt::Size aSize( mXShape->getSize() );
css::awt::Point aStart, aEnd, aCenter;
::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
aStart.X = (sal_Int32)( ( cos( nStartAngle * F_PI18000 ) * 100.0 ) );
aStart.Y = - (sal_Int32)( ( sin( nStartAngle * F_PI18000 ) * 100.0 ) );
aEnd.X = (sal_Int32)( ( cos( nEndAngle * F_PI18000 ) * 100.0 ) );
aEnd.Y = - (sal_Int32)( ( sin( nEndAngle * F_PI18000 ) * 100.0 ) );
aStart.X = (sal_Int32) ( cos( nStartAngle * F_PI18000 ) * 100.0 );
aStart.Y = - (sal_Int32) ( sin( nStartAngle * F_PI18000 ) * 100.0 );
aEnd.X = (sal_Int32) ( cos( nEndAngle * F_PI18000 ) * 100.0 );
aEnd.Y = - (sal_Int32) ( sin( nEndAngle * F_PI18000 ) * 100.0 ) ;
aCenter.X = aPoint.X + ( aSize.Width / 2 );
aCenter.Y = aPoint.Y + ( aSize.Height / 2 );
aStart.X += aCenter.X;

View File

@ -116,7 +116,7 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang
if ( nFieldType )
{
mpFieldEntry = new FieldEntry( nFieldType, 0, mnTextSize );
if ( ( nFieldType >> 28 == 4 ) )
if ( nFieldType >> 28 == 4 )
{
mpFieldEntry->aRepresentation = aString;
mpFieldEntry->aFieldUrl = aURL;

View File

@ -274,7 +274,7 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, SfxStyleS
bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, sal_uInt16 nWhich, bool& rState )
{
if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
if( rSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SvXMLAttrContainerItem& rAttr = *rSet.GetItem<SvXMLAttrContainerItem>( nWhich );
@ -320,7 +320,7 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet )
bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet, sal_uInt16 nWhich )
{
if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
if( rSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SvXMLAttrContainerItem& rAttr = *rSet.GetItem<SvXMLAttrContainerItem>( nWhich );

View File

@ -1529,7 +1529,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
sal_Int32 nGroupId = pEffect->getGroupId();
CustomAnimationTextGroupPtr pTextGroup;
if( (nGroupId != -1) )
if( nGroupId != -1 )
{
// use existing group
pTextGroup = pEffectSequence->findGroup( nGroupId );

View File

@ -92,8 +92,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr )
{
SdrPageView* pPageView = mpView->GetSdrPageView();
if( ( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) )
// || ( mpView->GetMarkedObjectList().GetMarkCount() == 0 ) )
if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 )
{
nZoomValues &= ~SvxZoomEnableFlags::OPTIMAL;
}

View File

@ -1148,7 +1148,7 @@ void FuSelection::SelectionHasChanged()
FuDraw::SelectionHasChanged();
if ((mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection))
if (mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection)
{
// Switch rotation body -> selection
mpView->ResetCreationActive();

View File

@ -350,10 +350,10 @@ sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< s
{
if( rIdentifier.getLength() == 16 )
{
if( (0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
if( 0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
if( (0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
if( 0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc));
}

View File

@ -546,8 +546,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
if( ( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) )
// || ( mpDrawView->GetMarkedObjectList().GetMarkCount() == 0 ) )
if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 )
{
nZoomValues &= ~SvxZoomEnableFlags::OPTIMAL;
}

View File

@ -1482,7 +1482,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
if( pMarkedObj ) try
{
// change first marked object
if( (SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON) )
if( SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON )
{
bNewObj = false;

View File

@ -115,7 +115,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if(pSdrOle2Obj)
{
if (pSdrOle2Obj->GetObjRef().is() &&
((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
(pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
rSet.DisableItem(SID_ORIGINAL_SIZE);
}

View File

@ -186,7 +186,7 @@ ErrCode CheckPasswd_Impl
{
ErrCode nRet = ERRCODE_NONE;
if( ( !pFile->GetFilter() || pFile->IsStorage() ) )
if( !pFile->GetFilter() || pFile->IsStorage() )
{
uno::Reference< embed::XStorage > xStorage = pFile->GetStorage();
if( xStorage.is() )

Some files were not shown because too many files have changed in this diff Show More