diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-16 14:23:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-25 17:29:32 +0200 |
commit | f09d48069bd5c53a02cae08de7e6695d558d4613 (patch) | |
tree | 26a3fd83d00b03f1cb7f79005072f04db8711362 /sw | |
parent | e5a5369030ef8a1619529a3058ed469cb973b558 (diff) |
ofz#3663: returning SfxPoolItem belonging to local
Change-Id: Ib9760efb1231ef057dfd62d06095c15e3bf73a87
Reviewed-on: https://gerrit.libreoffice.org/43425
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 7d4833c508f5..bb961c9a1462 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1480,9 +1480,9 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos, if (pNd->IsTextNode()) { const sal_Int32 nPos = rPos.nContent.GetIndex(); - SfxItemSet aSet(pDoc->GetAttrPool(), {{nWhich, nWhich}}); - if (pNd->GetTextNode()->GetAttr(aSet, nPos, nPos)) - pItem = aSet.GetItem(nWhich); + m_xScratchSet.reset(new SfxItemSet(pDoc->GetAttrPool(), {{nWhich, nWhich}})); + if (pNd->GetTextNode()->GetAttr(*m_xScratchSet, nPos, nPos)) + pItem = m_xScratchSet->GetItem(nWhich); } if (!pItem) diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 154706725c47..868858c49570 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -357,6 +357,7 @@ class SwWW8FltControlStack : public SwFltControlStack { private: SwWW8ImplReader& rReader; + std::unique_ptr<SfxItemSet> m_xScratchSet; sal_uInt16 nToggleAttrFlags; sal_uInt16 nToggleBiDiAttrFlags; SwWW8FltControlStack(const SwWW8FltControlStack&) = delete; |