diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-31 10:10:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-31 18:33:10 +0200 |
commit | 2efe1e8977a83143696b8db49c7c26bbff91c04c (patch) | |
tree | 69f20a1a8adfb495350c78de50d6f01923a32c77 /include/editeng | |
parent | 21ad3e6cbdf9568c1152a2eab8178e4219e40c33 (diff) |
no need to allocate EditNodeIdx separately
it is just two pointers
Change-Id: I80a9206b9f94fb4a4401352b93fcd727f787f52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/svxrtf.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 42198a7acb72..87283eadf11d 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -69,7 +69,7 @@ public: sal_Int32 GetCntIdx() const; // clone NodeIndex - std::unique_ptr<EditNodeIdx> MakeNodeIdx() const; + EditNodeIdx MakeNodeIdx() const; }; typedef std::map<short, vcl::Font> SvxRTFFontTbl; @@ -238,7 +238,7 @@ protected: virtual void InsertText() = 0; virtual void MovePos( bool bForward = true ) = 0; - virtual void SetEndPrevPara( EditNodeIdx*& rpNodePos, + virtual void SetEndPrevPara( std::optional<EditNodeIdx>& rpNodePos, sal_Int32& rCntPos )=0; virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); // for Tokens, which are not evaluated in ReadAttr @@ -293,8 +293,8 @@ class SvxRTFItemStackType friend class SvxRTFParser; SfxItemSet aAttrSet; - std::unique_ptr<EditNodeIdx> pSttNd; - EditNodeIdx *pEndNd; + std::optional<EditNodeIdx> mxStartNodeIdx; + std::optional<EditNodeIdx> mxEndNodeIdx; sal_Int32 nSttCnt, nEndCnt; std::unique_ptr<SvxRTFItemStackList> m_pChildList; sal_uInt16 nStyleNo; @@ -318,8 +318,8 @@ public: //bad, consider this deprecated. void SetStartPos( const EditPosition& rPos ); - const EditNodeIdx& GetSttNode() const { return *pSttNd; } - const EditNodeIdx& GetEndNode() const { return *pEndNd; } + const EditNodeIdx& GetSttNode() const { return *mxStartNodeIdx; } + const EditNodeIdx& GetEndNode() const { return *mxEndNodeIdx; } sal_Int32 GetSttCnt() const { return nSttCnt; } sal_Int32 GetEndCnt() const { return nEndCnt; } |