[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - connectivity/source dbaccess/source
Herbert Dürr
hdu at apache.org
Mon Oct 7 05:07:45 PDT 2013
connectivity/source/commontools/ConnectionWrapper.cxx | 5 ++-
dbaccess/source/ui/browser/unodatbr.cxx | 27 ++++++++++--------
2 files changed, 19 insertions(+), 13 deletions(-)
New commits:
commit 345303a6cb1ba638fc2e151481a8735c22f9317b
Author: Herbert Dürr <hdu at apache.org>
Date: Mon Oct 7 11:44:41 2013 +0000
#i123418# prevent iterator decrement when it is at begin()
also prevent derefencing of an iterator after it has been erased
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 156a7a0..0404555 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1408,23 +1408,26 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) thr
{
for ( ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin();
aLoop != m_aExternalFeatures.end();
- ++aLoop
)
{
- if ( aLoop->second.xDispatcher.get() == xSource.get() )
- {
- ExternalFeaturesMap::iterator aPrevious = aLoop;
- --aPrevious;
+ if ( aLoop->second.xDispatcher.get() != xSource.get() ) {
+ ++aLoop;
+ continue;
+ }
- // remove it
- m_aExternalFeatures.erase( aLoop );
+ // prepare to erase the aLoop iterator
+ const sal_uInt16 nSlotId = aLoop->first;
+ ExternalFeaturesMap::iterator aNext = aLoop;
+ ++aNext;
- // maybe update the UI
- implCheckExternalSlot(aLoop->first);
+ // remove it
+ m_aExternalFeatures.erase( aLoop );
- // continue, the same XDispatch may be resposible for more than one URL
- aLoop = aPrevious;
- }
+ // maybe update the UI
+ implCheckExternalSlot( nSlotId );
+
+ // continue, the same XDispatch may be resposible for more than one URL
+ aLoop = aNext;
}
}
else
commit 67a5b7b958a28290b34dc904ba4eebb72c7a504f
Author: Herbert Dürr <hdu at apache.org>
Date: Mon Oct 7 11:18:30 2013 +0000
#i123418# fix the TPropertyValueLessFunctor to enable property sorting
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 06e2b5f..7cd53e5 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -196,7 +196,10 @@ namespace
{}
bool operator() (const ::com::sun::star::beans::PropertyValue& lhs, const ::com::sun::star::beans::PropertyValue& rhs) const
{
- return !!(lhs.Name.equalsIgnoreAsciiCase( rhs.Name ));
+ const rtl_uString* l = lhs.Name.pData;
+ const rtl_uString* r = rhs.Name.pData;
+ const int c = rtl_ustr_compareIgnoreAsciiCase_WithLength( l->buffer, l->length, r->buffer, r->length );
+ return (c < 0);
}
};
More information about the Libreoffice-commits
mailing list