[Libreoffice-bugs] [Bug 130559] LibreOffice crashes when opening a document in print preview
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Jul 25 10:37:44 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=130559
--- Comment #10 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to Julien Nabet from comment #8)
> Just for the test, I tried the same thing on Writer.
> ...
> -> no crash
The problem here is that preview data is exported into ODS' settings.xml
(/office:document-settings/office:settings/config:config-item-set[1]/config:config-item-map-indexed/config:config-item-map-entry/config:config-item:
ViewId = view2). Then on load, this ViewId is used in
SfxBaseModel::createViewController called from impl_createDocumentView called
from SfxFrameLoader_Impl::load, and an instance of preview is attempted to be
created, which throws and crashes.
On the other hand, preview data is not exported into ODT. The difference is in
implementation of ScPreviewShell::WriteUserDataSequence vs
SfxViewShell::WriteUserDataSequence (i.e., ScPreviewShell overrides the
WriteUserDataSequence method, while SwPagePreview does not, and uses base empty
method).
The implementation of ScPreviewShell::WriteUserDataSequence was added in
https://git.libreoffice.org/core/+/1f51730f3c5b05c3afaa35431c925482e8152783,
without any explanation in commit message (the issue number in some internal
tracker is unavailable).
The options are:
1. Remove the implementation - with possible unknown regression.
2. Pass an information to the implementation, so that it conditionally doesn't
write information. As this is called through UNO interface during the export,
the only method to pass the necessary data is using component context, like
done in https://gerrit.libreoffice.org/c/core/+/81616 using SetFlagContext.
3. Process the result of getViewData() in SvXMLExport::GetViewSettingsAndViews,
so that when aProps.hasElements, the elements are checked if ViewId gives a
preview shell ... bad: needs to know modules' preview shell classes; needs to
modify the XIndexAccess instance (re-create it "filtered" in case of multiple
views, one of which should not be exported)...
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200725/83b49a9f/attachment.htm>
More information about the Libreoffice-bugs
mailing list