Re: [api-dev] Re: OOo Basic Specification

2005-01-21 Thread Andrew Douglas Pitonyak
Curtis Clauson wrote: Jürgen Schmidt wrote: Hi Curtis, no, there is no specification available. Only the existing online help and the docu in the DevGuide. When you find bugs in both kind of documentation, you can easy help us by submitting an issue for the problem. The Community will owe it

Re: [api-dev] Python in 1.9.74

2005-01-29 Thread Andrew Douglas Pitonyak
Ian Laurenson wrote: I have put together a uno package that contains a Python component. The component uses the os module. The package installs and runs fine 1.1.4. In 1.9.74 (for Linux - Mandrake 10.1) I get the following error message when installing the package via: Tools Package Manager...

[api-dev] How to create a database in OOo 2.0?

2005-01-29 Thread Andrew Douglas Pitonyak
I am so close, I can smell it, but it does not work. Any comments on the steps that I am missing... I think that I need to set default keys and that sort of thing... The following macro tries to create a databsae document... Sub NewDB Dim sDBUrl As String 'URL of a New Database document.

Re: [api-dev] CDbl function

2005-03-07 Thread Andrew Douglas Pitonyak
Sevastian `seva` Foglia wrote: I found where problem is: environment variable LANG on linux. If LANG is [EMAIL PROTECTED] this macro Sub Main Dim sVal as String sVal = 0,30 print CDbl(sVal) End Sub return 0 If LANG is not set macro return correct value 0,3 Perhaps you should add this

Re: [api-dev] Problem with insertDocumentFromURL

2005-03-15 Thread Andrew Douglas Pitonyak
Cristian Fonti wrote: Andrew Douglas Pitonyak ha scritto: Cristian Fonti wrote: Hi to all, i have a problem using the method insertDocumentFromURL: when i use it to insert some formatted text (font size, font color,etc...) from another document, in the destination file appear at the top

Re: [api-dev] Page size and Page format

2005-04-13 Thread Andrew Douglas Pitonyak
Cristian Fonti wrote: Hi to all, what is the property in Java Api to set the Page size(A4,A3...) and the Page Format (Landscape,Portrait)/Allignment in a Writer Document??? I use this code: XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)

Re: [api-dev] hidden/show OpenOffice

2005-04-15 Thread Andrew Douglas Pitonyak
You might want to consider simply locking the controllers... :-) The XWindow interface should support the SetVisible(boolean) method. The problem is that if a document is loaded hidden, there are some things that are apparently NOT initialized so setting the document visible after loading might

[api-dev] Re: [users] 1.9.95 script calling Calc built-in functions

2005-04-25 Thread Andrew Douglas Pitonyak
The returned object is typically a global object, so if you dispose it, then you can not get a new one until you restart OpenOffice.org. I found this while playing with some database stuff. Jahn, Ray (R.) wrote: Thanks for the advice provided by Kohei. I found useful content in both the

[api-dev] Re: [users] 1.9.95 script calling Calc built-in functions

2005-04-27 Thread Andrew Douglas Pitonyak
Jahn, Ray (R.) wrote: Thanks to the explanation by Andrew Douglas Pitonyak and Mathias Bauer. Scope: global vs. local vs. any other Are all objects returned by CreateUnoService() global objects and therefore not to be disposed of by users? If the answer is dependent on the exact service requested

Re: [api-dev] Problems with Page Style

2005-04-28 Thread Andrew Douglas Pitonyak
No comment on use in Java, but Cristian Fonti wrote: Hi to all, i have a problem with the Api: I generate a new Writer document, with a Java procedure, with import others documents with the method insertDocumentUrl. Now, i would to use different styles for the header of right and left pages

Re: [api-dev] new text document from selction by API

2005-05-02 Thread Andrew Douglas Pitonyak
Marc Santhoff wrote: Hi, I need to make a new writer doc from another wroter docs selection. In this case the clipboard cannot be used because the target doc has to stay hidden (no dispatch with hidden docs). How can this be done? TIA, Marc Tricky! You might try something like save the document

Re: [api-dev] How to insert and remove annotation?

2005-05-31 Thread Andrew Douglas Pitonyak
Liao Yu wrote: Hi, We can hide and show annotations in a text document via OOo API, but how can we insert or remove one with API? Regards, Yu An annotation is just a text field, you can remove it as any other text field. -- Andrew Pitonyak My Macro Document:

Re: [api-dev] Sequence of Texttables

2005-06-14 Thread Andrew Douglas Pitonyak
Martin Thoma wrote: Hello! I have a text-document which contains some tables: Table1 (Named MyTable) Table2 (Named My 2nd Table) I copy+paste (executeDispatch) Table1 some times into the document: Table1 (Named MyTable) NewTable (Named Table 4) NewTable (Named Table 5) NewTable (Named Table

Re: [api-dev] Calc Outline and cell address

2005-06-26 Thread Andrew Douglas Pitonyak
I also was unable to find anything, and I did search and inspect... Laurent Godard wrote: Hi all, i play with calc Outline and experiences some troubles 1- on a sheet, using showDetail and hideDetail hideDetail works even if only the adresse one cell of the range is used as argument

Re: [api-dev] Re: newbie drawing question

2005-07-27 Thread Andrew Douglas Pitonyak
/// Thanks a lot. From: Andrew Douglas Pitonyak [EMAIL PROTECTED] Reply-To: dev@api.openoffice.org To: dev@api.openoffice.org CC: Senthilkumar Mehalingam [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [api-dev] Re: newbie drawing question Date: Wed, 11 May 2005 22:34:25 -0400 Yes

Re: [api-dev] Browsing the source code

2005-07-27 Thread Andrew Douglas Pitonyak
I typically download the source code and then I use a text search on the whole thing. Of course, the whole thing is more than 1GB I think, so on my computer, this can take a long time. Especially since sometimes I search for the wrong thing :-( Senthilkumar Mehalingam wrote: Hi All, I want

Re: [api-dev] Browsing the source code

2005-08-01 Thread Andrew Douglas Pitonyak
version had 116 cpp source files. Are the functions implemented in some other files having a different extension or am I making a mistake. I would appreciate any help. Sincerely Senthil From: Andrew Douglas Pitonyak [EMAIL PROTECTED] Reply-To: dev@api.openoffice.org To: dev@api.openoffice.org

Re: [api-dev] [CPHennessy] [users] Print order '4; 1; 2; 3'?

2005-08-13 Thread Andrew Douglas Pitonyak
Mathias Röllig wrote: Am 10.08.2005 09:47 schrieb Turbo Fredriksson: I don't know, why you would specifify the pageorder. If you print pages 1-8 with the 'brochure' option, you will get a 'book' with 8 pages in the right order. Also pages 9-16, 17-32 aso. Oki, so which variable do

Re: [api-dev] Active cell from selection

2005-08-13 Thread Andrew Douglas Pitonyak
Jayant Balraj Madavi wrote: Hi, I create a Range from Selection. how do I find the active cell ?? uno::Reference frame::XModel xModel( m_xDesktop-getCurrentComponent(), uno::UNO_QUERY );

Re: [api-dev] [CPHennessy] [users] Print order '4; 1; 2; 3'?

2005-08-14 Thread Andrew Douglas Pitonyak
Marc Santhoff wrote: Am Samstag, den 13.08.2005, 17:21 -0400 schrieb Andrew Douglas Pitonyak: Mathias Röllig wrote: [...] I think you need http://api.openoffice.org/docs/common/ref/com/sun/star/text/PrintSettings.html#PrintProspect greetings Mathias What

[api-dev] CSV file opens a write document

2005-11-04 Thread Andrew Douglas Pitonyak
I am writing an extensive database and macro document here: http://www.pitonyak.org/database/OOoBaseBinaryFields.odt I have a macro that demonstrates how to connect to flat files using macros. My macro generates the data, loads the data into a Calc document using the scalc: Text - txt - csv

Re: [api-dev] macro doesn't run

2005-11-11 Thread Andrew Douglas Pitonyak
In my opinion, yes. If you want the default behavior, then do not attache anything else to it, otherwise, do it all in your own code. Douglas Staas wrote: Ok, so due to the rescheduling of threads, sometimes an OK button's events get fired as expected and sometimes the dialog is closed

Re: [api-dev] macro graphics handling is wonky

2005-11-15 Thread Andrew Douglas Pitonyak
Douglas Staas wrote: Attached is my newest binder cover Draw file. It prompts the user for a client logo and it displays the image in 4 locations. Sometimes all 4 locations are updated, sometimes 1, sometimes 2, 3 or ever zero. When less then 4 locations are updated, you can save the file,

Re: [api-dev] disposing of macros

2005-11-15 Thread Andrew Douglas Pitonyak
Douglas Staas wrote: i'm reposting this question: What is meant by provide for disposal when the document is closed? Where could I find this in the documentation? Well, where did you read this? It is not possible to answer without context. No wait, I just ran a GOOGLE search on the

Re: [api-dev] disposing of macros

2005-11-15 Thread Andrew Douglas Pitonyak
I was able to extract one attachement from this email, so I took a look at it. I noticed a few unusual things. Consider the OK button. The OK Button is listed as type OK button, NOT as a default button. Because of this, when you click on the button, an event is automatically fired, that will

Re: [api-dev] disposing of macros

2005-11-16 Thread Andrew Douglas Pitonyak
Douglas Staas wrote: The button also has some events tied to things such as key press and mouse click. I have since changed this. I removed the event bindings and simply call the code like so: If oDialog.Execute() = 1 Then SetAllText() End If Also, you hit the nail on the

Re: [api-dev] macro graphics handling is wonky

2005-11-16 Thread Andrew Douglas Pitonyak
I appreciate being able to see some code :-) Still did not get enough sleep. I sent a birth anouncement by email to family and friends before going to bed and then I started to receive telephone call after telephone call until late into the night. So, my mind is a bit clouded. I sometimes read

Re: [api-dev] Strange effect when accessing TextCursor objects

2005-12-05 Thread Andrew Douglas Pitonyak
Alexej Kryukov wrote: Hi, in my projects I often have to iterate through text portions in OOo Writer text documents. So, when trying to adapt my older programs to OOo 2.0 I noticed the following strange problem. Let's take for example the following macro (which basically does nothing, just

Re: [api-dev] getFormDocuments() in StarBasic

2005-12-10 Thread Andrew Douglas Pitonyak
Daniel Brunner wrote: I am trying to get a reference to the forms related to a DataSource in StarOffice 8.0. How ca I transpose the following code snippet to StarBasic : public static void openFormInDesignMode(XMultiServiceFactory _rMSF) throws com.sun.star.uno.Exception {

Re: [api-dev] Integer Division?

2005-12-14 Thread Andrew Douglas Pitonyak
Felix E. Klee wrote: Am Mittwoch, 14. Dezember 2005 12:11 schrieb Laurent Godard: 11 \ 3 = 3 I couldn't find documentation for this operator in the online help (1.1.3). How come? or fix(11/3) Well this probably uses a floating point number as an intermediary, which

Re: [api-dev] How do I generate an Error?

2005-12-17 Thread Andrew Douglas Pitonyak
Felix E. Klee wrote: In the online documentation and in a book that I have at hand (Open Office Programmierung by Rene Martin) I find explanation for handling errors. But, what I'd like to know is: * How can I let my code *generate* errors? * If generating errors manually is possible, how

[api-dev] getData() and getDataArray() do not work on text tables.

2005-12-20 Thread Andrew Douglas Pitonyak
Should getData() and getDataArray() work on a text table? I tested this on windows and linux using 2.01 release candidates. Create a text document and add a single text table. Add some data to the text table. Use at least two rows and two columns. Now, run this macro Dim oTable oTable =

Re: [api-dev] How to apply a paragraph style to a XTextTableCursor?

2005-12-21 Thread Andrew Douglas Pitonyak
Peter Eberlein wrote: Hi, in a former StarOffice version the following worked properly: oTableCursor = oTable.createCursorByCellName(oTable.CellNames(0)) oTableCursor.ParaStyleName = MyStyle Contrary to a normal XTextCursor this does not work in 2.0 anymore. According to the api the service

Re: [api-dev] Optional Parameters in Starbasic function call

2006-01-02 Thread Andrew Douglas Pitonyak
Andrew Jensen wrote: Question, I attempted to write a function with the following declaration: function findCodeVal( RegDSName as String, _ TableName as String, _ SrchColName as String, _ SrchFor as variant, _

Re: [api-dev] Optional Parameters in Starbasic function call

2006-01-04 Thread Andrew Douglas Pitonyak
Laurent Godard wrote: Hi Bernard, The bug was reported in IZ 30500. In versions 1.1.x and 2.0.1 it is still not corrected and not even documented, so it should not have status RESOLVED and FIXED. perhraps reopen the bug and mark it as regression in keywords where are optional parameters

Re: [api-dev] Re: [users] Macro in 1.1.4 does not work in 2.0

2006-06-06 Thread Andrew Douglas Pitonyak
Miguel Quirós wrote: Thank you very much for your answer. As I told, I am not expert in writing macros and I am just using the things that I can see are used by the macro recorder (the dispatcher) and try to adapt them to my needs. From your answer, I deduce that there are methods easier to

Re: [api-dev] Re: [users] Macro in 1.1.4 does not work in 2.0

2006-06-08 Thread Andrew Douglas Pitonyak
Your welcome. Be certain to ask if you have other questions. Miguel Quirós wrote: El mar, 06-06-2006 a las 21:38 -0400, Andrew Douglas Pitonyak escribió: Miguel Quirós wrote: Thank you very much for your answer. As I told, I am not expert in writing macros and I am just using

Re: [api-dev] Mapping of the UNO type hyper in StarBasic

2006-06-22 Thread Andrew Douglas Pitonyak
Paolo Mantovani wrote: Hi Christian, sorry for my previous message. Alle 09:20, martedì 20 giugno 2006, Christian Junker ha scritto: Hi Paolo, I have the same problems as you have here. I guess there is no other way than using CreateUnoValue. [...] 2) using CreateUnoValue might

[api-dev] Best way to find or identify redline

2006-07-03 Thread Andrew Douglas Pitonyak
Assuming a simple text document, I can enumerate text sections. I thought that I could find red line text by checking for the RedlinePortion service, but I can not. The example below finds redline sections by checking for the existance of a specific property in the property set information

Re: [api-dev] Best way to find or identify redline

2006-07-03 Thread Andrew Douglas Pitonyak
And another question with redlines If I iterate over the redlines, how can I accept or reject them? Sub MainIterateRedLine Dim oDoc Dim oViewCursor Dim oContWin Dim oRedLines, oRedLine Dim k% Dim lRet As Long Dim sDum$ oDoc = ThisComponent oViewCursor = oDoc.CurrentController.ViewCursor

Re: [api-dev] Searching Tables or Cell Ranges in the Writer

2006-07-16 Thread Andrew Douglas Pitonyak
If you are using a macro to search, you can indicate where a search will begin. For example, you can specify that the search should start at the first position of the text object in the first cell of a table. Or, you could start searching from the last point before the text table begins. You

Re: [api-dev] Searching Tables or Cell Ranges in the Writer

2006-07-18 Thread Andrew Douglas Pitonyak
to get this working. Do you have an example? I want to tell the search to begin at an arbitrary table, first cell is perfectly ok for me. --- Andrew Douglas Pitonyak [EMAIL PROTECTED] wrote: If you are using a macro to search, you can indicate where a search will begin. For example, you can

Re: [api-dev] Set width of column in texttable in basic

2006-07-20 Thread Andrew Douglas Pitonyak
Download my free macro document and find section 8.7 titled Column Widths Martin Thoma wrote: Hello! I just want to set the width of a cell in a writers texttable (OO 2.0.2, Windows). I found this message http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=3446 and adapted it to basic:

Re: [api-dev] Apply Styles to Cell Range

2006-07-24 Thread Andrew Douglas Pitonyak
Kent Gibson wrote: Is there any way to apply a style to a range of cells in the writer? As far as I can see you have to extract the XText from every cell, create a cursor and then apply the style. no? Kent, you never mentioned what type of style that you want to set. In my free macro

[api-dev] LoadComponentFromURL using an XInputStream in Basic

2006-08-06 Thread Andrew Douglas Pitonyak
I am using OOo 2.0.3 on Linux FC4. I store a binary file into a database - Base document if it matters. First I tried to use a stream: oStatement.setBinaryStream(2, oStream, oStream.getLength()) The error message said that there was an error from the ODBC driver stating that the stream was

Re: [api-dev] LoadComponentFromURL using an XInputStream in Basic

2006-08-08 Thread Andrew Douglas Pitonyak
snip snip snip :-) It can be solved ... if you implement an UNO Service which accepts a Sequence sal_Int8 as IN parameter and returns an XSeekable/XInputStream as result. Such service can be used in Java, C++, Basic, Phyton etcpp. Currently I do not know if such help service still

Re: [api-dev] How can I concatenate a stream word collection

2006-09-07 Thread Andrew Douglas Pitonyak
aloizio wrote: Hi My goal is to store the merged document on a database as a byteArray. I am not being able to do this. Then I am trying to stored the merged document on disk and after moving it to the database. Do you know where I can find one example about this? In my current code I want

[api-dev] field value in header not related to view cursor

2006-09-07 Thread Andrew Douglas Pitonyak
I wrote a simple macro to create a text like representation of a Write document containing a header and/or footer with the current page number. The view cursor traverses the pages, extracting header, text, and footer. The interesting thing for me was that the header/footer content is static

Re: [api-dev] How can I concatenate a stream word collection

2006-09-08 Thread Andrew Douglas Pitonyak
I was never able to insert one document into another using a stream... I can open a document using certain types of streams (Never from a stream obtained from a database), but not insert (note that I use Basic). aloizio wrote: Hi I am able to store a document like a stream into database

Re: [api-dev] How to get paragraph from TextRange

2006-09-29 Thread Andrew Douglas Pitonyak
If you can create a text cursor from a TextRange, then you can use the ParagraphCursor to jump to the start and end of the paragraph. Julien Galand wrote: Does someone know a reliable way to get the paragraph containing a TextRange (let's say it's collapsed), beside of course enumerating all

Re: [api-dev] How can I insert a header only in the first page

2006-11-03 Thread Andrew Douglas Pitonyak
aloizio wrote: How can I insert a header that appear only in the first page of the document? I am using OpenOffice API, Java. You need to use a different page style for the first page and a different page style for the rest. You then enable the special header only in the first page page

Re: [api-dev] How can I insert a header only in the first page

2006-11-06 Thread Andrew Douglas Pitonyak
aloizio wrote: I don't understand styles well enough yet. Have you some example code? I have been working with OpenOffice API for three months. First, you need to know how to do this using the GUI. In other words, you must understand how styles work. After you understand styles and how to

[api-dev] Create simple toolbar in basic

2006-12-12 Thread Andrew Douglas Pitonyak
What are the basic steps to create a simple toolbar in basic? Assume, for example, that I desire a toolbar associated with Writer documents that supports commands such as next page, previous page, document start, etc... Must I create an addon? I assume no. If I wanted the toolbar in a

Re: [api-dev] Create simple toolbar in basic

2006-12-13 Thread Andrew Douglas Pitonyak
Carsten Driesner wrote: Andrew Douglas Pitonyak wrote: What are the basic steps to create a simple toolbar in basic? Hi Andrew, You don't need to create an add-on, but it would make life much easier if you just want to use built-in commands. No coding, just define the content of your

[api-dev] How update options/configuration without restart

2006-12-13 Thread Andrew Douglas Pitonyak
Use Tools Options OpenOffice.org calc General Press enter to move selection, and set a new value. Close the dialog, and the change is immediate. If I use the API, however, I must restart OOo before the change is seen. For example, Sub CheckConfigs Dim nodeArgs(0) As New

Re: [api-dev] How update options/configuration without restart

2006-12-13 Thread Andrew Douglas Pitonyak
Niklas Nebel wrote: Andrew Douglas Pitonyak wrote: If the MoveSelectionDirection is set to 0 (Down) using the GUI and then I use the macro to set the direction to 1 (Right), I must restart OOo to see the change. Well, the macro sees the change if I run the macro a second time

Re: [api-dev] Create simple toolbar in basic

2006-12-14 Thread Andrew Douglas Pitonyak
Carsten Driesner wrote: Andrew Douglas Pitonyak wrote: In your example, you have the following code, which works: If ( oModuleCfgMgr.hasSettings( sTBURL )) Then oModuleCfgMgr.replaceSettings( sTBURL, oTBSettings ) Else oModuleCfgMgr.insertSettings( sTBURL, oTBSettings ) End

[api-dev] getCellAddress() returns garbage

2006-12-21 Thread Andrew Douglas Pitonyak
Is the method getCellAddress() deprecated? I am not able to obtain valid results. For example, I ran the following macro on FC6 (with what ever came with the system, which means I am still on 2.04 with a fedora supplied build) Sub TestCellAddress Dim oCell Dim oAddress oCell =

Re: [api-dev] getCellAddress() returns garbage

2006-12-22 Thread Andrew Douglas Pitonyak
Cor Nouws wrote: Hi Andrew, Andrew Douglas Pitonyak wrote: Is the method getCellAddress() deprecated? I am not able to obtain valid results. For example, I ran the following macro on FC6 (with what ever came with the system, which means I am still on 2.04 with a fedora supplied build) Sub

Re: [api-dev] getCellAddress() returns garbage

2006-12-22 Thread Andrew Douglas Pitonyak
Laurent Godard wrote: Hi Andrew, Andrew Douglas Pitonyak a écrit : Is the method getCellAddress() deprecated? I am not able to obtain valid results. For example, I ran the following macro on FC6 (with what ever came with the system, which means I am still on 2.04 with a fedora supplied build

Re: [api-dev] Dialogs: OK button can't call macros?

2007-01-24 Thread Andrew Douglas Pitonyak
Johnny Andersson wrote: Hi again... 2007/1/24, Malte Timmermann [EMAIL PROTECTED]: This will return 0 for Cancel, something else (1) for OK. So if execute() doesn't return 0, do your stuff. One thing comes to my mind then: When dlg.execute() is finished (user clicked OK or Cancel), I

Re: [api-dev] Re: Variant vs other types...

2007-01-28 Thread Andrew Douglas Pitonyak
Johnny Andersson wrote: Maybe I should put it another way: Let's say that I have these lines, among others: Dim Ctl As Object Dim Doc As Object, Sheet As Object Dim A As String Dim OBDef As Double ' Or whatever, it doesn't seem to matter in this case, see further below...

Re: [api-dev] Re: Variant vs other types...

2007-01-29 Thread Andrew Douglas Pitonyak
Johnny Andersson wrote: 2007/1/29, Andrew Douglas Pitonyak [EMAIL PROTECTED]: What do you really want to accomplish? Do you want to copy a range of data from one location to another? If so, you can use methods to directly copy the data. I have used cheat methods such as oCellRange1.setData

Re: [api-dev] StarBasic - what to recommen and what to avoid?

2007-03-14 Thread Andrew Douglas Pitonyak
Your structs should pass by reference unless you purposely pass them by value. see http://www.pitonyak.org/oooconf/OOoConf_2004_Macro_Presentation.sxi so, passing these should not be a performance issue. Much will be determined by how many times things are called as to what you should really

Re: [api-dev] ImageURL in a UnoControlImageControlModel

2007-03-14 Thread Andrew Douglas Pitonyak
Fernand Vanrie wrote: Need to show Embeded Images in a UnoControlImageControlModel. Giving a normal URL to the ImageURL property works fine, but Internal URL's (from embedded Images) do not works Is there a workaround ? Can a internal URL been transformed to a normal URL ? Tryed to use

Re: [api-dev] extension's max supported OOo version

2007-03-24 Thread Andrew Douglas Pitonyak
Mathias Bauer wrote: Paolo Mantovani wrote: Hi, Alle 20:20, giovedì 22 marzo 2007, Frank Schönheit - Sun Microsystems Germany ha scritto: Hi Stephan, [...] I suppose one can think of more things which contribute to an extension's required environment, but are not

Re: [api-dev] Finding the actual integer value of a numbered paragraph?

2007-03-31 Thread Andrew Douglas Pitonyak
ian_mcr123 wrote: Hi, I'm working on an export filter for generating accessible HTML. I identify the html list properties by inspecting the numbering rules of a paragraph (so I find whether it uses Roman numerals etc.) and produce the corresponding HTML. Is it possible to identify the actual

[api-dev] Where did the code snippets go?

2007-04-02 Thread Andrew Douglas Pitonyak
Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- 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:

[api-dev] How to remove a shape from a Draw Page

2007-04-03 Thread Andrew Douglas Pitonyak
Michael, This is a very interesting question and I spent an hour or so and was not able to solve the problem. I am copying the dev mailing list to see if there are any clues there: The problem: Assume a draw document with a single shape selected. I want to delete the single shape. The code

Re: [api-dev] Where did the code snippets go?

2007-04-03 Thread Andrew Douglas Pitonyak
maintain the page. Juergen Christian Junker wrote: huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak [EMAIL PROTECTED]: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- Andrew Pitonyak My Macro Document: http

Re: [api-dev] How to remove a shape from a Draw Page

2007-04-04 Thread Andrew Douglas Pitonyak
Frank Schönheit - Sun Microsystems Germany wrote: Hi Andrew, not having an answer to your question, but ... Assume a draw document with a single shape selected. I want to delete the single shape. The code shown below obtains a reference to the selected shape from the current controller

[api-dev] A link to explain extensions to my Mother please

2007-04-04 Thread Andrew Douglas Pitonyak
I am writing a section for OOo documentation for publication that describes OOo Extensions (as in, what are they, how to import, and how to activate). The target audience is interested in creating macros using the macro recorder; and I have a lot of text regarding that complete with pictures.

Re: [api-dev] A link to explain extensions to my Mother please

2007-04-05 Thread Andrew Douglas Pitonyak
THANKS Juergen, this does help! I really appreciate it. Juergen Schmidt wrote: Hi Andrew, Andrew Douglas Pitonyak wrote: I am writing a section for OOo documentation for publication that describes OOo Extensions (as in, what are they, how to import, and how to activate). The target audience

Re: [api-dev] strange value of (ItemEvent).Selected

2007-04-09 Thread Andrew Douglas Pitonyak
As a signed value, this would be -1, which might mean that nothing was selected... just a guess. Mikael De Bie wrote: Hi, Using an ItemListener, I wanted to know if the action that triggered the listener was a selection or anything else. I don't find another way that to find the value of

Re: [api-dev] strange value of (ItemEvent).Selected

2007-04-10 Thread Andrew Douglas Pitonyak
Is this a 64 bit version, or the standard build? Stephan Bergmann wrote: Mikael De Bie wrote: On Mon, 2007-04-09 at 22:39 -0400, Andrew Douglas Pitonyak wrote: As a signed value, this would be -1, which might mean that nothing was selected... That's what I've guessed too, but the value I

Re: [api-dev] Replaceing selected text with Basic Macro

2007-04-17 Thread Andrew Douglas Pitonyak
Mathias Röllig wrote: Am 17.04.2007 11:45 schrieb Johnny Andersson: Is this what always happens or did I do something wrong? I think no (twice). I filed a issue: http://api.openoffice.org/issues/show_bug.cgi?id=76449 Greetings MRoe I replied to the issue, but I would have

Re: [api-dev] PageBreak in XTextTable

2007-06-19 Thread Andrew Douglas Pitonyak
Michael Jeier wrote: I have a long XTextTable in a writer document. How can I get the number of the row, where a pagebreak occurs? Thanks for your help. Regards, Michael I assume that you need to use the view cursor to count the lines. Ugly, I know, but I can think of no other way. --

Re: [api-dev] Question reg. Sound programming in Basic

2007-06-19 Thread Andrew Douglas Pitonyak
Cor Nouws wrote: Hi, I've functions in which quite often properties for controls are set. Thus I could do A) n times oCtrl = oDlgDoc.getControl(name) oCtrl.setSomething or B) n times SetMyControlProp (name) which calls Sub SetMyControlProp (sN$) oCtrl = oDlgDoc.getControl(name)

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-01 Thread Andrew Douglas Pitonyak
Volker Lenhardt wrote: How can I insert a sheet table from a text file (UTF-8) in Calc using Basic? I only find the dispatcher with uno:insert, but what is the syntax? I don't get any further than to get the dialog to insert a table, but I want to use an existing URL directly. Isn't there

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-02 Thread Andrew Douglas Pitonyak
Volker Lenhardt wrote: Andrew Douglas Pitonyak schrieb: Look at AndrewBase.odt. I discuss CSV files. The macro named ReadFixedWidthFile(), creates a CSV file and then reads it into a Calc document. You might find something of use... Thank you, Andrew, it helps me to open the file

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-02 Thread Andrew Douglas Pitonyak
Volker Lenhardt wrote: and got the GUI dialog to insert a sheet. Understandable, as I have no path mentioned. What is the syntax for doing so? When I looked for an API method I only got to insertNewByName([in] string aName, [in] short nPosition) There is no means whatever

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-02 Thread Andrew Douglas Pitonyak
REM * BASIC * Option Explicit Sub Main Dim oSheet oSheet = ThisComponent.getSheets().getByIndex(0) oSheet.link(file:andrew0/home/andy/foo.csv, _ Sheet1, _ Text - txt - csv (StarCalc), _ FIX,34,0,1,0/3/8/2/19/10, _ com.sun.star.sheet.SheetLinkMode.NORMAL) End Sub

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-02 Thread Andrew Douglas Pitonyak
Turns out I had an example in my book that snows how to link. Andrew Douglas Pitonyak wrote: REM * BASIC * Option Explicit Sub Main Dim oSheet oSheet = ThisComponent.getSheets().getByIndex(0) oSheet.link(file:andrew0/home/andy/foo.csv, _ Sheet1, _ Text - txt - csv

Re: [api-dev] Calc Basic Insert Table from text file

2007-07-03 Thread Andrew Douglas Pitonyak
Volker Lenhardt wrote: Andrew Douglas Pitonyak schrieb: Turns out I had an example in my book that snows how to link. Andrew Douglas Pitonyak wrote: REM * BASIC * Option Explicit Sub Main Dim oSheet oSheet = ThisComponent.getSheets().getByIndex(0) oSheet.link(file:andrew0

Re: [api-dev] Some Calc Java Macro Issues:

2007-07-05 Thread Andrew Douglas Pitonyak
I believe that I have code (Basic) and Calc as a simple database from my web site and now available from the documentation project in the Calc section. As for speed, can you set all the data at one time (or in large groups) using setData or setDataArray? Denis Camargo wrote: Hi. I really

Re: [api-dev] Should a key event listener be called for the Ctrl key?

2007-07-10 Thread Andrew Douglas Pitonyak
. Over-all, however, XRay is certainly a better object inspector. You should be able to install and use it with no problem. I consider it highly recommended. Zitat von Andrew Douglas Pitonyak [EMAIL PROTECTED]: My opinion is that this is a bug! I can ask on the dev mail list! Christoph Lupp

Re: [api-dev] Re: [gsl-dev] Re: [api-dev] Should a key event listener be called for the Ctrl key?

2007-07-10 Thread Andrew Douglas Pitonyak
Thanks for that excellent reply! (Philipp, I copied you on BCC to make certain you would receive my thanks even if you do not monitor the list). Philipp Lohmann wrote: Hi, Modifiers alone do not per se generate a key event in vcl for years but a specialized KeyModChange (modifier changed)

[api-dev] Insert a Draw document into a gallery

2007-07-17 Thread Andrew Douglas Pitonyak
OOo has very little clipart. I was asked to write a macro that will create OOo clipart galleries from existing folders of clipart. I figured out how to insert links from a URL oTheme.insertURLByIndex(sURL, 0) I figured out how to insert the object as a graphic Dim oProvider

Re: [api-dev] Vá: Insert a Draw docum ent into a gallery

2007-07-18 Thread Andrew Douglas Pitonyak
import odg files. The UI of gallery does not support to add odg and sxd files (interesting? - the gallery supports many formats but not the default OpenOffice.org formats)... Are there any way to import odg files via API? Best regards, KAMI Andrew Douglas Pitonyak [EMAIL PROTECTED] 07/18/07 5:57

Re: [api-dev] Insert a Draw document into a gallery

2007-07-20 Thread Andrew Douglas Pitonyak
It is possible to add a Draw document to a gallery? I tried oTheme.insertDrawingByIndex(oDoc, 0), which looks like it should work based on the API, but it does not work. http://www.pitonyak.org/OOoGalleryImport.odt I traced things to this code in svx/source/unogallery/unogaltheme.cxx

Re: [api-dev] Vá: Insert a Draw docum ent into a gallery

2007-07-25 Thread Andrew Douglas Pitonyak
: Andrew Douglas Pitonyak [EMAIL PROTECTED] 07/18/07 1:59 du. Worst case: I will see if I can read the SVG and then export it as a different graphic type and then add that to the gallery. If we can run a different command line to convert all SVG files to something else, however

Re: [api-dev] Open Office VBA porting? or leave as it is?

2007-07-30 Thread Andrew Douglas Pitonyak
Simon B. Margulies wrote: Hi all, I'm still evaluating open office as the new solution for my parents tax software, which has been built in excel with some vba scripts. ... What do you think? Are there any developers using VBA in Open Office? Is VBA supported in openoffice for windows AND os

Re: [api-dev] Open Office VBA porting? or leave as it is?

2007-07-31 Thread Andrew Douglas Pitonyak
for your answers! I'm now looking into porting the existing vba-code to StarBasic and trying to get java working for future developments. thanks a lot simon On 30.07.2007, at 22:39, Andrew Douglas Pitonyak wrote: Simon B. Margulies wrote: Hi all, I'm still evaluating open office

Re: [api-dev] how to do custom formula functions embedded in the document?

2007-07-31 Thread Andrew Douglas Pitonyak
Ionel Maries Cristian wrote: I belive some form of macro would be suitable for this job. The function has to fetch some xml from a remote url, the xml has to be parsed and the parameters for the url are sent as post data (as xml) I've failed to find apis for doing url fetching in basic. Python

Re: [api-dev] AWT TREE: OOoBasic version of the ScriptSelector example

2007-09-07 Thread Andrew Douglas Pitonyak
Ariel Constenla-Haile wrote: PS 2: though my English is very me-Tarzan-you-Jane, No, your English is much better than that. isn't it wrong Childs as plural of Child, instead of Children? Children is the correct plural for Child. The Java API uses Children for the plural ( z.B.

Re: [api-dev] Getting printers via Basic or Java

2007-09-12 Thread Andrew Douglas Pitonyak
Download my free macro document and search for Listing the supported printers This is for Basic. Tobias Krais wrote: Hi togehter, I have to write a little uno package managing printer options. Up to OO 2.0, it was not possible to get the available printers via OO Basic. Can you tell me

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-12 Thread Andrew Douglas Pitonyak
Have you seen the solution in my macro document? This might only work if the GUI is present (ie, not in headless mode). Tobias Krais wrote: Hi Hal, Code would be a big help so I could compare what we've got. I'll be glad to send you what I have. Right now I'm working with a wrapper

Re: [api-dev] Styling cells in a spreadsheet in Basic

2007-10-24 Thread Andrew Douglas Pitonyak
I think that you set borders either using a Style (just a guess, never have done it, but it would imply that the style itself specifies the border), or by manipulating a cell (or probably a cell range, I am guess rather than grabbing a copy of my book). I know that I do cover this in my book,

Re: [api-dev] list of propertyName's

2007-10-27 Thread Andrew Douglas Pitonyak
Atte André Jensen wrote: Hi My cursor is over some text. I'd like to read the propertyes of the selection as with (in php): $propertyValue = $cursor-getPropertyValue('CharWeight'); Where can I see a list of possible propertyName's similar to CharWeight? You can inspect the object with

Re: [api-dev] Code-Highlighting in Basic IDE

2007-10-30 Thread Andrew Douglas Pitonyak
Thomas Krumbein wrote: Hi Ariel, hi Malte, thank you for the information. Ariel Constenla-Haile schrieb: [..] See Andrew Pitonyak's Macro Document at http://www.pitonyak.org/AndrewMacro.odt chap. 9 Formatting macros containg macros to format Basic code just like the IDE does. OK,

  1   2   >