<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.openoffice.devel.api">
    <title>gmane.comp.openoffice.devel.api</title>
    <link>http://blog.gmane.org/gmane.comp.openoffice.devel.api</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21667"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21666"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21664"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21663"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21660"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21659"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21656"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21648"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21643"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21639"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21638"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21630"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21627"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21624"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21617"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21616"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21611"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21608"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21607"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21596"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21667">
    <title>How to make changes to a Dialog persistent</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21667</link>
    <description>&lt;pre&gt;When have made some changes to a Dialog (stored in a Librarie) I trye to 
make this changes persitent for future use.
The secrets are in the methods off the dialog.model
odialog.model.read( ???)
odialog.model.write(???)
found a confusing explaination in the DSK but nullware any examples how 
to use this read-write mechanism to make the changes persitent

Thanks for any hint !

Fernand
&lt;/pre&gt;</description>
    <dc:creator>Fernand Vanrie</dc:creator>
    <dc:date>2011-12-06T12:07:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21666">
    <title>new Apache OpenOffice.org mail list to replace this list</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21666</link>
    <description>&lt;pre&gt;&lt;/pre&gt;</description>
    <dc:creator>KS&lt; at &gt;apache.org</dc:creator>
    <dc:date>2011-11-02T16:23:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21664">
    <title>executing a dialog without blocking the program</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21664</link>
    <description>&lt;pre&gt;Is it possible to execute a dialog of UNO-AWT without blocking the program.
for example:

dialog.execute();                                            // execute the
dialog (show the dialog)...
System.out.println("not blocking dialog");         // ...without being
blocked, keep to this line while showing the dialog.

Thank you in advance for your answers.

Regards
&lt;/pre&gt;</description>
    <dc:creator>Gerardo Gómez</dc:creator>
    <dc:date>2011-10-27T02:17:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21663">
    <title>Announcing "BNF4OOo - Managing Backus-Naur-Forms with OpenOffice"</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21663</link>
    <description>&lt;pre&gt;Hi there,

maybe one of the last announcements, before Oracle shuts down these lists:

A student of WU Vienna, Franz Hohenegger, created a nice BNF-editing/transforming package for his
Diploma Thesis entitled "BNF4OOo - Managing Backus-Naur-Forms with OpenOffice".

Here is what the author says about his package:

    /Author's Abstract (English):/

    "This diploma thesis is about a program named BNF4OOo &amp;lt;http://sourceforge.net/projects/bnf4ooo/&amp;gt;
    which enables the user to manage different supported BNF
    &amp;lt;http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form&amp;gt;-dialects and make own customized BNF
    &amp;lt;http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form&amp;gt;-dialects as well. These dialects can be
    transferred into character-based syntax diagrams and a XML format closely related to IBM's DITA
    &amp;lt;http://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture&amp;gt;. OpenOffice
    &amp;lt;http://www.OpenOffice.org&amp;gt; is used as a graphical inferface for the transformations. This work
    describes the supported BNF-dialects with their used syntax structures and their implementation
    in BNF4OOo &amp;lt;http://sourceforge.net/projects/bnf4ooo/&amp;gt;. Furthermore it introduces the internal
    logic and structure of BNF4OOo &amp;lt;http://sourceforge.net/projects/bnf4ooo/&amp;gt;."


You  can get at this work by pointing your browser to
&amp;lt;http://wi.wu.ac.at:8002/rgf/diplomarbeiten/index.htm#dipl_201110&amp;gt;:

  * Clicking on the title gives you the PDF version of his thesis which nicely explains BNF and his
    work, which optionally allows to use OpenOffice.org writer as a GUI-based editor.
  * Clicking on the zip-link downloads his package.

Future updates will be placed on that project's Sourceforge home:
&amp;lt;http://sourceforge.net/projects/bnf4ooo/&amp;gt;.

Some highlights:

  * using OOo as a GUI (including his tools and configuration editor) via the OOo menu-system and a
    BNF-toolbar,
  * importing (extended) BNF textfiles,
  * rendering eBNFs to various kind of rail-diagrams and syntax definitions (text, but also XML,
    based on DITA, such that one can use DITA to create even more breath-taking rail-diagrams),
  * exporting raildiagrams as pictures, as HTML, and exporting the eBNF definitions as (individual)
    text files inclduing XML-DITA.

His package can also be used stand-alone via the commandline (including the ability to define ones
own extended BNF dialect)!

If you have any questions, then please come forward.

Regards,

---rony

P.S.: The package also works with LibreOffice, needless to say.

&lt;/pre&gt;</description>
    <dc:creator>Rony G. Flatscher</dc:creator>
    <dc:date>2011-10-24T17:52:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21660">
    <title>missing setSelectedItem() method in XComboBox interface</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21660</link>
    <description>&lt;pre&gt;As far as i know, there isn't any setSelectedItem() method in XComboBox
interface, i don't know if i need to make a new bug ticket for this one, if
you know of an alternative to this please let me know
&lt;/pre&gt;</description>
    <dc:creator>Gerardo Gómez</dc:creator>
    <dc:date>2011-10-14T22:54:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21659">
    <title>XButton, XFixedText, etc (Graphical components)</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21659</link>
    <description>&lt;pre&gt;Hello my name is Gerardo and i want to know if there is a way to
enable(disable) Graphical components without having to destroy or construct
them each change of state?. I'm currently working in the translation of an
OpenOffice extension called Oo2gdocs, changing the java Swing GUI to the UNO
AWT GUI.
&lt;/pre&gt;</description>
    <dc:creator>Gerardo Gómez</dc:creator>
    <dc:date>2011-10-04T05:11:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21656">
    <title>INFO: New home and EOL of this mailing list in the near future</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21656</link>
    <description>&lt;pre&gt;Hi,

It's probably not news to you, but in case you haven't heard, the
OpenOffice.org project has a new home under the Apache Software Foundation (
http://incubator.apache.org/openofficeorg/index.html). And some things are
going different under Apache. We will have only one project - Apache Open
Office - and the number of mailing lists will be limited to only a few (see
http://incubator.apache.org/openofficeorg/mailing-lists.html). There is a
common consensus that we will create new mailing lists with specific topics
if necessary but at the moment we will move forward with only few lists to
concentrate the information flow. From my point of view it's an advantage
compared to the former setup with many projects and many project related
mailing lists.

As the project lead of the API and Extension project i would like to inform
you that this mailing list will go end of life soon (exact date not known
yet) and further discussion on API and Extension specific topics should
happen on the ooo-dev&amp;lt; at &amp;gt;incubator.apache.org mailing list. I recommend that
you join the Apache OpenOffice project and subscribe (mail to
ooo-dev-subscribe&amp;lt; at &amp;gt;incubator.apache.org) on the ooo-dev list asap and help to
make this new Apache project successful in the same way as before under the
old setup. Well it's not really a new project but more the continuation of
the former official OpenOffice.org project. New in the sense that it is now
under the umbrella of the Apache foundation.

Maybe there will be some mail forwarding mechanisms established to ensure
that we won't lose any messages in the future but i hope that you all will
subscribe to the ooo-dev&amp;lt; at &amp;gt;incubator.apache.org mailing lists and that we
accept the new project under Apache as it is.

The migration of the project infrastructure to Apache is ongoing (source
code, website, wiki, forum, ...) and there are still a lot of things to do.
Every helping hand is welcome. Some things will change under Apache because
of the already existing rules there and we want to be a good and well formed
project there. Every change is also the opportunity to make things better
(if necessary) in the future. And you can be part of this important move of
OOo and can help to move things forward.

The good thing at Apache is that it is independent, well accepted in the
open source world and all project members are equal. Important is that the
rules of the Apache foundation and the project are accepted and that things
are getting done.

I hope to see you all on the new project and the
ooo-dev&amp;lt; at &amp;gt;incubator.apache.org mailing list soon. I am looking forward to an
interesting and challenging future of OOo under the umbrella of the Apache
foundation.

Regards

Juergen
&lt;/pre&gt;</description>
    <dc:creator>Jürgen Schmidt</dc:creator>
    <dc:date>2011-09-02T06:05:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21648">
    <title>Constant values for Function arguments</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21648</link>
    <description>&lt;pre&gt;Here's another delicate problem that's easy to work around, but still
very strange:

Module 2:
———Code starts below———
REM  *****  BASIC  *****

Option Explicit

Public Const VALUE=1
Public Const STRING=4
Public Const FORMULA=16
Public Const DATETIME=2

Sub HelloWorld
Print "Hello world!"
End Sub
———End of code———


Module1:
———Code starts below———
REM  *****  BASIC  *****

Option Explicit

Sub Main
Dim A
A=VALUE+STRING+FORMULA
End Sub
———End of code———
Run Main and you will get an error message at ”A=VALUE+STRING+FORMULA”.
If you run step by step (Ctrl+F8 in the BASIC IDE) and stop at that
line and then hover your mouse pointer over VALUE or STRING or
FORMULA, you can clearly see its values, but obviously this doesn't
help. Dimensioning A as Variant, as I did, doesn't help either. If you
look at VALUE, STRING or FORMULA in the variable monitor (or whatever
it's called in English), the window at the bottom left, you can see
that they are Variant/Integer and you can see their correct values.

So now, let's move the constant definition to Module1:
Module 2:
———Code starts below———
REM  *****  BASIC  *****

Option Explicit

Sub HelloWorld
Print "Hello world!"
End Sub
———End of code———


Module1:
———Code starts below———
REM  *****  BASIC  *****

Option Explicit

Public Const VALUE=1
Public Const STRING=4
Public Const FORMULA=16
Public Const DATETIME=2

Sub Main
Dim A
A=VALUE+STRING+FORMULA
End Sub
———End of code———

Now Main in Module1 works as expected, but take a look in the monitor
again. Those constants appears in exactly the same way this time as
before, the only exception is that this works.
I would be very grateful for an explanation about this. Is there
REALLY a logical reason for it to be this way or should I report this
as a bug as soon as possible?

Of course I can define those constants in every module, but isn't one
of the points by declaring as Public that I can reach them in all my
modules? Well, in this case I can; I just can't use them, at least not
when adding them to each other.
”A=VALUE” works in both my examples, but obviously not
”A=VALUE+STRING+FORMULA” for some reason I am sure absolutely nobody
can explain, so please prove me wrong here…!

:D


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-18T10:52:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21643">
    <title>ReDim driving me crazy again…</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21643</link>
    <description>&lt;pre&gt;I edited a lot of code yesterday, one of the rows I did NOT edit was
this one, which occurs at the top of a subroutine:

ReDim NDice(1 To 6) As Integer

It is defined in another module as:
Public NDice(1 To 6) As Integer


The error message I get is (translated from Swedish):
”BASIC syntax error:
The NDice variable is already defined.”

Yes, I know it is, that's one of the points by using ReDim, isn't it?

Before doing some heavy editing there was no complaints on this line
at all, and as I said, this is NOT one of the many lines I changed.

So obviously some of my other edits caused this, but where to start
looking? What can I possible have done to cause this?

I just hate when these things happen, when there is an error message
telling me that I can't do something that I should be able to do. Like
if I got an error message for the line ”If a=b Then”, and the error
message says: ”BASIC syntax error: a and b are already compared”…
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-17T09:45:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21639">
    <title>Custom types drives me nuts – this can't be happening… can it?</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21639</link>
    <description>&lt;pre&gt;I was editing some code I have, actually a game with dice and stuff,
but that doesn't matter, I suppose.

So I ran into a problem, and I copied the troubling part of the code
to a separate document for test driving.
However, the test code runs perfectly, but not within the game of mine!

I ran the game on another computer but another version of
OpenOffice.org (actually the first computer runs LibreOffice 3.3.3),
but the results were exactly the same.

Here's the test code. I have a message box after almost every
statement so I can see what happens. I added some extra comments in
the code.

REM  *****  BASIC  *****

Option Explicit
Option Compatible

Type DieStatistics
Value As Integer
Count As Integer
End Type

' The variable DiceFreq, declared below this comment, tells us which
two die values that are most frequent. For example, if the six dice
are 133455,
' DiceFreq will contain:
' DiceFreq(0).Value: 5 (the most common value is 5)
' DiceFreq(0).Count: 2 (2 dice have the value 5)
' DiceFreq(1).Value: 3 (the second most common value is 3 – in this
case there are two of both 3 and five, but higher value has priority)
' DiceFreq(1).Count: 2 (2 dice have the value 3)
' This makes it very easy for us to calculate things later,
calculations that are not present in this short example though.
Private DiceFreq(1) As DieStatistics '


Sub Test0
'NDice tells us how many there are of each die value. In the above
example, NDice(4)=1, since there are 1 die with the value 4.
Dim NDice(1 To 6) As Integer, i As Integer

'Here we set the values of NDice for an example where this is known
to fail, that is what NDice would contain if the dice were 112345
'NDice(1)=2, NDice(2)=1 and so on.
For i=2 To 5
NDice(i)=1
Next i
NDice(1)=2

'Here's where I calculate the values for DiceFreq by going through
NDice from 6 to 1.
For i=6 To 1 Step -1
If NDice(i)&amp;gt;DiceFreq(0).Count Then
DiceFreq(1).Count=DiceFreq(0).Count
DiceFreq(1).Value=DiceFreq(0).Value
MsgBox DiceFreq(0).Value &amp;amp; ": " &amp;amp; DiceFreq(0).Count &amp;amp; " st." &amp;amp; Chr(13) &amp;amp; _
DiceFreq(1).Value &amp;amp; ": " &amp;amp; DiceFreq(1).Count &amp;amp; " st."
DiceFreq(0).Count=NDice(i)
DiceFreq(0).Value=i
MsgBox DiceFreq(0).Value &amp;amp; ": " &amp;amp; DiceFreq(0).Count &amp;amp; " st." &amp;amp; Chr(13) &amp;amp; _
DiceFreq(1).Value &amp;amp; ": " &amp;amp; DiceFreq(1).Count &amp;amp; " st."
ElseIf NDice(i)&amp;gt;DiceFreq(1).Count Then
DiceFreq(1).Count=NDice(i)
DiceFreq(1).Value=i
MsgBox DiceFreq(0).Value &amp;amp; ": " &amp;amp; DiceFreq(0).Count &amp;amp; " st." &amp;amp; Chr(13) &amp;amp; _
DiceFreq(1).Value &amp;amp; ": " &amp;amp; DiceFreq(1).Count &amp;amp; " st."
EndIf
Next i
MsgBox "Final reults:" &amp;amp; String(2,Chr(13)) &amp;amp; DiceFreq(0).Value &amp;amp; ": "
&amp;amp; DiceFreq(0).Count &amp;amp; _
 " st." &amp;amp; Chr(13) &amp;amp; DiceFreq(1).Value &amp;amp; ": " &amp;amp; DiceFreq(1).Count &amp;amp; " st."
End Sub


Now, while this works perfectly as a stand-alone subroutine, it
doesn't work in the game. What happens in the game is that everytime I
change the value of DiceFreq(i).Value or DiceFreq(i).Count, BOTH
instances are changed, for example if I set DiceFreq(0).Value to 5,
DiceFreq(1).Value is also set to 5 and I just can't figure out why!

In the game the corresponding subroutine is called from another
module, but I simulated that too in my test, but still it ONLY fails
in the game.

I can upload my game document (the debug version) somewhere if needed.

What on earth could possibly cause this? I'm just out of ideas!

Help…?


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-15T12:31:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21638">
    <title>ReDim of a variable of a custom type</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21638</link>
    <description>&lt;pre&gt;I wrote some example code:

REM  *****  BASIC  *****

Option Compatible
Option Explicit

Type MyType
a As Integer
b As Integer
End Type
Dim x(1) As MyType

Sub Main
Dim y As MyType
Dim i As Integer
For i=0 To 1
x(i).a=1+i*2
x(i).b=2+i*2
Next i
y.a=5
y.b=6

MsgBox x(0).a &amp;amp; x(0).b &amp;amp; x(1).a &amp;amp; x(1).b &amp;amp; y.a &amp;amp; y.b ' Displays 123456

ReDim x(1) As MyType
ReDim y As MyType
MsgBox x(0).a &amp;amp; x(0).b &amp;amp; x(1).a &amp;amp; x(1).b &amp;amp; y.a &amp;amp; y.b ' Displays 123400
End Sub

So if we have an array as MyType (or any other custom type, I
suppose), ReDim will not reset it.
Is this the expected behaviour or should I write a bug report?
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-15T10:45:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21630">
    <title>How can I read my code in a module in the Basic IDE with Basic code?</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21630</link>
    <description>&lt;pre&gt;My workaround at the moment, is to first save my code to a file and
then loading it from the file.

Not that it matters why I want to do this, but I am writing a macro
that examines my subroutines and functions. I want to know the name of
every function and every subroutine, what module they are in, what
parameters they want, what they return, which subroutines and
functions (of those in the same modules) they call, by which functions
and subroutines they are called and maybe some more.
My macro works, but as I said, it reads the information from files
rather than directly from the modules in the Basic IDE.

If I only can read all the text in one module at once, that would do
it just fine. If there is a simple one-liner that reads just one
function or subroutine, that's a bonus, and if I can read a dialogue
that's even better…

I know how to read from spreadsheets and writer documents, I just
can't figure out how to reach the text in the IDE.
Hoping for an answer even though I noticed that this list seems quite
dead these days. Maybe people are busy doing real things…


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-14T06:11:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21627">
    <title>OpenOffice.org Basic – Arrays as parameters in functions</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21627</link>
    <description>&lt;pre&gt;Let's say I have this array:

Type MyType
A As String
B As Long
End Type

Sub Main
Dim MyArray(0) As MyType, i As Long

'A lot of stuff going on

For i=1 To Something
ReDim Preserve
MyArray(i).A=getStuffFromSomewhere()
MyArray(i).B=getStuffFromOuterSpace()
Next i

'More stuff going on for quite a while
End Sub

So I have a big array of my own type. Now I want a function to do
things based on the contents of MyArray. I know I can do this:

Function MyFunction(AnArray As Variant)
'Do things
End Function

So my question is, if I don't want to use the parameter-as-variant
method, is there another way?
I guess I could do something like the following:

Function MyFunction(AnArray(Something) As MyType)
'Do things
End Function

The problem is that ”Something” is just that, something, not a known value.
Using the variant trick seems to be cheating to me… Is it the only way
to go, really?


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-12T17:52:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21624">
    <title>Global variables – OpenOffice.org Basic</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21624</link>
    <description>&lt;pre&gt;I am testing some functions at the moment (I wrote them a few years
ago and now I'm trying to make them faster…) but I am a bit stuck at
the moment.

It looks something like this:

Module1
¯¯¯¯¯¯¯
' Code starts here
Option Explicit

Type Blahblah
This As Integer
That As Integer
End Type

Dim OneThing As Blahblah
Dim MoreStuff As Integer

Sub Main
Dim X As Integer
Some stuff
X=MyFunction(47)
More stuff
End Sub
' End of code

Module2
¯¯¯¯¯¯¯
' Code starts here
Function MyFunction(A As Integer) As Integer
Dim SomeValue As Integer
Some stuff
OneThing.This=A*SomeValue
More stuff
MyFunction=OneThing.This-A
End Function
' End of code

Now, when running this (with F5 or F8), it seems like it starts at
”Sub Main” and everything above it is omitted, so I get an error
message in module2 when ”OneThing” is mentioned.
Shouldn't the global things be available in all modules? They are if I
run similar macros from a spreadsheet, for example, that is not from
the Basic IDE.

Did I miss something here? Is there a way around it?


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-08T15:42:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21617">
    <title>Missing a Frac() function</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21617</link>
    <description>&lt;pre&gt;Am I the only one who miss a Frac() function in OpenOffice.org Basic
and as a cell function?

I always have to use my own function, which is probably slower than a
built in function would be:

Function Frac(Value As Double) As Double
    Frac=Value-Fix(Value) ' Using ”Int” instead of ”Fix” doesn't work
properly for negative values.
End Function

For example, Frac(-12.3456789) ⇨ -0.3456789

I use Frac() all the time and I can't be the only one who need it, can I? Among
other things it's nice for separating time from time+date, even if there are
other ways to do that.

In case there is a Frac() function after all, what's it called?

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-08-07T14:55:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21616">
    <title>Event OnPrepareUnload and CloseVetoException</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21616</link>
    <description>&lt;pre&gt;Hi,

according to mba in 
http://openoffice.org/projects/api/lists/dev/archive/2006-09/message/209 
it seems, that you can't prevent the document from closing by throwing a 
CloseVetoException, if once a OnPrepareUnload-event is fired.
Is this still true for OpenOffice 3.2?

Is there another way to let the document and the frame live by using the 
XJob-interface, if the user wants to close them?

Regards

Peter
&lt;/pre&gt;</description>
    <dc:creator>Peter Eberlein</dc:creator>
    <dc:date>2011-08-04T07:32:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21611">
    <title>Getting information from some site via Basic IDE – possible? How?</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21611</link>
    <description>&lt;pre&gt;Is it possible with the OpenOffice.org BASIC IDE to access a web site,
login, copy some text to the clipboard, and then logout?
Any hints?


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ
&lt;/pre&gt;</description>
    <dc:creator>Johnny Rosenberg</dc:creator>
    <dc:date>2011-07-16T15:34:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21608">
    <title>Open Ended Arrays or Similar Data Structures</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21608</link>
    <description>&lt;pre&gt;Is there any way, in OOo BASIC, to create something like a vector or linked list or anything that gives me something like an array that I can keep adding elements to?  (Everything I found with an array indicated it has to be declared with a set number of members.)


Thanks!



Hal-- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscribe&amp;lt; at &amp;gt;api.openoffice.org
For additional commands send email to sympa&amp;lt; at &amp;gt;api.openoffice.org
with Subject: help

&lt;/pre&gt;</description>
    <dc:creator>Hal Vaughan</dc:creator>
    <dc:date>2011-06-19T02:35:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21607">
    <title>Pre-recorded Macro Suddenly Crashing</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21607</link>
    <description>&lt;pre&gt;I've been using this macro for a good while:

sub CharacterName
Dim oDoc   As Object
Dim oDispatch As Object
BasicLibraries.LoadLibrary("HalLib")
HalLib.AutoTextMacro.InsertAutoMacroText()
Margin4()
'MsgBox "Debug 1"
oDoc = ThisComponent.CurrentController.Frame
'MsgBox "Debug 2"
oDispatch = createUnoService("com.sun.star.frame.DispatchHelper")
'MsgBox "Debug 3"
oDispatch.executeDispatch(oDoc, ".uno:GoToStartOfLine", "", 0, Array())
'MsgBox "Debug 4"
oDispatch.executeDispatch(oDoc, ".uno:EndOfLineSel", "", 0, Array())
MsgBox "Debug 5"
oDispatch.executeDispatch(oDoc, ".uno:ChangeCaseToUpper", "", 0, Array())
MsgBox "Debug 6"
oDispatch.executeDispatch(oDoc, ".uno:GoToEndOfLine", "", 0, Array())
'MsgBox "Debug 7"

End Sub

The debugging statements were not in there until recently.  The two lines that call other subroutines:

HalLib.AutoTextMacro.InsertAutoMacroText()
Margin4()

Are part of an auto-text setup I use where I can define keys to type out character names when I'm writing a script.  The first pulls the name out of a user field in the document and enters it in the document.  The 2nd one (Margin4()) changes the margins.

The line I'm having problem with is right after the "Debug 5" statement:

oDispatch.executeDispatch(oDoc, ".uno:ChangeCaseToUpper", "", 0, Array())

Now this is crashing my program every single time.  A few hours ago it was working perfectly.  Then I was trying to modify a routine that is in the same library and also reads the user fields in the document.  The routine I was working on does not change anything the above routine uses.

I've changed the routine I'm editing back to what it was originally.  (The original statements were just commented out, so I just uncommented them and commented out the changes.)  But I still get a crash whenever the macro hits this line.

I was wondering if something could have changed, so I tried to record a new macro, and I can't.


Any thoughts on why the ChangeCaseToUpper would suddenly not work?


Thanks!


Hal-- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscribe&amp;lt; at &amp;gt;api.openoffice.org
For additional commands send email to sympa&amp;lt; at &amp;gt;api.openoffice.org
with Subject: help

&lt;/pre&gt;</description>
    <dc:creator>Hal Vaughan</dc:creator>
    <dc:date>2011-06-16T10:16:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21596">
    <title>Displaying Multiple Dialogs from BASIC</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21596</link>
    <description>&lt;pre&gt;I've mentioned the sticky-note project I'm working on yesterday in two emails.

Now I'm running into a problem: I'd like to display a number of sticky-notes, but to display any kind of dialog in BASIC, I need to do something like this:

oSticky = createUnoDialog(DialogLibraries.HalLib.StickyNote)
oSticky.Execute()

And the program will stop until I close the dialog, either by the close button, a cancel, or OK, or another button.

That means the only way to have multiple dialogs open is to open one and from there, open the next, and then open the next and so on.

Is there some way, from BASIC, to display a dialog and leave it open without it stopping a script?


Thank you!



Hal-- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscribe&amp;lt; at &amp;gt;api.openoffice.org
For additional commands send email to sympa&amp;lt; at &amp;gt;api.openoffice.org
with Subject: help

&lt;/pre&gt;</description>
    <dc:creator>Hal Vaughan</dc:creator>
    <dc:date>2011-06-16T07:22:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.openoffice.devel.api/21590">
    <title>Document Text Fields</title>
    <link>http://comments.gmane.org/gmane.comp.openoffice.devel.api/21590</link>
    <description>&lt;pre&gt;While looking through the reference, I can find info on getting and storing text fields in a document in com.sun.star.text.FieldMaster.User, where I can name a text field and save the data.

I don't find anything telling me if there is a limit to how long such a field can be.  I think I remember them being unlimited.  Is that correct?  (I want to use them for storing notes about a document.)


Thank you!



Hal-- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscribe&amp;lt; at &amp;gt;api.openoffice.org
For additional commands send email to sympa&amp;lt; at &amp;gt;api.openoffice.org
with Subject: help

&lt;/pre&gt;</description>
    <dc:creator>Hal Vaughan</dc:creator>
    <dc:date>2011-06-15T05:23:45</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.openoffice.devel.api">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.openoffice.devel.api</link>
  </textinput>
</rdf:RDF>

