Hello, I'm currently working about improve the scanner use for ooo mac porting. After few hard time to compile and have a look about previous solution I have some question about scanner implementation in ooo and the best way to realize my project.
** How works scanner in ooo ** To resume shortly, there is a generic class : ScannerManager define in scanner.hxx (extensions/source/scanner). There is different kind of method : Xinterface wich probably define the interface (if I understand well). XscannerManager, all this method will be define for each OS (for windows you can find the definition in scanwin.cxx) Xbitmap which manage the bitmap object you get after the acquisition. Again this method are define for each OS. And some misc method which are define in scanner.cxx Finally we have a XScannerManager to use a scanner with the normal method for an Xobject : queryInterface, acquire and release. ** A first solution to use scanner with MacOs ** My first idea was to use the same way than scanwin. But we should use a controller and a view write in Objective-C wich are using Cocoa. So we need two file ScanMacController and ScanMacView (with the .h and .mm corresponding). For the Controller we have already a good start with the Cocoa example. After we just need to write a scanmacos file with the definition of ScannerManager (XScannerManager and Xbitmap). With the small problem to convert a NSBitmap object in a Xbitmap. I tried a little bit this solution, but at this time I have some difficult to compile the ScanMacController with dmake. My objective-C method doesn't compile because : "ld:Undefined symbols". ** Anoter solution ** My second idea is to write a component in Objective-C. It looks more easy. I would like write XScannerManager in a componant. So it need only to write the method from ScannerManager. But can we overwrite an existing interface with a componant ? I imagine we can probably define during the compilation to use the component instead of the normal Interface for macos. At this time I try to make the example with the counter ( http://wiki.services.openoffice.org/wiki/Constructing_Components) in Objective-C instead of C++. Do you think it's a better way than before ? ** To conclude ** It's stille quite dark in my mind. It's defenitly hard to involve in the OpenOffice.org API. So I probably some big stupid things previously, but if you can give me some hints, or give some good link to help you're welcome ! I'm writting a page on my wiki about this two way : http://wiki.valeuf.org/WayToSolveScannerUse Thanks for your reading. Bye PS : I think I get a problem with my mail client, so you probably received an half version of this mail previously, I'm sorry for the spam. -- Valentin JANIAUT Etudiant à l'U.T.B.M. 06 99 10 94 57 Blog : http://www..valeuf.org/
