Kaydet (Commit) 9e60d29b authored tarafından Noel Grandin's avatar Noel Grandin

tdf#117539 Crash after cut and paste operation of a chart stick

regression from
   commit 3d44b720
   loplugin:useuniqueptr in SfxItemPool_Impl
where I accidentally removed some fallback code.

Note that this does not fix the underlying bug where some pool is not
correctly set up.

Also, this only fixes the bug that I introduced in the above commit,
another bug in the same area has subsequently been introduced, causing
a crash in a different area when performing this operation.

Change-Id: Iaae3b0dc82c740b498e3735273820647ef28fd01
Reviewed-on: https://gerrit.libreoffice.org/54522Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0ca16593
......@@ -94,6 +94,12 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool)
{
m_pWhichRanges = const_cast<sal_uInt16*>(m_pPool->GetFrozenIdRanges());
assert( m_pWhichRanges && "don't create ItemSets with full range before FreezeIdRanges()" );
if (!m_pWhichRanges)
{
std::unique_ptr<sal_uInt16[]> tmp;
m_pPool->FillItemIdRanges_Impl(tmp);
m_pWhichRanges = tmp.release();
}
const sal_uInt16 nSize = TotalCount();
m_pItems.reset(new const SfxPoolItem*[nSize]{});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment