diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-09-07 18:43:31 -0400 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-15 06:28:56 +0000 |
commit | e9e5fee720eb72fe789651861f48982d3d87674d (patch) | |
tree | cd4cb143f019e0dfb5829b1bdb0facbcc49fdef5 /include/editeng | |
parent | ee7da352b885cfead32abb3fd111acead0c32816 (diff) |
tdf#62525 editeng: OutlinerParaObject
Convert the pimpled copy-on-write OutlinerParaObject class from
editeng to use ::o3tl::cow_wrapper using the default reference
counting policy.
Change-Id: I7009b9623d5be1bdf806ccaa6781cba82553c302
Reviewed-on: https://gerrit.libreoffice.org/18391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/outlobj.hxx | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx index 39c2b3ea9e9e..eac443bdd92a 100644 --- a/include/editeng/outlobj.hxx +++ b/include/editeng/outlobj.hxx @@ -24,15 +24,38 @@ #include <editeng/editengdllapi.h> #include <rtl/ustring.hxx> #include <rsc/rscsfx.hxx> +#include <o3tl/cow_wrapper.hxx> class EditTextObject; -class EDITENG_DLLPUBLIC OutlinerParaObject +/** + * This is the guts of OutlinerParaObject, refcounted and shared among + * multiple instances of OutlinerParaObject. + */ +struct OutlinerParaObjData { - struct Impl; - Impl* mpImpl; + // data members + EditTextObject* mpEditTextObject; + ParagraphDataVector maParagraphDataVector; + bool mbIsEditDoc; + + // constuctor + OutlinerParaObjData( EditTextObject* pEditTextObject, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc ); + + OutlinerParaObjData( const OutlinerParaObjData& r ); + + // destructor + ~OutlinerParaObjData(); + + bool operator==(const OutlinerParaObjData& rCandidate) const; - void ImplMakeUnique(); + // #i102062# + bool isWrongListEqual(const OutlinerParaObjData& rCompare) const; +}; + +class EDITENG_DLLPUBLIC OutlinerParaObject +{ + ::o3tl::cow_wrapper< OutlinerParaObjData > mpImpl; public: // constructors/destructor |