summaryrefslogtreecommitdiff
path: root/sc/inc/rangenam.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2011-08-25 01:59:46 +0200
committerEike Rathke <erack@erack.de>2011-08-25 02:03:53 +0200
commit792dee46f2b35a21167af182416803c0b80b517c (patch)
tree7bc758a0e9c09f26e117b859b7c632eb4753d135 /sc/inc/rangenam.hxx
parent47994ad7f4a1ba2dc158f8bf3c158bc528fb81d1 (diff)
crash when modifying a defined name (and other places as well)
In ScRangeName::insert() the underlying ::boost::ptr_set_adapter::insert(p) takes ownerwhip of p and in the case it can't insert it deletes the object. So, if ScRangeName::insert() returns false the object where p pointed to is gone. Adapted various places.
Diffstat (limited to 'sc/inc/rangenam.hxx')
-rw-r--r--sc/inc/rangenam.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 5d65bf5876b7..2774028334af 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -210,7 +210,14 @@ public:
SC_DLLPUBLIC iterator end();
SC_DLLPUBLIC size_t size() const;
bool empty() const;
+
+ /** Insert object into set if not a duplicate.
+ @ATTENTION: The underlying ::boost::ptr_set_adapter::insert(p) takes
+ ownership of p and if it can't insert it deletes the object! So, if
+ this insert here returns false the object where p pointed to is gone!
+ */
SC_DLLPUBLIC bool insert(ScRangeData* p);
+
void erase(const ScRangeData& r);
void erase(const iterator& itr);
void clear();