Re: [api-dev] No more lck file with HSQLDB Base ?
Hi, Issue 97032 has target OOo 3.1 and indicated as verified fixed in CWS dba31h. Now, dba31h_OOO310 is integrated into OOO310m2 but the problem is still here : no lock file when opening an odb with integrated hsql database. Was the patch forgotten ? Regards Bernard Message de Frank Schönheit - Sun Microsystems Germany date 2008-12-08 20:38 : HI Bernard, I am playing with DEV300m37 on Windows XP. I found that when I open a table or form in a Base document using internal HSQLDB, no xxx.lck file appears. In the same situation (same Base doc) in OOo 3.0 the .lck file does appear. Is it intentional ? That's not intentional, and most probably a regression of the update to HSQLDB 1.8.0.10, which happened in DEV300m30. The problem is now known as issue 97032, thanks for finding it! Perhaps related to Issue 93381 ? Not at all. Ciao Frank - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] solver in calc: non-linear optimization program
Hello there, I am a mechanical engineer, retired now, and use OpenOffice under Debian Lenny. Sometimes I use an optimizationprogram I have used all my live when in business, to find solutions in my technical work. It could handle all the non-linear problems I have encountered. The program is pretty old, about 30 years. It is free software now, written in Fortran, although I had it translated to Turbo Pascal. The TurboPascal version I still use. The program (MINI) is rather small, about 800 lines of code. It can handle constrains, can handle any amount of variables and is fast (nowadays!). I have both the the sources of course. You may have it, but I can not give much assistance, I am not a programmer. I can explain how it works, give examples and so on. I live in the Netherlands, perhaps there is someone in our country who can do the job of putting it into Calc. Kind regards, arend harrewijne 040 7074136 - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] solver in calc: non-linear optimization program
On 02/20/09 11:01, arend harrewijne wrote: I am a mechanical engineer, retired now, and use OpenOffice under Debian Lenny. Sometimes I use an optimizationprogram I have used all my live when in business, to find solutions in my technical work. It could handle all the non-linear problems I have encountered. The program is pretty old, about 30 years. It is free software now, written in Fortran, although I had it translated to Turbo Pascal. The TurboPascal version I still use. The program (MINI) is rather small, about 800 lines of code. It can handle constrains, can handle any amount of variables and is fast (nowadays!). I have both the the sources of course. You may have it, but I can not give much assistance, I am not a programmer. I can explain how it works, give examples and so on. I live in the Netherlands, perhaps there is someone in our country who can do the job of putting it into Calc. I'm not in the Netherlands, but I'm very interested in that code. We do have an API in Calc for solver extensions, and a colleague is just now working on a different implementation, so we could also try to adapt your code to that API. Are you willing to submit it under the Contributor Agreement (see bottom of http://contributing.openoffice.org/programming.html)? Niklas - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] Synchronous XDocumentIndex update, XRefereshable refresh, XStorable storeToUrl
Hi, I insert a Table of Contents into an Xmodel, ContentIndex service represented by XDocumentIndex interface. Then I call XDocumentIndex.update(). Is the update absolutely synchronous? Is there a listener I can use to make sure the update is finished? I also call XRefreshable.refresh(). Is refresh synchronous or do I have to use a XRefeshListener? I later call XStorable.storeToUrl. Is storeToUrl also synchronous? Is there a store listener I can use? Thank you very much, Daniel - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
RE: [api-dev] How to attach new Model to old Controller
Hi Mikhail, Thank you for your explanations. With regards to the Controller not closing the Model on loadTromUrl, I would rather the bug stay in because the workaround is very easy and I do not know how you would keep a Model alive and detach it from its Controller if you could not do it this way. It is a step towards orthogonality. Unless the Frame creates both a Controller and a Model on loadFromUrl and just Closing the Model after the load keeps a Controller in limbo somewhere, there is no harm done by having to dispose the replaced Model afterwards, but it opens the door to greater flexibility. Regards, Daniel -Original Message- From: mikhail.voite...@sun.com [mailto:mikhail.voite...@sun.com] Sent: February 20, 2009 4:58 AM To: dev@api.openoffice.org Subject: Re: [api-dev] How to attach new Model to old Controller Hi Daniel, On 02/20/09 02:49, Daniel Brosseau wrote: Hi Mikhail, Frank, Thank you again. since it would allow returning more information (and thus would have saved you the question, since you would have got a message saying not allowed for this implementation). As an extreemly minor point: I got a return of false and not not allowed for this implementation :) I have tried loading at the Frame level. I get the Frame by first loading a _blank component from the Desktop's XComponentLoader and then moving up from the XComponent's XModel to the XController to the XFrame. I then get the XFrame's XComponentLoader to load subsequent URL's into the Frame. The load replaces the previous Model but does not close it This is a bug. I have just written a small basic script to test this, and indeed in case a document is loaded as hidden one, the controller does not close the model. In case of visible documents it works well, the model is closed. Could you please write a bug to me. so I close the previous Model after the Frame is loaded with the new URL. If I do not close the previous Model, the memory usage in soffice.bin increases continuously with each load. Yes, a model has to be closed to end the objects lifetime. This is designed so, because the complex system of objects let cycle dependencies appear. And since the controller erroneously does not try to close it in this case, it stays open. In these circumstances your workaround to close the model after it is replaced in the frame is absolutely correct. After the mentioned above bug is fixed it will not be necessary any more. You can implement the workaround so that it is ready for DisposedException. If controller closes the model after the fix, the next try to close it will throw the exception ). This scheme is definitely much more stable than anything I tries before. Thanks :) Glad that it helps :) If I close the old XModel before the load of the new URL I destroy the whole Model-Controller-Frame structure. It is designed so. When a model of a frame is explicitly closed, it means that the document is closed. Since the model is still attached to the structure, the whole structure is closed. From other side if the frame is closed it disposes the controller. And the controller should close the related model if it is the last view of the document. I have tried to use XDesktop.terminate() at the end but this hangs or crashes so I just dispose the Xdesktop through it's XComponent interface. That is not correct. To shutdown office per API the terminate() call should be used. Please see the following link for details. http://wiki.services.openoffice.org/wiki/Documentation/DevGuid e/OfficeDev/Using_the_Desktop The fact that the call let office crash/hang is a problem. The developers guide mentiones that modified documents might be a problem in this case. Please try to set all remaining documents to nonmodified state before terminating and probably close them. Please also check that the call is done in the main thread. If not, please try the workaround to let it be triggered from the main thread that I have posted yesterday. Anyway, could you please send the crash when it crashes next time. You could use crashreporter for this, in this case it would be enough just to provide the crash ID to allow to find the stack. When I load a new URL I use the property ( Asynchron,false ). I am not certain this is required but I quess (you see I guess too) this uses the SynchronousFrameLoader service. Normally the loadComponentFromURL() should be always synchron. So this call should let the default scenario be used. Thank you both again, Daniel PS On the question of design, I guess my questions arose because as a recent re-comer to OpenOffice.org I concluded wrongly from the general tone of the API and the documentation that the Frame-Controller-Model paradigm was orthogonal and that each represented
Re: [api-dev] No more lck file with HSQLDB Base ?
Hi Bernard, Issue 97032 has target OOo 3.1 and indicated as verified fixed in CWS dba31h. Now, dba31h_OOO310 is integrated into OOO310m2 but the problem is still here : no lock file when opening an odb with integrated hsql database. Was the patch forgotten ? I re-opened the issue, and asked Ocke to investigate the problem. Thanks for the hint! Ciao Frank -- - Frank Schönheit, Software Engineer frank.schoenh...@sun.com - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] Xstorable.storeToUrl locks soffice.bin
Hi, In everything done in one main thread with no GUI, my program loadsFromUrl from the Frame a first ODT file and then appends one or more ODT files to this through a XTextCursor and XDocumentInsertable. After all files are appended I do a XRefreshable.refresh(). I then move to the beginning of the XTextDocument and insert a Table of Contents, do another XRefreshable.refresh() and a XDocumentIndex.update which I retreived through a XServiceInfo. At this point I can do one of two things: i) print the document through a XPrintable with a property Wait of true and for belts and suspenders a XPrintJobListener and XPrintJobBroadcaster (I do not think I need this with Wait) Or ii) storeToUrl through a XStorable using the PDF filter writer_pdf_Export, Asynchron of false and Overwrite true. The program then loops back to the beginning and loadsFromUrl/Append/etc for another set of files ... (after the load I close the released Xmodel, but am I leaking a Controller which I should also close?) If all I do is print, the the program can handle several sets of files without a problem but if I storeToUrl then soffice.bin will typically hang after 1 to 5 stores. The specific set of loaded files that causes soffice.bin to hang varies from run to run but inevitably soffice.bin hangs. In the directory from which the files are loaded, I see Appear a file .~lock.fileName.ODT# where the fileName is the name of first file of the set that was loaded through loadFromUrl which corresponds to the XModel's URL property. Evidently, having soffice.bin hang is a problem. What I don't know is if i) it is a threading issue relating to synchronization of the store, the refresh or the update Or ii) their is a file lock taken out that soffice.bin is waiting to have released before continuing. Really what I would like to know is how to avoid the hanging soffice.bin. When soffice.bin hangs, it just sits there consumming around 20% of the CPU with no change to memory usage, bytes read or anything else. Any hints? Thank you, Daniel Brosseau - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Xstorable.storeToUrl locks soffice.bin
Hi Daniel, Really what I would like to know is how to avoid the hanging soffice.bin. Any hints? I have two ideas: 1. After doing an action like opening, printing, storing or closing, what happens it you let your main Thread sleep for half a second? This avoids some deadlocks in my case. 2. If you can reproduce the deadlock, can you strace it? I think it might be interesting for the OOo team. Good luck, Tobias - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org