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

Kevin Hunter hunteke at earlham.edu
Wed Nov 23 22:05:13 PST 2011


At 8:45pm -0500 Wed, 23 Nov 2011, Kohei Yoshida wrote:
> On Wed, 2011-11-23 at 20:33 -0500, Kevin Hunter wrote:
>> At 7:56pm -0500 Wed, 23 Nov 2011, Markus Mohrhard wrote:
>>> 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.
>>
>> Well, I'd like to have some way of creating a new ScDocument.
>
> And could you tell us what you need to do that for?  Providing more
> details as to what area of code you are modifying, including the file
> name and class name (if applicable), and what end result you want to
> see would give us more context of what you are doing.

This was answered and responded to out-of-band as follows:

I wanted to create an ScDocument to work with in a new test file.  I was 
thinking in terms of test driven development and having some tests such 
that I could execute only them, as something akin to:

$ make  just_this_set_of_tests

I was educated that because each separate test file needs an entirely 
separate invocation of soffice (and all that that entails), this is not 
a desirable avenue for the general use-case of running all tests.  LO is 
nowhere near able to work in a TDD environment, and, short of much 
rewriting, will not be there anytime soon.  Thus, the answer to my 
question boiled down to: during development or bug hunting, comment out 
all superfluous tests in another, existing test file.

Kevin


More information about the LibreOffice mailing list