Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 16/11/11 14:35, Ivan Timofeev wrote:
Hi there,

I have fixed https://bugs.freedesktop.org/show_bug.cgi?id=42178 :-) ,
but I think an additional review will not be superfluous, since I am
still a newbie.

The fact is SwDocShell::GetWrtShell() always returns 0 in page
preview. And Writer dies due to that in "lcl_GetPrintUIOptions"
function (sw/source/ui/uno/unotxdoc.cxx).

ah yes, the ever-reocurring "this special document is missing this or
that shell" problem.
your workaround looks good (but please add an assertion for the case
that we don't get any page number, i.e. OSL_ENSURE(pPreView,...))

The second patch makes testing of the first one easier. :-) Because,
when you press "Cancel" in a print dialog, then make changes to a doc
and open a print dialog again, you currently will not see any effect.
Options will not be updated. The patch fixes this.

isn't m_pPrintUIOptions supposed to be deleted when
SwXTextDocument::render is called for the last page (and there is
specific code in vcl to ensure that this is done even on cancel)?

hmm... could be that i broke that... is the m_pPrintUIOptions really not
deleted for you?

the XRenderable implementation in writer is quite braindamaged imho with
storing stuff in SwXTextDocument members; while debugging printing
crashes a couple of weeks ago i noticed that in Draw the XModel
implementation does not implement XRenderable itself but creates an
extra class for it, which wouldn't have these ridiculous problems
because then every print job gets its own instance (but refactoring that
in writer is going to be some work...).

thanks for digging into this,
 michael


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.