Bug 126471 - Mail merge ignores preselected printer when printing second time
Summary: Mail merge ignores preselected printer when printing second time
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.4.0 target:6.2.6 target:6.3.1
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 06:04 UTC by Michael Weghorn
Modified: 2019-07-23 11:08 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 Michael Weghorn 2019-07-19 06:04:19 UTC
Steps to reproduce with master on Linux (should be similar on Windows):

1) set up two printers "foo" and "bar" on the system
2) make "foo" the default printer (e.g. using command 'lpoptions -d foo')
3) start LibreOffice Writer with a new document
4) run Mail Merge Wizard with any data source
5) click the "Print Merged Documents" icon in toolbar
   -> the "Print merged documents" dialog appears with no printer preselected
6) select printer "bar" (i.e. not the default printer)
7) click "Print Documents"
   -> printout happens on the selected printer "bar" (OK)
8) click the "Print Merged Documents" icon in toolbar again
  -> the "Print merged documents" dialog appears with printer "bar" preselected
9) click "Print Documents"

Result: The printout happens on printer "foo" (default printer) instead of the selected printer "bar".

Expected result: Printout should happen on the selected printer "bar".

Notes:
* This works as expected when temporarily selecting another printer, then switching back to "bar".

Version: 6.4.0.0.alpha0+
Build ID: 8e3f4317823aa83e0ad9e7dc008a1550ef3c9798
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Michael Weghorn 2019-07-19 06:04:44 UTC
* This bug report is mainly for documentation purposes. I've analyzed the issue and will submit a patch soon.
Comment 2 Michael Weghorn 2019-07-19 06:30:24 UTC
Gerrit change: https://gerrit.libreoffice.org/75933

and somewhat related: https://gerrit.libreoffice.org/75932
Comment 3 Gabor Kelemen (allotropia) 2019-07-19 06:44:52 UTC
May this be the same as bug #114099 ?
Comment 4 Michael Weghorn 2019-07-19 07:22:18 UTC
(In reply to Gabor Kelemen from comment #3)
> May this be the same as bug #114099 ?

That was my first thought as well. However, looking at it more closely, the dialogs being used for the both use cases are different ones.

For the use case described above, there is a "Print merged document" dialog that has some printer preselected (should be the "correct one" with above two patches).

For the case in bug 114099, there is first a "Mail Merge" dialog, and then the default print dialog is used. The above two patches don't change that the default printer is still selected there.
Comment 5 Commit Notification 2019-07-19 17:09:20 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0f0adc34889ff68da584cea97a9de649174b0333%5E%21

tdf#126471 Apply selected MM printer on dialog open

It will be available in 6.4.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 6 Michael Weghorn 2019-07-19 17:18:23 UTC
Fixed on master now.

Pending backports for 6.3 and 6.2:
https://gerrit.libreoffice.org/#/c/75966/
https://gerrit.libreoffice.org/#/c/75968/
Comment 7 Commit Notification 2019-07-23 11:08:30 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/9711e8ed4c7353e453aa5a9b59187f6cd31f24f1%5E%21

tdf#126471 Apply selected MM printer on dialog open

It will be available in 6.2.6.

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 8 Commit Notification 2019-07-23 11:08:41 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/fad14c70bec997bf99818ee3c08e83ba968c1b0f%5E%21

tdf#126471 Apply selected MM printer on dialog open

It will be available in 6.3.1.

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.