Re: [api-dev] Excel's Offset substitute?
Hello Dmitry! Am 26.02.2008 17:45 schrieb Dmitry Teslenko: Hello! Some time ago I've needed to implement Excel-like Offset function and I've got this: Private Function __CompatOffset(ByRef objSource As Object, _ intRow As Integer, intColumn As Integer) As Object Dim intSheet As Integer intRow = objSource.CellAddress.Row + intRow intColumn = objSource.CellAddress.Column + intColumn intSheet = objSource.CellAddress.Sheet __CompatOffset = ThisComponent.getSheets().getByIndex(intSheet).getCellByPosition( _ intColumn, intRow) End Function It was implemented in OO Basic. Can it be implemented another way w/o struct CellAddress and w/o dispatcher? Please describe how do you use this macro. Calc knows also a OFFSET-function. What is the difference to Excel, so that you created this macro? Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] SystemShellExecute.execute(document) opens always Firefox in Linux
Hello Tobias! Am 28.02.2008 17:50 schrieb Tobias Krais: I want to use the SystemShellExecute.execute method to open Documents that OOo can not open. Giving the file location as the parameter aCommand opens the document with the default application in Windows. In Linux my Firefox is opened, which again opens the default application. Is there a way to tell the execute method to open the document directly? Why is it implemented to use the default browser? Can someone tell me the backgrounds? Please have a look at issue 84718 - it could be the same problem. Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] any workaround for issue 84718?
Hello! I created a form document for a costumer so one can dial a phone number from this form. The macrocode for this uses SystemShellExecute. It worked fine until OOo 2.1. Now it doesn't work but the costumer want to use it. The target of this issue is set to OOo 3.0. But is there a usable workaround till then? Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Sort problem
Hello Hubert! Am 01.01.2008 22:12 schrieb Rudolf Huber: the example works perfectly. Thanks. Thanks for your response. Hope, you can now do what you want. I wish your entire group a very Happy New Year 2008. Ebenfalls ein gesundes neues Jahr! Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problems with insertDocument
Hello Thomas! Am 23.11.2007 17:13 schrieb Thomas Krumbein: Now, I am using insertDocumentFromURL() to insert Doc2 in my MasterDocument. It works fine - but afterwards the Paragraph-style Standard of my MasterDoc is changes and charFont is now Times New Roman Therefor the hole formating of the document looks real strange. By the way - the same happend, when I insert the doc via Gui. The problem with the style Default is old as OOo 2. Look at issue 60475. OK, I can change the CharFontName of the Paragraph style back to Arial after inserting the document - but all Paragraph styles, who are not based on Standard are still in Times New Roman. I tried to find the reason (I never use Times New Roman) or a property to fix it - I find nothing and do not really have more ideas. Additional information: All documents are converted MS Word documents - so I am afraid, there is still some information left - but how can I get it out? It seems there are format errors in the imported document. And if the paragraph styles are not based on Default so the behavior is correct. So both behaviors aren't API problems rather then writer problems. Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problems with insertDocument (addition)
Hello Thomas! Am 23.11.2007 17:13 schrieb Thomas Krumbein: I do have some strange problems using insertDocument. Maybe someone can give me some advise? Situation: I do have two writer Documents (lets call them MasterDoc and Doc2). In all documents my Standard charFont ist Arial, the properties of OOo even shows Arial as a standard font for all selections. Now, I am using insertDocumentFromURL() to insert Doc2 in my MasterDocument. It works fine - but afterwards the Paragraph-style Standard of my MasterDoc is changes and charFont is now Times New Roman It could be, that the paragraph style Normal in the original document is not changed to Arial. So if you have no text in your MasterDoc (so no paragraph style is used) writer overwrites Default with the formats of the imported Normal paragraph style. So this problem could be solved if you insert a (empty) paragraph and delete it after the import. At the same way i worked around the described Default problem in the former message. I insert a paragraph at the end of the document, insert the new document at the paragraph before the last paragraph and delete the last paragraph after import. Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to change the default page style
Am 25.10.2007 20:48 schrieb Ool: If this behavior regards to all document types (text, sheet, graphic), it seems there is a problem with the printer driver. (Or this is a language depending feature that i don't know.) Could be. I have an American release of Windows XP running here. All the units I manually switched to metric and the paper sizes in the printer drivers to A4, because this is Germany and the US standards are a provincial aberration from globally acceptable norms anyway, used by people who don't get out much. Is there an special OpenOffice version for Brits? If this is a locale problem so go to Tools - Options - Language Settings - Language and change the Locale Setting to English (UK). I'd love to, but what's the name of the file in which template properties are stored? Where do I find it? That paragraph looking like a piece of source code told me nothing. I'm a stupid user, who doesn't do much command line tinkering. I translate German to English for a living... I know that if I downloaded the German release of OpenOffice I wouldn't have those problems. My parents get an empty A4-sized document when they click on Neu on their machine. Please look into the OOo Help, tab |Find| with Search term: Default template [x] Complete words only [x] Find in headings only press [Find] HTH Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] dialog opens behind the document
Am 26.10.2007 09:19 schrieb Mathias Bauer: Could you please send me the ods file? I would like to have a closer look. You have mail. greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Refreshing document structure and state using refresh() and reformat()
Am 04.10.2007 23:28 schrieb ashok _: I have a writer document. In this document I am moving TextSection objects using the API. section1 section1.1 section1.2 section2 section2.1 section3 section4 If I move section3 before section2 - and I view the section structure using Format-Sections the new structure is displayed correctly. When I query the structure using the API : getTextSections().getByName(sectionName).ChildSections I still get the old structure of the document. I have tried calling the refresh() + reformat() of the XTextDocument but unfortunately that doesnt have any effect. If I save the document, close it, and reopen it, the API reflects the structure correctly... What am i doing wrong ? Is there something other than refresh() + reformat() that I need to call ? Can you post a little piece of code with that i can test this behavior? Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to change the default page style
Am 26.10.2007 14:10 schrieb Ool: If this is a locale problem so go to Tools - Options - Language Settings - Language and change the Locale Setting to English (UK). Yes! That worked. Thanks a bundle! Now i tried it by myself. I don't know when this behavior was changed. So now the initial page size is printer independent an depends on the locale setting. Actually I set it to English (Eire). That way I get the proper decimal separators and the correct currency symbol, €, and yet the default language can be separately set to US English, meaning the spellchecker won't complain about my spelling. It's a little hacked, but it sets everything the way I want it. No hacking, that's the reason why these options separately exists. You can also install a german language pack, so you can use a german user interface with english locale settings if you want. Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to change the default page style
Am 26.10.2007 21:34 schrieb Ool: Actually I very much prefer an English user interface. That way when I ask for international online support I don't have to rake my brain what the English label for something like the Extras pull-down menu is. (Or what Tools would be in German...) I have to do enough of that on the job. That's why I have an American version of Windows XP installed. Is there a language pack available that would let me switch between user interfaces freely...? Yes, it is. I use it also in this way. If you use the actual version of OOo (2.3) then look at http://distribution.openoffice.org/mirrors/#extmirrors select any mirror and go into the directory extended/2.3.0rc3/ and pick the right language pack version for your version. For you it should be OOo_2.3.0rc3_20070910_Win32Intel_langpack_de.exe To extend a german version use OOo_2.3.0rc3_20070910_Win32Intel_langpack_en-GB.exe greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to change the default page style
Am 25.10.2007 00:35 schrieb Ool: I have the settings of all my printers set to A4 and still all the new documents OpenOffice creates are letter-sized until I change them manually-every single one. Change the paper format in the properties of the default printer (driver) of the system, so writer will open with this paper size as default page style. No, it won't. My default printer is set to A4. OpenOffice still insists on letter. If this behavior regards to all document types (text, sheet, graphic), it seems there is a problem with the printer driver. (Or this is a language depending feature that i don't know.) If this is so, try to set any other printer driver as the system default. If this behavior regards to text documents only (and ituses a other printer driver then the default), it seems, that there is set a template file as default template. Otherwise how Fernand wrote you can use and set a own template with the right settings as default template. Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] dialog opens behind the document
Hello Mathias! I have a calc template with macros and a dialog in it. The main macro is bound to the event create document of the template. The macro loads the dialog. If i double click the template file (linux, ubuntu) and a other OOo-window is open, the dialog starts behind the new document in front of the former top OOo-window. That is strange. The events Create/OpenDocument have been defined in a way that they won't be fired before the document they belong to got the focus for the first time. I'm pretty sure this works well for Open Document, may be Create Document has a bug. Can you test if the macro works fine if you assing it to the Open Document event of the template and then open the template for editing? It's the same behavior with a *.ods if i assign the macro to Open Document. (With the template it has no effect by double clicking it. ;-) ) BTW: which platform? How i wrote in the 2. paragraph: Linux/Ubuntu. Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to change the default page style
Hello Reinhold! Am 05.10.2007 11:26 schrieb Reinhold Merk: is it possible to change the default page style, more precisely the paper format from A4 to another value (in that way that OO starts every time with this value and the user needs not to change it manually)? I've searched in the .xcu-files for such a property value, but unfortunately without success. If you have not set a own default template for text, writer uses the size of the actual printer settings. Change the paper format in the properties of the default printer (driver) of the system, so writer will open with this paper size as default page style. Hope, you understand me. Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Moving CoceSnippets into the Wiki?
Am 19.08.2007 21:41 schrieb Frank Schönheit - Sun Microsystems Germany: Alternatively (and perhaps better and less expensive in terms of work to be invested), we should think about lowering the hurdles for contribution with the existing snippet creator. What about some semi-automated way to contribute, to bypass the bottle neck of a single moderator? What about integrating a submit functionality into the snippet creator? What about integrating the snippet creator into the next OOo release? This sounds good! In other words: Are we really sure migration to the Wiki is the best way? I'm uncertain about it. I agree. The snippet creator should be improved and not killed. Copy and paste of code from and to a website isn't a good thing. Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] mysterious StarBasic problem
Hello Noelson! It seems a typo, change to: Select Case iNum Thanks for the correction. But it is only a mistake in my email. Otherwise the macro would never run ... So here is the description with the correct statement: In a basic macro i use a simple Select Case statement: Option Explicit Sub Test1 Dim sDate As String Dim iNum As Integer Dim iBreak As Integer On Error GoTo ErrorHandler sDate = Date() iNum = DatePart( w, sDate, 2 ) iBreak = 0 Select Case iNum Case 1, 6 iBreak = 2 Case 2 To 5 iBreak = 1 End Select MsgBox iBreak Exit Sub ErrorHandler: MsgBox error End Sub The macro works fine on my Ubuntu 6.06 with german locale settings. But on a linux system with english locale settings the macro gives either a internal error arg $1 or a undefined variable in line n, where the line n is the line Case 2 To 5. If i change Case 2 To 5 to Case 2, 3, 4, 5 the macro runs without any error. Strange!? Can anybody reproduce this problem? Any ideas? greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
Am 29.05.2007 18:56 schrieb Mathias Bauer: Do Until oForm.isLoaded Wait( 100 ) Loop This has the drawback that it is busy waiting, costs CPU time and can create reentrance problems. But in case there's no listener that allows to wait in passive state (don't know that, sorry) it's indeed the only chance. I can add a LoadListener. But i don't know how to use it. :-( The listener can execute a separate sub, but this sub doesn't know the variables of my sub. Sorry, too much subs error. :-) So you know how to add a listener and how to implement it, right? But your problem is that this listener and so any procedures it might call don't know variables of ... what exactly? The problem is, that in my opinion i don't need a listener - if i have already understood the sense of it. A listener should execute anything if a special event is initiated. And this should be every time the event is applied. By my macro should only wait once, if the form is not loaded. do anything If oForm.isLoaded do this Else waiting for oForm.isLoaded do this End If I can't see how i can implement the waiting with a listener. So i should add the listener, wait for the event, and after the event i must remove the listener. But ... #-| greetings, Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
Hello Mathias! Do Until oForm.isLoaded Wait( 100 ) Loop This has the drawback that it is busy waiting, costs CPU time and can create reentrance problems. But in case there's no listener that allows to wait in passive state (don't know that, sorry) it's indeed the only chance. I can add a LoadListener. But i don't know how to use it. :-( The listener can execute a separate sub, but this sub doesn't know the variables of my sub. In the Developers Guide there is only a short excursion to the world of listeners (in the table of contents there it is before 3.4.4 Automation Bridge, in the document there it is before 3.4.3.5 Automation Bridge - it seems, there is a numbering error), but it doesn't helps me. :-( Any tip? Thanks, Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
Hi Frank! Am 16.05.2007 12:03 schrieb Frank Schönheit - Sun Microsystems Germany: oForm.moveToInsertRow() oControl = oForm.getByName( mySubform ).getByName( myControl ) Wait( 3000 ) oControl.setString( myString ) I tried also oForm.getByName( mySubform ).reload() Do Until oForm.getByName( mySubform ).isLoaded() Wait( 100 ) Loop but the subform is loaded ... with the same effect. I meant that there is no effect, because the subform is loaded and the loop is not executed. I've tested it with oForm.getByName( mySubform ).reload() i = 0 Do Until oForm.getByName( mySubform ).isLoaded() i = i + 1 Loop print i and get i = 0 as result. If you have a small self-contained sample document which shows this behaviour, I'd be interested in having a look at it. You have mail. ;-) The sample shows also that the problem not depends to the datasource connection. Have a nice man day! (Or is there another english synonym?) Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
Hi Mathias! Thanks for your quick response! oDoc = StarDesktop.loadComponentFromURL( myDoc, _blank, 0, props() ) '***(1)*** waiting for document load oForm = oDoc.DrawPage.Forms.getByName( myForm ) oForm.moveToInsertRow() oControl = oForm..getByName( mySubForm ).getByName( myControl ) '***(2)*** waiting for form load oControl.setString( myString ) At (1) the macro must wait till the document is loaded if it isn't so. Otherwise i get a exception. At (2) the macro must wait till the form is fully loaded. Otherwise the myString is deleted because the control default. So my questions: (1) How can i test that the document ist loaded and the form is available? As long as the document isn't an HTML document the loading process is complete already when loadComponentFromURL returns. It is a writer document with a database form on it. The database form is connected to a database. So it is possible that the makro not need to wait for the document but that the database connection is established(?). (2) How can i test that the form is fully loaded? No idea, sorry. What does that mean? Sorry, i forgot the command oForm.moveToInsertRow(). :-( It seems so, that the database form makes a refresh after that command. But it seems also that it is fullfilled after oControl.setString( myString ), so that the string is always deleted again. If i go step by step through the makro, it does what i want. I thought i can register a event at the document and/or at the form so that the macro can wait for the special event - but i don't know how to do this. :-( greetings Mathias t. o. ;-) -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
(2) How can i test that the form is fully loaded? No idea, sorry. What does that mean? Try to create an UNO-Listener, http://api.openoffice.org/docs/common/ref/com/sun/star/form/XLoadListener.html I tried this, but it doesn't work if i do nothing wrong. But if Mathias is right, that the document is loaded by returning of load ComponentfromURL() (and i think so ;-) ), then the event (OnLoadFinished) is fired before i can register a event listener. It seems, that i need something for the database form ... Thank you, Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Waiting for a document load and for a form load
Am 15.05.2007 16:13 schrieb Mathias Röllig: It is a writer document with a database form on it. The database form is connected to a database. So it is possible that the makro not need to wait for the document but that the database connection is established(?). With the knowledge that the macro must wait for the form load i could solve the first problem: Do Until oForm.isLoaded Wait( 100 ) Loop (2) How can i test that the form is fully loaded? No idea, sorry. What does that mean? Sorry, i forgot the command oForm.moveToInsertRow(). :-( It seems so, that the database form makes a refresh after that command. But it seems also that it is fullfilled after oControl.setString( myString ), so that the string is always deleted again. This is always awaiting a solution. But now i have a third problem: oDoc = StarDesktop.loadComponentFromURL( ... MsgBox( myText ) ... the Messagebox is behind oDoc ... :-( I've tried StarDesktop.setActiveFrame( oDoc.getCurentController.getFrame() ) before the above lines, but it has no effect. ?-| greetings Mathias t. o. ;-) -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Making fields read-only
Hello Jakob! Am 09.05.2007 14:55 schrieb Jakob Lechner: In my case the content of the fields is provided by a C++ addon. If certain values are displayed the user shall be allowed to modify the field content, if some other values are displayed the user shouldn't be allowed to change the content. Do you have any ideas how I can implement this behavior? Can you please explain the goal of that? Please describe a sample case where this behavior is useful. So possibly we can find a way for you. Greetings Mathias t. o. ;-) -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Making fields read-only
Am 08.05.2007 08:33 schrieb Mathias Bauer: Here's my question: I want some of the inserted fields to be read-only but I haven't found a property in the field API yet. Any ideas? I'm afraid that this isn't available. Sounds like a useful enhancement. Sure? Perhaps, if the field can be protected against deletion. But IMHO is this also only senseful if protected areas can be protected by protecting the document with password like a calc document. greetings, Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Making fields read-only
Am 02.05.2007 09:35 schrieb Jakob Lechner: I posted this question already at the extensions mailing list but I haven't received an answer yet. May be someone here knows an answer. Here's my question: I want some of the inserted fields to be read-only but I haven't found a property in the field API yet. Any ideas? I see, there is still no answer, and IMHO no property for this request. What should be the sense? If you want insert foo, why do you not insert foo and why do you want a field with the content foo? Greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Replaceing selected text with Basic Macro
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 -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How copy a sheet to another calc document?
Am 11.03.2007 03:52 schrieb TerryJ: Have a look at this post: http://www.oooforum.org/forum/viewtopic.phtml?p=189530#189530 which refers to this post showing how to create a link: http://www.oooforum.org/forum/viewtopic.phtml?p=66195#66195 This post (at the end of the thread containing the first) shows how to break the link: http://www.oooforum.org/forum/viewtopic.phtml?p=190406#190406 The result is that the sheet is copied into the other file. Thank you for your answer. But this isn't a solution for me, because it should be possible to use the original document as a template. To create a link to a sheet, the container document must be saved. So it must be temporarily saved. (And i think that there are other problems.) I've found a solution by myself by recording the dispatcher commands for copy/move of a sheet. But using this view API the sheet must also be visible. I am searching for a solution to create a new calc document based on a hidden sheet. (e. g. copy the hidden sheet to the new document, make it visible and delete the other sheets.) Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] How copy a sheet to another calc document?
Hello! I want copy a sheet from a document to another document by using a basic script that is embedded in the first document. After searching in the mailinglists I have found http://api.openoffice.org/servlets/ReadMsg?listName=devmsgNo=6847 where Stephan (3,5 years ago) described a solution with the dispatch API. So I use the same subject. But the problem is, that the original sheet must be visible. Is there meanwhile another solution? e. g. saving the sheet as a object variable and insert it into the new document? Thank you for help Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How copy a sheet to another calc document?
Am 09.03.2007 16:46 schrieb Mathias Röllig: Hello! I want copy a sheet from a document to another document by using a basic script that is embedded in the first document. After searching in the mailinglists I have found http://api.openoffice.org/servlets/ReadMsg?listName=devmsgNo=6847 where Stephan (3,5 years ago) described a solution with the dispatch API. So I use the same subject. But the problem is, that the original sheet must be visible. I forgot another problem: I use named areas at the sheet. If i copy the content of the sheet into a sheet by the described way, the named areas will work only if the sheet in the new document have the same internal number as the original sheet - even if the new sheet have the same name as the original sheet. Is there meanwhile another solution? e. g. saving the sheet as a object variable and insert it into the new document? Thank you for help Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] getting the actual text of a formatted field
Hello Berend and Frank! Am 05.12.2006 12:45 schrieb Frank Schönheit - Sun Microsystems Germany: this is a bug that I could reproduce. The property Text or its method pendant getText() of the control should return the displayed text. I submitted http://www.openoffice.org/issues/show_bug.cgi?id=72281 to deal with it. ... isn't this a duplicate of http://www.openoffice.org/issues/show_bug.cgi?id=23080 ? Thank you for your answers. Is there a better(?) workaround then view.up() and view.down()? Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] getting the actual text of a formatted field
Hello! I want to create a letter via basic macro. The macro reads the initial data for the letter from a form - the form controls are not linked to a database. For the date i want to use a date control, but there isn't a formatting like 'd. '. So i use a formatted field with this formatting, but also a date control to use the date selector (calendar). (I have sized the date control field so that only the date selector is visible.) On the change event of a field a macro reads the actual value and writes it to the other field. Thats works fine. But the problem is, that i see the correct date at the screen (e. g. '4. Dezember 2006'), but the property 'text' of the control model and also of the view returns the value that is formerly set by the user. So my workaround is, to use the methods up() and then down() at the view of the formatted field to set the correct value to the text property. But i think that there is another (and better) way and which i not see ... Hope you can understand me. ;-) Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] printing current sheet
Hello Marc! Am 14.11.2006 00:09 schrieb Marc Santhoff: So the question is: how can i figure out, which print page number has the actual sheet? Or, how can i figure out, on which print page(s) will a special print area reside? As a workaround you can: - use the PrintAreas of the calc doc: - store old print areas - Sheet.getPrintAreas() ... at every sheet - clear all print areas at all sheets - set a new one for the used range of the sheet you want to print, maybe adapt scaling to 100% - print - restore old print areas Now i preferred this solution. If i have the time i will create a code snippet. Thanks Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] printing current sheet
Hello Tobias! Thank you for your answer. Am 13.11.2006 13:14 schrieb Tobias Krais: In a calc document i want to place a button with that the user can print the actual sheet or rather the defined (and named) print area at the sheet. But i can't find the right print options to do that. please see the code attached. It is free, again. This is a good example, but not this that i need. (I use Basic, but this isn't a problem.) My workaround is equivalent to this code, where myPages is set by the button tag. (Ich habe einen Knopf auf der Tabelle, der das Makro auslöst und in der Zusatzinformation die zu druckende Seite(nnummer) übergibt.) // Setting the property Pages so that only the desired pages // will be printed. PropertyValue[] printOpts = new PropertyValue[1]; printOpts[0] = new PropertyValue(); printOpts[0].Name = Pages; printOpts[0].Value = myPages; The problem is, that in the document the tables must not be moved or deleted, because the print page number will not be right further more. So the question is: how can i figure out, which print page number has the actual sheet? Or, how can i figure out, on which print page(s) will a special print area reside? greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] printing current sheet
Hello Marc! Am 14.11.2006 00:09 schrieb Marc Santhoff: So the question is: how can i figure out, which print page number has the actual sheet? Or, how can i figure out, on which print page(s) will a special print area reside? You can't, OO.o does not allow to do so. This should be worth an RFE (if not already written). That I already imagined. :-( - try to use the print preview (not tested, would be an interesting solution) - use the PrintAreas of the calc doc: - store old print areas - Sheet.getPrintAreas() - set a new one for the used range of the sheet you want to print, maybe adapt scaling to 100% - print - restore old print areas I also imagined that it could be a solution if i define no print areas and only set one with the print job. Thank you. Greetings, Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] [CPHennessy] [users] Print order '4; 1; 2; 3'?
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 i set for this? I can set the 'PaperOrientation' (using 'com.sun.star.view.PaperOrientation.LANDSCAPE'), the 'PaperFormat' (using 'com.sun.star.view.PaperFormat.A4'), 'PageRows' and 'PageColumns'. But I can't figure out a way to specify to print in brochure format... I think you need http://api.openoffice.org/docs/common/ref/com/sun/star/text/PrintSettings.html#PrintProspect greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to open a database form
Hi Frank, Am 16.02.2005 13:53 schrieb Frank Schönheit - Sun Microsystems, Inc.: Is there a way to link writer documents (form document) to a database? I can't see it ... No, the Links (or Verknüpfungen in your version) are not available anymore. The idea is that you now store your text documents in the database document (and don't let confuse you that they're called forms, you of course have the full power of Writer at your disposal :). Yes, but if i would attach basic macros the document wants to save as a separately writer document. Or have i made a mistake? greetings Mathias -- ·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-· - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]