diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-18 10:45:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-19 09:51:57 +0100 |
commit | 752cc49c97b9c88f37d9a451050beaeab2d2e5cf (patch) | |
tree | c4ff4cfabb5a6ed4c906273310d65995e6b01ce3 /sc/source/ui | |
parent | 46fcf87725818666fee34226afdac4a64edd94eb (diff) |
cid#1399259 Uncaught exception
Change-Id: Ia811eeb04cb9ab86aea205aa848e210fc34ab9d6
Reviewed-on: https://gerrit.libreoffice.org/83072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 4471ea81f80b..8c83b502647e 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1513,7 +1513,7 @@ ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const pData->eIconSetType = static_cast<ScIconSetType>(mxLbIconSetType->get_active()); for(const auto& rxEntry : maEntries) { - pData->m_Entries.push_back(std::unique_ptr<ScColorScaleEntry>(rxEntry->CreateEntry(mpDoc, maPos))); + pData->m_Entries.emplace_back(rxEntry->CreateEntry(mpDoc, maPos)); } pFormat->SetIconSetData(pData); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 44ef3d49c330..d530cc81cbcd 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1989,13 +1989,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScIconSetFormat* pEntry = new ScIconSetFormat(pDoc); ScIconSetFormatData* pIconSetFormatData = new ScIconSetFormatData(eIconSetType); - pIconSetFormatData->m_Entries.push_back(std::make_unique<ScColorScaleEntry>(0, COL_RED, COLORSCALE_PERCENT)); - pIconSetFormatData->m_Entries.push_back(std::make_unique<ScColorScaleEntry>(round(100. / nSteps), COL_BROWN, COLORSCALE_PERCENT)); - pIconSetFormatData->m_Entries.push_back(std::make_unique<ScColorScaleEntry>(round(200. / nSteps), COL_YELLOW, COLORSCALE_PERCENT)); + pIconSetFormatData->m_Entries.emplace_back(new ScColorScaleEntry(0, COL_RED, COLORSCALE_PERCENT)); + pIconSetFormatData->m_Entries.emplace_back(new ScColorScaleEntry(round(100. / nSteps), COL_BROWN, COLORSCALE_PERCENT)); + pIconSetFormatData->m_Entries.emplace_back(new ScColorScaleEntry(round(200. / nSteps), COL_YELLOW, COLORSCALE_PERCENT)); if (nSteps > 3) - pIconSetFormatData->m_Entries.push_back(std::make_unique<ScColorScaleEntry>(round(300. / nSteps), COL_WHITE, COLORSCALE_PERCENT)); + pIconSetFormatData->m_Entries.emplace_back(new ScColorScaleEntry(round(300. / nSteps), COL_WHITE, COLORSCALE_PERCENT)); if (nSteps > 4) - pIconSetFormatData->m_Entries.push_back(std::make_unique<ScColorScaleEntry>(round(400. / nSteps), COL_GREEN, COLORSCALE_PERCENT)); + pIconSetFormatData->m_Entries.emplace_back(new ScColorScaleEntry(round(400. / nSteps), COL_GREEN, COLORSCALE_PERCENT)); pEntry->SetIconSetData(pIconSetFormatData); pFormat->AddEntry(pEntry); |