[Libreoffice-commits] core.git: 10 commits - connectivity/source editeng/source
Stephan Bergmann
sbergman at redhat.com
Tue Oct 6 07:33:55 PDT 2015
connectivity/source/drivers/flat/ETable.cxx | 4 -
connectivity/source/drivers/mork/MResultSet.cxx | 2
connectivity/source/drivers/odbc/OPreparedStatement.cxx | 2
connectivity/source/parse/sqlnode.cxx | 7 ---
editeng/source/editeng/impedit2.cxx | 1
editeng/source/editeng/impedit3.cxx | 3 -
editeng/source/editeng/impedit4.cxx | 1
editeng/source/rtf/svxrtf.cxx | 35 +++++++---------
8 files changed, 21 insertions(+), 34 deletions(-)
New commits:
commit 52e120a9e56c7fc8b2f93852fca5a25ecad6e9a0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:13:06 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Id6698ecef885e37412dc88f8bdbc25ff0da8af21
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 2311fbe..7dbabb8 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -1026,7 +1026,6 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
aAttrStack.push_back( pNew );
- pAkt = pNew;
}
}
else
commit 4f2dfb18283121a81861afb58b037408b3c0036f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:12:59 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I211ff9c4f64e97f3b397fe2b384f06d18026e1e4
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index a7c81ae..2311fbe 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -297,7 +297,7 @@ INSINGLECHAR:
void SvxRTFParser::ReadStyleTable()
{
- int nToken, bSaveChkStyleAttr = bChkStyleAttr ? 1 : 0;
+ int bSaveChkStyleAttr = bChkStyleAttr ? 1 : 0;
sal_uInt16 nStyleNo = 0;
bool bHasStyleNo = false;
int _nOpenBrakets = 1; // the first was already detected earlier!!
@@ -310,7 +310,8 @@ void SvxRTFParser::ReadStyleTable()
while( _nOpenBrakets && IsParserWorking() )
{
- switch( nToken = GetNextToken() )
+ int nToken = GetNextToken();
+ switch( nToken )
{
case '}': if( --_nOpenBrakets && IsParserWorking() )
// Style has been completely read,
@@ -320,10 +321,10 @@ void SvxRTFParser::ReadStyleTable()
case '{':
{
if( RTF_IGNOREFLAG != GetNextToken() )
- nToken = SkipToken();
+ SkipToken();
else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ) &&
RTF_PN != nToken )
- nToken = SkipToken( -2 );
+ SkipToken( -2 );
else
{
// filter out at once
@@ -458,9 +459,9 @@ void SvxRTFParser::ReadFontTable()
while( _nOpenBrakets && IsParserWorking() )
{
- int nToken = 0;
bool bCheckNewFont = false;
- switch( ( nToken = GetNextToken() ))
+ int nToken = GetNextToken();
+ switch( nToken )
{
case '}':
bIsAltFntNm = false;
@@ -473,13 +474,13 @@ void SvxRTFParser::ReadFontTable()
break;
case '{':
if( RTF_IGNOREFLAG != GetNextToken() )
- nToken = SkipToken();
+ SkipToken();
// immediately skip unknown and all known but non-evaluated
// groups
else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ) &&
RTF_PANOSE != nToken && RTF_FNAME != nToken &&
RTF_FONTEMB != nToken && RTF_FONTFILE != nToken )
- nToken = SkipToken( -2 );
+ SkipToken( -2 );
else
{
// filter out at once
@@ -597,21 +598,20 @@ OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
while( _nOpenBrakets && IsParserWorking() )
{
- int nToken = 0;
- switch( nToken = GetNextToken() )
+ switch( GetNextToken() )
{
case '}': --_nOpenBrakets; break;
case '{':
{
if( RTF_IGNOREFLAG != GetNextToken() )
- nToken = SkipToken();
+ SkipToken();
else if( RTF_UNKNOWNCONTROL != GetNextToken() )
- nToken = SkipToken( -2 );
+ SkipToken( -2 );
else
{
// filter out at once
ReadUnknownData();
- nToken = GetNextToken();
+ int nToken = GetNextToken();
if( '}' != nToken )
eState = SVPAR_ERROR;
break;
@@ -662,16 +662,16 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
while( _nOpenBrakets && IsParserWorking() )
{
- int nToken = 0;
- switch( nToken = GetNextToken() )
+ int nToken = GetNextToken();
+ switch( nToken )
{
case '}': --_nOpenBrakets; break;
case '{':
{
if( RTF_IGNOREFLAG != GetNextToken() )
- nToken = SkipToken();
+ SkipToken();
else if( RTF_UNKNOWNCONTROL != GetNextToken() )
- nToken = SkipToken( -2 );
+ SkipToken( -2 );
else
{
// filter out at once
commit 13f51daa02cc6d1f923a6863ee91662dbea75a8d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:04:01 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Ib184b06cbf83ec582aa50fded3795daac37c7869
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 8a713f5..39e754b 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1307,7 +1307,6 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
bool bParaAttribs = false;
if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) )
{
- bParaAttribs = false;
{
// only style and ParaAttribs when new paragraph, or
// completely internal ...
commit da43c510e71db6afed581c5b038fbb97c89c8860
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:02:48 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Ic36598f30efd04b4084c0ffa1f4616687abf4d29
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index c11e891..99a9829 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1511,7 +1511,6 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
pLine->SetValid();
if ( bCalcCharPositions && bQuickFormat )
{
- bCalcCharPositions = false;
bLineBreak = false;
pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
@@ -1525,7 +1524,6 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
// then the text width does not have to be determined anew:
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
{
- bCalcCharPositions = false;
bLineBreak = false;
pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
commit 3f67e4975a096bc69fafb3330ea81339c264bcc7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:02:42 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Id2062ffd309f534f7c0dedf185569cfe5741c303
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 3ead023..c11e891 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1195,7 +1195,6 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( aStatus.OneCharPerLine() )
{
// State before Portion (apart from nTmpWidth):
- nPortionEnd = nTmpPos;
nTmpPos -= pPortion ? pPortion->GetLen() : 0;
nPortionStart = nTmpPos;
nTmpPortion--;
commit 6eff4b66777849b85432b9a8250213d085c23c11
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 16:00:51 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Ibec716d78425d32b7341eb608c08202364b84ba4
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index adb3169..1813ce7 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4161,7 +4161,6 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex,
nY -= pLine->GetHeight();
if ( !aStatus.IsOutliner() )
nY -= nSBL;
- nCurIndex = nCurIndex - pLine->GetLen();
}
Rectangle aEditCursor;
commit c1778ef1cb731e501b07b0ec3753fa71f6afe363
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 15:59:01 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Ie1416bdd0740efa78e1ebdba9d50536f1768b046
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 8b78dda..d03f97e 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -463,7 +463,6 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const
case extract_exp:
case length_exp:
case char_value_fct:
- {
bSimple=false;
if (!addDateValue(rString, rParam))
{
@@ -492,8 +491,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const
rString.append(aStringPara.makeStringAndClear());
}
bHandled = true;
- }
- //fall-through
+ break;
case odbc_call_spec:
case subquery:
case term:
@@ -502,8 +500,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const
case cast_spec:
case num_value_exp:
bSimple = false;
-
- break;
+ break;
default:
break;
} // switch ( getKnownRuleID() )
commit 1c5a0ac8dabbe32fc00686efab877805af851b0e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 15:56:56 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I4c73594326f4c20f25433dea2112115ad1a12299
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 6aa1c18..1935da6 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -184,7 +184,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc
// Get the parameter number that requires data
sal_Int32* paramIndex = 0;
- nReturn = N3SQLParamData(m_aStatementHandle, reinterpret_cast<SQLPOINTER*>(¶mIndex));
+ N3SQLParamData(m_aStatementHandle, reinterpret_cast<SQLPOINTER*>(¶mIndex));
// If the parameter index is -1, there is no
// more data required
commit dc2db4ee3f47697aa3bde91399995eed9eba47fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 15:55:17 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I40017006cdf8b8454d487b4b78bebb6350476390
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 53a3fc0..c77543b 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -1516,7 +1516,7 @@ bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset )
"connectivity.mork", "return False, m_nRowPos = " << m_nRowPos);
return false;
}
- sal_Int32 nCurCard = nCurPos;
+ sal_Int32 nCurCard;
if ( nCurPos < (sal_Int32)m_pKeySet->get().size() ) //The requested row is exist in m_pKeySet, so we just use it
{
nCurCard = (m_pKeySet->get())[nCurPos-1];
commit 5d698f08c9ce2550345545d0ae0a4beb780b4f41
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 6 15:44:20 2015 +0200
clang-analyzer-deadcode.DeadStores
nLen was unused ever since 5e1b6f684538df8e38f8d60619a2ae2e792edf47 "first
version"
Change-Id: I110ccf9156c4d0c4b47b0fba928d388ba7e06387
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 7e31289..bdacc83 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -618,18 +618,14 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
}
else
{
- // lengths depending on data-type:
- sal_Int32 nLen;
sal_Int32 nType = 0;
if(bIsTable)
{
- nLen = m_aPrecisions[i-1];
nType = m_aTypes[i-1];
}
else
{
Reference< XPropertySet> xColumn = *aIter;
- xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen;
xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
}
switch(nType)
More information about the Libreoffice-commits
mailing list