Bug 131618 - MailMerge contradictory data source error
Summary: MailMerge contradictory data source error
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: medium normal
Assignee: Oleg Shchelykalnov
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-27 08:08 UTC by Oleg Shchelykalnov
Modified: 2020-03-30 08:19 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 Oleg Shchelykalnov 2020-03-27 08:08:15 UTC
MailMerge shows error when validating arguments: Either the ResultSet or DataSourceName and DataCommand must be set

https://github.com/LibreOffice/core/blob/master/sw/source/uibase/uno/unomailmerge.cxx#L606

But later in https://github.com/LibreOffice/core/blob/9b8013b20d20a3946146d5287e8d8f8b9ddf694d/sw/source/uibase/dbui/dbmgr.cxx#L469 it checks for aData.sDataSource.isEmpty() || aData.sCommand.isEmpty() || !xResSet.is() and silently fails.
Comment 1 Oleg Shchelykalnov 2020-03-27 10:44:36 UTC
Also I've tried to provide ActiveConnection instead of DataSourceName which allowed according to DataAccessDescriptor documentation but first check fails with it.
Comment 2 Oleg Shchelykalnov 2020-03-28 13:53:43 UTC
I've tested https://gerrit.libreoffice.org/c/core/+/91277 with only ResultSet assigned and object was accesed.
Comment 3 Commit Notification 2020-03-28 19:30:35 UTC
Oleg Shchelykalnov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a039725510f13c77591106b02f32f5899c37c007

tdf#131618 MailMerge: Don't require DataSourceName if ResultSet provided

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Oleg Shchelykalnov 2020-03-28 19:31:37 UTC
Could it be backported to 6.4?
Comment 5 Roman Kuznetsov 2020-03-29 14:37:51 UTC
Oleg, if this bug is fixed, then please close it as RESOLVED FIXED, thanks
Comment 6 Commit Notification 2020-03-30 08:19:09 UTC
Oleg Shchelykalnov committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/06789981b0ed4485f695ad87b332a1b6c3230365

tdf#131618 MailMerge: Don't require DataSourceName if ResultSet provided

It will be available in 6.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.