diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-10 16:07:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-11 08:42:59 +0200 |
commit | ff8442fd85f2e281a564e3dc832a751a3a9c3072 (patch) | |
tree | 05d4a59e914d53a357f99a8ce6146cb3e35f47c3 /sw | |
parent | 672660031e4ca38205e2068b1e321268a844a68b (diff) |
pass EditTextObject around using std::unique_ptr
Change-Id: I71f4529c2e02fd0ac2561191e4cb35e18e206037
Reviewed-on: https://gerrit.libreoffice.org/52682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 1b165cfdef64..bf921f3c9c44 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -984,10 +984,10 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP m_pDrawEditEngine->QuickDelete(aFirstChar); } - EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject(); + std::unique_ptr<EditTextObject> pTemporaryText = m_pDrawEditEngine->CreateTextObject(); pRet = new OutlinerParaObject(*pTemporaryText); pRet->SetOutlinerMode( OutlinerMode::TextObject ); - delete pTemporaryText; + pTemporaryText.reset(); m_pDrawEditEngine->SetText( OUString() ); m_pDrawEditEngine->SetParaAttribs(0, m_pDrawEditEngine->GetEmptyItemSet()); @@ -1193,11 +1193,11 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, } bool bVertical = pTextObj->IsVerticalWriting(); - EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject(); + std::unique_ptr<EditTextObject> pTemporaryText = m_pDrawEditEngine->CreateTextObject(); OutlinerParaObject* pOp = new OutlinerParaObject(*pTemporaryText); pOp->SetOutlinerMode( OutlinerMode::TextObject ); pOp->SetVertical( bVertical ); - delete pTemporaryText; + pTemporaryText.reset(); pTextObj->NbcSetOutlinerParaObject( pOp ); pTextObj->SetVerticalWriting(bVertical); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 8a10fe16eed8..eaf0b9d07356 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -39,6 +39,7 @@ #include <viewopt.hxx> #include <cmdid.h> +#include <editeng/editobj.hxx> #include <editeng/fontitem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/langitem.hxx> |