Ariel Constenla-Haile wrote:
> 
> Hello Михаил,
> 
> On Sunday 08 February 2009 13:17, Михаил Кечинов wrote:
>> Hello.
>> I need to insert image into opened document in java program.
>>
>> I am creating document:
>> ===========
>> com.sun.star.frame.XComponentLoader xComponentLoader = null;
>> com.sun.star.beans.PropertyValue openProperties[] = new
>> com.sun.star.beans.PropertyValue[1];
>> openProperties[0] = new com.sun.star.beans.PropertyValue();
>> openProperties[0].Name = "Hidden";
>> openProperties[0].Value = new Boolean(true);
>> try {
>> xComponentLoader =
>> (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(com.sun.star
>>.frame.XComponentLoader.class, this.xDesktop);
>> this.xComponent =
>> xComponentLoader.loadComponentFromURL("private:factory/swriter",
>> "_blank",
>> 0, openProperties);
>> } catch( Exception e) {
>>             System.err.println("Could not create blank file.");
>>             e.printStackTrace(System.err);
>>              return false;
>> }
>> ===========
>>
>> What next?
> 
> well... study the SDK examples.
> Did you download the SDK? See 
> http://svn.services.openoffice.org/opengrok/xref/DEV300_m41/odk/examples/java/Text/GraphicsInserter.java
> it's also on your SDK.
> 
> Regards
> -- 
> Ariel Constenla-Haile
> La Plata, Argentina
> 
> 
> "Aus der Kriegsschule des Lebens
>               - Was mich nicht umbringt,
>       macht mich härter."
>               Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

but what if the document is not really new? i mean, it already has contents
and the image must be inserted from where the cursor is.


-----
"What cannot kill you will make you stronger."
-- 
View this message in context: 
http://www.nabble.com/Create-blank-document-and-insert-image-into-it--JAVA--tp21899867p22397452.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to