summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2019-07-19 08:16:54 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-07-23 13:07:29 +0200
commit9711e8ed4c7353e453aa5a9b59187f6cd31f24f1 (patch)
tree6b5491d1dbc5c6fbc3ab00489c2aa32e57437bc9
parent4bba6c122c3bb3468bccd69d53d70d00fd00bdcc (diff)
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 <m.weghorn@posteo.de> (cherry picked from commit 0f0adc34889ff68da584cea97a9de649174b0333) Reviewed-on: https://gerrit.libreoffice.org/75968 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index b7b55baca56c..d102faec4103 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -341,6 +341,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());
}