Re: OpenOffice API Programming
You can create Macros in Basic and tie them to toolbar icons or keyboard short cuts. You can also create an extension with a menu item. On 03/09/2016 03:31 PM, Michel wrote: Good day everyone, I'm interested in programming a little extension for OpenOffice, especially Impress. But currently I'm not sure which language would be the best one to achieve my goals and realize the ideas I have. Just quick: * creating a new little button in impress' GUI that can be pressed by the user o a new small window will appear and display some informations, like the current slice's elements position on the slice and so on I'm doing some research in the online documentary of OO's API, but after all I'm not even sure if this is possible using just an extension and without messing around with OO's source code. Thanks for your replies! Michel - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Set property of selected cell range in a textable in Writer
First, you need to understand what is returned when you get the current selection and then you need to check for it. For example: Nothing selected or multiple text ranges: com.sun.star.text.TextRanges ne or more cells selected in one block: com.sun.star.text.TextTableCursor So, you must inspect what is returned and then make changes based on that For example: Sub WhatIsSelected Dim oSel Dim oneSel Dim i As Long oSel = ThisComponent.CurrentCOntroller.getSelection() 'Inspect oSel If oSel.supportsService(com.sun.star.text.TextRanges) Then For i = 0 To oSel.getCount() - 1 oneSel = oSel.getByIndex(i) If oneSel.supportsService(com.sun.star.text.TextRange) Then If NOT IsNull(oneSel.Cell) Then ' You have a cell here ' If actually select stuff, it will probably look like ' there is one more selection than you really have. ' One for each selected range and one for the current cursor ' location (I think). ENd If Else Print what is this thing 'Inspect oneSel End If Next ElseIf oSel.supportsService(com.sun.star.text.TextTableCursor) Then 'Inspect oSel 'Can you set what you want on the entire range at once? ' I think that you can, I do not think that you must enumerate the cells. End If End Sub Hope this helps On 07/08/2015 06:44 PM, Hung Mark wrote: Hi, I didn't express very clearly. What I want to do is to set WritingMode property for all the selected cells. I did use MRI to explore APIs, but I was stuck in the middle. To Mathias, When selecting multiple cells, WritingMode of the first cell changed. The remaining cells didn't In contrast, ParaAdjust of all paragraphs in all the selected cells are changed. To Bernard, It seems that I can't even call getByIndex() on my selection. 2015-07-09 1:12 GMT+08:00 Bernard Marcelly marce...@club-internet.fr: Hi Mark, You should use Xray to help you explore the API. All my indications here can be found by a study of what Xray displays (and then reading of API docs). - You can find if your selection is inside a paragraph of a cell, and then find the cell and its table: Dim firstSelection As Object Dim currentCell As Variant, currentTable As Variant firstSelection = oCurrentSelection.getByIndex(0) currentCell = firstSelection.Cell if not IsEmpty(currentCell) then currentCell.WritingMode = com.sun.star.text.WritingMode2.TB_RL currentTable = oCurrentSelection.TextTable else MsgBox(First selection is not in a table) end if - A table has a property WritingMode. Perhaps it can set WritingMode to all cells at once (not tested). - Enumerate all cells of a table : the table has method getCellNames() that returns an array of all the cell names. Regards Bernard Hung Mark a écrit le 2015-07-08 13:52 : Hi Mathias, While invoking setPropertyValue for ParaAdjust works, it is a Paragraph property instead of a cell property. Sub ModifyCells Dim oCurrentSelection As Variant oCurrentSelection = ThisComponent.getCurrentSelection() oCurrentSelection.setPropertyValue( WritingMode, com.sun.star.text.WritingMode2.TB_RL ) ' doesn't work oCurrentSelection.setPropertyValue( VertOrient, com.sun.star.text.VertOrientation.BOTTOM ) ' doesn't work oCurrentSelection.setPropertyValue( ParaAdjust, com.sun.star.style.ParagraphAdjust.RIGHT ) ' works oCurrentSelection.setPropertyValue( ParaBackColor,RGB(100,0,0) ) ' works End Sub - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php
Re: STOP SENDING TRASH
It is more likely that she is subscribed, but, that will not show in the TO field. I think that this is Victoria and her specialty, although highly technical, is not related to computers. Seems like an odd list for her to have subscribed to, so not sure how it occurred. Victoria, remember that what you write to this list is a public mailing list so that everyone can see what you write. Please forward an email with full headers so that a list admin can see the headers and know what email address was actually used to send the email to you. If you do not know how to do that, then respond back to the list and indicate what email software you use. On 01/08/2015 03:32 PM, Johnny Rosenberg wrote: Maybe one of the many subscribed users accidently (or by purpose…) created an email filter that automatically forwards all email from the list to you…? I don't have a clue, I am, just like most people on this list, just one of the users. I doubt that there is any company involved in this list at all, but maybe I'm wrong. I wouldn't possibly know. Anyway, maybe it's not that good idea after all to have mailing lists. Maybe a web forum would be better? Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ 2015-01-08 20:57 GMT+01:00 Disaster First Aid cont...@disasterfirstaid.com : I have already done that, and can do that again, but IT WONT HELP BECAUSE I NEVER SUBSCRIBED! ARE YOU ALL DEAF, DUMB, AND BLIND? HOW MANY TIMES MUST I TELL YOU THE SAME THING!!! When I do this as you advise, it simply tell me I AM NOT SUBSCRIBED! I have never knwingly subscribed to this, and if there is some vestige of some website visit I ever made, you must DELETE it. This is what I keep telling you, and why I keep writing you as I get more and more and moreof these emails that you are sending top other [people! All sorts of other people!More new ones evey day are coming to my mailbox and I can't seem to fet through to you. YOU MUST FIND WHERE THIS ADDRESS IS HIDDEN IN YOUR SEND FUNCTION AND REMOVE IT! YOU MUST STOP SENDING THESE OTHER PEOPLE'S EMAILS TO ME!!! STOP IT NOW. YOU ARE THE ONLY PEOPLE WHO CONTROL THIS, YOU ARE THE SENDER. YOU MUST STOP SENDING OTHER PEOPLE'S EMAILS TO ME!!! On Jan 8, 2015, at 11:30 AM, Ariel Constenla-Haile arie...@apache.org wrote: On Thu, Jan 08, 2015 at 11:05:55AM -0800, Disaster First Aid wrote: You really have got to stop this. [...] You are getting those mails because you have subscribed to this mailing list. To unsubscribe, send an e-mail from the same address you are subscribed to api-unsubscr...@openoffice.apache.org and follow the instructions. Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: loadComponentFromURL - Solaris 11 OO 3.3
Given all of the lists that you copied, I assumed that you were not subscribed so I copied you directly. Please respond to the list rather than me directly so that others will see your response... On 01/15/2014 07:00 PM, Steele, Raymond wrote: Hello, I have OpenOffice 3.3 installed and running on my Solaris x86 system. Things run under normal user experience, but if I run a custom application it fails on loadComponentFromURL(private:factory/scalc, _blank, 0, loadProps). This code works fine on a Solaris 10 system running OO 3.3. Here is some of the stack trace that java produces. I am unclear on what you are saying since you say things like this code works fine and here is a stack trace. Are you saying: (1) You have code that works on one computer but not on another (2) this code always fails If (1), then there is a problem with your installation or a bug in OOo. If (2), your code is probably wrong. What language did you use? Basic, Java, C++? My guess is Basic, but your claimed error seems wrong for that. If (1) then there is probably a problem in Java version, linked libraries, or similar. If (2), have you tried a simple version written in Basic? Can you show a few lines before and after the one line that causes the problem. This is not even an entire line of code (since loadComponentFromURL is a method on the desktop object). Would be nice to see how loadProps is declared and what it contains. Register to memory mapping: EAX=0x090bbe40 is an unknown value EBX=0xfe762000: _GLOBAL_OFFSET_TABLE_+0 in /libc.so.1 at 0xfe60 Stack [oxddc51, 0xddd4f000], sp=0xddd4c520, free space=1005k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.1] t_delete+0x41 C [libc.so.1] realfree+0x5e C [libc.so.1] _malloc_unlocked+0x1d2 C [libc.so.1] malloc+0x38 C [libxml2.so.2] xmlXPathNewParserContext+0x28 C [libxml2.so.2] xmlXPathEval+0x92 C [libunoxml.so+0x81131] Any help would be greatly appreciated. Also, I had to type this stack trace so I only provided what I thought was pertinent. Please let me know if you need more. Thanks, Raymond Steele -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: EXTERNAL: Re: loadComponentFromURL - Solaris 11 OO 3.3
No worries regarding the confusion, language is generally imprecise :-) Disclaimer: I have never used Java to manipulate OO. That said, your explanation sounds plausible, and my mostly uninformed opinion is that you are correct. Hopefully another more familiar person can provide a workable solution. On 01/21/2014 02:03 PM, Steele, Raymond wrote: Thanks for the reply and I apologize about the confusion. If I use OpenOffice as a regular user, the applications work just find (i.e. writer, database, etc.), but if I attempt to run any code that I've written in Java that uses the loadComponentFromURL method, the application crashes with the below stack trace. Also, compiling and running of FirstLoadComponent.java located in sdk/examples/DevelopersGuide/FirstSteps results in the same.If I install OpenOffice 3.3 on a Solaris 10, not Solaris 11 as in this case, the applications run fine. I presume there is a conflict with the libraries. Specifically, the libxml.so.2 libraries, which already exist in my /usr/lib (installed by other Solaris applications). It appears that OpenOffice requires the libxml.so.2 located within the /opt/openoffice.org directories instead of the one installed by the Solaris apps. If I change my LD_LIBRARY_PATH to include the one openoffice requires, I then get other library references out of sync. Raymond -Original Message- From: Andrew Douglas Pitonyak [mailto:and...@pitonyak.org] Sent: Tuesday, January 21, 2014 6:49 AM To: api@openoffice.apache.org; Steele, Raymond Subject: EXTERNAL: Re: loadComponentFromURL - Solaris 11 OO 3.3 Given all of the lists that you copied, I assumed that you were not subscribed so I copied you directly. Please respond to the list rather than me directly so that others will see your response... On 01/15/2014 07:00 PM, Steele, Raymond wrote: Hello, I have OpenOffice 3.3 installed and running on my Solaris x86 system. Things run under normal user experience, but if I run a custom application it fails on loadComponentFromURL(private:factory/scalc, _blank, 0, loadProps). This code works fine on a Solaris 10 system running OO 3.3. Here is some of the stack trace that java produces. I am unclear on what you are saying since you say things like this code works fine and here is a stack trace. Are you saying: (1) You have code that works on one computer but not on another (2) this code always fails If (1), then there is a problem with your installation or a bug in OOo. If (2), your code is probably wrong. What language did you use? Basic, Java, C++? My guess is Basic, but your claimed error seems wrong for that. If (1) then there is probably a problem in Java version, linked libraries, or similar. If (2), have you tried a simple version written in Basic? Can you show a few lines before and after the one line that causes the problem. This is not even an entire line of code (since loadComponentFromURL is a method on the desktop object). Would be nice to see how loadProps is declared and what it contains. Register to memory mapping: EAX=0x090bbe40 is an unknown value EBX=0xfe762000: _GLOBAL_OFFSET_TABLE_+0 in /libc.so.1 at 0xfe60 Stack [oxddc51, 0xddd4f000], sp=0xddd4c520, free space=1005k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.1] t_delete+0x41 C [libc.so.1] realfree+0x5e C [libc.so.1] _malloc_unlocked+0x1d2 C [libc.so.1] malloc+0x38 C [libxml2.so.2] xmlXPathNewParserContext+0x28 C [libxml2.so.2] xmlXPathEval+0x92 C [libunoxml.so+0x81131] Any help would be greatly appreciated. Also, I had to type this stack trace so I only provided what I thought was pertinent. Please let me know if you need more. Thanks, Raymond Steele -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: trouble with program that i cant figure out
Couple of comments: First, the API list is probably not the best list for such a question. I recommend that you use the user's mailing list (see http://openoffice.apache.org/mailing-lists.html) You can subscribe by sending an email to : users-subscr...@openoffice.apache.org You can then send questions here: us...@openoffice.apache.org When you subscribe to a mailing list, you receive email for all questions and answers, not just yours, so, you may receive a lot of email (20 to 100 per day). If you do not subscribe, you will not see the response unless the person responding knows that you are not subscribed and chooses to copy their answer to you personally. On the API list, since you are not subscribed, your email to the list will not go to the list until a moderator approves your email, so it can be delayed for a long time until a moderator does this. If you join the forum, you can do this without receiving a bunch of email https://forum.openoffice.org/en/forum/ Now, I have some concerns with your question. One of my concerns is that you state that you purchased OpenOffice. You can download OpenOffice for free http://www.openoffice.org/ Verify your version of OpenOffice. The latest version is 4.0.1 I believe. If your version says LibreOffice rather than OpenOffice, that would be useful to know. On 01/04/2014 10:08 AM, B.D. M. wrote: downloaded email document but when opened it is a bunch of symbols and unreadable. what is the problem and how to correct. I purchsed openoffice because my computer didnt have microsoft word or excell, and for the most part openoffice is working just fine but can't read anything from my email downloaded. I have gone to help but can't get answer.( help) also i deleted a file by mistake, can i get it back, how. I tried to look up this in help but could not find answer. Thank You What, exactly, do you mean? Do you mean that you received an email message that contains a document and you attempt to open the attached document? I will assume you do mean this. If not, well, I just wasted your time and mine! :-( A few questions for you, that may allow you to answer your own question. 1. How do you read your email? Are you using web mail? I see that you have a hotmail account, so, I assume that you are reading your email using a web browser. 2. How do you try to open the document? Do you save the document and then use File Open from OpenOffice, or, do you simply double click on the document while running your email program? If you are NOT saving the file to disk, especially if you are using your web browser, try saving the file to your local computer and then use File Open to open the file. 3. What is the document's file extension? I think that the file must have the correct file extension for OpenOffice to open it. As an example, it might end with .doc, .docx, or .odt. If you have a file encoded as DOCX, then it must have the .docx file extension (someone jump in if I am mistaken). I hope that this helps a little. -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: *.docx
On 09/26/2013 06:11 AM, K.Misha wrote: I distribute OpenOffice in Ukraine. A lot of people ask me if OpenOffice will be working with *.docx extension. Will be? I had expected docx writing in AOO on this next release based on comments shortly after 4.0.0 was released, but I have not seen the ability to write a docx file on the feature list yet. If they need to write docx, they might want to try LibreOffice, which currently supports reading and writing. Current versions of AOO does support reading docx files. Correct me if I am wrong please (I require docx writing capabilities). -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Find\replace in writer
On 09/26/2013 01:20 AM, Ariel Constenla-Haile wrote: On Wed, Sep 25, 2013 at 04:31:52PM +0300, K.Misha wrote: Hello! What interface i need to use to find\replace text in writer documet? Search and Replace in text documents is described in the Developer's Guide: http://wiki.openoffice.org/wiki/Documentation/DevGuide/Text/Navigating#Search_and_Replace Regards If you are using Basic, I have examples of this in AndrewMacro as well as OOME (both available as downloads from my web site). -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: *.docx in OpenOffice 4.0
On 09/26/2013 09:50 AM, K.Misha wrote: Hi, Andrew. OpenOffice4.0 opens *.docx format. Yes, but it does not WRITE the docx format. I should have emphasized that it reads DOCX formats, and that the capability has been improved for the latest release. Thanks for the clarification for my sloppy writing :-) And if we will watch MRI Uno object inspector tool we will see that Args is: Name stringFilterName Handlelong 0 Value any MS Word 2007 XML State .beans.PropertyState DIRECT_VALUE Value is MS Word 2007 XML. I will test OpenOffice4.0 if it can work with *.docx(writing in this format) and reply to you. Maybe it will be useful for you and other people who use OO SDK. p.s: Language: MS Visual Studio (C++); -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org