You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Peng Chen <ch...@gmail.com> on 2012/05/02 10:29:16 UTC

A wiki about how to support a VBA API

Hi All,
     I post a wiki about how to support a VBA API in OpenOffice,
http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice

     Any feedback will be appreciated, thanks.

Re: A wiki about how to support a VBA API

Posted by Peng Chen <ch...@gmail.com>.
Hi,
    Thank you all for your concern about this topic, maybe there are some
confusion about VBA support, thanks for Ma's clarification. I also update
the wiki with two reference, anything wrong or unclear, please update the
wiki directly, thanks.

2012/5/5 TJ Frazier <tj...@cfl.rr.com>

> Hi, Andrew,
>
>
> On 5/5/2012 02:48, Andrew Douglas Pitonyak wrote:
>
>> On 05/02/2012 04:29 AM, Peng Chen wrote:
>>
>>> Hi All,
>>> I post a wiki about how to support a VBA API in OpenOffice,
>>> http://wiki.services.**openoffice.org/wiki/How_to_**
>>> support_a_VBA_API_in_**OpenOffice<http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice>
>>>
>>>
>>> Any feedback will be appreciated, thanks.
>>>
>>> Now that I know what the page describes (thanks everyone), I gave this a
>> pretty careful read. It seems to provide significant information, and I
>> learned much. There are some issues with respect to language usage, and
>> they are easily fixed; I started to fix the wording (after I figured out
>> that I can), but I stopped after the first paragraph for two reasons:
>>
>> 1. It is not clear to me that my changes really did save, and
>>
>
> If your changes show properly in the Preview mode, then they will be
> correctly saved when you Save. Sometimes the ATS delivers stale pages, so
> you might see the original page, unchanged, after the Save. The workaround
> is described in "Moving Day":
> <http://wiki.services.**openoffice.org/wiki/Moving_Day<http://wiki.services.openoffice.org/wiki/Moving_Day>
> **>
> Taking a break also works; the stale pages expire and go away.
> Sorry for the problem, but it's quite beyond my poor powers to fix.
>
> /tj/
>
>
>> 2. It is very late and I need some sleep before my little girls drag me
>> out of bed (not to mention the bigger girl that I married).
>>
>>
>
>

Re: A wiki about how to support a VBA API

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
On 05/07/2012 10:08 PM, TJ Frazier wrote:
> On 5/7/2012 20:02, Andrew Douglas Pitonyak wrote:
>>
> I owe you one, for the help your (on-line) book provided, when I was 
> writing the temporary GUI for the new encoding feature:
> <http://wiki.services.openoffice.org/wiki/User:TJFrazier/Encryption>
>
> I might never have found the Config Provider without the magic word in 
> your example: "com.sun.star.comp." It seems that "comp." is not listed 
> as a module under c.s.s., nor have I seen it mentioned in the Dev 
> Guide. But it works.
>
And this is why I like open source and sharing my work.... oh, and when 
others share their work as well. So, thanks for the thanks and thanks 
for posting your work.

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Re: A wiki about how to support a VBA API

Posted by Juergen Schmidt <jo...@googlemail.com>.
On Tuesday, 8. May 2012 at 04:08, TJ Frazier wrote:
> On 5/7/2012 20:02, Andrew Douglas Pitonyak wrote:
> > 
> > > If your changes show properly in the Preview mode, then they will be
> > > correctly saved when you Save. Sometimes the ATS delivers stale pages,
> > > so you might see the original page, unchanged, after the Save. The
> > > workaround is described in "Moving Day":
> > > <http://wiki.services.openoffice.org/wiki/Moving_Day>
> > > Taking a break also works; the stale pages expire and go away.
> > > Sorry for the problem, but it's quite beyond my poor powers to fix.
> > > 
> > 
> > Thanks.... Time permitting, I will make some more changes as needed. The
> > important thing, however, is that it is already understandable :-)
> > 
> 
> I owe you one, for the help your (on-line) book provided, when I was 
> writing the temporary GUI for the new encoding feature:
> <http://wiki.services.openoffice.org/wiki/User:TJFrazier/Encryption>
> 
> I might never have found the Config Provider without the magic word in 
> your example: "com.sun.star.comp." It seems that "comp." is not listed 
> as a module under c.s.s., nor have I seen it mentioned in the Dev Guide. 
> But it works.
> 
> 

...comp.. is typically used for the implementation name of an implementation object implementing a service. It is possible to have multiple implementation for one and the same service. For many services we have only one impl but for others (e.g. typical service provider interfaces like a smart tag extension) we have or can have more. 
The implementation used the last registered impl for a service when it founds more than one. But it is possible to use the impl name as well to instantiate exactly the implementation you want. Well that is an internal detail only and is used sometimes. But it could theoretically be changed at any time.

Ok enough for now, when you interested to learn more about the details feel free to ask.

Juergen
> 
> -- 
> /tj/
> 
> 



Re: A wiki about how to support a VBA API

Posted by TJ Frazier <tj...@cfl.rr.com>.
On 5/7/2012 20:02, Andrew Douglas Pitonyak wrote:
>
>> If your changes show properly in the Preview mode, then they will be
>> correctly saved when you Save. Sometimes the ATS delivers stale pages,
>> so you might see the original page, unchanged, after the Save. The
>> workaround is described in "Moving Day":
>> <http://wiki.services.openoffice.org/wiki/Moving_Day>
>> Taking a break also works; the stale pages expire and go away.
>> Sorry for the problem, but it's quite beyond my poor powers to fix.
>>
> Thanks.... Time permitting, I will make some more changes as needed. The
> important thing, however, is that it is already understandable :-)
>
I owe you one, for the help your (on-line) book provided, when I was 
writing the temporary GUI for the new encoding feature:
<http://wiki.services.openoffice.org/wiki/User:TJFrazier/Encryption>

I might never have found the Config Provider without the magic word in 
your example: "com.sun.star.comp." It seems that "comp." is not listed 
as a module under c.s.s., nor have I seen it mentioned in the Dev Guide. 
But it works.

-- 
/tj/


Re: A wiki about how to support a VBA API

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
> If your changes show properly in the Preview mode, then they will be 
> correctly saved when you Save. Sometimes the ATS delivers stale pages, 
> so you might see the original page, unchanged, after the Save. The 
> workaround is described in "Moving Day":
> <http://wiki.services.openoffice.org/wiki/Moving_Day>
> Taking a break also works; the stale pages expire and go away.
> Sorry for the problem, but it's quite beyond my poor powers to fix.
>
Thanks.... Time permitting, I will make some more changes as needed. The 
important thing, however, is that it is already understandable :-)

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Re: A wiki about how to support a VBA API

Posted by TJ Frazier <tj...@cfl.rr.com>.
Hi, Andrew,

On 5/5/2012 02:48, Andrew Douglas Pitonyak wrote:
> On 05/02/2012 04:29 AM, Peng Chen wrote:
>> Hi All,
>> I post a wiki about how to support a VBA API in OpenOffice,
>> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>>
>>
>> Any feedback will be appreciated, thanks.
>>
> Now that I know what the page describes (thanks everyone), I gave this a
> pretty careful read. It seems to provide significant information, and I
> learned much. There are some issues with respect to language usage, and
> they are easily fixed; I started to fix the wording (after I figured out
> that I can), but I stopped after the first paragraph for two reasons:
>
> 1. It is not clear to me that my changes really did save, and

If your changes show properly in the Preview mode, then they will be 
correctly saved when you Save. Sometimes the ATS delivers stale pages, 
so you might see the original page, unchanged, after the Save. The 
workaround is described in "Moving Day":
<http://wiki.services.openoffice.org/wiki/Moving_Day>
Taking a break also works; the stale pages expire and go away.
Sorry for the problem, but it's quite beyond my poor powers to fix.

/tj/
>
> 2. It is very late and I need some sleep before my little girls drag me
> out of bed (not to mention the bigger girl that I married).
>



Re: A wiki about how to support a VBA API

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
On 05/02/2012 04:29 AM, Peng Chen wrote:
> Hi All,
>       I post a wiki about how to support a VBA API in OpenOffice,
> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>
>       Any feedback will be appreciated, thanks.
>
Now that I know what the page describes (thanks everyone), I gave this a 
pretty careful read. It seems to provide significant information, and I 
learned much. There are some issues with respect to language usage, and 
they are easily fixed; I started to fix the wording (after I figured out 
that I can), but I stopped after the first paragraph for two reasons:

1. It is not clear to me that my changes really did save, and

2. It is very late and I need some sleep before my little girls drag me 
out of bed (not to mention the bigger girl that I married).

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Re: A wiki about how to support a VBA API

Posted by Yong Lin Ma <ma...@gmail.com>.
On Sat, May 5, 2012 at 9:51 AM, Claudio Filho <fi...@gmail.com> wrote:
> Hi
>
> 2012/5/3 Rob Weir <ro...@apache.org>:
>> We have VBA support in Symphony.  It looks like the Symphony
>> developers are starting to add some technical documentation about the
>> features they added to Symphony, beyond what is in OOo.
>
> Rob, a curiousity: this support is a translation from VBA to OOo Basic
> or other language? Or other thing?

VBA support means support to VBA script in MS document, especially in
excel documents.
It is not translation from VBA to OOo Basic.  But Star Basic script
engine is reused and VBA script is mapping to UNO API instead of
Star Basic.

VBA support includes correctly open and execute VBA script in a MS
document, editing and save back the VBA script in a MS document.
Things are also different for MS document binary format and 2007/2010 format.

>
> And, i'm not sure if i understood, but this expertise in Symphony will
> migrate to AOO?
>

This is just a wiki to clarify the VBA support status in AOO3.4. Chen
Peng is an expertise on VBA and OO.o programability from Symphony
team. But he is not a AOO committer yet. If he want to do anything
significant on VBA for AOO, he needs post his idea/plan in AOO wiki
first.

> Best,
> Claudio

Re: A wiki about how to support a VBA API

Posted by Claudio Filho <fi...@gmail.com>.
Hi

2012/5/3 Rob Weir <ro...@apache.org>:
> We have VBA support in Symphony.  It looks like the Symphony
> developers are starting to add some technical documentation about the
> features they added to Symphony, beyond what is in OOo.

Rob, a curiousity: this support is a translation from VBA to OOo Basic
or other language? Or other thing?

And, i'm not sure if i understood, but this expertise in Symphony will
migrate to AOO?

Best,
Claudio

Re: A wiki about how to support a VBA API

Posted by Rob Weir <ro...@apache.org>.
On Thu, May 3, 2012 at 1:17 AM, Dave Fisher <da...@comcast.net> wrote:
>
> On May 2, 2012, at 9:45 PM, Andrew Douglas Pitonyak wrote:
>
>> On 05/02/2012 04:29 AM, Peng Chen wrote:
>>> Hi All,
>>>      I post a wiki about how to support a VBA API in OpenOffice,
>>> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>>>
>>>      Any feedback will be appreciated, thanks.
>>>
>> I am almost embarrassed to say this, but after having read it, I have no idea what the article is about. I think that the problem is that I lack the proper vocabulary. For example, when I see "VBA", I think "Visual Basic Applications", which is something that MSO (Microsoft Office) supports, and not OOo (OpenOffice.org).
>>
>> Is this an article related to the VBA compatibility mode stuff that can be enabled using a specific Option from inside of StarBasic?
>>
>> After I have a handle on exactly what is accomplished, then I will read this again, since it looks like you are probably answering some very specific questions that I have in areas that I do not fully understand, but have searched for in the past.
>>
>> Sorry for my lack of immediate understanding.
>
> I'm not sure what I am reading either. My reference is using Apache POI and its User Defined Function (UDF) capability to rewrite a VBA function in Java. This allows me to have a different implementation of a VBA function that is not in a Basic derivative. Whether that works or not depends on whether I can accurately code the VBA in Java. This is not easy.
>
> I think that this API may be more about "UDF" support than VBA support.
>
> To me VBA support means that I can run my MS Office VBAs in the program without any trouble.
>

We have VBA support in Symphony.  It looks like the Symphony
developers are starting to add some technical documentation about the
features they added to Symphony, beyond what is in OOo.

-Rob

> Still, UDF support is useful. VBA support is a panacea.
>
> What's it all about Peng?
>
> Regards,
> Dave
>
>>
>> --
>> Andrew Pitonyak
>> My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
>> Info:  http://www.pitonyak.org/oo.php
>>
>

Re: A wiki about how to support a VBA API

Posted by Dave Fisher <da...@comcast.net>.
On May 2, 2012, at 9:45 PM, Andrew Douglas Pitonyak wrote:

> On 05/02/2012 04:29 AM, Peng Chen wrote:
>> Hi All,
>>      I post a wiki about how to support a VBA API in OpenOffice,
>> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>> 
>>      Any feedback will be appreciated, thanks.
>> 
> I am almost embarrassed to say this, but after having read it, I have no idea what the article is about. I think that the problem is that I lack the proper vocabulary. For example, when I see "VBA", I think "Visual Basic Applications", which is something that MSO (Microsoft Office) supports, and not OOo (OpenOffice.org).
> 
> Is this an article related to the VBA compatibility mode stuff that can be enabled using a specific Option from inside of StarBasic?
> 
> After I have a handle on exactly what is accomplished, then I will read this again, since it looks like you are probably answering some very specific questions that I have in areas that I do not fully understand, but have searched for in the past.
> 
> Sorry for my lack of immediate understanding.

I'm not sure what I am reading either. My reference is using Apache POI and its User Defined Function (UDF) capability to rewrite a VBA function in Java. This allows me to have a different implementation of a VBA function that is not in a Basic derivative. Whether that works or not depends on whether I can accurately code the VBA in Java. This is not easy.

I think that this API may be more about "UDF" support than VBA support.

To me VBA support means that I can run my MS Office VBAs in the program without any trouble.

Still, UDF support is useful. VBA support is a panacea.

What's it all about Peng?

Regards,
Dave

> 
> -- 
> Andrew Pitonyak
> My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
> Info:  http://www.pitonyak.org/oo.php
> 


Re: A wiki about how to support a VBA API

Posted by Peng Chen <ch...@gmail.com>.
When users load MS document in OpenOffice with VBA, sometimes the macro
doesn't work, because we lack the support of VBA APIs in OO.
In this wiki, what's I want to express is that you can add the unsupported
API by yourself in OO's code if you meet such situation or you have
interesting to implement unsupported VBA APIs in OO.

2012/5/3 ZuoJun Chen <zj...@gmail.com>

> Hi,  Andrew, I think the article is about VBA Macros interoperability
> http://wiki.services.openoffice.org/wiki/VBA . It explains the details if
> you want to hack OO for more excel macros support.  Currently there are
> still many VBA apis not supported in OO,  although the support framework
> has been implemented.
> 2012/5/3 Andrew Douglas Pitonyak <an...@pitonyak.org>
>
> > On 05/02/2012 04:29 AM, Peng Chen wrote:
> >
> >> Hi All,
> >>      I post a wiki about how to support a VBA API in OpenOffice,
> >> http://wiki.services.**
> openoffice.org/wiki/How_to_**support_a_VBA_API_in_
> >> **OpenOffice<
> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
> >
> >>
> >>      Any feedback will be appreciated, thanks.
> >>
> >>  I am almost embarrassed to say this, but after having read it, I have
> no
> > idea what the article is about. I think that the problem is that I lack
> the
> > proper vocabulary. For example, when I see "VBA", I think "Visual Basic
> > Applications", which is something that MSO (Microsoft Office) supports,
> and
> > not OOo (OpenOffice.org).
> >
> > Is this an article related to the VBA compatibility mode stuff that can
> be
> > enabled using a specific Option from inside of StarBasic?
> >
> > After I have a handle on exactly what is accomplished, then I will read
> > this again, since it looks like you are probably answering some very
> > specific questions that I have in areas that I do not fully understand,
> but
> > have searched for in the past.
> >
> > Sorry for my lack of immediate understanding.
> >
> > --
> > Andrew Pitonyak
> > My Macro Document: http://www.pitonyak.org/**AndrewMacro.odt<
> http://www.pitonyak.org/AndrewMacro.odt>
> > Info:  http://www.pitonyak.org/oo.php
> >
> >
>

Re: A wiki about how to support a VBA API

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
Excellent... I thought that might be the case, but I wanted to be sure 
before I wracked my brain more. On more than one occasion, I had looked 
to see how this was done (and failed to figure it out). I will take 
another look. Thanks!

On 05/03/2012 01:45 AM, ZuoJun Chen wrote:
> Hi,  Andrew, I think the article is about VBA Macros interoperability 
> http://wiki.services.openoffice.org/wiki/VBA . It explains the details 
> if you want to hack OO for more excel macros support.  Currently there 
> are still many VBA apis not supported in OO,  although the support 
> framework has been implemented.
> 2012/5/3 Andrew Douglas Pitonyak <andrew@pitonyak.org 
> <ma...@pitonyak.org>>
>
>     On 05/02/2012 04:29 AM, Peng Chen wrote:
>
>         Hi All,
>              I post a wiki about how to support a VBA API in OpenOffice,
>         http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>
>              Any feedback will be appreciated, thanks.
>
>     I am almost embarrassed to say this, but after having read it, I
>     have no idea what the article is about. I think that the problem
>     is that I lack the proper vocabulary. For example, when I see
>     "VBA", I think "Visual Basic Applications", which is something
>     that MSO (Microsoft Office) supports, and not OOo (OpenOffice.org).
>
>     Is this an article related to the VBA compatibility mode stuff
>     that can be enabled using a specific Option from inside of StarBasic?
>
>     After I have a handle on exactly what is accomplished, then I will
>     read this again, since it looks like you are probably answering
>     some very specific questions that I have in areas that I do not
>     fully understand, but have searched for in the past.
>
>     Sorry for my lack of immediate understanding.
>
>     -- 
>     Andrew Pitonyak
>     My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
>     Info: http://www.pitonyak.org/oo.php
>
>

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Re: A wiki about how to support a VBA API

Posted by ZuoJun Chen <zj...@gmail.com>.
Hi,  Andrew, I think the article is about VBA Macros interoperability
http://wiki.services.openoffice.org/wiki/VBA . It explains the details if
you want to hack OO for more excel macros support.  Currently there are
still many VBA apis not supported in OO,  although the support framework
has been implemented.
2012/5/3 Andrew Douglas Pitonyak <an...@pitonyak.org>

> On 05/02/2012 04:29 AM, Peng Chen wrote:
>
>> Hi All,
>>      I post a wiki about how to support a VBA API in OpenOffice,
>> http://wiki.services.**openoffice.org/wiki/How_to_**support_a_VBA_API_in_
>> **OpenOffice<http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice>
>>
>>      Any feedback will be appreciated, thanks.
>>
>>  I am almost embarrassed to say this, but after having read it, I have no
> idea what the article is about. I think that the problem is that I lack the
> proper vocabulary. For example, when I see "VBA", I think "Visual Basic
> Applications", which is something that MSO (Microsoft Office) supports, and
> not OOo (OpenOffice.org).
>
> Is this an article related to the VBA compatibility mode stuff that can be
> enabled using a specific Option from inside of StarBasic?
>
> After I have a handle on exactly what is accomplished, then I will read
> this again, since it looks like you are probably answering some very
> specific questions that I have in areas that I do not fully understand, but
> have searched for in the past.
>
> Sorry for my lack of immediate understanding.
>
> --
> Andrew Pitonyak
> My Macro Document: http://www.pitonyak.org/**AndrewMacro.odt<http://www.pitonyak.org/AndrewMacro.odt>
> Info:  http://www.pitonyak.org/oo.php
>
>

Re: A wiki about how to support a VBA API

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
On 05/02/2012 04:29 AM, Peng Chen wrote:
> Hi All,
>       I post a wiki about how to support a VBA API in OpenOffice,
> http://wiki.services.openoffice.org/wiki/How_to_support_a_VBA_API_in_OpenOffice
>
>       Any feedback will be appreciated, thanks.
>
I am almost embarrassed to say this, but after having read it, I have no 
idea what the article is about. I think that the problem is that I lack 
the proper vocabulary. For example, when I see "VBA", I think "Visual 
Basic Applications", which is something that MSO (Microsoft Office) 
supports, and not OOo (OpenOffice.org).

Is this an article related to the VBA compatibility mode stuff that can 
be enabled using a specific Option from inside of StarBasic?

After I have a handle on exactly what is accomplished, then I will read 
this again, since it looks like you are probably answering some very 
specific questions that I have in areas that I do not fully understand, 
but have searched for in the past.

Sorry for my lack of immediate understanding.

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php