Hi Bernard,
Am 13.10.2013 08:46, schrieb Bernard Marcelly:
Message de Peter Eberlein  date 2013-10-11 15:50 :
Hi,

if I break the link of a TextSection (which is linked to another
section in
another document) by setting the FileLink property (FileURL is empty),
then the
content of the section vanishes.

If I do the same with GUI, then the content isn't lost.

Any ideas how to preserve the content?


Hi,
If you simply do this instead :
    yourSection.dispose()
then the text content of the section remains, but the section is removed.

Yes, but I need the section for other purposes, so I created a new one after disposing (transferred to Basic):

name = oTextSection.LinkDisplayName
oTextSection.isProtected = False
oAnchor = oTextSection.getAnchor()
oTextSection.dispose()
oSection = ThisComponent.createInstance("com.sun.star.text.TextSection")
oSection.setName(name)
oText = oAnchor.getText()
oText.insertTextContent(oAnchor , oSection , True)

Thanks Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org

Reply via email to