[api-dev] Question on XServiceInfo indirect service names...
Hi there, if using com.sun.star.lang.XServiceInfo.getSupportedServiceNames(), the array will return all services implemented in the object: Provides the supported service names of the implementation, including also indirect service names. Are indirect service names the (old-style-aggregation) services a service may contain? Or would one have to use reflection to (possibly recursively) figure out all services that are available through the object? Regards, ---rony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Question on XServiceInfo indirect service names...
Rony G. Flatscher wrote: Hi there, if using com.sun.star.lang.XServiceInfo.getSupportedServiceNames(), the array will return all services implemented in the object: Provides the supported service names of the implementation, including also indirect service names. Are indirect service names the (old-style-aggregation) services a service may contain? Or would one have to use reflection to (possibly recursively) figure out all services that are available through the object? I guess that is what was meant with indirect service names. However, I also assume that many objects that support XServiceInfo do not implement it that way, but only return their top services. -Stephan Regards, ---rony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] LETTER FORM question
Everyone should know that the Mail Merge Wizard is usseless for complex task and page layouts. Happly we have still the famous Letter Form question on printing from File print. Problems is when the user had said that he not wonts to see this option again than he is forever in problems to uses Leter Form printing: so: - how can we undo this never again thing with a macro using the API ? - can we call the Form Letter printing option with a macro using the API? thanks for any hints Fernand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Integer Division?
How do I perform an integer division (e.g. 11 / 3 = 4) in OpenOffice Basic? -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Am Mittwoch, 14. Dezember 2005 11:39 schrieb Eric MOREL: http://www.richhillsoftware.com/blog/archives/2005/06/xnumbers_011_no.html Do I really need an extra package just to do integer division? This operation is built into almost every programming language! -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
No I don't think so but perhaps you can see the macro code behind Xdivint(). Eric Felix E. Klee a crit: Am Mittwoch, 14. Dezember 2005 11:39 schrieb Eric MOREL: http://www.richhillsoftware.com/blog/archives/2005/06/xnumbers_011_no.html Do I really need an extra package just to do integer division? This operation is built into almost every programming language! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] How to launch and manipulate a document from an signed applet
Hi, I would like to do the FirstLoadComponent sample (from firststep) but in an signed applet. I have an exception "com.sun.star.comp.helper.BootstrapException: no office executable found! ". The code start with this line : XComponentContext xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); I think that I should use another way to connect and manipulate OOo but I don't find it easily. Thanks for your help. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Hi Felix, How do I perform an integer division (e.g. 11 / 3 = 4) in OpenOffice Basic? try this 11 \ 3 = 3 or fix(11/3) the rounding depends of what you need for me 11/3 is rounded to 3 Laurent -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org Indesko http://www.indesko.com Nuxeo CPS http://www.nuxeo.com - http://www.cps-project.org Livre Programmation OpenOffice.org, Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Hi Felix, http://www.richhillsoftware.com/blog/archives/2005/06/xnumbers_011_no.html Do I really need an extra package just to do integer division? This operation is built into almost every programming language! does print cint(11/3) do what you want ? Regards Stephan -- Everything should be made as simple as possible, but not one bit simpler. Albert Einstein (1879 - 1955) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Hi, How do I perform an integer division (e.g. 11 / 3 = 4) in OpenOffice Basic? Huh? IME the integer division operator (in languages where it exists) would produce 11 div 3 = 3, to match the modulus produced by the 'mod' operator (which does exist in StarBasic). That said, you can get the behavior you want (rounding) by assigning the result of a plain division to an integer variable q% = 11/3 ' Now the value of q% is 4 You can get a more typical integer division by using the available functions to convert to an integer by rounding down or truncating roundeddown% = int(11/3) ' value is 3 truncated% = fix(11/3) ' value is 3 These differ when negative numbers are involved. AFAICT truncation is the one that matches the builtin MOD operator, ie. b*fix(a/b) + a mod b = a HTH, Joerg -- Joerg Barfurth Sun Microsystems - Desktop - Hamburg using std::disclaimer Software Engineer [EMAIL PROTECTED] OpenOffice.org Configuration http://util.openoffice.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Am Mittwoch, 14. Dezember 2005 12:11 schrieb Laurent Godard: 11 \ 3 = 3 I couldn't find documentation for this operator in the online help (1.1.3). How come? or fix(11/3) Well this probably uses a floating point number as an intermediary, which could introduce numerical errors. This is not what I want. Anyway, thanks for your help so far. -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Hi Felix, does Dim iResult as integer iResult = 11 \ 3 fit your needs? The \ operator would do the division with a whole number result. BTW, 11 / 3 would never result as 4. ;-) Best wishes Dieter Felix E. Klee wrote On 12/14/05 11:26,: How do I perform an integer division (e.g. 11 / 3 = 4) in OpenOffice Basic? -- Dieter Krogh Support Engineer RSD StarOffice/Linux/Cobalt EMEA Sun Services Tel: (+49 40) 23646-744 / x66744 Sun Microsystems GmbH Fax: (+49 40) 23646-750 Sachsenfeld 4 http://www.sun.de D-20097 Hamburgmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Macro: revert changes.
All I need to do is, given a document file to the user, know how long it kept the document open before he returned it to the server. To prenvent the user from dealing all the time with 2 files, I was storing this information on a user-field in the document file. But before closing the document I need to revert unsaved changes, update the user-field with the editing time information and save the document. Is there anyway to do that (with or without reloading the document)? On 12/13/05, Mathias Bauer [EMAIL PROTECTED] wrote: Fabricio Lemos wrote: Hello all, Is there anyway, with macros, to revert all changes made in a document since last time it was saved, without reloading it? Such functionality does not exist at all, neither in the GUI nor in the API. You can call Undo until the undo stack is empty, in many cases that will do what you want. There are two cases where this is not what you want: (1) You have saved your document in the editing session. In this case calling Undo til the end will even go behind the last saved version. (2) OTOH if you have more undo steps than the configured depth of the undo stack (default in OOo2 is 100) you will not reach the last saved state. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Deprecated reflectable ? (Re: [api-dev] Question on XServiceInfo indirect service names...
Hi Stephan, I guess that is what was meant with "indirect service names." However, I also assume that many objects that support XServiceInfo do not implement it that way, but only return their "top" services. Thank you for your clarification and warning! An example seems to be the service "com.sun.star.frame.Desktop": using "XServiceInfo.getSupportedServiceNames()" does not list the service "com.sun.star.frame.Frame", also using "XTypeProvider.getTypes()" displays the non-existing (!) interface named "com.sun.star.document.XEventBroadcaster"; going to the documentation (cf. "OpenOffice.org2.0_SDK/docs/common/ref/com/sun/star/frame/Desktop.html") reveals, that this interface is "deprecated", because "This interface is a documentation error. It was never thought to be supported by this service. Please use the service GlobalEventBroadcaster instead of this interface.". The problem here is, that using the appropriate XTypeDescription interfaces documents that interface wrongly. Now, is there *any* way to get the information via reflection that some UNOIDL member is deprecated, such that one can take this information into account at runtime and act accordingly? Regards, ---rony P.S.: Being there: is there any way to get at the help text via reflection at runtime from UNOIDL files which gets used to create the UNO help system?
Re: [api-dev] Macro: revert changes.
Fabricio Lemos wrote: All I need to do is, given a document file to the user, know how long it kept the document open before he returned it to the server. To prenvent the user from dealing all the time with 2 files, I was storing this information on a user-field in the document file. But before closing the document I need to revert unsaved changes, update the user-field with the editing time information and save the document. Is there anyway to do that (with or without reloading the document)? I must confess that I'm not sure wether I understand what your goal is. A user gets a document from a server (right?). He makes some changes to the document and then saves it again to the server (right?). You keep track of the editing time in the document and update it when the document is closed. Now you want to store this updated time to the document on the server but of course without any changes that meanwhile have been applied to the document because obviously the user wants to discard them (right?). Why don't you update the editing time when the document is stored by the user instead of waiting until he closes the document? In this case the correct time gets stored along with all the changes the user wants. Of course you will not keep track of the time that the user works on the document but then discards his work, but do you want to count this time? And are you really sure that the OOo internal editing time isn't good enough for you? If you can use the OOo internal counter it will be stored each time anyway and you don't need to do anything on your side. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Question on XServiceInfo indirect service names...
Stephan Bergmann wrote: Rony G. Flatscher wrote: Hi there, if using com.sun.star.lang.XServiceInfo.getSupportedServiceNames(), the array will return all services implemented in the object: Provides the supported service names of the implementation, including also indirect service names. Are indirect service names the (old-style-aggregation) services a service may contain? Or would one have to use reflection to (possibly recursively) figure out all services that are available through the object? I guess that is what was meant with indirect service names. However, I also assume that many objects that support XServiceInfo do not implement it that way, but only return their top services. But that would be a bug, right? Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Macro: revert changes.
Why don't you update the editing time when the document is stored by the user instead of waiting until he closes the document? In this case the correct time gets stored along with all the changes the user wants. Of course you will not keep track of the time that the user works on the document but then discards his work, but do you want to count this time? Yes, I need to count this time. By the way, I need to keep track of all the time the document stays open, whether the user edit (change) it or not. And are you really sure that the OOo internal editing time isn't good enough for you? If you can use the OOo internal counter it will be stored each time anyway and you don't need to do anything on your side. It doesn´t work for me because the internal editing time is updated only when, and if, the document is saved and doesn´t register the time the document was open without being edited. On 12/14/05, Mathias Bauer [EMAIL PROTECTED] wrote: Fabricio Lemos wrote: All I need to do is, given a document file to the user, know how long it kept the document open before he returned it to the server. To prenvent the user from dealing all the time with 2 files, I was storing this information on a user-field in the document file. But before closing the document I need to revert unsaved changes, update the user-field with the editing time information and save the document. Is there anyway to do that (with or without reloading the document)? I must confess that I'm not sure wether I understand what your goal is. A user gets a document from a server (right?). He makes some changes to the document and then saves it again to the server (right?). You keep track of the editing time in the document and update it when the document is closed. Now you want to store this updated time to the document on the server but of course without any changes that meanwhile have been applied to the document because obviously the user wants to discard them (right?). Why don't you update the editing time when the document is stored by the user instead of waiting until he closes the document? In this case the correct time gets stored along with all the changes the user wants. Of course you will not keep track of the time that the user works on the document but then discards his work, but do you want to count this time? And are you really sure that the OOo internal editing time isn't good enough for you? If you can use the OOo internal counter it will be stored each time anyway and you don't need to do anything on your side. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Macro: revert changes.
Fabricio Lemos wrote: Why don't you update the editing time when the document is stored by the user instead of waiting until he closes the document? In this case the correct time gets stored along with all the changes the user wants. Of course you will not keep track of the time that the user works on the document but then discards his work, but do you want to count this time? Yes, I need to count this time. By the way, I need to keep track of all the time the document stays open, whether the user edit (change) it or not. And are you really sure that the OOo internal editing time isn't good enough for you? If you can use the OOo internal counter it will be stored each time anyway and you don't need to do anything on your side. It doesn´t work for me because the internal editing time is updated only when, and if, the document is saved and doesn´t register the time the document was open without being edited. I see. The best idea I have is to keep a local copy of the file each time the document is sent to the server and when the document is closed load the copy of the document (in hidden mode), change the time and sent *this* document to the server. In future versions of OOo we will be able to change the metadata of a document without loading the whole file, just with loading and storing only the metadata. So if you now store your document editing time as custom metadata (a new feature in OOo2) you can speed up your workflow a lot once the feature will be available. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Integer Division?
Felix E. Klee wrote: Am Mittwoch, 14. Dezember 2005 12:11 schrieb Laurent Godard: 11 \ 3 = 3 I couldn't find documentation for this operator in the online help (1.1.3). How come? or fix(11/3) Well this probably uses a floating point number as an intermediary, which could introduce numerical errors. This is not what I want. Anyway, thanks for your help so far. I believe that it is not documented. I documented them in my book by reading the source code -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Macro: revert changes.
I see. The best idea I have is to keep a local copy of the file each time the document is sent to the server and when the document is closed load the copy of the document (in hidden mode), change the time and sent *this* document to the server. Unhappyly, the user should be able to travel with the document between folders and with this solution he would have to travel with the document copies each time he moves the original document. This would not be a clear solution :( In future versions of OOo we will be able to change the metadata of a document without loading the whole file, just with loading and storing only the metadata. So if you now store your document editing time as custom metadata (a new feature in OOo2) you can speed up your workflow a lot once the feature will be available. Any ideas on which version will have this feature? Thank you a lot for your answers... On 12/14/05, Mathias Bauer [EMAIL PROTECTED] wrote: Fabricio Lemos wrote: Why don't you update the editing time when the document is stored by the user instead of waiting until he closes the document? In this case the correct time gets stored along with all the changes the user wants. Of course you will not keep track of the time that the user works on the document but then discards his work, but do you want to count this time? Yes, I need to count this time. By the way, I need to keep track of all the time the document stays open, whether the user edit (change) it or not. And are you really sure that the OOo internal editing time isn't good enough for you? If you can use the OOo internal counter it will be stored each time anyway and you don't need to do anything on your side. It doesn´t work for me because the internal editing time is updated only when, and if, the document is saved and doesn´t register the time the document was open without being edited. I see. The best idea I have is to keep a local copy of the file each time the document is sent to the server and when the document is closed load the copy of the document (in hidden mode), change the time and sent *this* document to the server. In future versions of OOo we will be able to change the metadata of a document without loading the whole file, just with loading and storing only the metadata. So if you now store your document editing time as custom metadata (a new feature in OOo2) you can speed up your workflow a lot once the feature will be available. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]