Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


hi Knut,

On 13/10/11 12:09, Knut Olav Bøhmer wrote:
Hi,

Why is it that some properties on some objects/services are not settable
from BASIC?
Like for example
"ThisComponent.getTextSections().getByName("sectionName").IsAutomaticUpdate
= True" has no effect
Is it some way to "fix" it?

it looks like this property only has an effect with DDE links, not file links: see lcl_UpdateLinkType in sw/source/core/unocore/unosect.cxx

are you using DDE? IIRC this works only on Windows?

I'm also trying to set
oDoc.getTextSections().getByName("sectionName").FileLink.FileURL, but
it's also not possible.

Am i doing it the wrong way?

seems the FileLink is some UNO struct.

the following seems to work:

dim l as new com.sun.star.text.SectionFileLink
l.FileURL = "file:///tmp/foo.odt"
ThisComponent.getTextSections().getByName("Section1").setPropertyValue("FileLink",l)


this then seems to remove the link again:

l.FileURL = ""
ThisComponent.getTextSections().getByName("Section1").setPropertyValue("FileLink",l)


I remember I've had this problem before, long time ago. I think I was
trying to set some properties on a hyperlink.
Can we take some action to fix this kind of issues?

well, basic has a horrible syntax that i find impossible to remember.
perhaps you have the same problem :)

Would it help to write my addons in C++? Or would that not make a
difference?

hmm... C++ also has a horrible syntax... choose your poison :)

regards,
 michael


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.