Re: [udk-dev] Create java UNO-IDL project and using non-natif librairies

2010-01-29 Thread Juergen Schmidt

On 1/29/10 1:13 PM, Philippe Denis wrote:


Le 29-janv.-10 à 11:20, Juergen Schmidt a écrit :



UNO-Type-Path: mytypes.jar.jar
Class-Path: lib/myhelper.jar
RegistrationClassName: 


If I have many librairies to add at the class-Path, what's the right
solution :
Class-Path: lib/myhelper.jar lib/myhelper2.jar


this one ;-)

Juergen


or

Class-Path: lib/myhelper.jar
Class-Path: lib/myhelper2.jar

Thanks




-
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org



Re: [udk-dev] Create java UNO-IDL project and using non-natif librairies

2010-01-29 Thread Juergen Schmidt

On 1/29/10 10:27 AM, Philippe Denis wrote:

Hello,

I create a java UNO-IDL project in eclipse. In this project, I use
external librairies. After, I deploy my module in OO without any problem.
However, when I launch my macro that uses my module, I receive an error
: some classes are not found during the execution.

I understand that when I deploy my module in OO, my libriairies are not
imported in OpenOffice.

Do you know how I can use external librairies? or Do you know if it's
possible to use an external librairie in a UNO-IDL project?

The external libriaire is just a .jar file that I created.


let's assume your service is defined in IDL mytypes.idl -> 
mytypes.[rdb|jar] and implemented in myimpl.jar. And you have an 
additional library myhelper.jar.


The structure in your oxt looks like

\...
\mytypes.rdb
\mytypes.jar
\myimple.jar
\lib\myhelper.jar

Then you need at least the following manifest entries in your myimple.jar

UNO-Type-Path: mytypes.jar.jar
Class-Path: lib/myhelper.jar
RegistrationClassName: appropriate registration class>


This means that mytypes.jar are loaded globally to make the new types 
available. myhelper.jar is a direct dependency of myimpl.jar and loaded 
via the same classloader that loads your myimpl.jar. Every extensions is 
loaded in their own classloader. This classlaoder inherit the env of the 
global classloader.


I hope this helps

Juergen



Thank you very much.


Philippe

-
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org




-
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org



Re: [udk-dev] The v2.4.2 SDK available [Was: Building PUNO On OOo 3.x]

2009-06-03 Thread Juergen Schmidt

Stephan Bergmann wrote:

On 06/03/09 15:46, Adam Tauno Williams wrote:

Is the 2.4.2 SDK still available anywhere?  I've searched around and not
had any luck.  
said that 2.4.2 says sdk_linuxintel isn't available and manually I
haven't been able to find it on any of the mirrors.


Jürgen, can you help?
not really, i don't know which versions we have stored. I assume that 
the old version is not longer available.


Which platform do you need? The 2.4 SDK should be fine because we 
normally don't release micro versions (exception for 3.1.1)


Juergen

-
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org



[udk-dev] Re: [api-dev] Thinking about an API deprecation process

2009-04-24 Thread Juergen Schmidt

Hi Thorsten,

thanks for the infos from the ESC. I think we have to discuss and to 
define a lot of things here.


Before we start discussing it in more detail, please can we agree to 
continue on one mailing list only. I would suggest to continue on the 
d...@api.openoffice.org list because it is API related and the correct 
list for it.


I would also suggest to summarize all the outcome of the discussion on a 
new wiki page in the API section.

I have created the following page
http://wiki.services.openoffice.org/wiki/API/Concepts_API_changes

Display title=Concepts for incompatible API changes and an API 
deprecation process


Thanks

Juergen


Thorsten Behrens wrote:

Hi *,

on the last ESC meeting, we had a little brainstorming about if and
how to deprecate OOo API. The 'if' was unanimously agreed upon,
for the 'how' we came up with the following thoughts:

API deprecation
===

See
http://wiki.services.openoffice.org/w/images/2/2a/Esc-mar-2009-api-deprecation.odp
for the kickoff slides

 -- What we need to do --


Decide on preconditions for change:
 - API was badly designed (architects/pleads to vote if not
   concordant)
   Have a list of 'design smells' here, e.g.:
   * missing exception specifications

 - API is unused
   * implemented but unused (can only be easily verified inside OOo
 code repo, with some more effort inside extension repo - is
 that enough?) 
   * not implemented (maybe transitively, i.e. listener interfaces,

 which are meant for API clients, but don't have code to call
 them inside OOo)

 - API implementation is too expensive (referring to both effort &
   performance)  (architects/pleads to vote if not concordant)
   What we mean here is e.g. (hypothetical):
   * profiling xml import has shown that
 css::xml::sax::XEntityResolver is horribly inefficient and
 needs a third argument
   * after the drawing layer rework, one of the css::drawing
 interfaces needs an inordinate amount of code to emulate old
 semantics

Decide on constraints:
 - how many clients does this API have
   * inside OOo code
   * (estimated) use outside OOo repo
   * (estimated) number of implementers not reading
 interface-announce

   For the latter two, if (at most) recompile is enough, any number 
   of implementers won't block change.


   For the latter two, if syntactic changes are required, have
   architects/pleads majority in favor of change?

 - how 'bad' is the API really – if bad enough, change anyway? 


Process of Change
 - when would change be permitted - every feature release, or only
   major releases?

 - deprecate API in advance - one or two features releases before
   the actual removal. Of course, a replacement needs to be
   available then?

 - can/should we add technical barriers/support for detecting stale
   API usage, i.e. refuse to run such extensions? Should we add
   technical means to warn devs when using deprecated API (either
   enabled in debug builds, or in a special logging mode of OOo)?

Who decides?
 - we've referred to the entity finally deciding as 
   "architects/pleads" here; please consider that a place holder.

   We'd like to hear sensible proposals here also for that
   committee, also simply voting on the relevant project mailing
   list is conceivable, or just having the respective project lead
   decide.

Looking forward to your ideas,

Kay, Frank & Thorsten


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org




--
Sun Microsystems GmbHJuergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany

Registered Office: Sun Microsystems GmbH, Sonnenallee 1, D-85551 
Kirchheim-Heimstetten

Commercial register of the Local Court of Munich: HRB 161028
Managing Directors: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Chairman of the Supervisory Board: Martin Haering

-
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org



Re: [udk-dev] How to write a calc addin?

2008-10-20 Thread Juergen Schmidt

Hi Andrea,

first of all the better mailing list would be [EMAIL PROTECTED] or 
[EMAIL PROTECTED]


I agree that the documentation is not up-to-date and i will try to fix 
this asap. Forgot the old mechanism.


The format of an oxt package is described in detail in the DevGuide and 
you can find examples in the SDK as well.


You don't have to implement the XAddin interface. Therefore you need 
(besides the DIL defintion) an appropriate CalcAddins.xcu where you 
define and document the new addin functions.


Under the node "AddInInfo" you insert a new node for your own addin, 
something like "org.openoffice.addin.MyNewAddin". The next node 
"AddInFunctions" is equal for all addins and opens the section where you 
define your new functions. Here in the example a new function with name 
"someValue". I am sure that the rest of the file is self explained ...

  ...
  
 

   
  
 SomeValues
  ...

Your C++ component should be the same as before but you don't need the 
XAddin interface (see my posted Java example).


Pack the xcu, your C++ lib and the type library in an oxt file and 
that's it.


The oxt file can be quite easy deployed via the extension manager.


Juergen

Andrea wrote:

Hi,

I've been trying for a while to create a Calc addin.

First, I followed the instructions in
http://wiki.services.openoffice.org/wiki/Calc/Add-In/Simple_Calc_Add-In
http://wiki.services.openoffice.org/wiki/Calc/Add-In/CompleteAddIn

And it worked (with some minor changes), but the deployment is a bit obscure, 
requiring the user to
change some config files of OpenOffice.

Then, I've learnt on this mailing list that there is a new preferred way of 
doing that, using
extensions, xcu, oxt files.
Something can be found here
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/File_Format
http://wiki.services.openoffice.org/wiki/Calc/Add-In/Project_Type
but it does not seem to give any full example, and detailed specifications.

It seems NetBeans can create a project of type Calc addin, but I've never used 
it.

There is a project called QuantLibAddin http://quantlib.org/quantlibaddin/ that 
seems to follow the
old method.

Does anybody know if I can find some documentation?
Especially it is not clear to me

1) which interfaces I need to implement. The first method seems to indicate the 
XAddIn must be
there, while the second seems to say the opposite.
2) how I can deploy it.

I prefer to be in control of the whole process and not use NetBeans or any 
other IDE, and I am
writing code in C++.

A working example could be very useful as well.

Thanks

Andrea


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: How to use reflection in a Calc Addin

2008-10-15 Thread Juergen Schmidt

Andrea wrote:

Juergen Schmidt wrote:

Hi Andrea,

based on your info i created an addin in Java with our NB plugin. You
can resue the IDL's, and the xcu file. Take a look into the Java
skeleton and adapt your C++ class ...


...


CalcAddins.xcu



Thanks.
The problem is that I cannot find any documentation about xcu files.
Where should I put it?
Is it the new way of telling OOCalc about addins?

yes it is a the new way.

You simply put the xcu file with your library in the an oxt zip package 
and create a manifest file with necessary entries.


Do you know about the structure of oxt files? If not please take a look 
into the DevGuide 
(http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/File_Format)


Juergen




Cheers


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: How to use reflection in a Calc Addin

2008-10-14 Thread Juergen Schmidt
I know, the AddIn
service is an older concept for providing the information that is now
stored in the CalcAddIns.xcu file. As Jürgen stated in a previous mail,
this has the advantage of not having to load the whole component for
accessing simple text information.
I do not have a link to an example for this, I am afraid. Perhaps
someone else can help here?
If you have used
http://wiki.services.openoffice.org/wiki/Calc/Add-In/CompleteAddIn
as a template, I fear that example should be updated.

That is new to me. I mush have missed the point where XAddIn is optional and, 
yes, I have followed
that template + the SimpleCalcAddin (where the is an other subtle error to do 
with the linker).
Things should get easier without this interface.
I will try to remove it and report what happens.


Andrea


I have removed

 interface com::sun::star::sheet::XAddIn;

from my IDL, which now looks like

service Service
{
interface XMaths; <<<<<<<<<<<<<< This is my interface 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
interface com::sun::star::lang::XInitialization;
interface com::sun::star::lang::XServiceName;
//  interface com::sun::star::sheet::XAddIn;
};

but now in OOCalc all my formulae appear as

=org.asi.Service.black()

instead of =BLACK()

and the result is #NAME?

I see you don't have an example, maybe there exists some documentation. What 
are the xcu files?
I want to use C++, but an example in Java could work as well.

Andrea


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Sun Microsystems GmbHJuergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany

Registered Office: Sun Microsystems GmbH, Sonnenallee 1, D-85551 
Kirchheim-Heimstetten

Commercial register of the Local Court of Munich: HRB 161028
Managing Directors: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Chairman of the Supervisory Board: Martin Haering

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: Calc addid: automatic argument names

2008-10-12 Thread Juergen Schmidt

Andrea wrote:

Juergen Schmidt wrote:

Hi Andrea,

i would suggest that you use our NB plugin to create a new simple Calc
Add-in. Take a look into the generated code. We generate a xcu file
where the add-in function is defined also and where you can directly
manage localized strings for the function and parameter names as well as
for descriptions. And when you take a look at the generated skeleton you
will notice that code becomes much simpler ...

The IDL can be seen as an necessary implementation detail to invoke the
the function later on easily and independent of the used programming
language ...

I agree that there is still some redundancy but i think it's much
simpler as before. First of all when you use our plugin ;-) A further
advantage is that we can read the info about new add-in function without
loading the whole component.


Juergen




Sounds good.
But I must be a bit dense tonight.
Where is this NB plugin?
You get via the build in lpugin manager of NetBeans -> search for 
OpenOffice.org API plugin



Does it support C++?
no, the plugin supports Java only at the moment. C++ support is on our 
todo list but i don't know when we will have time to implment it.


Juergen



Andrea


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: How to use reflection in a Calc Addin

2008-10-12 Thread Juergen Schmidt

Hi Andrea,

why should we do that, normally it is not needed and i still don't 
understand why you need it. Maybe you ca give us some more info about 
your add-in function and for what exactly you need tis info.


Juergen


Andrea wrote:

Andrea wrote:

Hi,

I am still trying to automatically find out argument names within a calc addin.
I want to take them from the IDL description.

I need an instance of

XIdlReflection

which is created via

Reference< XInterface  > xInterface = serviceManager->createInstance(  
OUString::createFromAscii(
"com.sun.star.reflection.CoreReflection" ));

Now, where do I get the serviceManager?

Since I want to query my own methods, is there an easier way?
My class implements some interfaces, one of which describes the functions I 
want to export to OOCalc.
How do I get a XIdlClass for that interface?

Cheers

Andrea


Done:

in component_getFactory() I save the IDLClass

Reference< XInterface  > xInterface = 
xMgr->createInstance(OUString::createFromAscii(
"com.sun.star.reflection.CoreReflection" ));

Reference< XIdlReflection > rIDLReflection(xInterface, UNO_QUERY);
ourIDLClass = 
rIDLReflection->forName(OUString::createFromAscii("org.asi.XMaths"));

then

OUString getDisplayArgumentName( const OUString& aProgrammaticName, ::sal_Int32 
nArgument ) throw
(RuntimeException)
{
Reference< XIdlMethod > aMethod = 
ourIDLClass->getMethod(aProgrammaticName);
Sequence< ParamInfo > params = aMethod->getParameterInfos();
return params[nArgument].aName;
}

It looks such an obvious thing to do, I wonder why OOCalc does not do it by 
itself (with the
possibility to overwrite the argument name).

Andrea


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Calc addid: automatic argument names

2008-10-09 Thread Juergen Schmidt

Hi Andrea,

i would suggest that you use our NB plugin to create a new simple Calc 
Add-in. Take a look into the generated code. We generate a xcu file 
where the add-in function is defined also and where you can directly 
manage localized strings for the function and parameter names as well as 
for descriptions. And when you take a look at the generated skeleton you 
will notice that code becomes much simpler ...


The IDL can be seen as an necessary implementation detail to invoke the 
the function later on easily and independent of the used programming 
language ...


I agree that there is still some redundancy but i think it's much 
simpler as before. First of all when you use our plugin ;-) A further 
advantage is that we can read the info about new add-in function without 
loading the whole component.



Juergen


Andrea wrote:

Hi,

I've create a calc addin.
I would like to get the names of the arguments of my functions directly from 
the idl files.

I don't want to rewrite the same information in getDisplayArgumentName

The information is definitely present in the idl

   method 1:
   documentation: ""
   flags: synchronous
   name: "projection"
   return type name: "[][]double"
   parameter count: 3
   parameter 0:
   flags: in
   name: "x" 
<< argument 1

   type name: "[][]double"
   parameter 1:
   flags: in
   name: "a" 
<<  argument 2

   type name: "[][]double"
   parameter 2:
   flags: in
   name: "b" 
<< argument 3

   type name: "[][]double"

Which is the same place where Openoffice gets the function name from.

Any idea?

Andrea


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] UNO python and openoffice. ManualHowto

2008-08-27 Thread Juergen Schmidt

Lukasz Szybalski wrote:

Hello,
I have updated the manual and give example on how to use sqlalchemy
(python database wrapper for mssql,mysql,postgres,sqlite,oracle) and
openoffice. The code shows you how to use openoffice as a document
template and fill in the data from the database.

SqlAlchemy and OpenOffice


http://lucasmanual.com/mywiki/OpenOffice#head-a6f86c6beea8170c083cd3f45438066e6f20760f


The program works great. I'm able to create around 100 letters per
minute which is way better then typing them. Because it is so easy to
create mini tempalte in openoffice I can let marketing people design
the forms, and I just fill it in. Great Combination!!!

Few problems I was hoping you could could help with.
1. I would like to skip creating the temp file.
Template.odt ->(find and replace)->(save as)-> temp.odt >
insertDocumentFromURL ->(final.odt)
and just do
Template.odt ->(find and replace )->append ->(final.odt)
How can I do it?
2. Is there a way to open openoffice in some kind of quite mode?
openoffice -accept="socket,host=localhost,port=2002;urp;"  This opens
up the actual program. I think if I was able to run it in a background
that would speed things up.
you should maybe use a second user installation and start the office 
headless.

Try the additional parameters

-env:UserInstallation=/myuserdir -headless -nofirststartwizard


Juergen


3. How can I "find" things inside of textbox. I had to remove all
textbox fields because "find" couldn't look into them.

Ideas?

Thanks,
Lucas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Sun Microsystems GmbHJuergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany

Registered Office: Sun Microsystems GmbH, Sonnenallee 1, D-85551 
Kirchheim-Heimstetten

Commercial register of the Local Court of Munich: HRB 161028
Managing Directors: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Chairman of the Supervisory Board: Martin Haering

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: My first Calc addin: problem with exception handling

2008-08-24 Thread Juergen Schmidt

Andrea wrote:

Andrea wrote:

I have read that one should use the same compiler used to compile OO.
Is it (still) true? 


maybe. I don't know.

it is recommended to avoid problems



Is this my problem? 


No.
I managed to find what was the problem:

I followed this example
http://wiki.services.openoffice.org/wiki/SimpleCalcAddIn

but I think it is not using the correct options for the linker.

I have found a different set of options in the example directory of the sdk.
Now I can raise exceptions.

In particular this one seems to be important

-Wl,--version-script,../component.uno.map

What is the definitive guide to "options to compile a Calc add-in"?
that is a good question. The options used in the SDK should be ok but i 
have to confess that it is not well documented and not really well 
arranged. It's of course not easy to maintain the set of necessary 
options because i want to limit them on the necessary minimum in the SDK 
env. Anyway i have it on a longer todo list to clean up this in the SDK. 
Maybe i should create a new wiki page where i document the options and 
maintain it.


The problem with the wiki is that docu can be easy created but can be 
also become out dated fast and it's often not maintained.


Juergen




Andrea




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] UNO python and openoffice. ManualHowto

2008-08-21 Thread Juergen Schmidt

Alexandro Colorado wrote:
This is awesome and so desperately needed. I will add it to the PyUNO 
wikipage

http://wiki.services.openoffice.org/wiki/Python


well we need more. I would love to see a Python chapter in the DevGuide 
and many more examples in the code snippet base or under the API section 
in the wiki.





I wonder if it's CC/PDL we could import the manual in the wiki.

that would be nice.





On Wed, 20 Aug 2008 08:47:00 -0500, Lukasz Szybalski 
<[EMAIL PROTECTED]> wrote:



Hello,

I created a little manual on how to use openoffice, with python and uno.

http://lucasmanual.com/mywiki/OpenOffice

nice work

Juergen



Contents

  1. OpenOffice and Python
1. Start openoffice
2. Connect to OpenOffice
3. Modify Content
  1. Load Services
  2. Load Current Document
  3. Load New Document
  4. Load Existing Document
  5. Modifying text
  6. Create Table
4. Save
  1. Save Changes
  2. Save file as
  3. Exit the file
5. Manipulate
  1. Find and Replace
  2. Save to PDF


Now if I could only figure out how to read the whole odf to some
python object, do some find and replace, and send it back to odf for
writing.

Is that possible, or do I have to use:
createSearchDescriptor()



Thanks
Lucas










--
Sun Microsystems GmbH    Juergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany

Registered Office: Sun Microsystems GmbH, Sonnenallee 1, D-85551 
Kirchheim-Heimstetten

Commercial register of the Local Court of Munich: HRB 161028
Managing Directors: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Chairman of the Supervisory Board: Martin Haering

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Simple Bootstrap

2008-04-18 Thread Juergen Schmidt

Hi Stephan,

i am for a cleanup and so for a clean solution for all 3. As Kay pointed 
out the C++ solution is probaly not used very often.


Juergen

Stephan Bergmann wrote:
Unfortunately, with the advent of the Three-Layer Office 
(, 
starting DEV300m4) both the C++ and Java "simple bootstrap" mechanisms 
( 
and 
) 
no longer work.  The problems are as follows:


1  C++ unoapploader on Unix (Linux, Solaris):  Determines the location 
of an soffice application, adds the soffice path to LD_LIBRARY_PATH (so 
that the subordinate process finds the URE libraries, which used to be 
located next to the soffice application), and then spawns the 
subordinate process.  This no longer works, as the URE libraries are now 
located somewhere else.


2  C++ unoapploader.exe on Windows:  Determines the location of an 
soffice application, adds the soffice path to PATH (so that the 
subordinate process finds the URE libraries, which used to be located 
next to the soffice application), and then spawns the subordinate 
process.  This no longer works, as the URE libraries are now located 
somewhere else.


3  Java com.sun.star.lib.loader.Loader:  Determines the location of an 
soffice application, locates classes/juh.jar relative to the soffice 
path, calls com.sun.star.comp.helper.UnoInfo.getJars there (which 
returns the list of URE jar URLs), and loads the subordinate application 
in a class loader that knows the URE jars.  This no longer works, as 
juh.jar is now located somewhere else.


Problem 3 could most silently be fixed by adding a fake classes/juh.jar 
(containing only a modified com.sun.star.comp.helper.UnoInfo.getJars 
that returns the correct list of URE jar URLs) to each brand layer.  The 
advantage is that an old Loader continues to work against a new soffice 
installation.  The disadvantage is the somewhat dirty solution (have a 
classes subdir only for the fake juh.jar, have a fake juh.jar with the 
same name as the true juh.jar in the URE).


Problem 1 could most silently be fixed by adding symbolic links for all 
the URE libraries to all brand layer program directories.  The advantage 
is that an old unoapploader continues to work against a new soffice 
installation.  The disadvantage is the somewhat dirty solution (quite a 
number of symlinks, not for general use but just for unoapploader to be 
happy).


Problem 2 cannot be silently fixed, however.  The only solution I see is 
to change the Windows unoapploader.exe as follows:  Determine the 
location of an soffice application and check whether there is an 
executable called (say) ureinfo next to it.  If yes (i.e., new soffice 
installation) call it and (if successful exit status) use its stdout 
data to extend PATH.  If no (i.e., old soffice installation) extend PATH 
with the soffice path, as before.  In either case, proceed as before 
(spawn subordinate application).  The disadvantage, of course, is that 
an old unoapploader will no longer work against a new soffice.


Given that problem 2 needs an incompatible solution, anyway, the 
question is, for each of the problems 1 and 3, whether to go with a 
compatible but somewhat dirty solution, or too go with a clean but 
incompatible solution.  (In all three cases the same sketched ureinfo 
could be called by the loaders, parameterized on stdin whether to supply 
information for C++ or for Java.)


For problem 1 my opinion is to go with the same solution as for problem 
2 (i.e., call the sketched ureinfo on all platforms from the C++ 
unoapploaders, and thus have an incompatible change in the C++ 
unoapploaders of all platforms).  For problem 3 I am somewhat undecided 
(and, out of laziness, would probably go with the fake classes/juh.jar 
wart, as it would be less work to implement).


More opinions, anybody?
-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Success Histories with OpenOffice UNO

2007-10-17 Thread Juergen Schmidt

Hi Andres,

UNO is the used technology but you are searching more for specific 
office API's or better solutions for your use case. I would suggest the 
[EMAIL PROTECTED] mailing list to reach more API users.


Juergen

Andres Tarallo wrote:

Hi !!!

I started to work for a public sector project. This porject involves a web
application that will generate documents with OpenOffice via UNO.

 I'm interested in success cases of poroject that involve merging many
documents into a new one, managing large documents, scalabilty issues.

Thanks for your help.

Andres Tarallo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Reference for .xcu files

2007-09-04 Thread Juergen Schmidt

Tobias Neubert wrote:

Hi all,

another newbie question: Is there any reference for the .xcu-files?
what exactly do you want to know. General information about xcu files 
[1] or do you have a concrete usecase in mind?


Juergen

[1] http://api.openoffice.org/docs/DevelopersGuide/Config/Config.xhtml


Tobias

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Reference for .xcu files

2007-09-04 Thread Juergen Schmidt

Alexandro Colorado wrote:
On Tue, 04 Sep 2007 16:37:39 -0500, Tobias Neubert <[EMAIL PROTECTED]> 
wrote:



Hi all,

another newbie question: Is there any reference for the .xcu-files?

Tobias



I don't know one for sure, maybe on the developer guide. 
exactly xcu is the file extension for configuration files. For more 
detailed infos related to the configuration see 
http://api.openoffice.org/docs/DevelopersGuide/Config/Config.xhtml


Juergen

However there
is a tutorial that touch a bit on the explanation of XCU for packaging 
external Addons.


http://wiki.services.openoffice.org/wiki/UNO_component_packaging



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] additional java libraries for my component

2007-09-04 Thread Juergen Schmidt

Hi Tobias,

Tobias Neubert wrote:

Hi all,

I hope this is the right place to post this question. If not, please 
tell me the right one.


Ok, I am new to UNO and I want to develop a filter for textdocuments. 
Therefor I started with the AsciiReplaceFilter-example of the 
development guide, which I can compile, package and install via unopkg. 
The idea is to customize that filter until I have my own one.


My filter needs an additional jar-file to do its work. So I tried to 
create a uno package that contains this additional jar file at the root 
of the package. Moreover I inserted the following to the manifest file:


manifest:media-type="application/vnd.sun.star.uno-component;type=Java" 
manifest:full-path="third-party.jar"/>
that is not correct because it is no component jar. You simply need a 
Jar manifest entry in your component jar that references the third party 
jar in your package.


for example an entry like this:
Class-Path: ./mythirdparty.jar

For more detailed info see the Java documentation, in Jar file 
specification the section about main attributes.


Juergen




Adding that uno package results in the following error:

## Progress log entry 2007-09-04 15:51:46 ##
Copying: MyFilter.uno.pkg
Enabling: MyFilter.uno.pkg
Enabling: TypeDetection.xcu
Enabling: MyFilter.uno.jar
rollback...
 Disabling: TypeDetection.xcu
 rollback finished.
ERROR: (com.sun.star.ucb.CommandFailedException) { { Message = "An error 
occurred while enabling: MyFilter.uno.jar", Context = 
(com.sun.star.uno.XInterface) @181c2c8 },
Reason = (any) { 
(com.sun.star.registry.CannotRegisterImplementationException) { { 
Message = "", Context = (com.sun.star.uno.XInterface) @0 } } } }



Can anyone tell me what to to to use additional java libraries within my 
uno package?


Any help is welcome. Cheers,
Tobias

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] evolving API

2007-08-27 Thread Juergen Schmidt

Stephan Bergmann wrote:

Frank Schönheit - Sun Microsystems Germany wrote:

Hi Stephan,


 for the records.


Please cite the URL of the page before ;)


Oops, lost in copy-n-paste...





an interesting discussion during my vacation ;-) (cc'ed jsc to the 
issue) that fits well to my BOF talk at the OO.org conference about 
compatibility of the API.


Juergen


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Unpublished interface to published service

2007-07-23 Thread Juergen Schmidt

Frank Schönheit - Sun Microsystems Germany wrote:

Hi Juergen,


But, well, you asked for a workaround. I'll tell you one of my best-kept
secrets :), though it will probably cease existing now that Stephan
knows about it: Just forward-declare the interface, instead of including
the IDL, and pretend, in the forward-declaration, it is published.
mmh, that is of course a bad hack. If we would extend regcompare to 
detect this as well the build would fail again.


Well, your comment in the mentioned issue reads "accepted", so I thought
that my small, little, innocent hack :) just anticipates your resolving
of the issue :)


"accepted" means that the task is correct for me and that i will take 
care of it. But it means not that i 100% agree so far, i am somewhat 
undecided ;-)


Juergen



Ciao
Frank



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Unpublished interface to published service

2007-07-20 Thread Juergen Schmidt

Frank Schönheit - Sun Microsystems Germany wrote:

Hi Kohei,


But I'm having trouble leaving the new interface unpublished.  I've
added the following lines:

/** provides access to the collection of filter fields.
 */
[optional] interface
com::sun::star::sheet::XExtendedSheetFilterDescriptor;

but the building of offapi fails, noting that "you can't use an
unpublished interface to a published service."  Is there a way to get
around this?


I heartly disagree with Stephan's answer, but so far was not able to
convince him (we already discussed this).

http://www.openoffice.org/issues/show_bug.cgi?id=69326, btw, describes
the problem - please lobby for it :).

In my opinion, the restriction that you cannot add unpublished
interfaces as optional entity to published services is way too strict.
There are very theoretic (sorry, Stephan) reasons for this, but in
reality, all services which are affected by such a change would not
suffer at all.

Mentionng the new interface in the document only is not a valid
alternative, as this introduces an additional complexity in the
generated IDL reference, is more easily overlooked by readers, and can't
be examined at runtime (see
css.reflection.XServiceTypeDescription.getOptionalServices).

But, well, you asked for a workaround. I'll tell you one of my best-kept
secrets :), though it will probably cease existing now that Stephan
knows about it: Just forward-declare the interface, instead of including
the IDL, and pretend, in the forward-declaration, it is published.


mmh, that is of course a bad hack. If we would extend regcompare to 
detect this as well the build would fail again. I don't like this 
approach. Either we find an agreement that it is allowed or we shouldn't 
do it. So please don't do it this way at the moment.


Juergen



Ciao
Frank



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-31 Thread Juergen Schmidt

Hi Joachim,

Joachim Dahl wrote:

I would like to forward such a request.   Is OOoforums/Calc:
http://www.oooforum.org/forum/viewforum.phtml?f=3


well, oooforum is an independent site and i am not sure if it can help 
here. Maybe somebody would pick it up and would make a official 
enhancement issue from it. But the correct way would be to submit such 
an issue directly on 
http://sc.openoffice.org/servlets/ProjectIssues;jsessionid=D75427EFC018527412170A29D22373CC.


A good idea would be also to discuss it first on [EMAIL PROTECTED] 
or [EMAIL PROTECTED]


Juergen



the appropriate place,  or this list?

- joachim

On 5/31/07, Juergen Schmidt <[EMAIL PROTECTED]> wrote:


Hi,

ah yes, i forgot it. From my perspective it is a useless feature to call
the function again and again to prepare this little preview of the
result in the function wizard dialog. Anyway you can submit an request
for enhancement (for the calc appl) if you like. I would like to have it
configurable.

Juergen

Joachim Dahl wrote:
> The problem seems to be that the add-in is executed every time I click
on a
> parameter in the
> function-wizard,  and thus the optimization routines I am wrapping are
> executed over and over again
> as I cycle through the different parameters.   So it's not a bug, but
> something you want to keep in mind for larger problems that take 
several

> minutes or longer to finish.
>
> - joachim
>
>
> On 5/29/07, Juergen Schmidt <[EMAIL PROTECTED]> wrote:
>>
>> Hi Joachim,
>>
>> that of course sounds strange and we should analyze it in detail. I am
>> not really familiar with the Python binding but anyway we should 
try to

>> check it. Maybe you can prepare a small demo add-in and can provide it
>> for further investigation.
>>
>> Juergen
>>
>> Joachim Dahl wrote:
>> > I have a final question that I'd like to ask you...
>> >
>> > I developed and tested the add-in on Ubuntu Feisty that comes with
OOo
>> > 2.2.0.
>> > The add-in
>> > seems to work perfectly,   but the function wizard is incredibly
>> sluggish
>> > for my add-in (and not for the
>> > regular OOo add-in)...   For example,  when I select a parameter in
the
>> > add-in, CPU usage goes
>> > to 100% and it takes 5-10s before the new parameter and the
>> corresponding
>> > cell ranges are
>> > highlighted - and the examples are all very small.   But if I update
>> the
>> > add-in parameters
>> > directly without the function wizard it works fast and smoothly,  so
>> it's
>> > not just simply Python
>> > being slow.
>> >
>> > Can anyone think of a potential error in the add-in that would cause
>> this?
>> > If I can solve this problem
>> > also,  I will be happy to the add a small Python example to the wiki
in
>> > return for all your help...
>> >
>> > thanks
>> > Joachim
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-31 Thread Juergen Schmidt

Hi,

ah yes, i forgot it. From my perspective it is a useless feature to call 
the function again and again to prepare this little preview of the 
result in the function wizard dialog. Anyway you can submit an request 
for enhancement (for the calc appl) if you like. I would like to have it 
configurable.


Juergen

Joachim Dahl wrote:

The problem seems to be that the add-in is executed every time I click on a
parameter in the
function-wizard,  and thus the optimization routines I am wrapping are
executed over and over again
as I cycle through the different parameters.   So it's not a bug, but
something you want to keep in mind for larger problems that take several
minutes or longer to finish.

- joachim


On 5/29/07, Juergen Schmidt <[EMAIL PROTECTED]> wrote:


Hi Joachim,

that of course sounds strange and we should analyze it in detail. I am
not really familiar with the Python binding but anyway we should try to
check it. Maybe you can prepare a small demo add-in and can provide it
for further investigation.

Juergen

Joachim Dahl wrote:
> I have a final question that I'd like to ask you...
>
> I developed and tested the add-in on Ubuntu Feisty that comes with OOo
> 2.2.0.
> The add-in
> seems to work perfectly,   but the function wizard is incredibly
sluggish
> for my add-in (and not for the
> regular OOo add-in)...   For example,  when I select a parameter in the
> add-in, CPU usage goes
> to 100% and it takes 5-10s before the new parameter and the
corresponding
> cell ranges are
> highlighted - and the examples are all very small.   But if I update 
the

> add-in parameters
> directly without the function wizard it works fast and smoothly,  so
it's
> not just simply Python
> being slow.
>
> Can anyone think of a potential error in the add-in that would cause
this?
> If I can solve this problem
> also,  I will be happy to the add a small Python example to the wiki in
> return for all your help...
>
> thanks
> Joachim
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-29 Thread Juergen Schmidt

Hi Joachim,

that of course sounds strange and we should analyze it in detail. I am 
not really familiar with the Python binding but anyway we should try to 
check it. Maybe you can prepare a small demo add-in and can provide it 
for further investigation.


Juergen

Joachim Dahl wrote:

I have a final question that I'd like to ask you...

I developed and tested the add-in on Ubuntu Feisty that comes with OOo 
2.2.0.

The add-in
seems to work perfectly,   but the function wizard is incredibly sluggish
for my add-in (and not for the
regular OOo add-in)...   For example,  when I select a parameter in the
add-in, CPU usage goes
to 100% and it takes 5-10s before the new parameter and the corresponding
cell ranges are
highlighted - and the examples are all very small.   But if I update the
add-in parameters
directly without the function wizard it works fast and smoothly,  so it's
not just simply Python
being slow.

Can anyone think of a potential error in the add-in that would cause this?
If I can solve this problem
also,  I will be happy to the add a small Python example to the wiki in
return for all your help...

thanks
Joachim



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-29 Thread Juergen Schmidt

Alexandro Colorado wrote:
The XCU most point to your script so it can be properly packaged, there 
is a site that is pretty good:

http://udk.openoffice.org/python/scriptingframework/index.html


i mean a new xcu file for Calc add-ins. It is probably not documented 
yet, you can take a look on 
http://wiki.services.openoffice.org/wiki/OpenOffice_Calc_Add-In_Project_Type#Generated_Code 
to get initial info.


Juergen



it list on 3 stages, the application level, the document level and the 
add-in level.



On Sat, 26 May 2007 04:24:49 -0500, Joachim Dahl 
<[EMAIL PROTECTED]> wrote:



Hi Juergen,

I haven't seen anything about xcu files.   I just zip up the META-INF 
files,

the python script,  and the binary
version of my IDL file.

Do you have a pointer handy to the newest format?

thanks
joachim


On 5/25/07, Juergen Schmidt <[EMAIL PROTECTED]> wrote:


Hi Joachim,

glad to hear that your add-in works now. Well not everything was
possible but you are able to workaround the multiple returns.

I would suggest that you take a look on new add-in with a configuration
file to define the new add-in function 8with localization if you want).
This new approach has several advantages and it would be nice if you can
support this. I know it is not so important for you because your add-in
works but i think it is worth to support the latest features at least
for new implementations.

Or did you already have an xcu file for your add-in?

Juergen

Joachim Dahl wrote:
> Hi Andreas,
>
> I think the Python UNO bridge works fine;  I managed to return an 
array

of
> values by using an array function.
> I needed to return multiple arrays of different lengths;  to give a
> specific
> example I made a wrapper around a
> linear programming solver with input arguments 'c' (a vector), 'G' (a
> matrix) and 'h' (a vector).  This routine
> outputs a status string,   a vector 'x' and a vector 'z',  and I 
used an

> IDL
> as
>
>  string lp ([in] sequence < sequence  > c,
> [in] com::sun::star::table::XCellRange x,
> [in] sequence < sequence  > G,
> [in] sequence < sequence  > h,
> [in] com::sun::star::table::XCellRange z);
>
> i.e., I used the XCellRange as a way to return additional variables by
> "writing back" values in x and z.   This approach
> works well for me in Python.
>
> The only problem I have left is that I have optional arguments, 
some of

> which are also "output" argument (albeit, in
> the sense of being XCellRanges),  but that's not possible with a Calc
> add-in.  So my work-around for this problem
> is to have a different function 'lp2' with more arguments (all
mandatory).
>
> But in summary,  the Python UNO bridge seems fine for writing add-ins.
>
> Joachim
>
>
>
> On 5/25/07, Andreas Saeger <[EMAIL PROTECTED]> wrote:
>>
>> Joachim Dahl wrote:
>> > me.
>> >
>> > So my problem is not so much of how to write a prototype of an
>> addin,  but
>> > rather how to
>> > implement something more advanced like "methodFour".
>> >
>> > Joachim
>> >
>>
>> Hi Joachim,
>> http://wiki.services.openoffice.org/wiki/CompleteAddIn has a chapter
>> "Transforming sequence of sequence into array". This describes the 
same

>> problem as I tried to explain with my simple Basic function
TWICE(array)
>> in http://www.oooforum.org/forum/viewtopic.phtml?t=57196. Only
>> array-functions, such as the built-in LINEST, can return more than 
one

>> value. The resulting array has to be converted to a 2-dimensional
matrix
>> rather than a list of lists. So it is possible that python alone 
is not

>> suitable for add-ins that deal with sheet functions in array context.
>>
>> Andreas
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-25 Thread Juergen Schmidt

Hi Joachim,

glad to hear that your add-in works now. Well not everything was 
possible but you are able to workaround the multiple returns.


I would suggest that you take a look on new add-in with a configuration 
file to define the new add-in function 8with localization if you want). 
This new approach has several advantages and it would be nice if you can 
support this. I know it is not so important for you because your add-in 
works but i think it is worth to support the latest features at least 
for new implementations.


Or did you already have an xcu file for your add-in?

Juergen

Joachim Dahl wrote:

Hi Andreas,

I think the Python UNO bridge works fine;  I managed to return an array of
values by using an array function.
I needed to return multiple arrays of different lengths;  to give a 
specific

example I made a wrapper around a
linear programming solver with input arguments 'c' (a vector), 'G' (a
matrix) and 'h' (a vector).  This routine
outputs a status string,   a vector 'x' and a vector 'z',  and I used an 
IDL

as

 string lp ([in] sequence < sequence  > c,
[in] com::sun::star::table::XCellRange x,
[in] sequence < sequence  > G,
[in] sequence < sequence  > h,
[in] com::sun::star::table::XCellRange z);

i.e., I used the XCellRange as a way to return additional variables by
"writing back" values in x and z.   This approach
works well for me in Python.

The only problem I have left is that I have optional arguments, some of
which are also "output" argument (albeit, in
the sense of being XCellRanges),  but that's not possible with a Calc
add-in.  So my work-around for this problem
is to have a different function 'lp2' with more arguments (all mandatory).

But in summary,  the Python UNO bridge seems fine for writing add-ins.

Joachim



On 5/25/07, Andreas Saeger <[EMAIL PROTECTED]> wrote:


Joachim Dahl wrote:
> me.
>
> So my problem is not so much of how to write a prototype of an
addin,  but
> rather how to
> implement something more advanced like "methodFour".
>
> Joachim
>

Hi Joachim,
http://wiki.services.openoffice.org/wiki/CompleteAddIn has a chapter
"Transforming sequence of sequence into array". This describes the same
problem as I tried to explain with my simple Basic function TWICE(array)
in http://www.oooforum.org/forum/viewtopic.phtml?t=57196. Only
array-functions, such as the built-in LINEST, can return more than one
value. The resulting array has to be converted to a 2-dimensional matrix
rather than a list of lists. So it is possible that python alone is not
suitable for add-ins that deal with sheet functions in array context.

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] returning multiple values (and range cells) from a Python calc add-in

2007-05-21 Thread Juergen Schmidt

Hi,

Joerg pinted out that our parameters are not allowed in add-ins and he 
ahs also defined a correct function which returns a sequence< sequence < 
long > >.


When you have implement it correct and when use this function later on 
in calc you have to use it as array function. Either you finish your 
input with ctrl-shift or use the function dialog and check the array 
check box in the lower left cormer.


Juergen

Joachim Dahl wrote:

thanks,  this brought me a step further...

Doing like Joerg suggest,  at least I don't get the #NAME error.

I invoke my add-in as
=LP(A1:A2)

but only a single element of the (1,2), array is returned (the first
element).

Joachim



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Re: returning multiple values (and range cells) from a Python calc add-in

2007-05-18 Thread Juergen Schmidt

Joachim Dahl wrote:

On 5/17/07, Joachim Dahl <[EMAIL PROTECTED]> wrote:


I am trying to write a Python calc add-in that returns multiple values
including range-cells (or arrays of numbers).

E.g., if I want the method to take two input  arguments 'inarg1' 
and

'inarg2' and return a status string and two
arrays of numbers, how would I specify the IDL routine and python method?


I've searched, but I can't find much information about this topic in the
PyUNO documentation...




Maybe my question is too generic...

There is a nice C++ tutorial about add-ins at the wikipage:
http://wiki.services.openoffice.org/wiki/CompleteAddIn

Is it possible to rewrite "methodFour" in Python?
It should definitely be possible. It's simple the question how you have 
to implement a sequence of sequence of long in Python. I am no Python 
expert and not really familiar with the Python binding but you can 
probably find more examples on the net.


Anyway independent of the used language. You can simplify the 
implementation by using a new config file to define some necessary 
add-in properties. See for example a generated Java add-in project in 
Netbeans using our Netbeans plugin.


Juergen






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] about the servicemanager

2007-05-15 Thread Juergen Schmidt
Hi Liyuan,

the implementation can be found in the "stoc" module but you should not
depend on the implementation details anywhere. The only thing which is
specified is that createInstance returns a new instance of an requested
service implementation object. The additional search for an
implementation name for example is an impl. detail and can be change.
And last but not least i recommend to use or to work with the
XMultiComponentFactory instead of the XMultiServiceFactory. It's the
newer interface and it should be used in new implementations.

Juergen


Liyuan(Internet) wrote:
> Hi all
> 
> In the interface com.sun.star.lang.XMultiServiceFactory, createInstance first 
> tries to find a service with this name. It this is not successful, it tries 
> to find an implementation with this name. If one of the two lookups is 
> successful, it instantiates the object and returns a XInterface reference to 
> it. 
> If a service is a oneinstance (or singleton) service, the servicemanager 
> instantiates it the first time it is requested, but keeps a hard reference to 
> it (the servicemanager owns the object). If it is requested again, the 
> service manager returns this reference. 
> Where can I find more information about the implemention of the service 
> factory of the servicemanager?
> 
> Regards
> Liyuan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] python scripting dialog.

2006-12-28 Thread Juergen Schmidt

Alexandro Colorado wrote:
On Thu, 28 Dec 2006 23:30:49 -0600, Juergen Schmidt 
<[EMAIL PROTECTED]> wrote:



Alexandro Colorado wrote:
Hi is there a reason why the Python dialog of OOo doesn't let you 
create a new library while the Javascript and Beanshell does. I read 
the UDK


i would assume because of the fact that nobody has integrated the 
support of Python in the dialog. The other languages are supported by 
us (Sun) and we made the integration. Python is somewhat unsupported 
and that is probably the main reason why the integration is not 100%.
But feel free to contribute in this direction, you will get the 
necessary support form us.


I am triying to figure ot what is the missing pieces to import a file, 
afaik importing files is somewhat trivial. There are basic code on 
importing images into a document, how different would it be to import a 
pytthon file to the necesary location. I guess I will know when I answer 
the doubts from how the macros dialog actually work. So I guess my first 
question is where is the source code or cws from the Basic/Beanshell 
import feature.


mmh, i am currently don't know where exactly the code is, i assume svx 
and probably somewhere else. Next week the right person is back in the 
office and can tell you exactly where the code can be found. But all 
this code is C++.


Juergen




thanks.



Juergen



Python framework 
(http://udk.openoffice.org/python/scriptingframework/index.html) 
arond the Script coding, however the instructions seem a bit confusing.
 If I want to get a macro within the document area and then editing 
with the Python syntaxis, how does the software recognized is a 
python module. So i went to the 'Run macro' dialog generate an empty 
file but I couldnt get how to get actual content in the files.
 I did an ediditn gon what it seemed like a defualt basic file, and 
put the code from a module however the definitions were not showed on 
their macro selection dialog.

 --Alexandro Colorado
Grupo de Usuarios Linux Tabasco
http://www.gultab.org
 OpenOffice.org
Community Contact // Mexico
http://www.openoffice.org
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--Alexandro Colorado
Grupo de Usuarios Linux Tabasco
http://www.gultab.org

OpenOffice.org
Community Contact // Mexico
http://www.openoffice.org

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] python scripting dialog.

2006-12-28 Thread Juergen Schmidt

Alexandro Colorado wrote:
Hi is there a reason why the Python dialog of OOo doesn't let you create 
a new library while the Javascript and Beanshell does. I read the UDK 


i would assume because of the fact that nobody has integrated the 
support of Python in the dialog. The other languages are supported by us 
(Sun) and we made the integration. Python is somewhat unsupported and 
that is probably the main reason why the integration is not 100%.
But feel free to contribute in this direction, you will get the 
necessary support form us.


Juergen



Python framework 
(http://udk.openoffice.org/python/scriptingframework/index.html) arond 
the Script coding, however the instructions seem a bit confusing.


If I want to get a macro within the document area and then editing with 
the Python syntaxis, how does the software recognized is a python 
module. So i went to the 'Run macro' dialog generate an empty file but I 
couldnt get how to get actual content in the files.


I did an ediditn gon what it seemed like a defualt basic file, and put 
the code from a module however the definitions were not showed on their 
macro selection dialog.


--Alexandro Colorado
Grupo de Usuarios Linux Tabasco
http://www.gultab.org

OpenOffice.org
Community Contact // Mexico
http://www.openoffice.org

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] hello I am starting working on the pyUNO bridge

2006-11-08 Thread Juergen Schmidt

Hi Liutao,

good to hear that somebody is interested in PyUNO.

I think a good approach is to work with the code, create patches and let 
the owner of this code review your patches. It's the normal way to get 
cvs access, submit patches for a specific piece of code and let the 
owner review. I am sure that the owner will give you the necessary cvs 
rights later ...


Welcome in the UNOverse

Juergen

blueeagle wrote:

Hi laurent, Hi all,
I am a chinese  developer working in the Beijing Redflag CH2000 Software Co., 
Ltd. I am interested in the pyUNO bridge and prepare to working on it.
I have read the Developer Guide and have ever participated in the work of Async 
Dialog Project ,therefore, I have ever build the m175+tag Async Dialog 
Project.but I have no CVS access.
I also have repaired some bugs in the OO,the issue number is 
#68512,#69682,#70212 and so no.
Laurent told me that the first tasks would be :
-migrate to python 2.5 instead of actual 2.3.5
- enhace packaging of python Extensions (package manager parser) so that more 
than one file can be imported (more in python spirit)
But I still don't know the details and how to start working on it.please 
help me and guide me.

- Original Message - 
From: "Laurent Godard" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, November 07, 2006 4:56 PM
Subject: Re: [udk-dev] hello I am starting working on the pyUNO bridge



Hi liutao

blueeagle :

i am starting working on the pyUNO bridge

Great :-)

Seems now your mailing subscription is ok :-)
Please send some more details about you

Thanks again in advance for your work. I'm sure you'll find valuable 
help here


Laurent

--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management >> http://www.nuxeo.com - 
http://www.nuxeo.org

Livre "Programmation OpenOffice.org", Eyrolles 2004-2006

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]