diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-15 17:35:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-16 12:07:15 +0200 |
commit | eec42f0dbcc79a4c9f456ce97fa1066b8031ea28 (patch) | |
tree | f089f757270293bd94dfac881c62520af76975e0 /include/editeng/outlobj.hxx | |
parent | a6ca6215a5ec82e833ebfcd2ebd4455cb504fd8e (diff) |
pass OutlinerParaObject around by value
since it uses o3tl::cow_wrapper, so it is really just a wrapper
around a pointer, no point in allocating it on the heap
Remove assert in SdrText::SetOutlinerParaObject, which was
bogus anyhow, because it was comparing pointers, not deep equality.
And since we are now being more efficient and avoiding
copying of the internal data in OutlinerParaObject, we hit
this assert.
Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng/outlobj.hxx')
-rw-r--r-- | include/editeng/outlobj.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx index b2c00a1683ff..fac9bed9ffb9 100644 --- a/include/editeng/outlobj.hxx +++ b/include/editeng/outlobj.hxx @@ -71,13 +71,16 @@ public: OutlinerParaObject(std::unique_ptr<EditTextObject>, const ParagraphDataVector&, bool bIsEditDoc); OutlinerParaObject( std::unique_ptr<EditTextObject> ); OutlinerParaObject( const OutlinerParaObject&); + OutlinerParaObject(OutlinerParaObject&&) noexcept; ~OutlinerParaObject(); // assignment operator OutlinerParaObject& operator=(const OutlinerParaObject& rCandidate); + OutlinerParaObject& operator=(OutlinerParaObject&&) noexcept; // compare operator bool operator==(const OutlinerParaObject& rCandidate) const; + bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); } // #i102062# bool isWrongListEqual(const OutlinerParaObject& rCompare) const; |