diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-07 13:41:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-07 18:36:59 +0100 |
commit | ebd43aee5b9cf98ed96ce28985267ad0bc980b7a (patch) | |
tree | 625f589b485ec5f516b9522d97f596994c977eaf /sw | |
parent | 3e1977abc648a0b30be7af3c10060938de1b143f (diff) |
rework setting hidden property on line break
to avoid the assert in InsertItem, I guess that was the wrong way
to do it then.
Change-Id: Icd30ced1d2598ec42d3e5f555360f5d2377515c1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 6cd9d88a398a..473c324b0b39 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -494,12 +494,11 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con aAnc.SetAnchor(&aPos); - SfxItemSet aSet(makeItemSetFromFormatAnchor(GetDoc()->GetAttrPool(), aAnc)); - SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); OSL_ENSURE(pFly, "SetFlyFrameAttr, no Fly selected."); if (pFly) { + SfxItemSet aSet(makeItemSetFromFormatAnchor(GetDoc()->GetAttrPool(), aAnc)); SwFlyFrameFormat* pInnerFlyFormat = pFly->GetFormat(); GetDoc()->SetFlyFrameAttr(*pInnerFlyFormat, aSet); } @@ -513,7 +512,9 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con //the next line, pushing the caption text out of //the frame making the caption apparently disappear SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN); - pTextNode->InsertItem(aHidden, nIndex, nIndex + 1); + SfxItemSet aSet(GetDoc()->GetAttrPool(), aHidden.Which(), aHidden.Which()); + aSet.Put(aHidden); + pTextNode->SetAttr(aSet, nIndex, nIndex + 1); } } |