To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=93818


User cmc changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|VERIFIED                  |REOPENED
--------------------------------------------------------------------------------
              Resolution|FIXED                     |
--------------------------------------------------------------------------------




------- Additional comments from [email protected] Wed Apr 28 10:48:50 +0000 
2010 -------
Nah, I know what the problem is here.

Take a .odt with notes in it and that has compatibility options "on" to use
printer metrics. Load it up. file->print, change the printer. Doomage looms
after this on the next time that a note has to be redrawn to screen.

See sw/source/ui/docvw/postit.cxx SwMarginWin::InitControls there we have...

OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE);
if ( pDev )
{
  mpOutliner->SetRefDevice( pDev );
}

because the document is using printer metrics this getReferenceDevice returns
the original printer OutputDevice from SwDoc::getPrinter. When we change the
printer from the print dialog that calls SwDoc::setPrinter and deletes that old
OutputDevice so the postit outliner is now left using a deleted OutputDevice.

Presumably when we're not using printer metrics and using the virtual device the
possibility of a SwDoc::setVirtualDevice being called that deletes the old
virtual device is sufficiently rare that, with this being the default for new
documents, its rare or impossible to delete the outputdevice from out under the
postit outliner in that mode.

So the question is, why do we bother setting a Reference device for the notes
outliner ? The default one from the svx pool would presumably be fine and should
always exist and not get destroyed before the outliner does. We're only drawing
to the margin window on screen so we don't need to follow any specific printer
metrics to achieve that, right ? and makes things safer and easier.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

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


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

Reply via email to