Download it now!
Bug 90594 - Property "Selection" provided to module com.sun.star.text.MailMerge is not evaluated correctly
Summary: Property "Selection" provided to module com.sun.star.text.MailMerge is not ev...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Christoph Lutz
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 16:37 UTC by Christoph Lutz
Modified: 2015-04-15 07:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Lutz 2015-04-13 16:37:26 UTC
The IDL-description for the com.sun.star.text.MailMerge-Service specifies a Property "Selection" which allows to mailmerge just a subset of elements in the datasource. 

See:
http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1MailMerge.html#a42f93ea78e286c0f30c2ddf14e1b0cb6

The elements that need to be provided in the UNO-Sequence "Selection" are considered as "bookmarks of the ResultSet". Therefore LibreOffice transforms bookmarks into indizes in a buggy loop in http://opengrok.libreoffice.org/xref/core/sw/source/uibase/uno/unomailmerge.cxx#570. Here, the pointer pTranslated is never incremented. All translated elements from the origin Selection sequence are written to the first position of the new index list.

The bug is very old and already contained in OpenOffice 3.2.1. It seems that nobody ever really has tested this feature.