core.git: 2 commits - dbaccess/source editeng/source

2024-01-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/api/KeySet.cxx |3 +--
 editeng/source/editeng/impedit4.cxx |   12 +---
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit aff6d3aa461b737130606ed1271568b94f4733a7
Author: Caolán McNamara 
AuthorDate: Sat Jan 13 19:33:30 2024 +
Commit: Caolán McNamara 
CommitDate: Sat Jan 13 22:09:28 2024 +0100

cid#1545795 silence Using invalid iterator

Change-Id: I5fc75150ce38a960fab092b2e7ac9a0fe642b26a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162026
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 7fa5389475e3..337d30b096df 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -467,7 +467,9 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 SfxStyleSheet* pParent = 
static_cast(GetStyleSheetPool()->Find( pStyle->GetParent(), 
pStyle->GetFamily() ));
 DBG_ASSERT( pParent, "Parent not found!" );
 rOutput.WriteOString( OOO_STRING_SVTOOLS_RTF_SBASEDON );
-nNumber = aStyleSheetToIdMap.find(pParent)->second;
+auto iter = aStyleSheetToIdMap.find(pParent);
+assert(iter != aStyleSheetToIdMap.end());
+nNumber = iter->second;
 rOutput.WriteNumberAsString( nNumber );
 }
 
@@ -479,7 +481,9 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 
 DBG_ASSERT( pNext, "Next not found!" );
 rOutput.WriteOString( OOO_STRING_SVTOOLS_RTF_SNEXT );
-nNumber = aStyleSheetToIdMap.find(pNext)->second;
+auto iter = aStyleSheetToIdMap.find(pNext);
+assert(iter != aStyleSheetToIdMap.end());
+nNumber = iter->second;
 rOutput.WriteNumberAsString( nNumber );
 
 // Name of the template...
@@ -526,7 +530,9 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 {
 // Number of template
 rOutput.WriteOString( OOO_STRING_SVTOOLS_RTF_S );
-sal_uInt32 nNumber = 
aStyleSheetToIdMap.find(pNode->GetStyleSheet())->second;
+auto iter = aStyleSheetToIdMap.find(pNode->GetStyleSheet());
+assert(iter != aStyleSheetToIdMap.end());
+sal_uInt32 nNumber = iter->second;
 rOutput.WriteNumberAsString( nNumber );
 
 // All Attribute
commit 44d77f760cdac0c4a1c89421f8e02514f57d411c
Author: Caolán McNamara 
AuthorDate: Sat Jan 13 19:22:58 2024 +
Commit: Caolán McNamara 
CommitDate: Sat Jan 13 22:09:21 2024 +0100

cid#1546059 xRow is always empty

Change-Id: Ic5c6b2463600cd449bf2e0fed829ce199172578c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162025
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index cfbec6afecef..d137dc9ab16b 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -539,7 +539,6 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow 
,const ORowSetRow& _rO
 Reference< XParameters > xParameter(xPrep,UNO_QUERY);
 
 bool bRefetch = true;
-Reference xRow;
 sal_Int32 i = 1;
 // first the set values
 for (auto const& columnName : *m_pColumnNames)
@@ -585,7 +584,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow 
,const ORowSetRow& _rO
 m_aKeyIter = m_aKeyMap.find(nBookmark);
 assert(m_aKeyIter != m_aKeyMap.end());
 m_aKeyIter->second.second.first = 2;
-m_aKeyIter->second.second.second = xRow;
+m_aKeyIter->second.second.second.clear();
 copyRowValue(_rInsertRow,m_aKeyIter->second.first,nBookmark);
 tryRefetch(_rInsertRow,bRefetch);
 }


[Libreoffice-commits] core.git: 2 commits - dbaccess/source editeng/source

2015-01-25 Thread Caolán McNamara
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |2 +-
 editeng/source/editeng/impedit4.cxx|1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit db15e9290e8e966edc83393c2abc793bcd954193
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 25 14:03:56 2015 +

coverity#1266514 Useless call

Change-Id: I2a95e2faa7682934cd69264c82ed2618225be2a7

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f8f8c2b..f4b765b 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1660,7 +1660,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( 
const Reference XPropert
 const sal_Int8* pEnd= pBegin + aSeq.getLength();
 for(;pBegin != pEnd;++pBegin)
 {
-aSQL.append( (sal_Int32)*pBegin, 16 ).getStr();
+aSQL.append( (sal_Int32)*pBegin, 16 );
 }
 if(nSearchable == ColumnSearch::CHAR)
 aSQL.append( \' );
commit f2a817edb0f31f65111544b57ee1bccc1a8d60a3
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 25 14:01:55 2015 +

coverity#1266515 Useless call

Change-Id: I554ca2a961a9ba6009bef23067febe8611ba1f80

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index d721ca3..667a969 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1918,7 +1918,6 @@ void ImpEditEngine::StartSpelling(EditView rEditView, 
bool bMultipleDoc)
 
 Reference XSpellAlternatives  ImpEditEngine::ImpFindNextError(EditSelection 
rSelection)
 {
-aEditDoc.GetObject( (aEditDoc.Count()-1) );
 EditSelection aCurSel( rSelection.Min() );
 
 OUString aWord;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits