[Libreoffice-commits] core.git: basegfx/source basic/source bean/native bridges/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 14 14:18:33 UTC 2020
basegfx/source/point/b2dpoint.cxx | 3
basegfx/source/point/b3dpoint.cxx | 3
basegfx/source/range/b2drange.cxx | 3
basegfx/source/range/b3drange.cxx | 3
basegfx/source/vector/b2dvector.cxx | 3
basegfx/source/vector/b3dvector.cxx | 3
basic/source/comp/exprtree.cxx | 3
basic/source/comp/token.cxx | 44 +++++++----
basic/source/runtime/runtime.cxx | 11 +-
basic/source/uno/namecont.cxx | 6 +
bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c | 5 -
bridges/source/cpp_uno/shared/component.cxx | 3
12 files changed, 60 insertions(+), 30 deletions(-)
New commits:
commit 14471a694271777440c19916055d659337c0fb8d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 14 14:54:45 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 14 16:17:55 2020 +0200
loplugin:buriedassign in b*
Change-Id: Ic20f46105a30b54bc5a991b4070e6c8edb15376e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basegfx/source/point/b2dpoint.cxx b/basegfx/source/point/b2dpoint.cxx
index 9775e1476740..0dc18b513db1 100644
--- a/basegfx/source/point/b2dpoint.cxx
+++ b/basegfx/source/point/b2dpoint.cxx
@@ -65,7 +65,8 @@ namespace basegfx
B2DPoint operator*( const ::basegfx::B2DHomMatrix& rMat, const B2DPoint& rPoint )
{
B2DPoint aRes( rPoint );
- return aRes *= rMat;
+ aRes *= rMat;
+ return aRes;
}
} // end of namespace basegfx
diff --git a/basegfx/source/point/b3dpoint.cxx b/basegfx/source/point/b3dpoint.cxx
index 0e44dad13d79..ff70b501ed7a 100644
--- a/basegfx/source/point/b3dpoint.cxx
+++ b/basegfx/source/point/b3dpoint.cxx
@@ -68,7 +68,8 @@ namespace basegfx
B3DPoint operator*( const ::basegfx::B3DHomMatrix& rMat, const B3DPoint& rPoint )
{
B3DPoint aRes( rPoint );
- return aRes *= rMat;
+ aRes *= rMat;
+ return aRes;
}
} // end of namespace basegfx
diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx
index a5f0db728eb5..55b545933d88 100644
--- a/basegfx/source/range/b2drange.cxx
+++ b/basegfx/source/range/b2drange.cxx
@@ -74,7 +74,8 @@ namespace basegfx
B2DRange operator*( const ::basegfx::B2DHomMatrix& rMat, const B2DRange& rB2DRange )
{
B2DRange aRes( rB2DRange );
- return aRes *= rMat;
+ aRes *= rMat;
+ return aRes;
}
} // end of namespace basegfx
diff --git a/basegfx/source/range/b3drange.cxx b/basegfx/source/range/b3drange.cxx
index 40e2f7ddf419..a8e5f359c3e3 100644
--- a/basegfx/source/range/b3drange.cxx
+++ b/basegfx/source/range/b3drange.cxx
@@ -55,7 +55,8 @@ namespace basegfx
B3DRange operator*( const ::basegfx::B3DHomMatrix& rMat, const B3DRange& rB3DRange )
{
B3DRange aRes( rB3DRange );
- return aRes *= rMat;
+ aRes *= rMat;
+ return aRes;
}
} // end of namespace basegfx
diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx
index a9223175e4ee..1ad51a9b5a4c 100644
--- a/basegfx/source/vector/b2dvector.cxx
+++ b/basegfx/source/vector/b2dvector.cxx
@@ -161,7 +161,8 @@ namespace basegfx
B2DVector operator*( const B2DHomMatrix& rMat, const B2DVector& rVec )
{
B2DVector aRes( rVec );
- return aRes*=rMat;
+ aRes *= rMat;
+ return aRes;
}
B2VectorContinuity getContinuity(const B2DVector& rBackVector, const B2DVector& rForwardVector )
diff --git a/basegfx/source/vector/b3dvector.cxx b/basegfx/source/vector/b3dvector.cxx
index 22a7c6220960..7dd5acf57f36 100644
--- a/basegfx/source/vector/b3dvector.cxx
+++ b/basegfx/source/vector/b3dvector.cxx
@@ -68,7 +68,8 @@ namespace basegfx
B3DVector operator*( const ::basegfx::B3DHomMatrix& rMat, const B3DVector& rVec )
{
B3DVector aRes( rVec );
- return aRes*=rMat;
+ aRes *= rMat;
+ return aRes;
}
bool areParallel( const B3DVector& rVecA, const B3DVector& rVecB )
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 4fe389983d28..cd6094db736b 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -210,7 +210,8 @@ std::unique_ptr<SbiExprNode> SbiExpression::Term( const KeywordSymbolInfo* pKeyw
bError = true;
}
- if( DoParametersFollow( pParser, eCurExpr, eTok = eNextTok ) )
+ eTok = eNextTok;
+ if( DoParametersFollow( pParser, eCurExpr, eTok ) )
{
bool bStandaloneExpression = (m_eMode == EXPRMODE_STANDALONE);
pPar = SbiExprList::ParseParameters( pParser, bStandaloneExpression );
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 92fabfe98ddd..37c8f9b3a475 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -259,7 +259,8 @@ SbiToken SbiTokenizer::Peek()
nPCol1 = nCol1; nCol1 = nOldCol1;
nPCol2 = nCol2; nCol2 = nOldCol2;
}
- return eCurTok = ePush;
+ eCurTok = ePush;
+ return eCurTok;
}
// For decompilation. Numbers and symbols return an empty string.
@@ -329,44 +330,54 @@ SbiToken SbiTokenizer::Next()
if( !NextSym() )
{
bEof = bEos = true;
- return eCurTok = EOLN;
+ eCurTok = EOLN;
+ return eCurTok;
}
if( aSym.startsWith("\n") )
{
bEos = true;
- return eCurTok = EOLN;
+ eCurTok = EOLN;
+ return eCurTok;
}
bEos = false;
if( bNumber )
{
- return eCurTok = NUMBER;
+ eCurTok = NUMBER;
+ return eCurTok;
}
else if( ( eScanType == SbxDATE || eScanType == SbxSTRING ) && !bSymbol )
{
- return eCurTok = FIXSTRING;
+ eCurTok = FIXSTRING;
+ return eCurTok;
}
else if( aSym.isEmpty() )
{
//something went wrong
bEof = bEos = true;
- return eCurTok = EOLN;
+ eCurTok = EOLN;
+ return eCurTok;
}
// Special cases of characters that are between "Z" and "a". ICompare()
// evaluates the position of these characters in different ways.
else if( aSym[0] == '^' )
{
- return eCurTok = EXPON;
+ eCurTok = EXPON;
+ return eCurTok;
}
else if( aSym[0] == '\\' )
{
- return eCurTok = IDIV;
+ eCurTok = IDIV;
+ return eCurTok;
}
else
{
if( eScanType != SbxVARIANT )
- return eCurTok = SYMBOL;
+ {
+ eCurTok = SYMBOL;
+ return eCurTok;
+ }
// valid token?
short lb = 0;
short ub = SAL_N_ELEMENTS(aTokTable_Basic)-1;
@@ -409,9 +420,11 @@ SbiToken SbiTokenizer::Next()
sal_Unicode ch = aSym[0];
if( !BasicCharClass::isAlpha( ch, bCompatible ) && !bSymbol )
{
- return eCurTok = static_cast<SbiToken>(ch & 0x00FF);
+ eCurTok = static_cast<SbiToken>(ch & 0x00FF);
+ return eCurTok;
}
- return eCurTok = SYMBOL;
+ eCurTok = SYMBOL;
+ return eCurTok;
}
special:
// #i92642
@@ -419,11 +432,13 @@ special:
eCurTok == THEN || eCurTok == ELSE); // single line If
if( !bStartOfLine && (tp->t == NAME || tp->t == LINE) )
{
- return eCurTok = SYMBOL;
+ eCurTok = SYMBOL;
+ return eCurTok;
}
else if( tp->t == TEXT )
{
- return eCurTok = SYMBOL;
+ eCurTok = SYMBOL;
+ return eCurTok;
}
// maybe we can expand this for other statements that have parameters
// that are keywords ( and those keywords are only used within such
@@ -434,7 +449,8 @@ special:
// Also we accept Dim APPEND
else if ( ( !bInStatement || eCurTok == DIM ) && tp->t == APPEND )
{
- return eCurTok = SYMBOL;
+ eCurTok = SYMBOL;
+ return eCurTok;
}
// #i92642: Special LINE token handling -> SbiParser::Line()
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 279f26f48971..9d81ea52c62d 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3221,11 +3221,14 @@ bool SbiRuntime::implIsClass( SbxObject const * pObj, const OUString& aClass )
{
const OUString& aObjClass = pObj->GetClassName();
SbModule* pClassMod = GetSbData()->pClassFac->FindClass( aObjClass );
- SbClassData* pClassData;
- if( pClassMod && (pClassData=pClassMod->pClassData.get()) != nullptr )
+ if( pClassMod )
{
- SbxVariable* pClassVar = pClassData->mxIfaces->Find( aClass, SbxClassType::DontCare );
- bRet = (pClassVar != nullptr);
+ SbClassData* pClassData = pClassMod->pClassData.get();
+ if (pClassData != nullptr )
+ {
+ SbxVariable* pClassVar = pClassData->mxIfaces->Find( aClass, SbxClassType::DontCare );
+ bRet = (pClassVar != nullptr);
+ }
}
}
}
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 179df9b3d009..6a510e0cc313 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1215,11 +1215,13 @@ void SfxLibraryContainer::implScanExtensions()
{
#if HAVE_FEATURE_EXTENSIONS
ScriptExtensionIterator aScriptIt;
- OUString aLibURL;
bool bPureDialogLib = false;
- while ( !(aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).isEmpty())
+ for (;;)
{
+ OUString aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib );
+ if (aLibURL.isEmpty())
+ break;
if( bPureDialogLib && maInfoFileName == "script" )
{
continue;
diff --git a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c
index 36464626c1bc..069bb1ee050e 100644
--- a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c
+++ b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c
@@ -90,8 +90,9 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindo
if (!result)
ThrowException(env, "java/lang/RuntimeException", "JAWT_GetAWT failed");
- /* Get the drawing surface */
- if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL)
+ /* Get the drawing surface */
+ ds = awt.GetDrawingSurface(env, obj_this);
+ if (ds == NULL)
return 0L;
/* Lock the drawing surface */
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 2c755fedb111..9cd2b5ba5f36 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -98,7 +98,8 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
// ];good guid
oid.append( cppu_cppenv_getStaticOIdPart() );
OUString aRet( oid.makeStringAndClear() );
- ::rtl_uString_acquire( *ppOId = aRet.pData );
+ *ppOId = aRet.pData;
+ ::rtl_uString_acquire( *ppOId );
}
}
catch (const ::com::sun::star::uno::RuntimeException & e)
More information about the Libreoffice-commits
mailing list