Re: [api-dev] Toolbar button added using Addon not enabled

2006-07-13 Thread bharathy b
Hi Carsten, thank you for replying.
  The SDK examples create a installable package automatically if you build 
them 
with make.  I was not aware of this. I will try to find out.Can you please 
guide me more about it. 
   
  Also ,now i understood Function1refers to a function by name Function1. But 
still i am not clearas to  where should i define Function1? Should i define 
Function1 inside ProtocolHandleraddon.java?  Since i am a newbie i am not clear 
with these concepts.
   
  Thank you
  With regards,
  Bharathy B
   
  

Carsten Driesner - Sun Germany - ham02 - Hamburg - Software Engineer [EMAIL 
PROTECTED] wrote:
  bharathy b wrote:
 Hi i tried to add a Addon to Writer using ProtocolHandlerAddon.java given in 
 the SDK . 
 ProtocolHandleraddon.java found in 
 OpenOffice.org2.0_SDK\examples\DevelopersGuide\Components\Addons\ProtocolHandlerAddon_java
  
 The addon creates toolbar button in openoffice writer and should display a 
 message box when it is clicked. I used UNOPKG to do it instead of pkgchk. The 
 toolbar buttons appear. but they are not activated
 here are the steps i have followed ...please tell me if i have missed out 
 anything or gone wrong anywhere. 

Hi bharathy,

First of all I don't understand why you do the build by hand. The SDK 
examples create a installable package automatically if you build them 
with make. If you do it by hand there are many ways to do something wrong.

 
 1) compile the ProtocolHandlerAddon.java and get the 
 ProtocolHandlerAddon.class and 
 ProtocolHandlerAddon$ProtocolHandlerAddonImpl.class 
 2) write the ProtocolHandlerAddon.uno.manifest file which Contains 
 Code: 
 RegistrationClassName:ProtocolHandlerAddon \n 
 
 3) Using this command i get ProtocolHandlerAddon.uno.jar file 
 Code: 
 jar cvf ProtocolHandlerAddon.uno.jar ProtocolHandlerAddon. class 
 ProtocolHandlerAddon$ProtocolHandlerAddonImpl.class 
 ProtocolHandlerAddon.uno.manifest 
 
 4) put the manifest.xml in a folder called META-INF. the manifest.xml is as 
 follows 
 Code: 
 
 
 5) now zip the following files into ProtocolHandlerAddon.uno.zip 
 i) ProtocolHandlerAddon.uno.jar 
 which inturn contains 
 META-INF/MANIFEST.MF \n
 ProtocolHandlerAddon.class 
 ProtocolHandlerAddon$ProtocolHandlerAddonImpl.class 
 ProtocolHandlerAddon.uno.manifest 
 ii)Addons.xcu 
 iii) ProtocolHandler.xcu 
 iv) META-INF/manifest.xml 
 6) exit OpenOffice(including Quickstart) and add the package using \n
 unopkg add ProtocolHandlerAddon.uno.zip 
 
 Here is the ProtocolHandlerAddon.java I hav used 
 import com.sun.star.uno.XComponentContext; 
 import com.sun.star.lib.uno.helper.Factory; 
 import com.sun.star.lang.XSingleComponentFactory\n; 
 import com.sun.star.lib.uno.helper.WeakBase; 
 import com.sun.star.uno.UnoRuntime; 
 import com.sun.star.registry.XRegistryKey; 
 import com.sun.star.lang.XInitialization; 
 import com.sun.star.lang.XTypeProvider\n; 
 import com.sun.star.lang.XServiceInfo; 
 import com.sun.star.uno.Type; 
 import com.sun.star.frame.XStatusListener; 
 import com.sun.star.frame.XDispatchProvider; 
 import com.sun.star.frame.XDispatch; 
 import \ncom.sun.star.frame.XModel; 
 import com.sun.star.frame.XFrame; 
 import com.sun.star.frame.DispatchDescriptor; 
 import com.sun.star.awt.XToolkit; 
 import com.sun.star.awt.XWindowPeer; 
 import com.sun.star.awt.XMessageBox\n; 
 import com.sun.star.awt.WindowAttribute; 
 import com.sun.star.awt.WindowClass; 
 import com.sun.star.awt.WindowDescriptor; 
 import com.sun.star.awt.Rectangle; 
 
 public class ProtocolHandlerAddon { 
 \npublic static class ProtocolHandlerAddonImpl extends WeakBase implements 
 XDispatchProvider, 
 XDispatch, 
 XInitialization, 
 XServiceInfo { 
 static private final String[] m_serviceNames \u003d { 
 com.sun.star.frame.ProtocolHand,1] ); 
 //--n/vnd.sun.star.uno-component;type=Java manifest:full-path= 
 ProtocolHandlerAddon.uno.jar/ 
 
 5) now zip the following files into ProtocolHandlerAddon.uno.zip 
 i) ProtocolHandlerAddon.uno.jar 
 which inturn contains 
 META-INF/MANIFEST.MF 
 ProtocolHandlerAddon.class 
 ProtocolHandlerAddon$ProtocolHandlerAddonImpl.class 
 ProtocolHandlerAddon.uno.manifest 
 ii)Addons.xcu 
 iii) ProtocolHandler.xcu 
 iv) META-INF/manifest.xml 
 6) exit OpenOffice(including Quickstart) and add the package using 
 unopkg add ProtocolHandlerAddon.uno.zip 
 
 Here is the ProtocolHandlerAddon.java I hav used 
 import com.sun.star.uno.XComponentContext; 
 import com.sun.star.lib.uno.helper.Factory; 
 import com.sun.star.lang.XSingleComponentFactory ; 
 import com.sun.star.lib.uno.helper.WeakBase; 
 import com.sun.star.uno.UnoRuntime; 
 import com.sun.star.registry.XRegistryKey; 
 import com.sun.star.lang.XInitialization; 
 import com.sun.star.lang.XTypeProvider ; 
 import com.sun.star.lang.XServiceInfo; 
 import com.sun.star.uno.Type; 
 import com.sun.star.frame.XStatusListener; 
 import com.sun.star.frame.XDispatchProvider; 
 import com.sun.star.frame.XDispatch; 
 import com.sun.star.frame.XModel; 
 import 

Re: [api-dev] Convert HTML file to DOC file or PDF file

2006-07-13 Thread Tobias Krais
Hi Aloizio,

 I have success to convert HTML to PDF or DOC. But when the HTML file has a
 image it does not appear in the generated DOC file. What is necessary todo
 do in this case? Why image does not appear into doc file?

i can not verify your problem. The code snippet exports pictures here
very well. But: if you open the html-file, can you see the pictures? The
pictures are stored external of the html file and I think this is the
problem - OOo can not find the pictures.

Greetings, Tobias

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



[api-dev] MailMerge keeps temporary file open

2006-07-13 Thread Jens Beier

Hi,
I'm trying to use MailMerge to fill a letter with data from a datasource 
and save it as PDF.
I'm using the setupConnection() and the doMerge() methods from 
http://codesnippets.services.openoffice.org/Writer/Writer.MailMerge.snip


I'm getting the XComponentContext and the XMultiComponentFactory. Based 
on this I can geht the MailMerge-service. Then I set the 
Mailmerge-properties and execute the XJob.


Everything works fine except that OpenOffice does not close the 
temporary file it uses for this job.


So what do I have to do to get the temporary file closed? Do I have to 
close any special service or interface? In all examples I have found in 
the Developer Guide and in forums nobody seems to close something after 
executing MailMerge.


I'm using OpenOffice 2.0.2 on a Solaris box. Solaris has a limitation to 
the number of open files.
When I execute the Job several hundred times I'm getting the following 
error when reaching the limitation of open files:


I/O error : Too many open files
I/O warning : failed to load external entity 
/export/home/asaadm/.openoffice.org2/user/config/javasettings_Solaris_x86.xml 


[Java framework] Error in function copyShareSettings (elements.cxx).

and the PDF which is generated only contains symbols like rectangles,...

I'm running out of ideas so could anyone help me? Thanks
Jens

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



Re: [api-dev] Toolbar button added using Addon not enabled

2006-07-13 Thread Mathias Bauer
bharathy b wrote:

 Hi Carsten, thank you for replying. The SDK examples create a
 installable package automatically if you build them with make.  I
 was not aware of this. I will try to find out.Can you please guide me
 more about it.

Please read the build instructions that are part of the SDK. After
installing the SDK correctly you can just go to any example directory
and call make. This will create the package.

 Also ,now i understood Function1refers to a function by name
 Function1. But still i am not clearas to  where should i define
 Function1? Should i define Function1 inside
 ProtocolHandleraddon.java?  Since i am a newbie i am not clear with
 these concepts.

Please read the chapters in the Dev Guide mentioned by Carsten.
Any description here would just repeat what is written there.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] Toolbar button added using Addon not enabled

2006-07-13 Thread bharathy b
Hi Mathias,
   I will try out the examples in the SDK and also i will go through the 
chapters mentioned by Carsten. I will get back if i get any doubts. 
  Thank you
  With regards,
  Bharathy B

Mathias Bauer [EMAIL PROTECTED] wrote:
  bharathy b wrote:

 Hi Carsten, thank you for replying. The SDK examples create a
 installable package automatically if you build them with make. I
 was not aware of this. I will try to find out.Can you please guide me
 more about it.

Please read the build instructions that are part of the SDK. After
installing the SDK correctly you can just go to any example directory
and call make. This will create the package.

 Also ,now i understood Function1refers to a function by name
 Function1. But still i am not clearas to where should i define
 Function1? Should i define Function1 inside
 ProtocolHandleraddon.java? Since i am a newbie i am not clear with
 these concepts.

Please read the chapters in the Dev Guide mentioned by Carsten.
Any description here would just repeat what is written there.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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




-
Sneak preview the  all-new Yahoo.com. It's not radically different. Just 
radically better.