diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-06 16:02:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-06 21:40:03 +0200 |
commit | 374782be555c1d91628a098c3f1c5cd85f7b0b01 (patch) | |
tree | c2c16d4d2a330611e2c8dcaf0d3ac030f2413d94 /include/editeng | |
parent | f76a7bcc65343a4aa51d24b13c998bf04031d89f (diff) |
use unique_ptr in Outliner
Change-Id: I022cf01f2c36f8846227a89418735271880d1f95
Reviewed-on: https://gerrit.libreoffice.org/78715
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/outliner.hxx | 4 | ||||
-rw-r--r-- | include/editeng/overflowingtxt.hxx | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index f62f3e0fde15..acb484943bf7 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -733,8 +733,8 @@ public: void SetParaRemovingHdl(const Link<ParagraphHdlParam,void>& rLink){aParaRemovingHdl=rLink;} const Link<ParagraphHdlParam,void>& GetParaRemovingHdl() const { return aParaRemovingHdl; } - NonOverflowingText *GetNonOverflowingText() const; - OverflowingText *GetOverflowingText() const; + std::unique_ptr<NonOverflowingText> GetNonOverflowingText() const; + std::unique_ptr<OverflowingText> GetOverflowingText() const; void ClearOverflowingParaNum(); bool IsPageOverflow(); diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index b7835f175d61..e1f3637f46ff 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -68,27 +68,25 @@ public: class OverflowingText { public: + OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent); + std::unique_ptr<OutlinerParaObject> JuxtaposeParaObject(Outliner *, OutlinerParaObject const *); std::unique_ptr<OutlinerParaObject> DeeplyMergeParaObject(Outliner *, OutlinerParaObject const *); private: - friend class Outliner; - OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent); - css::uno::Reference< css::datatransfer::XTransferable > mxOverflowingContent; }; class NonOverflowingText { public: + NonOverflowingText(const ESelection &aSel, bool bLastParaInterrupted); + std::unique_ptr<OutlinerParaObject> RemoveOverflowingText(Outliner *) const; ESelection GetOverflowPointSel() const; bool IsLastParaInterrupted() const; private: - NonOverflowingText(const ESelection &aSel, bool bLastParaInterrupted); - - friend class Outliner; const ESelection maContentSel; const bool mbLastParaInterrupted; }; |