[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 27 18:54:10 UTC 2019
sc/source/ui/inc/output.hxx | 2 +-
sc/source/ui/view/output2.cxx | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 54cd6a054f6e0fcff94dd7750847acc601a893ed
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 27 11:14:29 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Mar 27 19:53:46 2019 +0100
return unique_ptr from CreateOutputEditEngine
Change-Id: I403f0da5ea1ccdf508d156a9fa828e9f91813385
Reviewed-on: https://gerrit.libreoffice.org/69804
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index d68d9b7c9a7d..f78d5e4933f3 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -241,7 +241,7 @@ private:
void DrawEditStacked(DrawEditParam& rParam);
void DrawEditAsianVertical(DrawEditParam& rParam);
- ScFieldEditEngine* CreateOutputEditEngine();
+ std::unique_ptr<ScFieldEditEngine> CreateOutputEditEngine();
void ShowClipMarks( DrawEditParam& rParam, long nEngineHeight, const Size& aCellSize,
bool bMerged, OutputAreaParam& aAreaParam );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index ef857609adb6..f0b0e9fb7149 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2119,9 +2119,9 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
return tools::Rectangle();
}
-ScFieldEditEngine* ScOutputData::CreateOutputEditEngine()
+std::unique_ptr<ScFieldEditEngine> ScOutputData::CreateOutputEditEngine()
{
- ScFieldEditEngine* pEngine = new ScFieldEditEngine(mpDoc, mpDoc->GetEnginePool());
+ std::unique_ptr<ScFieldEditEngine> pEngine(new ScFieldEditEngine(mpDoc, mpDoc->GetEnginePool()));
pEngine->SetUpdateMode( false );
// a RefDevice always has to be set, otherwise EditEngine would create a VirtualDevice
pEngine->SetRefDevice( pFmtDevice );
@@ -4367,7 +4367,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
}
SfxItemSet* pPreviewFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab );
if (!pEngine)
- pEngine.reset(CreateOutputEditEngine());
+ pEngine = CreateOutputEditEngine();
else
lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
@@ -4496,7 +4496,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
if (!bHidden)
{
if (!pEngine)
- pEngine.reset(CreateOutputEditEngine());
+ pEngine = CreateOutputEditEngine();
else
lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
More information about the Libreoffice-commits
mailing list