summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 09:27:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 18:32:16 +0200
commit962bc9059e875f98e244b584c582f5b1674106b9 (patch)
tree7cc86691ec23a3d1f0aeebc8f20d3dd09d62573f /editeng
parentc4809b7c4e7f198464293e36d7f04cafe93597fc (diff)
no need to allocate these on the heap
Change-Id: I189f04c14a7ab7fbc1feba423efda88f3f811efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit4.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 76285d237fd8..dae90e5e435a 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2950,7 +2950,7 @@ bool ImpEditEngine::UpdateFields()
if (rAttr.Which() == EE_FEATURE_FIELD)
{
EditCharAttribField& rField = static_cast<EditCharAttribField&>(rAttr);
- std::unique_ptr<EditCharAttribField> pCurrent(new EditCharAttribField(rField));
+ EditCharAttribField aCurrent(rField);
rField.Reset();
if (!aStatus.MarkNonUrlFields() && !aStatus.MarkUrlFields())
@@ -2975,7 +2975,7 @@ bool ImpEditEngine::UpdateFields()
nPara, rField.GetStart(), rField.GetTextColor(), rField.GetFieldColor());
rField.SetFieldValue(aFldValue);
- if (rField != *pCurrent)
+ if (rField != aCurrent)
{
bChanges = true;
bChangesInPara = true;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index a105dc77142c..059d0bc7a523 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1456,10 +1456,10 @@ EESpellState ImpEditEngine::Spell(EditView* pEditView, weld::Widget* pDialogPare
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
- std::unique_ptr<EditSpellWrapper> pWrp(new EditSpellWrapper(pDialogParent,
- bIsStart, pEditView ));
- pWrp->SpellDocument();
- pWrp.reset();
+ {
+ EditSpellWrapper aWrp(pDialogParent, bIsStart, pEditView );
+ aWrp.SpellDocument();
+ }
if ( !bMultipleDoc )
{