From adc783cccd06f26a6c997d3dcd894bb4dd93112e Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 5 May 2020 11:12:46 +0200 Subject: Prefill doc count in mail merge's "Send Email" dialog Initialize the last document number with the doc count in the "Send Email Documents" mail merge dialog, just as is done for the "Print Merged Documents" and "Save Merged Documents" dialogs already. While at it, also set maximum value for the "from" spinbutton for the "Print Merged Documents" dialog. Change-Id: Idbd6d07eb7a21f2abf27ee06e7170125e1c706f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93459 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- sw/source/ui/dbui/mmresultdialogs.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw') diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 3794f9f861c9..e9dcc0b93a1b 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -376,6 +376,7 @@ void SwMMResultPrintDialog::FillInPrinterSettings() PrinterChangeHdl_Impl(*m_xPrinterLB); sal_Int32 count = xConfigItem->GetMergedDocumentCount(); + m_xFromNF->set_max(count); m_xToNF->set_value(count); m_xToNF->set_max(count); } @@ -432,6 +433,10 @@ void SwMMResultEmailDialog::FillInEmailSettings() m_xSendAsLB->set_active(3); SendTypeHdl_Impl(*m_xSendAsLB); + const sal_Int32 nCount = xConfigItem->GetMergedDocumentCount(); + m_xFromNF->set_max(nCount); + m_xToNF->set_max(nCount); + m_xToNF->set_value(nCount); } IMPL_LINK_NOARG(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, weld::ToggleButton&, void) -- cgit v1.2.3