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
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 6cd9d88..473c324 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);
}
}