List Info

Thread: Mapping of the UNO type "hyper" in StarBasic




Mapping of the UNO type "hyper" in StarBasic
user name
2006-06-21 05:06:42
Paolo Mantovani wrote:

>Hi Christian,
>
>sorry for my previous message.
>
>Alle 09:20, martedì 20 giugno 2006, Christian Junker ha
scritto:
>  
>
>>Hi Paolo,
>>I have the same problems as you have here.
>>I guess there is no other way than using
CreateUnoValue.
>>    
>>
>[...]
>  
>
>>2) using CreateUnoValue might be too difficult for
some to see or use
>>at first sight, thus making hyper a real type as
single, double etc.
>>would make things more comfortable for the
programmer. Would be good
>>to hear what Andreas Bregas thinks about that.
>>    
>>
> 
>I only want to add that using CreateUnoValue is a
workaround if you have to 
>pass an hyper to an API method, but does not helps when
you must get an 
>hyper.
>
>I've also tried with the css.script.Converter but
without any result, so any 
>suggestions are welcome
>
>thank you
>Paolo
>  
>
Are you saying that you do not know how to convert the
returned value to 
something that is usable when it is returned?

I noticed that some other types could not be created using
any other 
method... I think that Byte was one of them...

-- 
Andrew Pitonyak
My Macro Document: http://www.pi
tonyak.org/AndrewMacro.odt
My Book: http://w
ww.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.or
g/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

Mapping of the UNO type "hyper" in StarBasic
user name
2006-06-23 14:08:26
Hi Andrew,

Alle 07:06, mercoledì 21 giugno 2006, Andrew Douglas
Pitonyak ha scritto:
[....]
> >I only want to add that using CreateUnoValue is a
workaround if you have
> > to pass an hyper to an API method, but does not
helps when you must get
> > an hyper.
> >
> >I've also tried with the css.script.Converter but
without any result, so
> > any suggestions are welcome
>
> Are you saying that you do not know how to convert the
returned value to
> something that is usable when it is returned?

Yes I've had problems with 2.0.2 but after reading your msg
I repeated my 
tests and I've seen that the problem is not easily
reproducible.

Anyway This is the testing code:

	oUcb =
createUnoService("com.sun.star.ucb.SimpleFileAccess&q
uot;)
	oFile =
oUcb.OpenFileRead("file:///boot/vmlinuz")
	oFile.seek(createUnoValue("hyper", 5))
	print TypeName(oFile.getLength) ' Int64
	print oFile.Position

Ayway is intersting to notice that UNO hyper is mapped to an
"int64" in 
StarBasic.
If the int64 would be "declarable" I think we
coluld avoid the 
createUnoValue() function in order to pass hyper values to
API methods.

>
> I noticed that some other types could not be created
using any other
> method... I think that Byte was one of them...

yes, this should be already fixed 
http://www.openoffice.org/issues/show_bug.cgi?id=17825

Thank you
Paolo Mantovani

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )