Re: [api-dev] SDK 3.0 compatible with 2.4?

2009-01-14 Thread Christoph Neumann

Hi Jason,

as Jürgen already mentioned your Plugins should work in 2.3 as in 3.0. 
But be aware for the _since_ Tag in the idl files. API which comes with 
3.0 could not be executed in 2.3 ;-)


Greetings,
Christoph

Jason Cooper schrieb:

Hello.

I just wanted to check on the backwards compatibility of the new SDK. I'm
beginning to write some Java code to interact with OOo. I want the code to
work with both OOo 2.4.x and 3.0. Will SDK 3.0 work for both 2.4.x and 3.0
or will I need to install and develope with both SDKs?

Thanks,
Jason




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



Re: [api-dev] Help Please

2008-11-10 Thread Christoph Neumann

Hi Ashish,

the code you have linked is an UnoAPI-Tests, see
http://qa.openoffice.org/qadevOOo_doc/index.html

The util is not a jar but a class inside the runner. The runner is the 
framework to execute these UnoAPI-Tests. The util class you will find in 
qadevOOo/runner/util/utils.class


Hope that helps,
cn

ashish misra schrieb:

Hello,

I been searching for util.jar library that includes SOfficefactory and 
StatusException classes that I can't find anywhere on the internet. I want to 
be able to bring embedded calc/spreadsheet inside my application and it seems 
that I need these libraries.  If  you can help me  it will be great. Please 
take a look at following link for code: 
http://www.koders.com/java/fid2FD311757BCF9900B9B78AAA7CE349F664B2D9E4.aspx?s=com.sun.star.text.TextEmbeddedObject#L70

Thanks,
Ashish Misra
Software Developer

_
Color coding for safety: Windows Live Hotmail alerts you to suspicious email.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008




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



Re: [api-dev] API discussion/announce in the API mailing list?

2008-10-29 Thread Christoph Neumann

Hi All,

why not announce in [EMAIL PROTECTED] and [EMAIL PROTECTED]

interface-announce is a good place to have a history, [EMAIL PROTECTED] is the 
right place to reach the end-user.


Gruß,
cn

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



[api-dev] UnoAPI regression tests on cws

2008-01-02 Thread Christoph Neumann

Hi all,

as you may know in mostly all modules which support a UnoAPI there 
exists a folder called qa/unoapi. This folder contains files to run the 
Java based UnoAPI tests related to the module.
To avoid regression it is planned to implement a mechanism which is able 
to run all module tests related to a cws automatically.


I like to inform you about this project. If you are interested please 
take a look at here:


http://wiki.services.openoffice.org/wiki/UnoAPITest/project/cwsTests

If you have any suggestions please let me know.

Thx,
Christoph

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



Re: [api-dev] Problems with installing and uninstalling Extensions

2007-10-24 Thread Christoph Neumann

Hi Tobias,

Tobias Krais wrote:

6. The problem first occured when doing the following steps via Java
API: - detecting the version number of the installed extension. Then
removing the extension. At least installing a newer version of the
extension.



does your Java tool hold a reference to the component? My idea is that 
your tool asks the component itself for the installed version. So the 
tool hold a reference. Then you remove the component. At this time the 
UNO bridge gets broken. Note: Be aware of the garbage collection!



Just an idea,
cn

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



Re: [api-dev] Problems with User text fields

2006-11-15 Thread Christoph Neumann
Moin,

Juergen Schmidt schrieb:
> Hi Cedric,
> 
> Cedric Bosdonnat wrote:
> 
>> Hi all,
>>
>> I'm developping a macro using and updating User Text fields in a
>> document template. I have two options to create the document:
>>   1 - File > New > Documents and Templates
>>   2 - loadComponentURL()
>>
>> The macro is executed at the document creation. When creating the
>> document with method (1) there is no problem: the User fields are
>> updated. But when creating the document with method (2) the macro
>> cannot find any text field in the document. The following code returns
>> false instead of true:
>>
>> ThisComponent.getTextFields().createEnumeration().hasMoreElements()
>>
>> Is this a (known) bug ? Is there something to do with the
>> loadComponentFromURL ? Note that the macro works fine if I disable the
>> macro assignement att the document creation and run it just after the
>> loadComponentFromURL.
> 
> 
> Either a bug or you have to set an additional property in the
> MediaDescriptor which i am currently don't know. Hope Andreas Schluens
> can help here.

The property is "MacroExecutionMode":

PropertyValue[] DocArgs = new PropertyValue[1];
PropertyValue DocArg = new PropertyValue();
DocArg.Name = "MacroExecutionMode";
DocArg.Value = new Short(
com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN);
DocArgs[0] = DocArg;


so you can:

loadComponentFromURL(DocURL, "MyDoc", "_blank", DocArgs);


Hope that helps,
Christoph

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



Re: [api-dev] Dispatching Macro URL from Java Addon?

2006-11-09 Thread Christoph Neumann
Hi Jimmy,

the qadevOOo-Project, which is a test framework for the UNO-API has
helper classes which do your request.

Please take a look at here:
http://qa.openoffice.org/source/browse/qa/qadevOOo/runner/util/BasicMacroTools.java?rev=1.6&view=markup

Hope that helps,
Christoph

Jimmy schrieb:
> How can I dispatch a macro Url from my Java Add-on?
> 
> I'd like to dispatch the following function in the Tools/ModuleControles
> Library:
> 
> StoreDocument(oDocument as Object, FilterNames() as String, DefaultName
> as String, DisplayDirectory as String, Optional iAddProcedure as Integer)
> 
> I'd like to call this function from my add-on. It would be best if I
> could call this function from my Addons.xcu but this leads to a crash
> since I don't know how to set the oDocument parameter in the xcu file.
> Is there any other chance to call the macro? I can catch the dispatch
> for the corresponding button but don't know how to go any further..
> 
> Thanks
> 
> public void dispatch(URL arg0, PropertyValue[] arg1) {
>if (arg0.Protocol.compareTo("org.openoffice.addon.MyAddon:") == 0) {
>if (arg0.Path.compareTo("FuncExport") == 0) {
>try {
>Iterator iterOn = frames.iterator();
>while (iterOn.hasNext()) {
>FrameInfo actFrameInfo = (FrameInfo) iterOn.next();
>if (actFrameInfo.getXComp() == ElementController
>.getXComponent()) {
>convertElml = actFrameInfo.getXmlConverter();
>break;
>}
>}
>   // NOW CALL THE MACRO
> 
>} catch (java.lang.Exception e) {
>e.printStackTrace();
>}
>}
>}
>}
> 
> -
> 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: [api-dev] Java - XStorable with ODB document - OO.o hangs

2006-08-29 Thread Christoph Neumann
Hi Andreas,

a crash is always a bug. Can you please file an issue?

Thx,
Christoph

Andreas Bröker schrieb:
> Hello,
> 
> I loaded an odb document with the XComponentLoader. Using the XStorable
> interface of the document causes an OpenOffice.org crash (My java code
> does not return from the method storable.store()). This is my code:
> 
> Object object =
> application.getServiceProvider().createServiceWithContext("com.sun.star.frame.Desktop");
> 
>   XComponentLoader xComponentLoader =
> (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,
> object);
>   XComponent xComponent =
> xComponentLoader.loadComponentFromURL("file:///c:/MyDB2.odb", "_blank",
> FrameSearchFlag.ALL, new PropertyValue[0]);
>   XStorable storable =
> (XStorable)UnoRuntime.queryInterface(XStorable.class, xComponent);
>   storable.store();
> 
> Is this a bug?
> 
> Thanks for any help in advance.
> 
> Best regards
> 
> 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: [api-dev] Converting HTML to PDF

2006-08-16 Thread Christoph Neumann
Hi aloizio,

just change your font settings in your browser until it looks like the pdf.

Hope that helps,

Christoph

aloizio schrieb:
> Hi Jurgen,
> 
> 
> If you look carefully you will note that the Font is different.
> 
> 
> Jürgen Schmidt wrote:
> 
>>aloizio wrote:
>>
>>>Hi everyboy,
>>>
>>>I have a complicated problem to solve. I am converting one HTML file into
>>>one PDF file. The problem is that the generated PDF document doesn't keep
>>>the text format. You can see this by the attached files, where teste.html
>>>is
>>>the origin files and teste.pdf is the destination file.
>>>
>>>http://www.nabble.com/user-files/260/teste.html teste.html 
>>>
>>>http://www.nabble.com/user-files/276/teste.pdf teste.pdf 
>>
>>what exactly do you mean, after a first look to both documents they look 
>>equal.
>>
>>Juergen
>>
>>-
>>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: [api-dev] OOo as a Linux service

2005-11-17 Thread Christoph Neumann
Hi Andre,

the office needs an X. That is the problem. You can use Xfvb as X-Server.

Hope that helps,

Christoph

André Limaverde schrieb:
> I want to run soffice.bin as a Linux service so I can use the API.
> For now I run "soffice.bin -invisible" in a terminal, but I want to
> run this during the boot.
> 
> I've tried to put this in /etc/inittab, rc.local etc. but nothing
> seems to work. I've received "soffice.bin: Fatal IO error: client
> killed".
> 
> The closest to what I want is putting the command in /etc/profile. But
> this forces me to logon on Linux to the command run.
> I'm using Fedora Core 2.
> 
> A. Limaverde
> 
> -
> 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: [api-dev] programatically know which platform

2005-10-05 Thread Christoph Neumann
Hi,

Jürgen Schmidt schrieb:
> Hi,
> 
> Jorge Marques Pelizzoni wrote:
> 
>> Hi, all!
>>
>> I am using OOo 1.1.4 and would like to know if the API provides a way to
>> identify which the current platform is (windows, linux_x86, etc.) so I
>> can load
>> the right version of a third-party dynamic library.
> 
> 
> no, not that i know but you can simply implement a dummy sevice in your
> library, pack the library in a package and deploy the package with all
> other stuff you need. During runtime you can instantiate the dummy
> service, UNO will automatically load the appropriate library for the
> underlying platform. You have to ensure only that your package provides
> one library for each of your supported platforms.
> 
> - Juergen
> 

if it's enough to know Unix/Linux <-> Windows just query for the
PathSettings of the office. The Unix/Linux path start with "/" and
Windows with for example. "c:\".
Another way is to dispatch an Basic-Macro which could query for
environment variables. It's more an hack then a solution but...

Hope that helps,

Christoph

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



Re: [api-dev] instantiating Basic dialogs from UNO componets

2005-07-19 Thread Christoph Neumann

Hi Jorge,

Jorge Marques Pelizzoni schrieb:

Thank you, Thomas! However, the company I work for does not use the beta version
yet, just OOo 1.1.4. I've just checked that this service is not available
there. Can that be achieved - even if much more hardly - by 1.1.4 UNO
primitives?

Cheers,

Jorge.



a workaround could be to dispatch the macro. An undocumented source how 
to do this you can be found here:


http://qa.openoffice.org/source/browse/qa/qadevOOo/runner/util/BasicMacroTools.java

Hope that helps,

Christoph

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