sw/source/ui/dbui/mmresultdialogs.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
New commits: commit 0f0adc34889ff68da584cea97a9de649174b0333 Author: Michael Weghorn <[email protected]> AuthorDate: Fri Jul 19 08:16:54 2019 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jul 19 19:08:43 2019 +0200 tdf#126471 Apply selected MM printer on dialog open Calling 'PrinterChangeHdl_Impl' in 'SwMMResultPrintDialog::FillInPrinterSettings' makes sure that a preselected printer is actually taken into account (i.e. 'm_pTempPrinter' set accordingly etc.) as soon as the dialog is created, not only when explicitly selecting another printer. Since 'PrinterChangeHdl_Impl' is now called initially and every time another printer is selected, there's no more need to do so in 'PrinterSetupHdl_Impl' any more. This fixes the issue that printout would always happen on default printer instead of the preselected one when SwMMResultPrintDialog was opened a second time. Change-Id: I5c930ed56d1025a7e94cc98fb70c01612bda0d22 Reviewed-on: https://gerrit.libreoffice.org/75933 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 741cd9baab49..8a4201d904c8 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -342,6 +342,7 @@ void SwMMResultPrintDialog::FillInPrinterSettings() { m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } + PrinterChangeHdl_Impl(*m_xPrinterLB); sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); @@ -782,8 +783,6 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SwMMResultPrintDialog, PrinterSetupHdl_Impl, weld::Button&, void) { - if (!m_pTempPrinter) - PrinterChangeHdl_Impl(*m_xPrinterLB); if (m_pTempPrinter) m_pTempPrinter->Setup(m_xDialog.get()); } commit 3bc1f99d3a792cdba037bcc757e8611d7e187b73 Author: Michael Weghorn <[email protected]> AuthorDate: Fri Jul 19 08:27:57 2019 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jul 19 19:08:33 2019 +0200 Mail merge: Preselect proper printer The proper printer has already been set a few lines above depending on the value of 'bMergePrinterExists', so it shouldn't be unconditionally overwritten here with a potentially invalid printer (using the same statement as already used 7 lines above for the 'else' case). This e.g. makes sure that the default printer is selected when no printer has been set, e.g. just after running Mail Merge Wizard on a new Writer doc, in which case no printer was selected previously. Change-Id: I922b8234be9c80536b6b0a9ba0dd19bdc39246e8 Reviewed-on: https://gerrit.libreoffice.org/75932 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 21c9588d71d8..741cd9baab49 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -346,8 +346,6 @@ void SwMMResultPrintDialog::FillInPrinterSettings() sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); m_xToNF->set_max(count); - - m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } void SwMMResultEmailDialog::FillInEmailSettings() _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
