Re: [sc-dev] R + Calc Update
Niklas -- I'll focus on UNO components then. There will definitely be dialogs and visual guides for people, but I've been focusing on functions because I'd like to build something that can use any function in R, sort of like a very basic scripting process that can send anything to R and get the results back. The GUI could then use this function, rather than be confined to a dialog. Kohei -- Yes, I found your article incredibly useful - it was actually the first thing I read when I started exploring the OpenOffice source code. If I learn more new things, I'll write some more. Thanks, Wojciech On 5/2/07, Kohei Yoshida <[EMAIL PROTECTED]> wrote: On Tue, 2007-05-01 at 23:55 -0400, Wojciech Gryc wrote: > A little off-topic now, but I wrote an article for the wiki on adding > functions to the Calc code: > http://wiki.services.openoffice.org/wiki/Hacking_Calc_-_Adding_Functions Cool! I'm actually glad to see someone did read my article, and decide to write a sequel. :-) The topic is good. We need more articles like that - articles that are focused more on hacking the core than just the UNO stuff. Kohei - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Five Minutes to Midnight: Youth on human rights and current affairs http://www.fiveminutestomidnight.org/
Re: [sc-dev] R + Calc Update
On Tue, 2007-05-01 at 23:55 -0400, Wojciech Gryc wrote: > A little off-topic now, but I wrote an article for the wiki on adding > functions to the Calc code: > http://wiki.services.openoffice.org/wiki/Hacking_Calc_-_Adding_Functions Cool! I'm actually glad to see someone did read my article, and decide to write a sequel. :-) The topic is good. We need more articles like that - articles that are focused more on hacking the core than just the UNO stuff. Kohei - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sc-dev] Re: [sc-dev] There is a new crashbug!
毛勇岗 wrote: > Thank you very much for you reply. > As you said,regarding this crash issue,I should be how to modify in the next > step. > What can I do? I hope to get you hits. Thank you! There are two possibilities: 1. Prevent the file from being opened as CSV. This is what the filter detection is supposed to do, but it doesn't work with the special-case code you found already. Changing this would probably require help from the framework people. 2. Try to find what's going wrong when displaying the resulting strings, OutputDevice::DrawTextArray and below. It could then still take a long time to open the file, with the long mixed-script cells. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: [sc-dev] Re: [sc-dev] There is a new crashbug!
Niklas wrote: >So Calc tries to load the the MPEG file as CSV (text) file. As far as I >can see, the problems are from the display of the resulting strings in >the filter options dialog. >Your change would probably break the use of valid CSV files with unknown >extensions in the same situation again (issue 60158). >Calc's filter detection service already contains logic to reject CSV >files that have null bytes in unexpected positions, but in this >"workaround" case, the filter is selected without calling its detection >service. Maybe that can be changed, but generally, the filter detection >code can be quite fragile. I'm cc'ing the framework list. Thank you very much for you reply. As you said,regarding this crash issue,I should be how to modify in the next step. What can I do? I hope to get you hits. Thank you! Best Regards, Yonggang
Re: [sc-dev] Re: [?? Probable Spam] Re: [sc-dev] There is a new crash bug!
毛勇岗 wrote: > Thank you for your suggestions. > As you said I analyzed the call stack. And in the SfxMedium* > SfxApplication::InsertDocumentDialog(sfx2\source\appl\appopen.cxx), > sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, FALSE ); > if ( nError == ERRCODE_NONE && pFilter ) > pMedium->SetFilter( pFilter ); > else >DELETEZ( pMedium ); > when insert a *.mpeg, the "nError == ERRCODE_NONE && pFilter " always is > true.Then the program crash. > If I change > sRealType = ::rtl::OUString::createFromAscii("calc_Text_txt_csv_StarCalc"); > To: > sRealType = ::rtl::OUString::createFromAscii("writer_Text_encoded"); > in TypeDetection::impl_checkResultsAndAddBestFilter(...) > (filter\source\config\cache\typedetection.cxx), The bug will be fixed. > I'm looking forward to your advice! So Calc tries to load the the MPEG file as CSV (text) file. As far as I can see, the problems are from the display of the resulting strings in the filter options dialog. Your change would probably break the use of valid CSV files with unknown extensions in the same situation again (issue 60158). Calc's filter detection service already contains logic to reject CSV files that have null bytes in unexpected positions, but in this "workaround" case, the filter is selected without calling its detection service. Maybe that can be changed, but generally, the filter detection code can be quite fragile. I'm cc'ing the framework list. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sc-dev] R + Calc Update
Kohei Yoshida wrote: You may have already seen it, but there is also the scaddins module where you can add new functions. This module was there originally to ease addition of new cell functions without touching the Calc core, but I don't know if this module is actively used today (Niklas?). I wouldn't bother with this scaddins module though. I'd go with the UNO add-in component approach. The scaddins module is still used and contains functions that are included in the default installation. But, as mentioned, the R integration probably doesn't need any functions. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sc-dev] R + Calc Update
Wojciech Gryc wrote: 1. Using the wiki, I learned how to modify current functions, and exploring the code shows me where add-ins are placed and how they look. I was wondering, however, where do function names get stored? Again, I see the interpX.cxx but those function names are not the same as the ones I call from Calc -- how does Calc know what to call? I guess what I am trying to get at is, how can I add functions to Calc through the source code? All the tutorials I've found are for add-ins. 2. From your perspectives, should this be considered an add-in or directly coded into the "sc" folder? Is there any other area of the source code I should be working in? The whole thing should be a UNO component (unless it has to do something that can't be done in a component). I don't think cell functions are the right approach anyway. From a user's point of view, I was thinking of a menu entry, then some user interface (dialogs) to select the calculation and data, and the results ending up as values (and possibly graphics, but not formulas) in the spreadsheet. This can all be handled by a "normal" component without using the add-in interface. 3. Any thoughts on the TCP/IP versus package-to-OO communication mentioned above? I think it might be a bit beyond the scope of the summer project, but I'd be happy to try to tackle it if there's interest. TCP/IP for the sake of distributing across machines is certainly beyond the scope of the project. But I'd still like to see some kind of integration that doesn't force the component under GPL. The first idea was to pass command line arguments to a separate process, but a local TCP/IP connection might be an alternative. I just finished my last exam for this school year on Friday at 4 pm, so I'll be working on this pretty much full-time now. You can expect to hear a lot more compared to what you've been hearing so far. :) Great. Niklas (The past few days have been quiet from Hamburg because May 1st is a holiday, and most people took Monday off, too) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]