Issue 90242 - add insertDocumentFromURL with fix-ups
Summary: add insertDocumentFromURL with fix-ups
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 3.0 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: needhelp
Depends on:
Reported: 2008-06-02 09:58 UTC by mux2005
Modified: 2017-05-20 10:44 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description mux2005 2008-06-02 09:58:07 UTC
Abstract problem:

At present there is no way, neither via GUI nor via API, to append a document B
to a document A so that if the end result is printed, the result will be the
same as if A was printed first and then B was printed.

Insert/File in the GUI or insertDocumentFromURL() in the API don't do the trick,
because e.g.

1) paragraph formats, headers and footers will be inherited from document A,
which causes the layout and contents of document B to change

2) page anchored objects in document B will appear on the wrong page in the
merged document. (This has already been reported as a bug in File/Insert but the
issue has been closed, because it is considered "proper" behaviour)

Remark: While Master documents are applicable to some use cases, they are no
general solution and will never give you a single integrated ODT.

Concrete problem:
As part of our WollMux-component we needed to implement our own MailMerge
functionality. Because there are various transformations the WollMux needs to
make during the creation of the merged document (e.g. a single document may
result in several different variations for each dataset that have different
parts visible or invisible), the integrated MailMerge function cannot be used.
Our component has to assemble the merged document itself. This means that it has
to do all fixups itself, i.e. e.g. creating and applying of new header and
footer styles for each inserted document, moving page anchored objects to their
proper places, etc.

We have this implemented and "working", but there are 2 problems that are
technically unsolvable within the restrictions of the UNO API

a) the performance is abysmal. The API is simply not made for such a task. Issue
40827 already complains about poor performance of the built-in mailmerge. Doing
the same via API makes it slower still.

b) OOo's stability degrades with each document access via UNO. There has been a
lot of improvement since we started with 1.9.x, but a massive task of merging
200 documents of several pages each and doing many 1000s of fixups crashes OOo
most of the time.

Enhancement request:
Either add a new function or enhance insertDocumentFromURL (which already takes
a sequence of PropertyValues that control its operation) to enable insertion of
a document with fix-ups.

This functionality is already present in OOo, because the included MailMerge
functionality needs to do (and can do) the same fixups. All that is required is
to export this functionality via API.

I've seen on sw-discussion (thread "Mail merge performance issue") that there is
currently some rewriting going on in the mail merge code. This may be a good
time to include this enhancement.

I've assigned this issue to os, because he's handling issue 40827 and therefore
seems to be the right person.
Comment 1 Marcus 2017-05-20 10:44:27 UTC
Reset the assignee to the default "".