summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eertfpar.cxx4
-rw-r--r--editeng/source/rtf/svxrtf.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index a8fac71a7c72..cc1cf2bd3424 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -617,9 +617,9 @@ std::unique_ptr<EditPosition> EditPosition::Clone() const
return std::unique_ptr<EditPosition>(new EditPosition(mpEditEngine, mpCurSel));
}
-EditNodeIdx* EditPosition::MakeNodeIdx() const
+std::unique_ptr<EditNodeIdx> EditPosition::MakeNodeIdx() const
{
- return new EditNodeIdx(mpEditEngine, mpCurSel->Max().GetNode());
+ return std::make_unique<EditNodeIdx>(mpEditEngine, mpCurSel->Max().GetNode());
}
sal_Int32 EditPosition::GetNodeIdx() const
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 4c284248c3e8..cb50be3cb795 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -793,7 +793,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
}
}
- pOld->pEndNd = pInsPos->MakeNodeIdx();
+ pOld->pEndNd = pInsPos->MakeNodeIdx().release();
pOld->nEndCnt = pInsPos->GetCntIdx();
/*
@@ -939,7 +939,7 @@ SvxRTFItemStackType::SvxRTFItemStackType(
: aAttrSet( rPool, pWhichRange )
, nStyleNo( 0 )
{
- pSttNd.reset( rPos.MakeNodeIdx() );
+ pSttNd = rPos.MakeNodeIdx();
nSttCnt = rPos.GetCntIdx();
pEndNd = pSttNd.get();
nEndCnt = nSttCnt;
@@ -952,7 +952,7 @@ SvxRTFItemStackType::SvxRTFItemStackType(
: aAttrSet( *rCpy.aAttrSet.GetPool(), rCpy.aAttrSet.GetRanges() )
, nStyleNo( rCpy.nStyleNo )
{
- pSttNd.reset( rPos.MakeNodeIdx() );
+ pSttNd = rPos.MakeNodeIdx();
nSttCnt = rPos.GetCntIdx();
pEndNd = pSttNd.get();
nEndCnt = nSttCnt;
@@ -1017,7 +1017,7 @@ void SvxRTFItemStackType::SetStartPos( const EditPosition& rPos )
{
if (pSttNd.get() != pEndNd)
delete pEndNd;
- pSttNd.reset(rPos.MakeNodeIdx() );
+ pSttNd = rPos.MakeNodeIdx();
pEndNd = pSttNd.get();
nSttCnt = rPos.GetCntIdx();
}