[Libreoffice] how to acquire an ScDocument reference "from scratch"

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Nov 23 16:56:31 PST 2011


Hello Kevin,

2011/11/23 Kevin Hunter <hunteke at earlham.edu>:
> Hello List,
>
> I'm trying to get hold of an ScDocument "from scratch".  I have naively
> attempted to replicate another section of code, but for the life of me can't
> figure out what I'm missing.  My code crashes with a SIGSEGV on this line:
>
> aDocShell = new ScDocShell();
>
> I think I've boiled it down to a null pointer dereference (see attached,
> please), but that implies the existing code is incorrect, which I'm not yet
> ready to admit.
>

Can you explain in a bit more detail what you want to do. You can't
just create a new ScDocShell, you always need to do some
initialisation before. Depending on what you want to do you should not
need to create the ScDocShell yourself.

Regards,
Markus


More information about the LibreOffice mailing list