You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@openoffice.apache.org by Peter Eberlein <pe...@refofd.verwalt-berlin.de> on 2013/10/11 15:50:29 UTC
com.sun.star.text.SectionFileLink
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?
Regards
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org
Re: com.sun.star.text.SectionFileLink
Posted by Peter Eberlein <pe...@refofd.verwalt-berlin.de>.
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-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org
Re: com.sun.star.text.SectionFileLink
Posted by Bernard Marcelly <ma...@club-internet.fr>.
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.
Regards
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org