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
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
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
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
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
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
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
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.
--
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)
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
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
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
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
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
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.
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
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
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:
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
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
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
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
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
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...
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
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
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
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 =
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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, _
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
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 =
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
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
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
{
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
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
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
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,
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
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
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
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
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
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
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 );
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
///
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
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
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
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
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:
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
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
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
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
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
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)
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
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
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...
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.
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
101 - 185 of 185 matches
Mail list logo