Re: [api-dev] Where did the code snippets go?
huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak [EMAIL PROTECTED]: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- 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] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] [Announce] Snippet Collection holds more then 100 Snippets
Thanks goes to you Tom, for mantaining and providing thise code snippet base. 2006/7/14, Tom Schindl [EMAIL PROTECTED]: Hi folks, since we started our snippet collection we/you constantly added new snippets and now its time to announce the integration of the ***100ths*** Snippet. Today I've added 31 Snippets provided by students form the University of Vienna with a total amount of 120 Snippets. I want to say a great thank you to all how contributed. Next major target is to translate the snippets into other languages. Tom -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Mapping of the UNO type hyper in StarBasic
Then how would you want to convert it to hyper from Decimal? I believe there is no working way to do this, but I would be happy if you prove me wrong. 2006/6/27, Bernard Marcelly [EMAIL PROTECTED]: Bonjour Andreas Bregas Message du 2006-06-27 12:51: You're right, but after my fix of i66765 the only problem I still see is how hyper/int64 can be declared and how the cor- responding literals can be handled (i66770). Suggestion : use the unofficial Basic type Decimal to convert from/to hyper. I found it can handle up to 29 digits and supports arithmetic operators. dim v as variant v = CDec(9223372036854775806) print typename(v), v Of course it would be better if we could define: dim v as Decimal v = 9223372036854775806 Note : CDec is currently bugged (IZ 64348) Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Mapping of the UNO type hyper in StarBasic
There is no possibility as I see it, because you cannot directly convert a decimal to hyper, at least I can't (again I would be happy if you prove me wrong with a code snippet). But if you do it with a conversion to an whole number before, you cannot avoid a possible loss of data, which would make the use of Decimal useless in this case. 2006/6/27, Bernard Marcelly [EMAIL PROTECTED]: Bonjour Christian Junker Message du 2006-06-27 16:46: Then how would you want to convert it to hyper from Decimal? I believe there is no working way to do this, but I would be happy if you prove me wrong. I don't see your point. Hyper is a signed 64 bits integer, and it fits inside a Decimal range. When converting from Decimal to Hyper, of course the Decimal value must be an integer value within the range of Hyper. And the conversion from Decimal internal representation to Hyper should not pose big problems: Basic already can convert from Decimal to Long. Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Mapping of the UNO type hyper in StarBasic
Hi Paolo, I have the same problems as you have here. I guess there is no other way than using CreateUnoValue. There are two things I want to comment on at this time: 1) numeric constants like 5 should raise *no* errors when being passed to functions that expect arguments of UNO type 'hyper'. It could be avoided by typecasting in the various implementations (I guess hyper is nothing else than the C99 long long int), so that no error occurs. Maybe the Basic runtime throws those errors before the implementation function is even called. All that needs to be investigated. 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. 2006/6/19, Paolo Mantovani [EMAIL PROTECTED]: Hi all, as from subject: how does it is mapped the hyper UNO type in StarBasic? The question is because I ever had problems in basic when working with css.io.XSeekable methods (that takes or gets hyper values) Example: REM * BASIC * Sub TestUCB oUcb = createUnoService(com.sun.star.ucb.SimpleFileAccess) oFile = oUcb.OpenFileReadWrite(file:///home/paolo/img.png) oInputStream = createUnoService(com.sun.star.io.DataInputStream) oInputStream.setInputStream(oFile.getInputStream()) ' print oFile.getLenght 'error!!! ' oFile.seek(5) 'error!!! oFile.seek(CreateUnoValue(hyper, 5)) 'No problem.. oInputStream.closeInput End Sub thank you Paolo M - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Macro to accept all tracked changes
Hi Jo, it's not clear to me what your goal is, can you be a bit more specific so that people can more easily help you find a solution? 2006/6/3, Jo [EMAIL PROTECTED]: Hi, I created the following with Record Macro to record all changes made to a document. I was wondering if there would be a cleaner way to accomplish this. (i.e. without dispatcher) Sub AcceptTrackedChanges dim document as object dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService(com.sun.star.frame.DispatchHelper) dispatcher.executeDispatch(document, .uno:AcceptTrackedChanges, , 0, Array()) End Sub Kind regards, Jo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to debug API usage
Hi Yves, as far as I know of, there is no easy way to switch debugging on, because in the case you got your OpenOffice as a binary package it is very likely that it has been built without debugging enabled. Now, the hard way would be to build OOo yourself and use DEBUG TRUE for the right modules. But that said I am not informed how things have developed recently, maybe it is even possible with 2.x to get all output logged somewhere. 2006/6/6, Bénigot Yves [EMAIL PROTECTED]: I use open office developper release 2.0.3 on Linux with Java and UNO. Openoffice is started as a server under root and accessed via jboss. When I try to use storeToURL() to an RTF file I get com.sun.star.task.ErrorCodeIOException, although the URL seems correct (its a file url). Also running a test program under different conditions (eclipse client on Windows, to a Linux server, instead of using the API as a jboss backend) works. - So I need to get more information about what goes wrong in my precise case. Is there a way to get a trace of what happens on the openoffice side, to understand why the file write fails ? Is there a journal file for errors ? or a debug switch ? Yves Benigot -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Re: [dev] Programmatic XTextFrame Control with Java
Hi Kent Gibson, this is a pure API topic, so discussion should rather go on over there (dev@api.openoffice.org). Thus I am forwarding your message. 2006/2/6, Kent Gibson [EMAIL PROTECTED]: Hi-ya, I would like to create XTextFrames of a fixed arbitrary height and width and place them at arbitrary x and y coordinates. I can manage to get the frame, but I can't seem to size it or place it arbitrarily. I have based my code on the TextFrameExample() in TextDocuments.java. These properties seem to have no effect: XInterface xTextFrameInterface = (XInterface) mxDocFactory.createInstance(com.sun.star.text.TextFrame); XPropertySet xFramePropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextFrameInterface); xFramePropSet.setPropertyValue( FrameHeightAbsolute, new Long(5000)); xFramePropSet.setPropertyValue( FrameIsAutomaticHeight, new Boolean(false)); xFramePropSet.setPropertyValue( SizeType, new Short((short)1)); Also when I use xShape to define height and width, it doesn't seem to work either. The textframe is only as big as the text inside it. XShape xShape = ( XShape ) UnoRuntime.queryInterface( XShape.class, xFrame ); // Access the XPropertySet interface of the TextFrame XPropertySet xFrameProps = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xFrame ); // Set the size of the new Text Frame using the XShape's 'setSize' method Size aSize = new Size(); // this is probably (1/100 mm) aSize.Height = 400; aSize.Width = 15000; xShape.setSize(aSize); If anyone has any pointers that would be grand. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Executing external program and obtaining stdout, stderr and the return value
Hi Felix, no way to get the output directly, because Basic would need to handle pipes then. It is under consideration whether UNO should be extended to give support for standard IO, see #i53061#. Workaround is either such glue stuff like you presented or to use another (UNO-supported) language, for example Python, which does this stuff in a few lines of code easily (os.popen). 2006/1/26, Felix E. Klee [EMAIL PROTECTED]: I'd like to execute an external program (under LINUX) from within a Basic script, and I would like to obtain it's stdout, stderr and it's return value. I know that I could do it for example as follows (untested): 1. Shell( _ /bin/bash -c 'some_program /tmp/out 21; echo $? /tmp/retval') 2. Read the files /tmp/out and /tmp/retval. But, is there a simpler way? Is there an alternative to shell? -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] OO Basic editor questions
Hi Felix, 2006/1/18, Felix E. Klee [EMAIL PROTECTED]: Concerning the macro editor provided by OO 1.1.4 I've two questions: 1. Is it possible to have two Windows open showing different Basic files? No, I don't thin so. 2. Is there an EMACS mode suitable for editing OO Basic files? No, but if you want to implement that, it would surely be a nice thing. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] OLE Identifiers
Hi Misael, 2006/1/11, Misael Santos [EMAIL PROTECTED]: Hi everybody, I'm trying to access some OO objects from a Forms (Oracle) application using Native OLE Automation. It works fine for MS Office objects, using strings like Excel.Sheet, the OLE programmatic Identifiers. The question is, how do I get the strings for reference OO objects like a sheet? It's possible? sure, OLE is just a way how the OOAPI can be accessed (internally a UNO-COM bridge does all the dirty work for you), it does not change the API in any way. So you first get the service manager, from whereon you get the css::frame::Desktop service with the createInstance* method, the active component and from thereon the sheets container. Please see 3.4.3.5 Automation Bridge in the Developer's Guide for background information and http://udk.openoffice.org/common/man/tutorial/office_automation.html for some useful examples. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Upgrading from 1.x.x to 2.x.x -- Without Re-Learning An API?
Hi Hal, I have some good news for you... 2005/12/31, Hal Vaughan [EMAIL PROTECTED]: I was looking for a page or summary about what has changed from OOo 1.x.x to 2.x.x and can't find one. There is none, because nothing has really *changed* (backwards compatibility). The API has been extended instead, but your full code that worked for 1.1.x should also work for 2.0, if not then you can directly submit an issue for it. If I can use my old code with OOo 2.x.x, that would be perfect. Is that possible? Yes, see above. I've heard that the new API makes it easier to connect to, but since the old application has been written and is working I don't want to change it. I've also heard (but am not sure) that in 2.x.x, to get OOo to listen to a Java connection, I have to do something other than the old edit to Setup.xcu. Yes, the SimpleBootstrap mechanism which automates the IPC via a named pipe. Everything related to making the office listen for TCP/IP connections is documented in the Developer's Guide (first chapter, I think) available at api.openoffice.org . -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Java storeAsURL PDF Problem
This makes me think if we should add a note to the storeAsURL method description. http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XStorable.html#storeAsURL Like so: NOTE - saving of document formats that cannot be edited but only exported like PDF should be done with storeToURL only. What do others think? -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Catching Mouse Clicks
You say you want to advance to the next slide when a user presses a mouse button, but I don't see the sense of it since this is what happens by default. Can you describe your problem a bit more? In general you don't have a lot of control (at least no real-time control) over a running slide-show from the API. 2005/12/7, Bradley Bolen [EMAIL PROTECTED]: I would be listening for it in the slide show. Thanks, Brad -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] SDK 2.0
Hi Christian, on Stardiv it's http://ftp.stardiv.de/pub/OpenOffice.org/contrib/rc/2.0.0rc2/OOo_2.0.0rc2_051005_Win32Intel_sdk.zip 2005/11/9, Cristian Fonti [EMAIL PROTECTED]: I look to the stardiv.de but i don't find a Window OOo2.0 SDK... Someone have the correct link?? Thanks -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Re: [webmasters] Account is closed - dead link in SDK doc.
Thanks for forwarding Jacqueline, that is not good! As I already said before in a discussion with Jürgen, I think we should have external files on our collabnet webspace, eg at api.openoffice.org, for safety reasons. That way we don't depend on others. 2005/10/29, Jacqueline McNally [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Dear webmaster, today I wanted to install the OpenOffice-SDK for Windows. Like the Installation Guide says, there is a link implemented, where Windows user can get the needed GNU-Make file (see text below). But in fact that seems to be a dead link, because it applies, that the account is closed...?! -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Returnvalues from Macros
in Matthias Benkmann's example. But the code snippet can be much shorter, because you don't need the scriptProvider at all: Sub shortMBNKMN MsgBox Foo( Hello World ) End Sub Function Foo(st as String) as String MsgBox(st) Foo = Bye Bye End Function This gives exactly the same result. Sincerely, Gerrit Jasper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Returnvalues from Macros
Hi Alexander, 2005/10/22, Alexander Peters [EMAIL PROTECTED]: A dispatched macro can't return a value. And which makro can return a value? what Matthias meant with dispatched is, that it was called using css::frame::XDispatchHelper. Unfortunately there is currently no way to call macros across UNO-supported languages as far as I know, I must admit it would be very useful to have something like that. Scripting Framework developers can probably tell you more about such things... -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Returnvalues from Macros
I need to clarify, that I meant calling macros along with getting their return values. 2005/10/22, Christian Junker [EMAIL PROTECTED]: Unfortunately there is currently no way to call macros across UNO-supported languages as far as I know -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Multiple XShape select
Hi Jayant, 2005/10/6, Jayant Balraj Madavi [EMAIL PROTECTED]: Problem 1: How to get the shape name ? The css::drawing::Shape (abstract mother class of all shapes) has a Name property. I can't test on this machine right now, but I am pretty sure it's just a PropertyValue with the name Name. Problem 2: drawing::XShapes myShapes ;//(Shape collection from drawPage) For me XSelectionSupplier-Select(myShapes) also does not work is it suppose to work ? It should work as far as I see it, have you instantiated a css::drawing::ShapeCollection before at the office ServiceManager and added the to-be-selected shapes to it (querying XShapes and using its add method)? You also need to make sure that you pass in an object of uno type Any, in Java for example you can pass an object of type Object. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] programatically know which platform
Hi Jürgen, I wonder if it would be good to integrate an interface (into the IDL module system for example) and possibly a service that does exactly what has been asked for in this thread. Give some feedback what you think, if it makes sense to integrate this into the official build (not yet talking about how to implement it just about the abstraction). 2005/10/4, Jürgen Schmidt [EMAIL PROTECTED]: Hi, [...] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problem translating java method, getTypeName(), to python
It wouldn't be a lot of work to do it, there is the pydoc tool which just takes the doc-strings (which are already there) and generates html output if you tell it to. I will open up a new issue for this, in the end it is up to Jürgen to decide whether such a reference would fit into the sdk index.html. 2005/9/13, Joerg Budischewski [EMAIL PROTECTED]: Hi, there is one on the webpage, http://udk.openoffice.org/python/python-bridge.html but I basically don't want to invest time to transfer it into the developer manual. Bye, Joerg -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problem translating java method, getTypeName(), to python
See http://www.openoffice.org/issues/show_bug.cgi?id=54951 2005/9/22, Christian Junker [EMAIL PROTECTED]: [...] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Python equivalent to com.sun.star.comp.helper.Bootstrap.bootstrap()?
Hi Joerg, thanks for sharing your thoughts about this, I have started #i54532# (http://www.openoffice.org/issues/show_bug.cgi?id=54532). I guess everybody is welcome to contribute patch/patches if he/she likes and attach them to the issue. Forwarding this to udk mailinglist, also. 2005/9/12, Joerg Budischewski [EMAIL PROTECTED]: Hi, there is no counterpart Bootstrap.bootstrap() in pyuno core as far as i know. [...] Joerg -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problem translating java method, getTypeName(), to python
Hi Kim, thanks for your input first of all. As already said in an answer before, getTypeName() is specific to the PyUNO Runtime, it's not a function exposed in an IDL interface. This got me thinking however... Especially to Jürgen and Jörg: Why is there no Python UNO Runtime Reference as there is for Java and C++ ? 2005/9/11, Kim Kulak [EMAIL PROTECTED]: 1. The method getTypeName() is not listed in the index of the IDL Reference documentation. [...] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] ByteArrayToXInputStreamAdapter in the CVS tree
Hi Andreas, javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java 2005/9/6, Andreas Bröker [EMAIL PROTECTED]: Hello, [...] Can anybody tell me where i must have a look. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Any way to combine multiple actions into one undo-able action ?
Hi Patrik, as of right now there is still just the uno dispatch .uno:Undo which for many cases can be sufficient. 2005/8/26, Patrik Fimml [EMAIL PROTECTED]: Mathias Bauer wrote: CPH wrote: Hi, I have a button on my UI which performs several actions thru API calls. Is ther anyway which I can get all of these actions to be considered one atomic action by the Undo/Redo mechanism ? Not ATM. But we are currently discussing new APIs for Q. I'm somewhat involved into that and I will take your question as a feature enhancement request. :-) My understanding is that you want to do something like: set mark on undo stack execute API calls set another mark on undo stack and then you would expect that calling Undo would undo *all* the changes you made, and of course a following Redo would do the opposite. The same way we want to make macros undoable in one step. That was in October 2003. Is it possible now to do such things? Regards, Patrik Fimml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Connect to a remote office on another machine from SB
Hi all, often it has been talked about that OOo is perfectly capable of acting as a server on one machine and listening for UNO connections from other machines. Up till now I haven't seen a lot of examples showing this, so I just wanted to test if this was practically possible (inspired by a question on oooforum.org) and started a soffice process in listening mode in my wlan on Mac OS X Tiger. I chose to use Starbasic as it shows that you can purely do a socket connection with the OOo API. I used the UnoUrlResolver service as it is used in other languages as well to connect to a running Office, but you can probably also use the XConnector which gives you more low-level power. Also there is a Socket service in the io module. Of course it is probably not that efficient to use Starbasic, since you need to run OOo two times (on server and client machine) but well, it works ;-). I executed the SB code from a Win32 machine, having tested just this case up till now (Win32-Mac OS X), of course you shouldn't have firewalls running and make sure there are no heavy security settings turned on, in case you want to test the code. code Sub connectToRemoteOffice() '192.168.2.103 is the TCP/IP address of the server running OOo with '-accept=socket,host=0,port=8100;urp;StarOffice.ServiceManager' res = createUNOService(com.sun.star.bridge.UnoUrlResolver) remotemgr = res.resolve(uno:socket,host=192.168.2.103,port=8100;urp;StarOffice.ServiceManager) desk = remotemgr.createInstance(com.sun.star.frame.Desktop) desk.loadComponentFromURL(private:factory/swriter, _blank, 0, Array()) 'look on the server monitor now :-) End Sub /code As you can see it's just a few lines, so it's very simple and clean code. Hope this helps someone out there somehow. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] existing UNO bridges
I was trying to get the names of the existing UNO bridges implemented into the office. When testing it from Starbasic, like so code Sub Main bridgefac = createUNOService(com.sun.star.bridge.BridgeFactory) msgbox UBound(bridgefac.getExistingBridges()) End Sub /code the msgbox gives me a value of -1 back, indicating that there are no existing bridges. When trying this method from C++, like so code Reference XBridgeFactory xBridgeFactory( xMultiComponentFactoryServer-createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM(com.sun.star.bridge.BridgeFactory ) ), xComponentContext ), UNO_QUERY ); /* looks for existing bridges and prints out the name of the first bridge contained in the sequence returned by getExistingBridges() */ OUString brname; Sequence Reference XBridge aBridgeSeq; if( xBridgeFactory.is() ) { aBridgeSeq = xBridgeFactory-getExistingBridges(); if (aBridgeSeq.hasElements()) brname = aBridgeSeq.getArray()[0]-getName(); printf(UNO bridge 1 is named\t%s\n, (char*) brname.getStr()); } /code the sequence returns one single bridge (I checked with getLength() on the seq) with the name u. So my question is: What does this method really return? The documentation talks about a full list of all unnamed and named bridges, but yet it does only return me 1 entry in C++ and nothing at all in SB. Trying to extract some logic out of the results, it rather seems to me as if the function only checks for the bridges that are currently in active use, ie the cpp bridge would be used when calling from C++, but then why is it named u? -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Browsing the source code
Hi there, searching can easily be done on http://ooo.ximian.com , it has a powerful search engine. 2005/7/27, Senthilkumar Mehalingam [EMAIL PROTECTED]: Hi All, I want to see how the cut,paste,undo,redo functionalities are implemented in OO.org. If anybody could point me to the specific files and modules in which they are implemented I would highly appreciate that. I want to know if Design Patterns are used in implementing them or not. If not I would like to try to implement it. I would appreciate any help and advice. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Dialog controls: relative ImageURLs
Hi Jorge, get your ooo-installationpath (folder) from PathSubstitution service, like so: code pathsub = createUnoService(com.sun.star.util.PathSubstitution) oodir = pathsub.getSubstituteVariableValue($(inst)) /code Once you have the installation path it shouldn't be hard to get to your desired folders (just use string manipulations). 2005/7/18, Jorge Marques Pelizzoni [EMAIL PROTECTED]: Hi, all! I wonder if there is a way to set property ImageURL (e.g. of CommandButtons) to some kind of relative URL at _design time_ (i.e. not resorting to com.sun.star.util.PathSettings at runtime). I what I need is (in decreasing order of importance): 1 - an application dialog to retrieve images from its installation folder (inside OpenOffice.org/user/basic or OpenOffice.org/share/basic); 2 - a document dialog to retrieve images from the directory where its document is located. Unfortuantely, I am bound to version 1.1.4 and no higher. Thanks in advance. Cheers, Jorge. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] XMouseClickHandler and corresponding cell
Hi Laurent, XMouseClickHandler was not working in the last milestones, which should have been fixed as stated in: #i47814#, however it is very recent, so it's probably not in m113 thus it's not a surprise that you have problems with XMouseClickHandler. 2005/7/12, Laurent Godard [EMAIL PROTECTED]: Hi all i try to react to clicks on some cells Using the com.sun.star.awt.XMouseClickHandler, i only retreive the coordinates of the pointer. Is there a way to know which cell has been clicked ? I'm actually using the com.sun.star.view.XSelectionChangeListener It globally works but i encounter 3 problems - some double calls - if the user moves the mouse during the callback function _selectionChanged, i end with a state during selection, i mean, as if i was curren,tly selecting a range (moving the mouse hanges the selection) - using print preview shutdown the listener Are this known issues ? Any workaround ? Thanks a lot in advance 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] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] [EMAIL PROTECTED] TOPIC: Contributing
2005/7/9, Jack Park [EMAIL PROTECTED]: Thanks for this opportunity to comment on the dev doc. I'd like to point out a potential ambiguity. I confess, I don't have the doc in front of me; I hope what I sketch is sufficiently robust that someone can spot the issue properly. It deals with the early stages of building from source using cygwin. The instructions call for running ./configure, then shuffling some files around (they were already where they belong). From memory of the issues I ran into, the instructions then ask you to run dmake. ... Hi Jack, you're talking to the wrong mailinglist. This is about the OpenOffice API, not the build process from OOo's sources. Please ask those things at either the tools project (tools.openoffice.org) or at development.openoffice.org . Thanks. -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Broken links in API:Basics and Dialogs?
Can confirm this. Would you start an issue, please? If you don't want to register for Issuezilla, just let me know and I will write a report for this.2005/7/1, Ennio-Sr [EMAIL PROTECTED]: Hi all!On page 45 (of 155) of the captioned doc. there is a link to *8.Spreadsheet Documents* which does not seem to be available. Cansomebody suggest a substitute URL?Regards,Ennio. --[Perche' usare Win$ozz (dico io) se ...anche uno sciocco sa farlo. \\?// Fa' qualche cosa di cui non sei capace!(diceva Henry Miller) ](°|°)[Why use Win$ozz (I say) if ... even a fool can do that.)=( Do something you aren't good at! (as Henry Miller used to say) ]-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- Best RegardsChristian Junker
Re: [api-dev] Re: [users] Problems regarding scroll bars
quote[...]Horizontal scroll bars thru tools/options. /quote What do you exactly mean?? Which scroll bars? It seems to me that you want to use persistent menu/toolbar configurations for a specific file. While this is supported in OOo 1.1.x it's not in OOo 2.0 as far as I know. Please provide much more information about your Java component, OOo version and other related information.2005/7/1, G. Roderick Singleton [EMAIL PROTECTED]:On Thu, 2005-06-30 at 18:48 +0530, Divya wrote: sir/madam i have used open office in my gui in java application.i have saved all the files as .sxw without horizontal scroll bars thru tools/options. when i run my application and open a .sxw file for the first time it comes without the horizontal scroll bar. but if i open it for the second time without closing the application it comes with the horizontal scroll bar. again if i close my application run it again it comes without the scroll bar for the first time. can u help me with this divyaSince you are programming, I think this question is better suited to the API lists. I have cc'd this list and recommend that you look there foranswers.--PLEASE KEEP MESSAGES ON THE LIST.OpenOffice.org Documentation Co-Lead http://documentation.openoffice.org/-To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]-- Best RegardsChristian Junker
Re: [api-dev] Sequence of Texttables
In addition to what Andrew provided here, there is yet another way, which is probably not that good but can be taken into account: Using the viewcursor you can go from the beginning to the end of the document regularly checking if the property TextTable of the viewcursor is void (IsEmpty(cur.TextTable)) . Nevertheless the enumeration way is the more reliable one. Do note, that right now in the 680 line (2.0 beta) thisComponent is broken, so use Stardesktop.getCurrentComponent() instead and make sure you run the macro from the menu and not from the Basic IDE.2005/6/15, Andrew Douglas Pitonyak [EMAIL PROTECTED]: Martin Thoma wrote:Hello! I have a text-document which contains some tables:Table1 (Named MyTable)Table2 (Named My 2nd Table)I copy+paste (executeDispatch) Table1 some times into the document: Table1 (Named MyTable)NewTable (Named Table 4)NewTable (Named Table 5)NewTable (Named Table 6)NewTable (Named Table 7) Table2 (Named My 2nd Table)What I need is to access the NewTables in the right order.I tried to use getTextTables, because I thought it returns the tables in theorder they are in to document, but it gives: Table1 (Named MyTable)Table2 (Named My 2nd Table)NewTable (Named Table 4)NewTable (Named Table 5)NewTable (Named Table 6) NewTable (Named Table 7)I coulnd't rely on the table-name, because I don't know which tables arealready inside the document.My idea now is to store all table-names before the copy+paste, use getTextTables and compare the names with the tables-names I stored - but Ihave to be sure that the first table I get will be the first I inserted(Table 4) and not some other of the new tables (like Table 6). Will this ALWAYS be the case?RegardsMartinIf I understand your problem correctly, you want to enumerate the texttables in the order that they are contained in the document. Is this correct? If so, remember that TextTables are stored as a paragraph, soyou will find them while enumerating paragraphs.Sub EnumerateTextTablesInOrderDim oEnumDim s$Dim oParoEnum = ThisComponent.getText().createEnumeration()Do While oEnum.hasMoreElements()oPar = oEnum.nextElement()If oPar.supportsService(com.sun.star.text.TextTable) Thens = s oPar.getName () CHR$(10)End IfLoopMsgBox s, 0, Text TablesEnd Sub--Andrew PitonyakMy Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htmFree Info:http://www.pitonyak.org/oo.php -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- Best RegardsChristian Junker
Re: [api-dev] How to identify and remove empty pages in writer document.
Alright, after some replies with code that was just out of the box, meaning it wasn't well thought about, I decided to spend some more time on this coming up with a hopefully complete-working macro. The result can be seen on: http://www.oooforum.org/forum/viewtopic.phtml?t=20153 As a remark: It is nice to see how much can be done with just the viewcursors, no need for a textcursor to accomplish such a task. Tom, if you want to include this into your snippets page you can go ahead. As said on the linked page, please give me some input if you encounter problems with this macro, I have not done any extensive tests yet.2005/5/13, malcolm cooke [EMAIL PROTECTED] :Hi,I wonder if anyone can give me pointers how to do this?Background - a document is created programmatically from a template and in the process textadded / removed. As a result now end up with empty pagesbecause of the way text is now flowing through the document. There is aneed to remove the extra blank pages.I have looked at content xml to see if anything obvious to identify the blank page and there isn't (which I suppose is understandable because theblanks pages are a symptom of the 'presentation' of the content)I have looked through the api and there is nothing obvious there either. One possibility comes to mind but I'm not experienced enough with the api'sto know if it is a feasible approach or not :identify number of pages in doc.for each page in docuse XpageCursor to jump to page somehow extract the text range for each page (? create a text cursor forthe page)if text range is emptystore page numberfor each stored page number (processed in reverse order) remove the page from the document (?how)Perhaps someone with more knowledge could comment on what I'm trying to door point to some other part of the api which might do what I want to do.Thanks Malcolm--No virus found in this outgoing message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] -- Best RegardsChristian Junker
Re: [api-dev] How to identify and remove empty pages in writer document.
Hi Malcolm, maybe the macro I just wrote will help you. Please note that it is by no means 'perfect' because I have not tested all possible situations. The problem is that there is no such API function as to recognize whether a page is empty, so you have to check it on your own. Because there are many ways to skip a page it is also not doable in one specific and simple way. My macro checks the first 'chars' characters on the page, if they are all whitespace or if there is none but a page break it will remove the page. You can set the value to whatever you want (I check for the first 50 characters), depending on how well your document is structured. For example if you don't have messy formatting (messy means i.e. if some pages only have text in the middle and don't start at the top) then you can set it be low, otherwise set this value much higher. code Private chars as Integer 'specifies the number of characters checked at the beginning of every page Function emptypage Dim i as Integer chars = 50 odoc = thisComponent 'if you have problems with thisComponent for the new OOo 2.0 builds, 'use Stardesktop.getCurrentComponent() instead otext = odoc.getText() cur = otext.createTextCursor() cur.goToStart(False) view = odoc.getCurrentController() viewcursor = view.getViewCursor() 'retrieve total page number viewcursor.jumpToLastPage() npages = viewcursor.getPage() viewcursor.jumpToFirstPage() For i = 1 to npages cur.goRight(chars, True) txt = Trim(cur.String) If len(txt) = 0 Then DeletePage(cur, i) Else If Asc(txt) = 32 Then DeletePage(cur, i) Else viewcursor.jumpToNextPage() cur.goToRange(viewcursor.getStart(), False) End If End If Next i End Function Function DeletePage(cur, i as Integer) cur.goLeft(chars, False) cur.goToNextWord(True) cur.setString() i =+ 1 End Function/code Hope this helps you. 2005/5/14, malcolm cooke [EMAIL PROTECTED]: Hi Paolo,I would if I could :-)Unfortunately the adding / removing of text to/from the template document(which in itself contains a lot of formatted text) is database driven anddependent upon a whole host of factors based around a particular customers geographic location. Obviously the template has to cater for allpossibilities and as large amounts of text get added / removed the originalpage boundaries fluctuate.MalcolmAt 22:21 13/05/2005, you wrote: Hi Malcom,Alle 18:02, venerdì 13 maggio 2005, malcolm cooke ha scritto: Hi, I wonder if anyone can give me pointers how to do this? Background - a document is created programmatically from a template and in the process textadded / removed. As a result now end up with empty pages because of the way text is now flowing through the document. There is a need to remove the extra blank pages. I have looked at content xml to see if anything obvious to identify the blank page and there isn't (which I suppose is understandable because the blanks pages are a symptom of the 'presentation' of the content) []Bingo!the pages of a document are the consequence.You should act on the cause instead.empty rows?wrong page style? wrong paragraph style? or manual page breaks? Ask yourself what is the cause of empty pages in your document and remove itusing API'sciaoPaolo Mantovani- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005 --No virus found in this outgoing message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] -- Best RegardsChristian Junker
Re: [api-dev] How to identify and remove empty pages in writer document.
U, this works better I guess: REM * BASIC * Private chars as Integer 'specifies the number of characters checked at the beginning of every page Function Delete_empty_pages Dim i as Integer chars = 50 odoc = thisComponent 'if you have problems with thisComponent for the new OOo 2.0 builds, 'use Stardesktop.getCurrentComponent() instead otext = odoc.getText() cur = otext.createTextCursor() cur.goToStart(False) view = odoc.getCurrentController() viewcursor = view.getViewCursor() 'retrieve total page number viewcursor.jumpToLastPage() npages = viewcursor.getPage() viewcursor.jumpToFirstPage() For i = 1 to npages cur.goRight(chars, True) txt = Trim(cur.String) If len(txt) = 0 Then DeletePage(cur, i) Else If Asc(txt) = 32 Then DeletePage(cur, i) End If End If viewcursor.jumpToNextPage() cur.goToRange(viewcursor.getStart(), False) Next i End Function Function DeletePage(cur, i as Integer) cur.goLeft(chars, False) cur.goToNextWord(True) cur.setString() i =+ 1 End Function2005/5/14, Christian Junker [EMAIL PROTECTED]: Hi Malcolm, maybe the macro I just wrote will help you. Please note that it is by no means 'perfect' because I have not tested all possible situations. The problem is that there is no such API function as to recognize whether a page is empty, so you have to check it on your own. Because there are many ways to skip a page it is also not doable in one specific and simple way. My macro checks the first 'chars' characters on the page, if they are all whitespace or if there is none but a page break it will remove the page. You can set the value to whatever you want (I check for the first 50 characters), depending on how well your document is structured. For example if you don't have messy formatting (messy means i.e. if some pages only have text in the middle and don't start at the top) then you can set it be low, otherwise set this value much higher. code Private chars as Integer 'specifies the number of characters checked at the beginning of every page Function emptypage Dim i as Integer chars = 50 odoc = thisComponent 'if you have problems with thisComponent for the new OOo 2.0 builds, 'use Stardesktop.getCurrentComponent() instead otext = odoc.getText() cur = otext.createTextCursor() cur.goToStart(False) view = odoc.getCurrentController() viewcursor = view.getViewCursor() 'retrieve total page number viewcursor.jumpToLastPage() npages = viewcursor.getPage() viewcursor.jumpToFirstPage() For i = 1 to npages cur.goRight(chars, True) txt = Trim(cur.String) If len(txt) = 0 Then DeletePage(cur, i) Else If Asc(txt) = 32 Then DeletePage(cur, i) Else viewcursor.jumpToNextPage() cur.goToRange(viewcursor.getStart(), False) End If End If Next i End Function Function DeletePage(cur, i as Integer) cur.goLeft(chars, False) cur.goToNextWord(True) cur.setString() i =+ 1 End Function/code Hope this helps you. 2005/5/14, malcolm cooke [EMAIL PROTECTED] : Hi Paolo,I would if I could :-)Unfortunately the adding / removing of text to/from the template document(which in itself contains a lot of formatted text) is database driven anddependent upon a whole host of factors based around a particular customers geographic location. Obviously the template has to cater for allpossibilities and as large amounts of text get added / removed the originalpage boundaries fluctuate.MalcolmAt 22:21 13/05/2005, you wrote: Hi Malcom,Alle 18:02, venerdì 13 maggio 2005, malcolm cooke ha scritto: Hi, I wonder if anyone can give me pointers how to do this? Background - a document is created programmatically from a template and in the process textadded / removed. As a result now end up with empty pages because of the way text is now flowing through the document. There is a need to remove the extra blank pages. I have looked at content xml to see if anything obvious to identify the blank page and there isn't (which I suppose is understandable because the blanks pages are a symptom of the 'presentation' of the content) []Bingo!the pages of a document are the consequence.You should act on the cause instead.empty rows?wrong page style? wrong paragraph style? or manual page breaks? Ask yourself what is the cause of empty pages in your document and remove itusing API'sciaoPaolo Mantovani- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005 --No virus found in this outgoing message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] -- Best RegardsChristian Junker -- Best RegardsChristian Junker
Re: [api-dev] IDL for the TextDocument service
I noticed the method getScriptProvider() yesterday which is probably the door to the XScriptProviderSupplier, however neither of those are listed in the IDL reference. In other words: This is probably an unofficial interface, thus no guarantees for its usability. 2005/5/11, Andreas Schlüns [EMAIL PROTECTED]: Christian Junker wrote: A text document does support the XMultiServiceFactory indirectly. Directly the XMultiServiceFactory interface is supported by the DrawingDocumentFactory which is a service that every document - that contains a drawing page - has. This includes the text document. About the other interface I don't know.Sorry ... but the generic IDL for every document iscss.document.OfficeDocument. The IDL css.drawing.DrawingDocumentFactory is deprecated and replaced by the IDLcss.drawing.GenericDrawingDocument. Further this GenericDrawingDocumentis the base of our draw/impress documents only and not the base of ourwriter/web/global nor of the calc or formula documents. I dont know for which reason the XMultiServiceFactory interface isneeded. But I know that an UNO implementation can implement more thenthe described interfaces ... e.g. to use it internaly in combination with some implementation helpers.The other interface XScriptProviderSupplier is not described by anydocument service IDL. But if all office documents should be usable forscripting may be this interface should be added to css.document.OfficeDocument.RegardsAndreas On 5/3/05, Christoph Lutz [EMAIL PROTECTED] wrote:Hi, Is there a reason why the service TextDocument doesn't support the interfaces XMultiServiceFactory and XScriptProviderSupplier *in the IDL*?Currently a TextDocument Service exports these interfaces, but that's not reflected by the IDL.best regards,Christoph__ Verschicken Sie romantische, coole und witzige Bilder per SMS!Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193- 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]-- Best RegardsChristian Junker
Re: [api-dev] IDL for the TextDocument service
Okay, I did not read carefully, this is actually about the IDL reference (documentation) not having the XMultiServiceFactory included in its exported interfaces. As Jürgen proposed, I submitted an issue for this: http://www.openoffice.org/issues/show_bug.cgi?id=49101 . If you wanted to Christoph, I am sorry ;( but better having it posted than forgetting about it. 2005/5/11, Christian Junker [EMAIL PROTECTED]: I noticed the method getScriptProvider() yesterday which is probably the door to the XScriptProviderSupplier, however neither of those are listed in the IDL reference. In other words: This is probably an unofficial interface, thus no guarantees for its usability. 2005/5/11, Andreas Schlüns [EMAIL PROTECTED]: Christian Junker wrote: A text document does support the XMultiServiceFactory indirectly. Directly the XMultiServiceFactory interface is supported by the DrawingDocumentFactory which is a service that every document - that contains a drawing page - has. This includes the text document. About the other interface I don't know.Sorry ... but the generic IDL for every document iscss.document.OfficeDocument. The IDL css.drawing.DrawingDocumentFactory is deprecated and replaced by the IDLcss.drawing.GenericDrawingDocument. Further this GenericDrawingDocumentis the base of our draw/impress documents only and not the base of ourwriter/web/global nor of the calc or formula documents. I dont know for which reason the XMultiServiceFactory interface isneeded. But I know that an UNO implementation can implement more thenthe described interfaces ... e.g. to use it internaly in combination with some implementation helpers.The other interface XScriptProviderSupplier is not described by anydocument service IDL. But if all office documents should be usable forscripting may be this interface should be added to css.document.OfficeDocument.RegardsAndreas On 5/3/05, Christoph Lutz [EMAIL PROTECTED] wrote:Hi, Is there a reason why the service TextDocument doesn't support the interfaces XMultiServiceFactory and XScriptProviderSupplier *in the IDL*?Currently a TextDocument Service exports these interfaces, but that's not reflected by the IDL.best regards,Christoph__ Verschicken Sie romantische, coole und witzige Bilder per SMS!Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193- 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] -- Best RegardsChristian Junker -- Best RegardsChristian Junker
Re: [api-dev] IDL for the TextDocument service
A text document does support the XMultiServiceFactory indirectly. Directly the XMultiServiceFactory interface is supported by the DrawingDocumentFactory which is a service that every document - that contains a drawing page - has. This includes the text document. About the other interface I don't know. On 5/3/05, Christoph Lutz [EMAIL PROTECTED] wrote: Hi, Is there a reason why the service TextDocument doesn't support the interfaces XMultiServiceFactory and XScriptProviderSupplier *in the IDL*? Currently a TextDocument Service exports these interfaces, but that's not reflected by the IDL. best regards, Christoph __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] preview in BASIC dialog
On 4/27/05, Marc Santhoff [EMAIL PROTECTED] wrote: Do you know the serviceName or implementation name of the templates dialogs preview? No and I don't even know if it's an (official) UNO object, if it's not - you definately have no way to use it via OO API. I would just write an email to the programming leaders of the writer component. See http://ooo.ximian.com/name-account.html -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] preview in BASIC dialog
Don't know of a direct way. As a dirty workaround it came to my mind: loading an impress document (in the background) inserting the writer/calc document as an OLEShape into the first drawing page, making its size as big as the drawing page. Then creating a PageShape with either the documentfactory of the dummy-impress document or your actual document - which is nothing else than a previewshape showing the current drawpage in small - and showing it in your awt window or wherever you want to place it. The nice thing about the pageshape is that it is in live mode and that you have full control over it (size, position etc.). However, I rather suggest that you dig through some more resources, like searching in the list of dispatch commands, diving through the Developer's Guide or in the last place to look into the source code. LXR (http://ooo.ximian.com) will be a good helper when it comes to the third point. On 4/23/05, Marc Santhoff [EMAIL PROTECTED] wrote: Hi, I'm sure this topic has been on the list, but I don't find it anymore: In a BASIC dialog I want to schow a preview of writer and calc docs. Is there any way to render a doc in preview mode to an image control? Or can the preview instantiated dynamically? Im talking of a first page stamp-like view as in the templates dialog. That's what I want to show to the user. TIA, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Wiki for writing OOo macros
Great work, Ian. On 4/20/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The URL is http://ext.openoffice.org.nz The wiki currently includes: * A getting started guide. * A cookbook / tutorial guide of some common ways of doing things. * A collaborative section for uploading macros and templates (currently has Iannz macros) * A slightly revised version of the on-line Basic help in wiki format * The API documentation in wiki format To me, I needed this resource up and running in a hurry as something to hang a couple of presentations I delivered at the OpenOffice.org LCA 2005 MiniConf. So I hope that I haven't offended anyone on this list for not discussing this more. I do not see the wiki as a replacement for: http://codesnippets.services.openoffice.org or http://www.oooforum.org/forum/viewforum.phtml?f=11 But to complement them, in that it is not a discussion forum, but it should allow for easy updating and more tutorial style text. The rationale for having the API and on-line Basic guide in wiki format is: It should make it easier to correct, and expand this documentation, and for ease of cross referencing in the wiki. Currently you do not need to register to edit the pages (if we have problems with spammers this may have to change). I do not know if this idea will be successful, and there are bound to be initial teething problems but I hope that you will join me in continuing to extend and update this wiki. Thanks, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] bug in windows OOo 1.1.4 bootstrap - InvocationTargetException
The SDK 1.9m77 is not intended to be used for OO 1.1.4. That said I don't know if it is incompatible to OO 1.1.x, but since bootstrapping has changed a lot over the last months it is not surprising to me that problems occur in your case. On Apr 7, 2005 4:27 PM, Mike Traum [EMAIL PROTECTED] wrote: I'm using the 1.9.m77 sdk to write a java client. I've been having other problems, but along the way, I was told that OOo 1.1.4 supports the Bootstrap, but there is currently a bug when having a space in the path name of the installation. So, I removed the installation, installed without the space, and I still get the same stack trace. thanks, mike Here's the stack trace: --- Exception in thread main java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.star.lib.loader.Loader.main(Loader.java:169) Caused by: java.lang.UnsatisfiedLinkError: createJNI at com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Native Method) at com.sun.star.lib.connections.pipe.PipeConnection.init(PipeConnection.java:156) at com.sun.star.lib.connections.pipe.pipeConnector.connect(pipeConnector.java:171) at com.sun.star.comp.connections.Connector.connect(Connector.java:172) at com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.java:159) at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:292) ... [ my classes ] ... --- __ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Up to date IDL and slots
Hi Ian, it should be part of the odk module or sdk_oo, at least that's what it used to be. The API project page even tells us about the modules on its front page. As for the slots (slots.sxc), I don't think it is part of the source code. -- Best Regards Christian Junker On Mon, 14 Mar 2005 11:11:27 +1300, Ian Laurenson [EMAIL PROTECTED] wrote: I would like to have up to date references for IDL and slots (for UNO dispatch calls). I have downloaded and extracted OOo_2.0beta_src.tar.gz but I can not work out how to compile the IDL reference. Similarly, I can't work out how to find what slots or UNO dispatch calls are available. I would really appreciate being pointed in the right direction on how to create this documentation. Thanks, Ian Laurenson - 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] How can I get the url of the currently opened document?
Hi Tom, you don't need the line: XPropertySet documentProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, document); Thus the import of XPropertySet can be omitted, too. On Fri, 11 Mar 2005 13:27:44 +0100, Tom Schindl [EMAIL PROTECTED] wrote: Ines Pfauch wrote: On 11.03.2005, at 11:10, Tom Schindl wrote: It would be great if you would summerize this small thread which showed us not to use the MediaDescriptor.html#URL to retrieve the URL form a document but instead the XModel in a small and tiny codesnippet. It's worth the time you saved by people helping to your solve problem ;-) OK. That is no problem. And thanks again for the help! :) Here is the codesnippet for getting the url of a current opened document: -- snip -- // XMultiComponentFactory xmcf = ... // XComponentContext ctx = ... Object desktop = xmcf.createInstanceWithContext(com.sun.star.frame.Desktop, ctx); XDesktop xDesktop = (XDesktop)UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, desktop); XComponent document = xDesktop.getCurrentComponent(); XPropertySet documentProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,document); XModel xmodel = (XModel)UnoRuntime.queryInterface(XModel.class,document); if (xmodel != null) String url = xmodel.getURL(); -- snap -- I meant something like this :-) http://codesnippets.services.openoffice.org/Office/Office.GetDocumentURL.snip - 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] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How can I get the url of the currently opened document?
Hi Kai, I tested this SB script... code Sub Main odoc = thisComponent odoc.storeAsURL(file:///C:/file1.sxw, Array()) msgbox odoc.getURL() odoc.storeAsURL(file:///C:/file2.sxw, Array()) msgbox odoc.getURL() End Sub /code and it does return the correct filenames. On Fri, 11 Mar 2005 16:44:13 +0100, Kai Sommerfeld [EMAIL PROTECTED] wrote: Hi, just a comment based on my personal experience with css.frame.XModel.getURL() implementation: The returned URL gets not updated after storing the document to a different name/location. I was told that it is best to use css.frame.XStorable.getLocation() in order to obtain the document's URL. XStorable is implemented by every OOo doc instance. Maybe somebody from the Framework team can comment on this. - Kai. Christian Junker wrote: Hi Tom, you don't need the line: XPropertySet documentProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, document); Thus the import of XPropertySet can be omitted, too. On Fri, 11 Mar 2005 13:27:44 +0100, Tom Schindl [EMAIL PROTECTED] wrote: Ines Pfauch wrote: On 11.03.2005, at 11:10, Tom Schindl wrote: It would be great if you would summerize this small thread which showed us not to use the MediaDescriptor.html#URL to retrieve the URL form a document but instead the XModel in a small and tiny codesnippet. It's worth the time you saved by people helping to your solve problem ;-) OK. That is no problem. And thanks again for the help! :) Here is the codesnippet for getting the url of a current opened document: -- snip -- // XMultiComponentFactory xmcf = ... // XComponentContext ctx = ... Object desktop = xmcf.createInstanceWithContext(com.sun.star.frame.Desktop, ctx); XDesktop xDesktop = (XDesktop)UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, desktop); XComponent document = xDesktop.getCurrentComponent(); XPropertySet documentProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,document); XModel xmodel = (XModel)UnoRuntime.queryInterface(XModel.class,document); if (xmodel != null) String url = xmodel.getURL(); -- snap -- I meant something like this :-) http://codesnippets.services.openoffice.org/Office/Office.GetDocumentURL.snip - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How can I get the url of the currently opened document?
That's because you need to query for the correct interface first, before you use such a method. In this case I would query the com.sun.star.frame.XModel interface and call the method getURL() on the returned object. In order to code in Java for OOo, you need to know about such things as queryInterface, and I suggest that you read the first chapters of the Developer's Guide which should explain this. -- Best Regards Christian Junker On Thu, 10 Mar 2005 13:46:47 +0100, Ines Pfauch [EMAIL PROTECTED] wrote: On 09.03.2005, at 13:20, Aidan Butler wrote: Hello, The URL of the document is stored as a property of the document component. The following python code will print the URL #ctx is the current context desktop = ctx.ServiceManager.createInstanceWithContext( \ com.sun.star.frame.Desktop, ctx ) document = desktop.getCurrentComponent() print document.URL Alternatively a document.getPropertyValue(URL) should do the trick Maybe I so something wrong but this does not work, when I try to convert it to java. I can understand the whole thing unto here: // XComponentContext ctx ... // XMultiComponentFactory f ... XDesktop desktop = (XDesktop)f.createInstanceWithContext(com.sun.star.frame.Desktop, ctx); XComponent document = (XComponent)desktop.getCurrentComponent(); But a document.getPropertyValue(URL) method does not exist. Please help me. - 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] OpenOffice.org Extensions - was Format for information file about templates and addons
Hi Ian, I am not a friend of licenses and I am not good at policies and stuff, but I think that the Programmer's Guide cannot be edited by you, because it is published under the Sun Microsystems flag. That means that you probably need to make an agreement with Sun first. Am I correct with this, Hamburg?? -- Best Regards Christian Junker On Mon, 07 Mar 2005 11:44:43 +1300, Ian Laurenson [EMAIL PROTECTED] wrote: On Fri, 2005-03-04 at 21:58, Jürgen Schmidt wrote: Ian Laurenson wrote: On Thu, 2005-03-03 at 21:49, Jürgen Schmidt wrote: [snip] Sure, the new SDK provides makefiles for creating UNO packages (both component packages and script/library packages). I also have the first running ant scripts and ideally would be an integrated wizard in NetBeans and/or Eclipse. [snip] While it would be good to be able create UNO packages from external IDEs, to me it would be even better if it were possible within OpenOffice.org. I assume you mean that it would be nice to export Basic libraries as UNO packages, right? Not just Basic libraries, my wish list includes: any graphics that are being used, the associated help files, Python components, the xcu file. [remainder snipped] Thanks, Ian - 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] Menu control
Hi Matthias, I do ask myself, why those interfaces are deprecated. Why not removing them completely? a) from source code (I searched with ximian lxr and there was no single implementation I found about XMenu) b) from documentation (IDL Reference) -- Best Regards Christian Junker On Fri, 04 Mar 2005 09:07:52 +0100, Mathias Bauer [EMAIL PROTECTED] wrote: Christian Junker wrote: I remember some time ago, that it had been discussed that OOo 2.0 will provide functional interfaces that haven't been functional yet in any way (XMenu, XMenuListener) and probably add some more interfaces that make menus accessible via API. We don't use XMenu etc., those interfaces remain deprecated. The new API is much more abstract. I'm afraid the documentation is still not ready. Maybe we can provide some example code on the framework project Website. Now that the first beta candidate has been released, I would like to know if that is possible yet. I tried putting information together and working it out for 1.9.m79 but I did not succeed. I think that there is a lot of request in this area, since it would improve customization of OOo's GUI a lot and make it possible for developers around the world to create their own OOo looks (of course there are tight boundaries, but as of yet it is not even possible to disable certain menu entries in the main menu as far as I know) without having to hack portions of the huge source code and repackaging their own oo distributions. For complete customization of menu it is still recommended to use XML files. The new API for menus is a dynamic way to change the menu at runtime, f.e. to extend it for components added to the installation. 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] Code snippets ....
Absolutely Jürgen, as you know there are others that don't have much time, as well :(. I also have the strong feeling of wanting to have one place where useful macros, that are asked a whole lot on oooforum.org periodically, are listed. Right now it seems like pieces can be found here and there, lying scattered around, which is confusing to many people, because they usually don't know all those sites. This feeling gets stronger and stronger because I try to help people on oooforum but very often it's the same questions that are asked and I feel like a coffee machine producing the same coffee every single day. quote The upcoming MS Office Developer Studio will come with a bunch of code snippets for often used API's. /quote Is there someone here that will get this Studio or already has it? I think we could all gain from the competitor what kind of snippets they have. Finally, I think UNO and OO API are very powerful buildings and one of the main strengths of the OpenOffice suite giving users an immense possibility of programmatic control - let's omit menu control right now - and in my opinion the OO API is far ahead of the MS Office API. Thus it's even more important to show the real strengths of OO to the people out there that think of switching to OpenOffice or that will be impressed by how much automation can be put into OpenOffice. Best Regards Christian Junker Jürgen Schmidt wrote: Hi, we have started some time ago with our code snippet base where Tom Schindle did a great work and also Paolo Mantovani who created the code snippet wizard. I would like to invite all of you to submit code snippets for often used API's or often asked questions. I think it so important to have a good base of code snippets which helps people to solve their problems fast or simple get started. I have promised that i will submit one snippet per week and i must apologize that i haven't reached my personal goal but i will work on it when i have time ;-) The upcoming MS Office Developer Studio will come with a bunch of code snippets for often used API's. Everything is well integrated and the user have only to click here and there, fill in some gaps (controlled navigation from gap to gap) and has then a working macro. We will probably not reach this kind of IDE integration but we can provide a good code snippet base. And of course it is possible to take this code snippets, convert them all to Java for example and create an extension for NetBeans or Eclipse. Any volunteers here? - Juergen - 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] OpenOffice.org Extensions - was Format for information file about templates and addons
How about updating the StarOffice 7 Programmer's Guide. I think this is the no.1 tutorial on Starbasic/OpenOffice Basic and could get an update, I think. By update I mean not just possible corrections but also extending the guide with a few more examples. Best Regards Christian Junker Jürgen Schmidt wrote: Hi Ian, Ian Laurenson wrote: On Thu, 2005-03-03 at 21:49, Jürgen Schmidt wrote: [snip] Sure, the new SDK provides makefiles for creating UNO packages (both component packages and script/library packages). I also have the first running ant scripts and ideally would be an integrated wizard in NetBeans and/or Eclipse. So if there are any volunteers who are familiar with one of the IDE'S and who are willing to investigate some time in this please let me know. I have a lot of ideas but didn't find the time until now. While it would be good to be able create UNO packages from external IDEs, to me it would be even better if it were possible within OpenOffice.org. I assume you mean that it would be nice to export Basic libraries as UNO packages, right? [snip] Where can I find the updated Developers Guide for OOo2.0? It can be found in the Beta SDK and will be published soon on api.openoffice.org Just checking that my understanding is correct: At the moment the updated Developers Guide for OOo2.0 is in the Beta SDK, which is not yet publicly available? I think it will be available this week. I am keen to help with the updated Developers Guide for OOo2.0 - is there anything that I can do now? No, not for this version, but you are welcome to review the guide and feedback is always welcome. As we all know the Devguide is probably more for core developers. I would like start the work on some shorter tutorials, for example 5 pager for add-ons in Java and one for C++. I think we need more documentation concentrating on certain aspects. Thanks Juergen [Remainder snipped] Thanks, Ian - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CDbl function
The one distributed with Fedora heidelberg. I have not set the LANG environment variable however, so I guess it only happens then (I set the locale under ToolsOptionsLanguage Settings). Best Regards Christian Junker Davide Dozza wrote: Christian Junker wrote: Hi Sevastian, I tested your piece of code for OOo 1.1.2 - locale setting german - on Fedora Core 3 and it didn't print 0 but the correct value 0,3. Do you have the vanilla distribution of OOo or the one distributed with Fedora? Davide - 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] small problem with starbasic in OOo 1.1.x
Hi Peter, should have tested this (again it shows that you should always test something before you give advice). I thought again about your problem and if your script does not run all the time but only sometimes I would propose the following to you: Either you create a dialog, or which is little bit more complicated a modular window (with the windowdescriptor service), that pops up when the macro begins its execution. In that time the user is caught in this one dialog (I would put an explanatory text like Please wait until the progress finishes... and if you want to make it professional you add some progressbar or some animation or whatever so that the user is occupied at least with something). The important thing is that the dialog itself has been disabled which means that it is not closed when the user presses the X button that you can see for every window on popular platforms. You do that by setting the enabled property in the dialog properties to the value off. Of course the macro shouldn't take too long, because a normal user probably would get angry when he clicks on the window to close it but it doesn't :). I know this is not a very user-friendly thing, but look around in other programs: They also sometimes show dialogs like Please wait... when they need to process a lot of data. Best Regards Christian Junker Peter Eberlein wrote: Hi Laurent, hi Christian, Laurent Godard schrieb: Hi, I can only agree with Laurent, the second way by locking the controllers would be the best option, I think. That way you can be very sure that your macro gets executed from beginning to end without any disturbance. for me this does not work like expected. LockControllers only disables writing into document and the toolbar buttons, not the menubar and shortkeys (1.9.74 WinNT). Peter - 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] small problem with starbasic in OOo 1.1.x
Hi Peter, please read on! What can be done is to assign the macro to the receiving focus event, this event gets fired when the macro is started, so it is fired right at the beginning. Build the dialog in the Basic IDE, do define the property enabled as Yes. Thus code structure should look like this: 1.) load dialog library, createunodialog, execute dialog (thread starts) - dialog pops up and receiving focus event is fired, the assigned function is called 2.) dlg.setEnable(False) - user cannot close the dialog 2.) do everything you wanted to do now with the document (=implementation) 3.) at the end call dlg.setEnable(True) and then dlg.endexecute() - the dialog vanishes, the user can now work on with the document, control flow of the Starbasic code goes back to the .execute() statement and continues from there on (in the standard case the next line would just be End Sub or End Function). Note, that dlg should be a global variable as it is propably used in not just one function. Best Regards Christian Junker Peter Eberlein wrote: Christian Junker schrieb: and I forgot: Once the macro has finsihed you call endExecute() on the dialog and it should return to the document again. Christian, when the dialog is executed and shown on the screen, the macro stops (sleeps) at this point until the user triggers any event (pushs a button), doesn't it? That means, the user must trigger the main function (disabling the dialog, showing the progress bar, doing all the other things and ending execute the dialog). But that's not what Christian Anderson wanted. Peter - 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] small problem with starbasic in OOo 1.1.x
I can only agree with Laurent, the second way by locking the controllers would be the best option, I think. That way you can be very sure that your macro gets executed from beginning to end without any disturbance. Best Regards Christian Junker Laurent Godard wrote: Hi christian, Is there some way that I can (in script or config) tell OOo to not close the document before the script has finished i see 2 ways : - declaring a listener on the document closing event. Don't sure it suites totally your nee - lock OOo until your script has finished ThisComponent.lockControllers - save - modify ThisComponent.unlockController Then the user won't be able to close the document has the GUI is frozen for user interactions HTH laurent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] storing textrange to a stream
Hi Marc, the xmlcontent is what it says it is :). It's simply a string automatically put together in another function that builds up a simple xml structure. But as you're dealing with objectoutput and not textoutput you wouldn't write strings into your file but dump actual OpenOffice objects into it. Best Regards Christian Junker On Fri, 04 Feb 2005 02:44:08 +0100, Marc Santhoff [EMAIL PROTECTED] wrote: Am Fr, den 04.02.2005 schrieb Christian Junker um 01:21: Hi Marc, yes that is possible. Hi Christian, wow, that loks promising, thank you. Although it'll take some time for me to understand and adapt to my needs, there's one question left at once, see inline: I will give you some code that will show you how to deal with xml outputstreams (it's actually pretty similiar to Java's API): snip fileAccessService = createUnoService(com.sun.star.ucb.SimpleFileAccess) textOutputStream = createUnoService(com.sun.star.io.TextOutputStream) If fileAccessService.exists(SaveFileName) Then If fileAccessService.isReadOnly(SaveFileName) Then IOStreamXML = -2 Exit Function End If End If 'now open the file.. outputStream = fileAccessService.openFileWrite(SaveFileName) outputStream.truncate() textOutputStream.setOutputStream(outputStream) textOutputStream.writeString(xmlcontent) What type of thing is this xmlcontent? That's the missing link to the documents content, I think. :) 'Close the Xml File, no writing possible anymore textOutputStream.closeOutput() 'msgbox xml saved under: SaveFilename '[dbg] /snip Don't worry about the If statements and what is happening in there, because I took this code fragment out of a bigger macro that I have written. You can see that I use the [...]io.TextOutputStream, you would need to apply the [...].io.ObjectOutputStream service of course. I hope that the code is enough to give you the start. The IDL reference, the Developer's Guide - and in case you need advanced information about data sinks etc. the udk project page - should give you enough information to write a good working implementation. Hope this helps in some way. Best Regards Christian Junker On Thu, 03 Feb 2005 16:01:25 +0100, Marc Santhoff [EMAIL PROTECTED] wrote: Hi, is there any chance of storing arbitrary writer text snippets (mostly TextRange ojects) into an OutputStream (or to a TextOutputStream represented as XML)? Think of autotexts that are streamed away instead of being stored in any container file while not losing formatting ... TIA, Marc - 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] - 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] starting the OOo-help without API
Hi Arne, I have found several UNO dispatches that probably can invoke displaying the OpenOffice Help, possibly also specific help components (writer, calc ...). How these dispatches are launched is explained in the Developer's Guide. In short: You simply use the DispatchHelper service and invoke the executeDispatch() method which takes some arguments. The dispatch commands are listed in the slots.sxc, that you can download from the Documents Files section of the api project page; just search through all sheets for the keyword help and you should find good results. The description given for those dispatch commands is generally pretty low so testing them is very important. I wish you good luck, I didn't test any of the several help dispatches I found but if I have some time again I will take a look, except until then your problem has been solved. Best Regards Christian Junker On Thu, 3 Feb 2005 17:20:33 +0100, Bock, Arne [EMAIL PROTECTED] wrote: Hello, is there any possibility to start the OOo-SWriter-help from a Java-application without using the OOo-API? I have the problem/challenge that I want to start this helpViewer from a JavaHelp-Window which does not know anything about the 'rest' of the application (inlcuding the OOo-bean). I know that I could make it knowing exactly that, but this is not what I want. If someone has an idea or even experiences with that kind of stuff, please let me know! Arne - 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]