[Libreoffice-commits] core.git: 3 commits - reportdesign/source sc/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon Apr 4 09:14:47 UTC 2016
reportdesign/source/ui/dlg/GroupsSorting.cxx | 4 ++--
sc/source/core/tool/compiler.cxx | 8 ++++++++
sw/source/ui/misc/bookmark.cxx | 4 ++--
3 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 9e087de13351624a9fff2edf33d98221a967e040
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 4 10:09:55 2016 +0100
coverity#708016 Uninitialized scalar field
Change-Id: I6ec7614eab32f08596f259ef445a999cbb8b69e8
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f3480a2..d45008a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1712,6 +1712,8 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos,
pDoc(rCxt.getDoc()),
aPos(rPos),
mpFormatter(pDoc->GetFormatTable()),
+ mnCurrentSheetTab(-1),
+ mnCurrentSheetEndPos(0),
pCharClass(ScGlobal::pCharClass),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1730,6 +1732,8 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
pDoc( pDocument ),
aPos( rPos ),
mpFormatter(pDoc->GetFormatTable()),
+ mnCurrentSheetTab(-1),
+ mnCurrentSheetEndPos(0),
nSrcPos(0),
pCharClass( ScGlobal::pCharClass ),
mnPredetectedReference(0),
@@ -1746,6 +1750,8 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos )
pDoc(rCxt.getDoc()),
aPos(rPos),
mpFormatter(pDoc ? pDoc->GetFormatTable() : nullptr),
+ mnCurrentSheetTab(-1),
+ mnCurrentSheetEndPos(0),
pCharClass(ScGlobal::pCharClass),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1764,6 +1770,8 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
pDoc( pDocument ),
aPos( rPos ),
mpFormatter(pDoc ? pDoc->GetFormatTable() : nullptr),
+ mnCurrentSheetTab(-1),
+ mnCurrentSheetEndPos(0),
nSrcPos(0),
pCharClass( ScGlobal::pCharClass ),
mnPredetectedReference(0),
commit e5c7c9697065aebf4bcf75278e70b8fc84f0fbf6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 4 10:04:23 2016 +0100
coverity#705112 Using invalid iterator
Change-Id: I95a4646e7ecff90babd8c140fdfa5f6fc47ce399
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index d81924b..05babba 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -792,8 +792,8 @@ void OFieldExpressionControl::DeleteRows()
// we use this way to create undo actions
m_pParent->m_pController->executeChecked(SID_GROUP_REMOVE,aArgs);
- ::std::vector<sal_Int32>::iterator aFind = ::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos);
- ::std::vector<sal_Int32>::const_iterator aEnd = m_aGroupPositions.end();
+ std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end();
+ std::vector<sal_Int32>::iterator aFind = std::find(m_aGroupPositions.begin(), aEnd, nGroupPos);
if (aFind != aEnd)
{
*aFind = NO_GROUP;
commit f9dd9b867973024d998a45fce37b6acc3d3e8454
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 4 09:59:48 2016 +0100
coverity#1358029 Dereference null return value
and
coverity#1358028 Dereference null return value
Change-Id: Id659899b0df87a78359a9332be571afb326538df
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 59b56cc..a72004e 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -388,7 +388,7 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark)
SvTreeListEntry* BookmarkTable::GetRowByBookmarkName(const OUString& sName)
{
SvTreeListEntry* pEntry = First();
- for (sal_Int32 i = GetRowCount(); i; i--)
+ while (pEntry)
{
sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pEntry->GetUserData());
if (pBookmark->GetName() == sName)
@@ -422,7 +422,7 @@ OUString BookmarkTable::GetNameProposal()
{
sal_Int32 nHighestBookmarkId = 0;
SvTreeListEntry* pEntry = First();
- for (sal_Int32 i = GetRowCount(); i; i--)
+ while (pEntry)
{
sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pEntry->GetUserData());
OUString sName = pBookmark->GetName();
More information about the Libreoffice-commits
mailing list