Re: [dev] Making Jdialog Modal in Java Extension
Hii Marcin, thanks a lot. In our case its not a simple swing dialog, we are providing one JFrame dialog which consists of radioButtons,check-Boxes,some buttons etc. By using this dialog we take user inputs and use these inputs in OO dispatch method. We have already developed this all part using swing and its working fine expect modal. So now converting this all swing part to native will be relly more cumbersome. Would there be any other simple trick to make it modal? 2009/4/28 Marcin Miłkowski milek...@o2.pl Hi Dinesh, if this is just an information dialog, try with native OOo controls - it's quite cumbersome to make OOo dialog really modal. I don't know how we solved this in LanguageTool (the code was long removed as we're not using a Swing dialog to check text anyway) but this was some dirty trick. It's easier to get an information dialog using XMessageBox like this: ... final XMessageBoxFactory messageBoxFactory = (XMessageBoxFactory) UnoRuntime .queryInterface(XMessageBoxFactory.class, parentWindowPeer.getToolkit()); final Rectangle messageBoxRectangle = new Rectangle(); final XMessageBox box = messageBoxFactory .createMessageBox( winPeer, messageBoxRectangle, infobox, 0, Window Title, Some beautiful info); box.execute(); ... You get parentWindowPeer like this: final XModel model = (XModel) UnoRuntime.queryInterface(XModel.class, getxComponent()); final XWindow parentWindow = model.getCurrentController().getFrame() .getContainerWindow(); final XWindowPeer parentWindowPeer = (XWindowPeer) UnoRuntime .queryInterface(XWindowPeer.class, parentWindow); My getxComponent() looks like this: private XComponent getxComponent() { try { final XMultiComponentFactory xMCF = xContext.getServiceManager(); final Object desktop = xMCF.createInstanceWithContext( com.sun.star.frame.Desktop, xContext); final XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface( XDesktop.class, desktop); final XComponent xComponent = xDesktop.getCurrentComponent(); return xComponent; } catch (final Throwable t) { showError(t); return null; } } and you should already get XComponentContext-type variable (here: xContext) when initializing your class in OOo in Main(). Regards Marcin Dinesh Chothe pisze: Hello, I have been making one extension using java. In this I want to simply populate simple dialog with some message on menu items click event. I am able to get populate dialog but not getting it as Modal. Because dont know how to provide parent Dialog's object. JDialog d = *new* JDialog(parent); - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org -- Thanks and Regards, Dinesh
[dev] Making Jdialog Modal in Java Extension
Hello, I have been making one extension using java. In this I want to simply populate simple dialog with some message on menu items click event. I am able to get populate dialog but not getting it as Modal. Because dont know how to provide parent Dialog's object. JDialog d = *new* JDialog(parent); -- Thanks and Regards, Dinesh
[dev] Making Jdialog Modal in Java Extension
Hello, I have been making one extension using java. In this I want to simply populate simple dialog with some message on menu items click event. I am able to get populate dialog but not getting it as Modal. Because dont know how to provide parent Dialog's object. JDialog d = *new* JDialog(parent); -- Thanks and Regards, Dinesh
Re: [dev] Error while calling web service through openoffice extention
Hello, What are the things I need to do it working with OpenOffice2.3? On Wed, Oct 8, 2008 at 1:32 PM, Dinesh Chothe [EMAIL PROTECTED]wrote: Hello All,Firstly I apologize for making mistake in writing Exception error i.e. (Exception = com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class callWebService is not found. Have you run APT to generate them?) I thank you very much to Stephan Bergmann to focussing on class loader issue . By running my oxt which calls web service by using OpenOffice2.1, their is no such exception. I have been trying for 3-4 days to solve wrapped class not found exception. Thanks a lot. On Tue, Oct 7, 2008 at 4:57 PM, Stephan Bergmann [EMAIL PROTECTED] wrote: On 10/07/08 11:36, Dinesh Chothe wrote: Hello, I have been developing an extention using java1.6,net-beans6.1,jax-ws(Web Services),tomcat6. Firstly generated one web service by using netbeans6 which simply takes one string and returns string to client. Then created .war of same and deployed in tomacat web-apps. After this developed one simple java program which calls above created web-service.As successfully testing this java client, created its .jar file then added into openoffices add-on extention program. Then simpley called jar's method which calls web service. if ( aURL.Path.compareTo(CallWeb) == 0 ){ // add your own code here System.out.println(Calling Web Service-); Main m = new Main(); m.callWebService(lower caseee); } But while doing this it throws following exception. Exception = com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class callWebService is not found. Have you run APT to generate them? This *might* be the context class loader issue, see http://blogs.sun.com/GullFOSS/entry/is_your_java_extension_ready. -Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks and Regards, Dinesh -- Thanks and Regards, Dinesh P. Chothe Software Developer Binyas Information Technologies Kataria Chambers, 128/6 Sane Wadi, SBI Building, Aundh, Pune-40. Phone :- +91-20-410420001 Mobile:- +91-9881471876 E-mail:- [EMAIL PROTECTED]
Re: [dev] Error while calling web service through openoffice extention
Hello All,Firstly I apologize for making mistake in writing Exception error i.e. (Exception = com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class callWebService is not found. Have you run APT to generate them?) I thank you very much to Stephan Bergmann to focussing on class loader issue . By running my oxt which calls web service by using OpenOffice2.1, their is no such exception. I have been trying for 3-4 days to solve wrapped class not found exception. Thanks a lot. On Tue, Oct 7, 2008 at 4:57 PM, Stephan Bergmann [EMAIL PROTECTED]wrote: On 10/07/08 11:36, Dinesh Chothe wrote: Hello, I have been developing an extention using java1.6,net-beans6.1,jax-ws(Web Services),tomcat6. Firstly generated one web service by using netbeans6 which simply takes one string and returns string to client. Then created .war of same and deployed in tomacat web-apps. After this developed one simple java program which calls above created web-service.As successfully testing this java client, created its .jar file then added into openoffices add-on extention program. Then simpley called jar's method which calls web service. if ( aURL.Path.compareTo(CallWeb) == 0 ){ // add your own code here System.out.println(Calling Web Service-); Main m = new Main(); m.callWebService(lower caseee); } But while doing this it throws following exception. Exception = com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class callWebService is not found. Have you run APT to generate them? This *might* be the context class loader issue, see http://blogs.sun.com/GullFOSS/entry/is_your_java_extension_ready. -Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks and Regards, Dinesh
Re: [dev] Error while calling web service through openoffice extention
I am guessing, this exception is generating because of class callWebService is not found. The external jar which contains above class is also present in .oxt. On Tue, Oct 7, 2008 at 3:39 PM, Steffen Grund [EMAIL PROTECTED] wrote: Hello, I do not recognize the exception you get. Are you sure that all the additional jars/libraries you need for accessing the web service are also packed with the Add-On project. What you should try out is to add these jars/libraries also to the Add-On extension. But I'm really just guessing here. Regards, Steffen Dinesh Chothe wrote: Hello, I have been developing an extention using java1.6,net-beans6.1,jax-ws(Web Services),tomcat6. Firstly generated one web service by using netbeans6 which simply takes one string and returns string to client. Then created .war of same and deployed in tomacat web-apps. After this developed one simple java program which calls above created web-service.As successfully testing this java client, created its .jar file then added into openoffices add-on extention program. Then simpley called jar's method which calls web service. if ( aURL.Path.compareTo(CallWeb) == 0 ){ // add your own code here System.out.println(Calling Web Service-); Main m = new Main(); m.callWebService(lower caseee); } But while doing this it throws following exception. Exception = com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class callWebService is not found. Have you run APT to generate them? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks and Regards, Dinesh
Re: [dev] openoffice hangs in writer appln
Thanks for reply. Without loading my extension if I opens same document in OpenOffice doesn't create any problem. My extension firstly reads whole contents of doc line by line through moving cursor to end of document. In this case it is not creating any problem with small content(for eg 50 pages doc) but when it works with more than above limit it gets openofffice as not responding after some time. On Wed, Aug 6, 2008 at 1:04 PM, Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems [EMAIL PROTECTED] wrote: Hi, Dinesh Chothe wrote: Hello, I have developed one oxt using java and it works with OO writer. This oxt processes reads data from .doc files and converts its to other form. Now when I uses upto 50-60 pages doc file it works fine but when I use 100 pages doc file, openoffice hangs.My CPU using 2 GB Ram. Can you reproduce the hang without your extension loading the specific Microsoft Word document? If yes, please submit a corresponding issue and attach the Microsoft Word document, which causes the hang. Thanks, Oliver. -- === Sun Microsystems GmbHOliver-Rainer Wittmann Nagelsweg 55 Software Engineer - OpenOffice.org/StarOffice 20097 Hamburg Germany Fax: (+49 40) 23 646 550 http://www.sun.demailto:[EMAIL PROTECTED] --- Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering === Oliver-Rainer Wittmann (od) - OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks and Regards, Dinesh P. Chothe Software Developer Binyas Information Technologies Kataria Chambers, 128/6 Sane Wadi, SBI Building, Aundh, Pune-40. Phone :- +91-20-410420001 Mobile:- +91-9881471876 E-mail:- [EMAIL PROTECTED]
[dev] openoffice hangs in writer appln
Hello, I have developed one oxt using java and it works with OO writer. This oxt processes reads data from .doc files and converts its to other form. Now when I uses upto 50-60 pages doc file it works fine but when I use 100 pages doc file, openoffice hangs.My CPU using 2 GB Ram. -- Thanks and Regards, Dinesh
[dev] Removing link from program items
I have been building OOo2.3 from source using java for windows. At the lat step in building developed oo.exe which installs OO. While installing it has creating menu items for writer and calc in Program Menus(after click on Start in left hand corner of windows). How can we disable this creation of menu items? -- Thanks and Regards, Dinesh
Re: [dev] current cursor position in XTable
Hey I got the solution for getting current active cell in spreadsheet. Its as following... com.sun.star.sheet.XSpreadsheetDocument rSheetDoc = (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, m_xFrame.getController().getModel()); XMultiComponentFactory xMCF = m_xContext.getServiceManager(); Object desktop=null; try { desktop = xMCF.createInstanceWithContext(com.sun.star.frame.Desktop, m_xContext); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(); } XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, desktop); XComponent xComponent = xDesktop.getCurrentComponent(); XInterface doc = (XInterface)UnoRuntime.queryInterface( XInterface.class, xComponent ); XSpreadsheetDocument xSheetDocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, doc); XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xSheetDocument); XCell xCell = (XCell) UnoRuntime.queryInterface(XCell.class,xModel.getCurrentSelection()); xCell is the current active cell in spreadsheet. On Thu, Jul 10, 2008 at 11:45 AM, Dinesh Chothe [EMAIL PROTECTED] wrote: Hello *Andrew ,* * I *have been using java as programming language so I have not found any CurrentSelection() method associated with xSpreadsheet object. The example you have provided seems to really good but I have not found any such using java. oOldSelection = ThisComponent.CurrentSelection What is ThisComponent in above line, How would this in using java? On 7/10/08, Andrew Douglas Pitonyak [EMAIL PROTECTED] wrote: If only one cell is selected, then you can simply obtain the CurrentSelection property from the document. Things are more complicated if you must worry about multiple things being selected... it looks like you can also grab the selection property from the current controller. If you want only the cell that contains the cursor, and you want to ignore the rest, you can tell the controller to select an empty range that was created by the document. The following subroutine does the following: 1.Save the current selection. This is useful if more than a single cell is active. 2.Select an empty range so that only the cell with the cursor is selected. The cell is selected with an outline around the cell, but it is not completely blacked out. If you use the controller to select a range, this method can also be used to change the selection from a completely selected cell, to merely an active cell. 3.Use the CellAddressConversion service to obtain the address of the active cell. This is new to 1.1.1, part of the linked controls implementation. Listing 2.12: Find the active cell. REM Author: Paolo Mantovani REM email: [EMAIL PROTECTED] Sub RetrieveTheActiveCell() Dim oOldSelection 'The original selection of cell ranges Dim oRanges'A blank range created by the document Dim oActiveCell 'The current active cell Dim oConv 'The cell addres conversion service REM store the current selection oOldSelection = ThisComponent.CurrentSelection oRanges = ThisComponent.createInstance(com.sun.star.sheet.SheetCellRanges) ThisComponent.CurrentController.Select(oRanges) 'get the active cell! oActiveCell = ThisComponent.CurrentSelection REM a nice service I've just found!! :-) oConv = ThisComponent.createInstance(com.sun.star.table.CellAddressConversion) oConv.Address = oActiveCell.getCellAddress Print oConv.UserInterfaceRepresentation Print oConv.PersistentRepresentation 'restore the old selection (but loosing the previous active cell) ThisComponent.CurrentController.Select(oOldSelection) End Sub Dinesh Chothe wrote: XTextViewCursorSupplier xViewCursorSupplier = ( XTextViewCursorSupplier )UnoRuntime.queryInterface ( XTextViewCursorSupplier.class, xTextDocument ); For getting current position from current document I did as above. Now while doing this same for spreadsheet it doesnt work by passing xSpreadsheet instead of xTextDocument. How would I access current active cell in spreadsheet? On Tue, Jul 8, 2008 at 5:26 PM, Andrew Douglas Pitonyak [EMAIL PROTECTED] wrote: Dinesh Chothe wrote: Hello, I want to get current position of cursor from documents XTable or XTextDocument also for calc I want to get current cells position. How do I? I am using OoSDK2.3 and java... I believe that the view cursor has a property TextTable and a property Cell. The cell has a property CellName. -- Andrew Pitonyak
Re: [dev] current cursor position in XTable
XTextViewCursorSupplier xViewCursorSupplier = ( XTextViewCursorSupplier )UnoRuntime.queryInterface ( XTextViewCursorSupplier.class, xTextDocument ); For getting current position from current document I did as above. Now while doing this same for spreadsheet it doesnt work by passing xSpreadsheet instead of xTextDocument. How would I access current active cell in spreadsheet? On Tue, Jul 8, 2008 at 5:26 PM, Andrew Douglas Pitonyak [EMAIL PROTECTED] wrote: Dinesh Chothe wrote: Hello, I want to get current position of cursor from documents XTable or XTextDocument also for calc I want to get current cells position. How do I? I am using OoSDK2.3 and java... I believe that the view cursor has a property TextTable and a property Cell. The cell has a property CellName. -- 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] -- Thanks and Regards, Dinesh P. Chothe Software Developer Binyas Information Technologies Kataria Chambers, 128/6 Sane Wadi, SBI Building, Aundh, Pune-40. Phone :- +91-20-410420001 Mobile:- +91-9881471876 E-mail:- [EMAIL PROTECTED]
[dev] localization of open office's installer
Hello, How do I change the installer's language to some other language? Should I have to go with getting source code then build installer by adding new language menus to installer script or there is another way to do this? -- Thanks and Regards, Dinesh
[dev] building source on linux and installer on windows
Hello, I am building open office2.3 from source using oo2.3 source, Ubuntu7.1. For building I am refering this site http://tools.openoffice.org/dev_docs/build_linux.html. By doing all steps given in above url I will get set up(setup.sh) file in this directory .../instsetoo_native/unxlngi4.pro/ Now how do I make installer(.exe) for windows XP using above compiled build ? -- Thanks and Regards, Dinesh
[dev] localization of open office's installer
Hello, How do I change the installer's language to some other language? Should I have to go with getting source code then build installer by adding new language menus to installer script or there is another way to do this? -- Thanks and Regards, Dinesh
[dev] disabling toolbar controls
I am developed one extension using java,oosdk etc. Through this added one menu item in open office's toolbar. Now clicking on this menu item one JFrame get open's and it does its part. This JFrame is build from sun.awt.swing's package. Now how do open office's toolbar get disabled when this JFrame get open's? Like JDialog box's modal when set as true it disables behind window's controls. -- Thanks and Regards, Dinesh -- Thanks and Regards, Dinesh P. Chothe Software Developer Binyas Information Technologies Kataria Chambers, 128/6 Sane Wadi, SBI Building, Aundh, Pune-40. Phone :- +91-20-410420001 Mobile:- +91-9881471876 E-mail:- [EMAIL PROTECTED]
[dev] Problem in extension development
I have been working with search and replaceall functions using java and OoSDK as following, XReplaceable xReplaceable = (XReplaceable) UnoRuntime.queryInterface(XReplaceable.class,xTextDocument); XReplaceDescriptor xRepDesc = xReplaceable.createReplaceDescriptor(); xRepDesc.setPropertyValue(SearchWords, new Boolean(true)); //for only replacement of exact complete words xRepDesc.setSearchString(¢›¸); //here I am giving only one char for replacement xRepDesc.setReplaceString(**); //replacing that char with another char long nResult = xReplaceable.replaceAll(xRepDesc); //here my all chars get replaced with specified above string But now problem is my all strings which has as setSearchString get replaces and also other strings which contains setSearchString as* sub string also gets replaced.* for eg. I wanted to replace this string - ¢›¸ replaces all this strings- 1. **£ú(R)¸µ¸ .. substring at start position also gets replaced. 2. ** .. this is only perfect replace. 3. ú‡œ¸ú‡** .. substring at end position also gets replaced. 1. how do achieve only perfect replace as search string? 2. Is there replaceFirst() method so that only first found string get replaced? 3. XReplaceable xReplaceable = (XReplaceable) UnoRuntime.queryInterface(XReplaceable.class,*xTextDocument*); Here can we use for only xTextContent or xTextRange or xTextPortion instead of *xTextDocument ?* * * -- Thanks and Regards, Dinesh
[dev] problem using search and replaceall methods
I have been working with search and replaceall functions using java and OoSDK as following, XReplaceable xReplaceable = (XReplaceable) UnoRuntime.queryInterface(XReplaceable.class,xTextDocument); XReplaceDescriptor xRepDesc = xReplaceable.createReplaceDescriptor(); xRepDesc.setPropertyValue(SearchWords, new Boolean(true)); //for only replacement of exact complete words xRepDesc.setSearchString(¢›¸); //here I am giving only one char for replacement xRepDesc.setReplaceString(**); //replacing that char with another char long nResult = xReplaceable.replaceAll(xRepDesc); //here my all chars get replaced with specified above string But now problem is my all strings which has as setSearchString get replaces and also other strings which contains setSearchString as* sub string also gets replaced.* for eg. I wanted to replace this string - ¢›¸ replaces all this strings- 1. **£ú(R)¸µ¸ .. substring at start position also gets replaced. 2. ** .. this is only perfect replace. 3. ú‡œ¸ú‡** .. substring at end position also gets replaced. 1. how do achieve only perfect replace as search string? 2. Is there replaceFirst() method so that only first found string get replaced? 3. XReplaceable xReplaceable = (XReplaceable) UnoRuntime.queryInterface(XReplaceable.class,*xTextDocument*); Here can we use for only xTextContent or xTextRange or xTextPortion instead of *xTextDocument ?* * * -- Thanks and Regards, Dinesh
[dev] Handling action listen in dialogbox
I am using java,Oo SDK and net beans for developing one writers extension. In which how do I call action listener on Xbutton which is in Dialog box. Can anyone help me how to handle button click events in Dialog box? -- Thanks and Regards, Dinesh E-mail:- [EMAIL PROTECTED]
[dev] xTextDocument clone
I am doing like this for creating text documents object, com.sun.star.text.XTextDocument xTextDocument =(com.sun.star.text.XTextDocument)UnoRuntime.queryInterface( com.sun.star.text.XTextDocument.class, m_xFrame.getController().getModel()); com.sun.star.text.XText xText = xTextDocument.getText(); Now I am processing this xText object and some contents from it. Then I wanted to use search() and replace() methods such that searching string from newer xTextDocument and replace on older xTextDocument. For this how do I create clone of xTextDocument? or any alternative way for doing this? -- Thanks and Regards, Dinesh
[dev] Query in writer search()
Hello, I am a Oo extension developer. I am developing one extension in which I would like to use some functionality like you used in altsearch extension. Like for find and replace of text I wanted to replace on the basis of specific font of original text. I also not interested in replaceall() method, just want to replace first found text. How can I achieve this? Is it possible to refer source code or any documentation of altsearch extension. -- Thanks and Regards, Dinesh
[dev] Data from cell of xTexttable
I want to retrieve text from cells of xTextTable for this when I have used this , xTextTable.getCellByName(cellNames[j]).getFormula()); I have got empty data. I also know that it only gives me formula if applied But How do I get text data from cell? -- Thanks Dinesh
[dev] Problem with search and replace in writer
Hello, I am using java and Oo Sdk(2.3) for development. I am working on search and replace functions. Firstly using following methods, // set a string to search for xRepDesc.setSearchString(random numbers); // set the string to be inserted xRepDesc.setReplaceString(replaced numbers); // replace long nResult = xReplaceable.replaceAll(xRepDesc); Now in this case my all strings in document get replaced but I want only replace* first or single* element like findFirst() in case of search and not all elements. How do I do this? -- Thanks and Regards, Dinesh
[dev] Oo writer's problem
Hello, I am developing writer based application using java,oo sdk and netbeans. In this application object has to travels from starting of document up to end of document. While moving it may come across different txt contents,images,tables,graphs etc... Now this object has to access only text contents its properties(like font,bold,size etc),it may from tables or graphs etc. After getting I am replacing it with some other text then it should be replace with at exact positions with as per its previous properties. Can anybody guide me for how to do this? -- Thanks and Regards, Dinesh
[dev] charset encoding information of Document
Hello, I am using Java and Oosdk for developing one application in which how do I get charset encoding information of Document and Spread sheet ? For eg. WINDOWS-1252 or UTF-8 or ISO-8859-1 Thanks and Regards, Dinesh
[dev] Problem in developing oo extension
Hello, I am developing one Oo extension using Oo2.4 ,java,NeBeans,Windows-Xp. By this I have added some menus to my OO menubar. Now by clicking on menu item I can able to access documents contents. How to access this text's font?Which method will give me this? How to replace some specific fonts text with other text? Can I able to access each word's Font? -- Dinesh
[dev] Font details of doc's text
Hello, I am developing one Oo extension using Oo2.4 ,java,NeBeans,Windows-Xp. By this I have added some menus to my OO menubar. Now by clicking on menu item I can able to access documents contents. How to access this text's font?Which method will give me this? How to replace some specific fonts text with other text? Can I able to access each word's Font? -- Dinesh
[dev] Small query in building .oxt
Hello, I am building one extension(.oxt) using netbeans and java. In which task using some external libraries (Dlls). So how do I include this external libraries while building oxt? ,so it can be work on any machine. -- Dinesh
Re: [dev] dll integration with open office
On Wed, Mar 12, 2008 at 1:10 PM, Mathias Bauer [EMAIL PROTECTED] wrote: Dinesh Chothe wrote: Hello, I am developing one extension application using open office.org2.3, open office sdk(2.3), java 1.6,Linux(ubuntu),vc++ dll. In this application I added menu items to menu bar and its click event accessed selected text from doc in one String. 1. Now how do I pass this text to dll and get return text? If I understand correctly, you want to implement a command callable from a menu and this command should get some text as a parameter and should return some new text, right? The good news is that the whole thing can be packed into an extension, without any need to change the OOo source code at all. First you should understand the concept of the Dispatch Framework a bit (it's explained in the Developer's Guide). In this concept you will also find how you can add new commands in extensions. The code bound to the command will be provided by an object called protocol handler and some Dispatch objects it creates. The protocal handler is initialized with the Frame object it is working on (representing the view anc controller pair it contains). From this object you can get access to the current selection. The selection allows you to retrieve the current content as well as to change it. Yes. I have seen all this from developers guide. Now after getting contents in object how to pass it to VC++ DLL? How OO objects handles VC++ DLL's methods? 2. How to integrate dll with open offices extension? XModel xModel = ( XModel ) UnoRuntime.queryInterface( XModel.class, xDoc ); XController xController = xModel.getCurrentController (); XTextViewCursorSupplier xTVCSupplier = ( XTextViewCursorSupplier ) UnoRuntime.queryInterface( XTextViewCursorSupplier.class ,xController); XTextViewCursor xTVC = xTVCSupplier.getViewCursor(); docText=xTVC.getString(); From here (doctext) I accessed selected text from doc now this text I want to pass to dll and get back return string. As described above, you should access the ViewCursor or the SelectionSupplier via the Frame object. Best regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to [EMAIL PROTECTED]. I use it for the OOo lists and only rarely read other mails sent to it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dinesh P. Chothe INDICTRANS Computing in Indian Languages Mobile : +91 9850076045 Email : [EMAIL PROTECTED]
Re: [dev] Extension not working with open office separately
On Thu, Mar 6, 2008 at 4:05 PM, Robert Vojta [EMAIL PROTECTED] wrote: On Wed, Mar 5, 2008 at 7:51 AM, Dinesh Chothe [EMAIL PROTECTED] wrote: I have created one oo extension project using Netbeans. When I build and run this extension through Netbeans it works fine Does this mean that you click on Deploy and Run Extension in OpenOffice.org? --Yes. This has done through netbeans progect--right click--deploy and run application in open office. but after creating its .oxt file through Netbeans and building it through tools--Extension Manager in open office(2.3) not working. How did you create your extension (.oxt file)? Create OXT in project context menu? These steps are equivalent (in extension create install view) ... a) Create OXT and manual installation ( Tools - Extension Manager ) b) Deploy OpenOffice.org Extension c) Deploy and Run Extension in OpenOffice.org ... if not, it is probably a bug and should be reported. -- Yes I have tried all bove mentioned possible ways. Also my extension uses some java classes in which some functions are related with jdk1.6 library. For this I also set the jre1.6 in open office. By this I am getting an error while clicking on new menu item that ... Open office requires java run time enviornment. Selected jre is defective. Please select another jre... For this also I checked jre, it is selected properly under tools-optione- java--jre1.6 . How do I solve this problem? -- Robert Vojta - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dinesh P. Chothe INDICTRANS
[dev] Toolbar Combo box Addition
Hello, I have added one menu item to menu bar. When menu item gets clicked on it uses dispatch function to do some text conversion. Now how to add combo box in tool bar and use its item values in menu items dispatch function? -- Dinesh
[dev] Extension not working with open office separately
Hello, I have created one oo extension project using Netbeans. When I build and run this extension through Netbeans it works fine but after creating its .oxt file through Netbeans and building it through tools--Extension Manager in open office(2.3) not working. Only the new menu items get displayed in menu bar but after clicking on its functionality doesnt work. Please correct if I am going wrong any where Dinesh
[dev] Help in menu item functionality
I am working on project in which I want to add new menu item to menu bar then click on that menu item should do some functionality. For this I am using Net beans 6.1 with open office sdk API . Up till now able to added new menu item to menu bar then I want to get text from document and pass it another java program and get return from program and replace the selected text. 1. How do I get access selected text? From where I would get similar kind of sample programs ? I am going through developers guide, but it is quite difficult to understand for new Oo developers. -- Dinesh