Hi Henry,

On Thu, Apr 11, 2013 at 07:50:55PM -0500, Henry Tiquet Leyva wrote:
> Hello everyone,
> 
> I'm trying to do that:
> http://wiki.openoffice.org/wiki/Programming_OOoDraw_and_OOoImpress#Giving_a_Name_to_the_Shape
> 
> 
> and the connection is successful and the XComponentloader is
> instanciated but when I add this part of code:
> 
> //get an instance of the spreadsheet Reference< XComponent
> > xcomponent = rComponentLoader->loadComponentFromURL(
> > OUString::createFromAscii("private:factory/swriter"),
> > OUString::createFromAscii("prueba"),

Try with "_default", or "_blank"
see
http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Handling_Documents#Target_Frame

By the way, createFromAscii is expensive for ASCII string literals,
better use OUString(RTL_CONSTASCII_USTRINGPARAM( "_default" ))
http://www.openoffice.org/api/docs/cpp/ref/def-all.html#RTL_CONSTASCII_USTRINGPARAM

> Connected sucessfully to the office
> XComonentloader succesfully instanciated
> Segmentation fault (core dumped)

This shouldn't crash. Is it the office code that crashes, or your client
application not catching the exception thrown by loadComponentFromURL?
Please try surrounding the code with a try-catch; if it still crashes,
then open a bug.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgpMzZP1N801i.pgp
Description: PGP signature

Reply via email to