[Libreoffice-commits] core.git: extensions/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 29 15:07:05 UTC 2019
extensions/source/propctrlr/eventhandler.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 725b51044b955946c6528ca08a8a36dc44f09cd8
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 29 14:09:26 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Sep 29 17:06:24 2019 +0200
tdf#127863: fix crash when trying to edit assigned macro to a button
see bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=154638
Let's avoid iterator use here to avoid invalid iterator in debug mode
+ slight formatting
Change-Id: I40b42201ad299aee33275b2c961e1e0233f86ad4
Reviewed-on: https://gerrit.libreoffice.org/79812
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 83bbef32496b..3a9a6d147cc5 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -303,7 +303,7 @@ namespace pcr
{
private:
typedef std::unordered_map< OUString, ScriptEventDescriptor > EventMap;
- typedef std::map< EventId, EventMap::iterator > EventMapIndexAccess;
+ typedef std::map< EventId, OUString > EventMapIndexAccess;
EventMap m_aEventNameAccess;
EventMapIndexAccess m_aEventIndexAccess;
@@ -349,7 +349,7 @@ namespace pcr
std::pair< EventMap::iterator, bool > insertionResult =
m_aEventNameAccess.emplace( _rEventName, _rScriptEvent );
OSL_ENSURE( insertionResult.second, "EventHolder::addEvent: there already was a MacroURL for this event!" );
- m_aEventIndexAccess[ _nId ] = insertionResult.first;
+ m_aEventIndexAccess[ _nId ] = _rEventName;
}
ScriptEventDescriptor EventHolder::getNormalizedDescriptorByName( const OUString& _rEventName ) const
@@ -409,7 +409,7 @@ namespace pcr
// appear in the property browser UI.
for (auto const& elem : m_aEventIndexAccess)
{
- *pReturn = elem.second->first;
+ *pReturn = elem.second;
++pReturn;
}
return aReturn;
More information about the Libreoffice-commits
mailing list