diff options
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dbui/mailmergewizard.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 531 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.hxx | 112 | ||||
-rw-r--r-- | sw/source/uibase/inc/mailmergewizard.hxx | 1 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/mmresultemaildialog.ui | 398 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/mmresultprintdialog.ui | 293 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/mmresultsavedialog.ui | 221 |
8 files changed, 1200 insertions, 375 deletions
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index 647257636c7e..4273747b4446 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -234,7 +234,7 @@ protected: DECLARE_MAILMERGE_TEST(TestName, filename, datasource, tablename, true, MMTest) int MMTest::documentStartPageNumber( int document ) const -{ // See SwMailMergeOutputPage::documentStartPageNumber() . +{ // See documentStartPageNumber() . SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwWrtShell* shell = pTextDoc->GetDocShell()->GetWrtShell(); @@ -365,8 +365,8 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundariesSimpleMailMerge, "simple-mail-mer { // This is like the test above, but this one uses the create-single-document-containing-everything-generated approach, // and verifies that boundaries of the generated sub-documents are correct inside that document. - // These boundaries are done using "SwMailMergeOutputPage::documentStartPageNumber<number>" UNO bookmarks (see also - // SwMailMergeOutputPage::documentStartPageNumber() ). + // These boundaries are done using "documentStartPageNumber<number>" UNO bookmarks (see also + // documentStartPageNumber() ). executeMailMerge(); // Here getPages() works on the source document, so get pages of the resulting one. SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 4cb0adafda1b..967480626d8a 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -55,7 +55,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem m_sLayout( SW_RES( ST_LAYOUT )), m_sPrepareMerge( SW_RES( ST_PREPAREMERGE )), m_sMerge( SW_RES( ST_MERGE )), - m_sOutput( SW_RES( ST_OUTPUT )), m_sFinish( SW_RES( ST_FINISH )), m_nRestartPage( MM_DOCUMENTSELECTPAGE ) { @@ -77,7 +76,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem MM_LAYOUTPAGE, MM_PREPAREMERGEPAGE, MM_MERGEPAGE, - MM_OUTPUTPAGE, WZS_INVALID_STATE ); else @@ -89,7 +87,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem MM_LAYOUTPAGE, MM_PREPAREMERGEPAGE, MM_MERGEPAGE, - MM_OUTPUTPAGE, WZS_INVALID_STATE ); @@ -113,7 +110,6 @@ VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState) case MM_LAYOUTPAGE : pRet = VclPtr<SwMailMergeLayoutPage>::Create(this); break; case MM_PREPAREMERGEPAGE : pRet = VclPtr<SwMailMergePrepareMergePage>::Create(this); break; case MM_MERGEPAGE : pRet = VclPtr<SwMailMergeMergePage>::Create(this); break; - case MM_OUTPUTPAGE : pRet = VclPtr<SwMailMergeOutputPage>::Create(this); break; } OSL_ENSURE(pRet, "no page created in ::createPage"); return pRet; @@ -161,7 +157,7 @@ void SwMailMergeWizard::enterState( WizardState _nState ) case MM_ADDRESSBLOCKPAGE : bEnableNext = m_rConfigItem.GetResultSet().is(); break; - case MM_OUTPUTPAGE : + case MM_MERGEPAGE: bEnableNext = false; break; } @@ -190,8 +186,6 @@ OUString SwMailMergeWizard::getStateDisplayName( WizardState _nState ) const return m_sPrepareMerge; case MM_MERGEPAGE: return m_sMerge; - case MM_OUTPUTPAGE: - return m_sOutput; } return OUString(); } @@ -210,8 +204,6 @@ void SwMailMergeWizard::UpdateRoadmap() MM_PREPAREMERGEPAGE > only active if address data has been selected inactive after preparemerge page MM_MERGEPAGE > only active if address data has been selected - - MM_OUTPUTPAGE > only active if address data has been selected */ // enableState( <page id>, false ); @@ -230,7 +222,7 @@ void SwMailMergeWizard::UpdateRoadmap() bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) || static_cast<svt::OWizardPage*>(pCurPage)->commitPage( ::svt::WizardTypes::eValidate ); - for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage) + for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_MERGEPAGE; ++nPage) { bool bEnable = true; switch(nPage) @@ -256,7 +248,6 @@ void SwMailMergeWizard::UpdateRoadmap() // fall-through case MM_PREPAREMERGEPAGE: case MM_MERGEPAGE: - case MM_OUTPUTPAGE: bEnable = bEnable && !m_bDocumentLoad && bEnableOutputTypePage && m_rConfigItem.GetResultSet().is() && bAddressFieldsConfigured && diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index d44fe72d20e8..e385d59e6991 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -30,6 +30,8 @@ #include <docsh.hxx> #include <IDocumentDeviceAccess.hxx> #include <hintids.hxx> +#include <swmodule.hxx> + #include <editeng/scripttypeitem.hxx> #include <editeng/langitem.hxx> #include <svl/itemset.hxx> @@ -217,40 +219,91 @@ public: void SetBCC(const OUString& rSet) {m_pBCCED->SetText(rSet);} }; -SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent) - : svt::OWizardPage(_pParent, "MMOutputPage", - "modules/swriter/ui/mmoutputpage.ui") - , m_sSaveStartST(SW_RES(ST_SAVESTART)) - , m_sSaveMergedST(SW_RES(ST_SAVEMERGED)) - , m_sPrintST(SW_RES(ST_PRINT)) - , m_sSendMailST(SW_RES(ST_SENDMAIL)) - , m_sDefaultAttachmentST(SW_RES(ST_DEFAULTATTACHMENT)) - , m_sNoSubjectST(SW_RES(ST_NOSUBJECT)) - , m_sConfigureMail(SW_RES(ST_CONFIGUREMAIL)) - , m_bCancelSaving(false) - , m_pWizard(_pParent) - , m_pTempPrinter(nullptr) +SwMMResultSaveDialog::SwMMResultSaveDialog(vcl::Window* pParent) + : SfxModalDialog(pParent, "MMResultSaveDialog", "modules/swriter/ui/mmresultsavedialog.ui") { - get(m_pSaveStartDocRB, "savestarting"); - get(m_pSaveMergedDocRB, "savemerged"); - get(m_pPrintRB, "printmerged"); - get(m_pSendMailRB, "sendmerged"); - get(m_pSeparator, "frame"); - get(m_pSaveStartDocPB, "savestartingdoc"); get(m_pSaveAsOneRB, "singlerb"); get(m_pSaveIndividualRB, "individualrb"); - get(m_pPrintAllRB, "printallrb"); - get(m_pSendAllRB, "sendallrb"); get(m_pFromRB, "fromrb"); get(m_pFromNF, "from-nospin"); get(m_pToFT, "toft"); get(m_pToNF, "to-nospin"); - get(m_pSaveNowPB, "savenow"); + get(m_pOKButton, "ok"); + + m_pSaveAsOneRB->SetClickHdl(LINK(this, SwMMResultSaveDialog, DocumentSelectionHdl_Impl)); + m_pSaveIndividualRB->SetClickHdl(LINK(this, SwMMResultSaveDialog, DocumentSelectionHdl_Impl)); + m_pFromRB->SetClickHdl(LINK(this, SwMMResultSaveDialog, DocumentSelectionHdl_Impl)); + + m_pOKButton->SetClickHdl(LINK(this, SwMMResultSaveDialog, SaveOutputHdl_Impl)); +} + +SwMMResultSaveDialog::~SwMMResultSaveDialog() +{ + disposeOnce(); +} + +void SwMMResultSaveDialog::dispose() +{ + m_pSaveAsOneRB.clear(); + m_pSaveIndividualRB.clear(); + m_pFromRB.clear(); + m_pFromNF.clear(); + m_pToFT.clear(); + m_pToNF.clear(); + m_pOKButton.clear(); + + SfxModalDialog::dispose(); +} + +SwMMResultPrintDialog::SwMMResultPrintDialog(vcl::Window* pParent) + : SfxModalDialog(pParent, "MMResultPrintDialog", "modules/swriter/ui/mmresultprintdialog.ui") + , m_pTempPrinter(nullptr) +{ get(m_pPrinterFT, "printerft"); get(m_pPrinterLB, "printers"); m_pPrinterLB->SetStyle(m_pPrinterLB->GetStyle() | WB_SORT); get(m_pPrinterSettingsPB, "printersettings"); - get(m_pPrintNowPB, "printnow"); + get(m_pPrintAllRB, "printallrb"); + get(m_pFromRB, "fromrb"); + get(m_pFromNF, "from-nospin"); + get(m_pToFT, "toft"); + get(m_pToNF, "to-nospin"); + get(m_pOKButton, "ok"); + + m_pPrinterLB->SetSelectHdl(LINK(this, SwMMResultPrintDialog, PrinterChangeHdl_Impl)); + m_pPrinterSettingsPB->SetClickHdl(LINK(this, SwMMResultPrintDialog, PrinterSetupHdl_Impl)); + + m_pPrintAllRB->SetClickHdl(LINK(this, SwMMResultPrintDialog, DocumentSelectionHdl_Impl)); + m_pFromRB->SetClickHdl(LINK(this, SwMMResultPrintDialog, DocumentSelectionHdl_Impl)); + + m_pOKButton->SetClickHdl(LINK(this, SwMMResultPrintDialog, PrintHdl_Impl)); + + FillInPrinterSettings(); +} + +SwMMResultPrintDialog::~SwMMResultPrintDialog() +{ + disposeOnce(); +} + +void SwMMResultPrintDialog::dispose() +{ + m_pPrinterFT.clear(); + m_pPrinterLB.clear(); + m_pPrinterSettingsPB.clear(); + m_pPrintAllRB.clear(); + m_pFromRB.clear(); + m_pFromNF.clear(); + m_pToFT.clear(); + m_pToNF.clear(); + m_pOKButton.clear(); + + SfxModalDialog::dispose(); +} + +SwMMResultEmailDialog::SwMMResultEmailDialog(vcl::Window* pParent) + : SfxModalDialog(pParent, "MMResultEmailDialog", "modules/swriter/ui/mmresultemaildialog.ui") +{ get(m_pMailToFT, "mailtoft"); get(m_pMailToLB, "mailto"); get(m_pCopyToPB, "copyto"); @@ -261,74 +314,32 @@ SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent) get(m_pAttachmentGroup, "attachgroup"); get(m_pAttachmentED, "attach"); get(m_pSendAsPB, "sendassettings"); - get(m_pSendDocumentsPB, "sendnow"); - - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - // #i51949# hide e-Mail option if e-Mail is not supported - if(!rConfigItem.IsMailAvailable()) - m_pSendMailRB->Hide(); - - Link<Button*,void> aLink = LINK(this, SwMailMergeOutputPage, OutputTypeHdl_Impl); - m_pSaveStartDocRB->SetClickHdl(aLink); - m_pSaveMergedDocRB->SetClickHdl(aLink); - m_pPrintRB->SetClickHdl(aLink); - m_pSendMailRB->SetClickHdl(aLink); - m_pSaveStartDocRB->Check(); - m_pPrintAllRB->Check(); - m_pSaveAsOneRB->Check(); - m_pSendAllRB->Check(); - - m_pSaveStartDocPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, SaveStartHdl_Impl)); - m_pSaveNowPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, SaveOutputHdl_Impl)); - m_pPrinterLB->SetSelectHdl(LINK(this, SwMailMergeOutputPage, PrinterChangeHdl_Impl)); - m_pPrintNowPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, PrintHdl_Impl)); - m_pPrinterSettingsPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, PrinterSetupHdl_Impl)); - - m_pSendAsPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, SendAsHdl_Impl)); - m_pSendDocumentsPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, SendDocumentsHdl_Impl)); - m_pSendAsLB->SetSelectHdl(LINK(this, SwMailMergeOutputPage, SendTypeHdl_Impl)); - - OutputTypeHdl_Impl(m_pSaveStartDocRB); - - m_pCopyToPB->SetClickHdl(LINK(this, SwMailMergeOutputPage, CopyToHdl_Impl)); - - m_pSaveAsOneRB->SetClickHdl(LINK(this, SwMailMergeOutputPage, DocumentSelectionHdl_Impl)); - m_pSaveIndividualRB->SetClickHdl(LINK(this, SwMailMergeOutputPage, DocumentSelectionHdl_Impl)); - m_pPrintAllRB->SetClickHdl(LINK(this, SwMailMergeOutputPage, DocumentSelectionHdl_Impl)); - m_pSendAllRB->SetClickHdl(LINK(this, SwMailMergeOutputPage, DocumentSelectionHdl_Impl)); - - m_pFromRB->SetClickHdl(LINK(this, SwMailMergeOutputPage, DocumentSelectionHdl_Impl)); - //#i63267# printing might be disabled - m_pPrintRB->Enable(!Application::GetSettings().GetMiscSettings().GetDisablePrinting()); + get(m_pSendAllRB, "sendallrb"); + get(m_pFromRB, "fromrb"); + get(m_pFromNF, "from-nospin"); + get(m_pToFT, "toft"); + get(m_pToNF, "to-nospin"); + get(m_pOKButton, "ok"); + + m_pCopyToPB->SetClickHdl(LINK(this, SwMMResultEmailDialog, CopyToHdl_Impl)); + m_pSendAsPB->SetClickHdl(LINK(this, SwMMResultEmailDialog, SendAsHdl_Impl)); + m_pSendAsLB->SetSelectHdl(LINK(this, SwMMResultEmailDialog, SendTypeHdl_Impl)); + + m_pSendAllRB->SetClickHdl(LINK(this, SwMMResultEmailDialog, DocumentSelectionHdl_Impl)); + m_pFromRB->SetClickHdl(LINK(this, SwMMResultEmailDialog, DocumentSelectionHdl_Impl)); + + m_pOKButton->SetClickHdl(LINK(this, SwMMResultEmailDialog, SendDocumentsHdl_Impl)); + + FillInEmailSettings(); } -SwMailMergeOutputPage::~SwMailMergeOutputPage() +SwMMResultEmailDialog::~SwMMResultEmailDialog() { disposeOnce(); } -void SwMailMergeOutputPage::dispose() +void SwMMResultEmailDialog::dispose() { - m_pTempPrinter.disposeAndClear(); - m_pSaveStartDocRB.clear(); - m_pSaveMergedDocRB.clear(); - m_pPrintRB.clear(); - m_pSendMailRB.clear(); - m_pSeparator.clear(); - m_pSaveStartDocPB.clear(); - m_pSaveAsOneRB.clear(); - m_pSaveIndividualRB.clear(); - m_pPrintAllRB.clear(); - m_pSendAllRB.clear(); - m_pFromRB.clear(); - m_pFromNF.clear(); - m_pToFT.clear(); - m_pToNF.clear(); - m_pSaveNowPB.clear(); - m_pPrinterFT.clear(); - m_pPrinterLB.clear(); - m_pPrinterSettingsPB.clear(); - m_pPrintNowPB.clear(); m_pMailToFT.clear(); m_pMailToLB.clear(); m_pCopyToPB.clear(); @@ -338,13 +349,17 @@ void SwMailMergeOutputPage::dispose() m_pSendAsLB.clear(); m_pAttachmentGroup.clear(); m_pAttachmentED.clear(); - m_pSendAsPB.clear(); - m_pSendDocumentsPB.clear(); - m_pWizard.clear(); - svt::OWizardPage::dispose(); + m_pSendAllRB.clear(); + m_pFromRB.clear(); + m_pFromNF.clear(); + m_pToFT.clear(); + m_pToNF.clear(); + m_pOKButton.clear(); + + SfxModalDialog::dispose(); } -void SwMailMergeOutputPage::ActivatePage() +void SwMMResultPrintDialog::FillInPrinterSettings() { //fill printer ListBox const std::vector<OUString>& rPrinters = Printer::GetPrinterQueues(); @@ -357,20 +372,30 @@ void SwMailMergeOutputPage::ActivatePage() } } - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - SwView* pTargetView = rConfigItem.GetTargetView(); + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); + + SwView* pTargetView = pConfigItem->GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(pTargetView) { SfxPrinter* pPrinter = pTargetView->GetWrtShell().getIDocumentDeviceAccess().getPrinter( true ); - m_pPrinterLB->SelectEntry( pPrinter->GetName() ); - m_pToNF->SetValue( rConfigItem.GetMergedDocumentCount() ); - m_pToNF->SetMax( rConfigItem.GetMergedDocumentCount() ); + m_pPrinterLB->SelectEntry(pPrinter->GetName()); + m_pToNF->SetValue(pConfigItem->GetMergedDocumentCount()); + m_pToNF->SetMax(pConfigItem->GetMergedDocumentCount()); } - m_pPrinterLB->SelectEntry( rConfigItem.GetSelectedPrinter() ); + m_pPrinterLB->SelectEntry(pConfigItem->GetSelectedPrinter()); +} - SwView* pSourceView = rConfigItem.GetSourceView(); +void SwMMResultEmailDialog::FillInEmailSettings() +{ + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); + + SwView* pSourceView = pConfigItem->GetSourceView(); OSL_ENSURE(pSourceView, "no source view exists"); if(pSourceView) { @@ -382,105 +407,7 @@ void SwMailMergeOutputPage::ActivatePage() INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET )); } } -} - -bool SwMailMergeOutputPage::canAdvance() const -{ - return false; -} - -IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, void) -{ - vcl::Window* aControls[] = - { - m_pSaveStartDocPB, - m_pSaveAsOneRB, m_pSaveIndividualRB, - m_pFromRB, m_pFromNF, m_pToFT, m_pToNF, - m_pSaveNowPB, - m_pPrinterFT, m_pPrinterLB, m_pPrinterSettingsPB, m_pPrintAllRB, - m_pPrintNowPB, - m_pMailToFT, m_pMailToLB, m_pCopyToPB, - m_pSubjectFT, m_pSubjectED, - m_pSendAsFT, m_pSendAsLB, m_pSendAsPB, - m_pAttachmentGroup, - m_pSendAllRB, m_pSendDocumentsPB, - nullptr - }; - SetUpdateMode(true); - vcl::Window** pControl = aControls; - do - { - (*pControl)->Show(false); - - } while(*(++pControl)); - - if (m_pSaveStartDocRB == pButton) - { - m_pSaveStartDocPB->Show(); - m_pSeparator->set_label(m_sSaveStartST); - - } - else if (m_pSaveMergedDocRB == pButton) - { - Control* aSaveMergedControls[] = - { - m_pSaveAsOneRB, m_pSaveIndividualRB, - m_pFromRB, m_pFromNF, m_pToFT, m_pToNF, - m_pSaveNowPB, - nullptr - }; - Control** pSaveMergeControl = aSaveMergedControls; - do - { - (*pSaveMergeControl)->Show(); - - } while(*(++pSaveMergeControl)); - if(!m_pFromRB->IsChecked() && !m_pSaveAsOneRB->IsChecked()) - { - m_pSaveIndividualRB->Check(); - } - m_pSeparator->set_label(m_sSaveMergedST); - } - else if (m_pPrintRB == pButton) - { - Control* aPrintControls[] = - { - m_pFromRB, m_pFromNF, m_pToFT, m_pToNF, - m_pPrinterFT, m_pPrinterLB, m_pPrinterSettingsPB, m_pPrintAllRB, - m_pPrintNowPB, - nullptr - }; - Control** pPrinterControl = aPrintControls; - do - { - (*pPrinterControl)->Show(); - - } while(*(++pPrinterControl)); - if(!m_pFromRB->IsChecked()) - m_pPrintAllRB->Check(); - - m_pSeparator->set_label(m_sPrintST); - } - else - { - vcl::Window* aMailControls[] = - { - m_pFromRB, m_pFromNF, m_pToFT, m_pToNF, - m_pMailToFT, m_pMailToLB, m_pCopyToPB, - m_pSubjectFT, m_pSubjectED, - m_pSendAsFT, m_pSendAsLB, m_pSendAsPB, - m_pAttachmentGroup, - m_pSendAllRB, m_pSendDocumentsPB, nullptr - }; - vcl::Window** pMailControl = aMailControls; - do - { - (*pMailControl)->Show(); - - } while(*(++pMailControl)); - if(!m_pFromRB->IsChecked()) - m_pSendAllRB->Check(); if(m_pAttachmentED->GetText().isEmpty()) { OUString sAttach( m_sDefaultAttachmentST ); @@ -490,13 +417,11 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi m_pAttachmentED->SetText( sAttach ); } - m_pSeparator->set_label(m_sSendMailST); //fill mail address ListBox if(!m_pMailToLB->GetEntryCount()) { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); //select first column - uno::Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY); + uno::Reference< sdbcx::XColumnsSupplier > xColsSupp(pConfigItem->GetResultSet(), uno::UNO_QUERY); //get the name of the actual columns uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr; uno::Sequence< OUString > aFields; @@ -508,10 +433,9 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi m_pMailToLB->SelectEntryPos(0); // then select the right one - may not be available - const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders(); + const ResStringArray& rHeaders = pConfigItem->GetDefaultAddressHeaders(); OUString sEMailColumn = rHeaders.GetString( MM_PART_E_MAIL ); - Sequence< OUString> aAssignment = - rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); + Sequence< OUString> aAssignment = pConfigItem->GetColumnAssignment(pConfigItem->GetCurrentDBData()); if(aAssignment.getLength() > MM_PART_E_MAIL && !aAssignment[MM_PART_E_MAIL].isEmpty()) sEMailColumn = aAssignment[MM_PART_E_MAIL]; m_pMailToLB->SelectEntry(sEMailColumn); @@ -519,13 +443,17 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi m_pSendAsLB->SelectEntryPos(3); SendTypeHdl_Impl(*m_pSendAsLB); } - } - m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : nullptr); +} - SetUpdateMode(false); +IMPL_LINK_TYPED(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, Button*, pButton, void) +{ + bool bEnableFromTo = pButton == m_pFromRB; + m_pFromNF->Enable(bEnableFromTo); + m_pToFT->Enable(bEnableFromTo); + m_pToNF->Enable(bEnableFromTo); } -IMPL_LINK_TYPED(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, Button*, pButton, void) +IMPL_LINK_TYPED(SwMMResultPrintDialog, DocumentSelectionHdl_Impl, Button*, pButton, void) { bool bEnableFromTo = pButton == m_pFromRB; m_pFromNF->Enable(bEnableFromTo); @@ -533,7 +461,15 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, Button*, pButt m_pToNF->Enable(bEnableFromTo); } -IMPL_LINK_TYPED(SwMailMergeOutputPage, CopyToHdl_Impl, Button*, pButton, void) +IMPL_LINK_TYPED(SwMMResultEmailDialog, DocumentSelectionHdl_Impl, Button*, pButton, void) +{ + bool bEnableFromTo = pButton == m_pFromRB; + m_pFromNF->Enable(bEnableFromTo); + m_pToFT->Enable(bEnableFromTo); + m_pToNF->Enable(bEnableFromTo); +} + +IMPL_LINK_TYPED(SwMMResultEmailDialog, CopyToHdl_Impl, Button*, pButton, void) { ScopedVclPtrInstance< SwCopyToDialog > pDlg(pButton); pDlg->SetCC(m_sCC ); @@ -545,57 +481,19 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, CopyToHdl_Impl, Button*, pButton, void) } } -IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveStartHdl_Impl, Button*, pButton, void) -{ - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - SwView* pSourceView = rConfigItem.GetSourceView(); - OSL_ENSURE( pSourceView, "source view missing"); - if(pSourceView) - { - SfxViewFrame* pSourceViewFrame = pSourceView->GetViewFrame(); - uno::Reference< frame::XFrame > xFrame = - pSourceViewFrame->GetFrame().GetFrameInterface(); - xFrame->getContainerWindow()->setVisible(sal_True); - pSourceViewFrame->GetDispatcher()->Execute(SID_SAVEDOC, SfxCallMode::SYNCHRON); - xFrame->getContainerWindow()->setVisible(sal_False); - SwDocShell* pDocShell = pSourceView->GetDocShell(); - //if the document has been saved its URL has to be stored for - // later use and it can be closed now - if(pDocShell->HasName() && !pDocShell->IsModified()) - { - INetURLObject aURL = pDocShell->GetMedium()->GetURLObject(); - //update the attachment name - if(m_pAttachmentED->GetText().isEmpty()) - { - if ( pDocShell->HasName() ) - { - m_pAttachmentED->SetText(aURL.getName( - INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET )); - } - } - - rConfigItem.AddSavedDocument( - aURL.GetMainURL(INetURLObject::DECODE_TO_IURI)); - pButton->Enable(false); - m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); - pButton->Enable(false); - - } - } -} - -IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, SaveCancelHdl_Impl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwMMResultSaveDialog, SaveCancelHdl_Impl, Button*, void) { m_bCancelSaving = true; } -int SwMailMergeOutputPage::documentStartPageNumber( int document ) const +namespace { + +int documentStartPageNumber(SwMailMergeConfigItem* pConfigItem, int document) { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - SwView* pTargetView = rConfigItem.GetTargetView(); + SwView* pTargetView = pConfigItem->GetTargetView(); assert( pTargetView ); SwCursorShell& shell = pTargetView->GetWrtShell(); - const SwDocMergeInfo& info = rConfigItem.GetDocumentMergeInfo( document ); + const SwDocMergeInfo& info = pConfigItem->GetDocumentMergeInfo(document); sal_uInt16 page, dummy; shell.Push(); shell.GotoMark( info.startPageInTarget ); @@ -604,16 +502,15 @@ int SwMailMergeOutputPage::documentStartPageNumber( int document ) const return page; } -int SwMailMergeOutputPage::documentEndPageNumber( int document ) const +int documentEndPageNumber(SwMailMergeConfigItem* pConfigItem, int document) { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - SwView* pTargetView = rConfigItem.GetTargetView(); + SwView* pTargetView = pConfigItem->GetTargetView(); assert( pTargetView ); SwWrtShell& shell = pTargetView->GetWrtShell(); - if( document < int( rConfigItem.GetMergedDocumentCount()) - 1 ) + if (document < int(pConfigItem->GetMergedDocumentCount()) - 1) { // Go to the page before the starting page of the next merged document. - const SwDocMergeInfo& info = rConfigItem.GetDocumentMergeInfo( document + 1 ); + const SwDocMergeInfo& info = pConfigItem->GetDocumentMergeInfo( document + 1 ); sal_uInt16 page, dummy; shell.Push(); shell.GotoMark( info.startPageInTarget ); @@ -633,10 +530,15 @@ int SwMailMergeOutputPage::documentEndPageNumber( int document ) const } } -IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, void) +} // anonymous namespace + +IMPL_LINK_TYPED(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - SwView* pTargetView = rConfigItem.GetTargetView(); + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); + + SwView* pTargetView = pConfigItem->GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) return; @@ -679,14 +581,14 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi if(m_pSaveIndividualRB->IsChecked()) { nBegin = 0; - nEnd = rConfigItem.GetMergedDocumentCount(); + nEnd = pConfigItem->GetMergedDocumentCount(); } else { nBegin = static_cast< sal_Int32 >(m_pFromNF->GetValue() - 1); nEnd = static_cast< sal_Int32 >(m_pToNF->GetValue()); - if(nEnd > rConfigItem.GetMergedDocumentCount()) - nEnd = rConfigItem.GetMergedDocumentCount(); + if(nEnd > pConfigItem->GetMergedDocumentCount()) + nEnd = pConfigItem->GetMergedDocumentCount(); } OUString sFilter; OUString sPath = SwMailMergeHelper::CallSaveAsDialog(sFilter); @@ -724,14 +626,13 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi ErrorHandler::HandleError( nErrorCode ); } - SwView* pSourceView = rConfigItem.GetSourceView(); + SwView* pSourceView = pConfigItem->GetSourceView(); ScopedVclPtrInstance< PrintMonitor > aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE); aSaveMonitor->m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22)); - aSaveMonitor->SetCancelHdl(LINK(this, SwMailMergeOutputPage, SaveCancelHdl_Impl)); + aSaveMonitor->SetCancelHdl(LINK(this, SwMMResultSaveDialog, SaveCancelHdl_Impl)); aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) ); m_bCancelSaving = false; aSaveMonitor->Show(); - m_pWizard->enableButtons(WizardButtonFlags::CANCEL, false); for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc) { @@ -765,7 +666,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi pTempView->GetDocShell()->GetDoc()->ReplaceDocumentProperties( *pTargetView->GetDocShell()->GetDoc(), true ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), - documentStartPageNumber( nDoc ), documentEndPageNumber( nDoc )); + documentStartPageNumber(pConfigItem, nDoc), documentEndPageNumber(pConfigItem, nDoc)); pTargetView->GetWrtShell().EndAction(); //then save it OUString sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI); @@ -809,13 +710,15 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi } ::osl::File::remove( sTargetTempURL ); } - m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); - m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); } -IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox&, rBox, void) +IMPL_LINK_TYPED(SwMMResultPrintDialog, PrinterChangeHdl_Impl, ListBox&, rBox, void) { - SwView *const pTargetView = m_pWizard->GetConfigItem().GetTargetView(); + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); + + SwView *const pTargetView = pConfigItem->GetTargetView(); SfxPrinter *const pDocumentPrinter = pTargetView->GetWrtShell() .getIDocumentDeviceAccess().getPrinter(true); if (pDocumentPrinter && rBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) @@ -851,38 +754,42 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox&, rBox, vo } else m_pPrinterSettingsPB->Disable(); - m_pWizard->GetConfigItem().SetSelectedPrinter( rBox.GetSelectEntry() ); + + pConfigItem->SetSelectedPrinter(rBox.GetSelectEntry()); } -IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwMMResultPrintDialog, PrintHdl_Impl, Button*, void) { - SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView(); + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); + + SwView* pTargetView = pConfigItem->GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) return; sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); if(m_pPrintAllRB->IsChecked()) { nBegin = 0; - nEnd = rConfigItem.GetMergedDocumentCount(); + nEnd = pConfigItem->GetMergedDocumentCount(); } else { nBegin = static_cast< sal_Int32 >(m_pFromNF->GetValue() - 1); nEnd = static_cast< sal_Int32 >(m_pToNF->GetValue()); - if(nEnd > rConfigItem.GetMergedDocumentCount()) - nEnd = rConfigItem.GetMergedDocumentCount(); + if(nEnd > pConfigItem->GetMergedDocumentCount()) + nEnd = pConfigItem->GetMergedDocumentCount(); } - rConfigItem.SetPrintRange( (sal_uInt16)nBegin, (sal_uInt16)nEnd ); + pConfigItem->SetPrintRange((sal_uInt16)nBegin, (sal_uInt16)nEnd); - OUString sPages(OUString::number( documentStartPageNumber( nBegin ))); + OUString sPages(OUString::number(documentStartPageNumber(pConfigItem, nBegin))); sPages += " - "; - sPages += OUString::number( documentEndPageNumber( nEnd - 1 )); + sPages += OUString::number(documentEndPageNumber(pConfigItem, nEnd - 1)); - pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, false); + pTargetView->SetMailMergeConfigItem(pConfigItem, 0, false); if(m_pTempPrinter) { SfxPrinter *const pDocumentPrinter = pTargetView->GetWrtShell() @@ -895,7 +802,6 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell(); SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh)); SfxBoolItem aMergeSilent(SID_SILENT, false); - m_pWizard->enableButtons(WizardButtonFlags::CANCEL, false); uno::Sequence < beans::PropertyValue > aProps( 2 ); aProps[0]. Name = "MonitorVisible"; @@ -905,12 +811,9 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) pTargetView->ExecPrint( aProps, false, true ); SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh)); - - m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); - m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); } -IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterSetupHdl_Impl, Button*, pButton, void) +IMPL_LINK_TYPED(SwMMResultPrintDialog, PrinterSetupHdl_Impl, Button*, pButton, void) { if( !m_pTempPrinter ) PrinterChangeHdl_Impl(*m_pPrinterLB); @@ -918,7 +821,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterSetupHdl_Impl, Button*, pButton, v m_pTempPrinter->Setup(pButton); } -IMPL_LINK_TYPED(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox&, rBox, void) +IMPL_LINK_TYPED(SwMMResultEmailDialog, SendTypeHdl_Impl, ListBox&, rBox, void) { sal_uLong nDocType = reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; @@ -943,29 +846,34 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox&, rBox, void) } } -IMPL_LINK_TYPED(SwMailMergeOutputPage, SendAsHdl_Impl, Button*, pButton, void) +IMPL_LINK_TYPED(SwMMResultEmailDialog, SendAsHdl_Impl, Button*, /*pButton*/, void) { + /* TODO FIXME this currently tries to connect to the wizard, fix that, or + instantiate it when needed or something VclPtr<SwMailBodyDialog> pDlg = VclPtr<SwMailBodyDialog>::Create(pButton, m_pWizard); pDlg->SetBody(m_sBody); if(RET_OK == pDlg->Execute()) { m_sBody = pDlg->GetBody(); } + */ } // Send documents as e-mail -IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, void) +IMPL_LINK_TYPED(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void) { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); + SwView* pView = ::GetActiveView(); + SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); + assert(pConfigItem); //get the composed document - SwView* pTargetView = rConfigItem.GetTargetView(); + SwView* pTargetView = pConfigItem->GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) return; - if(rConfigItem.GetMailServer().isEmpty() || - !SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) ) + if(pConfigItem->GetMailServer().isEmpty() || + !SwMailMergeHelper::CheckMailAddress(pConfigItem->GetMailAddress()) ) { ScopedVclPtrInstance< QueryBox > aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail); sal_uInt16 nRet = aQuery->Execute(); @@ -985,14 +893,14 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, if(m_pSendAllRB->IsChecked()) { nBegin = 0; - nEnd = rConfigItem.GetMergedDocumentCount(); + nEnd = pConfigItem->GetMergedDocumentCount(); } else { nBegin = static_cast< sal_Int32 >(m_pFromNF->GetValue() - 1); nEnd = static_cast< sal_Int32 >(m_pToNF->GetValue()); - if(nEnd > rConfigItem.GetMergedDocumentCount()) - nEnd = rConfigItem.GetMergedDocumentCount(); + if(nEnd > pConfigItem->GetMergedDocumentCount()) + nEnd = pConfigItem->GetMergedDocumentCount(); } bool bAsBody = false; rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding(); @@ -1097,7 +1005,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, SfxStringItem aFilterName( SID_FILTER_NAME, pSfxFlt->GetFilterName() ); OUString sEMailColumn = m_pMailToLB->GetSelectEntry(); OSL_ENSURE( !sEMailColumn.isEmpty(), "No email column selected"); - Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY); + Reference< sdbcx::XColumnsSupplier > xColsSupp( pConfigItem->GetResultSet(), UNO_QUERY); Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr; if(sEMailColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn)) return; @@ -1129,7 +1037,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, xStore->storeToURL( sTargetTempURL, aValues ); //create the send dialog - VclPtr<SwSendMailDialog> pDlg = VclPtr<SwSendMailDialog>::Create( pButton, rConfigItem ); + VclPtr<SwSendMailDialog> pDlg = VclPtr<SwSendMailDialog>::Create(pButton, *pConfigItem); pDlg->SetDocumentCount( nEnd ); pDlg->ShowDialog(); //help to force painting the dialog @@ -1139,8 +1047,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, Application::Reschedule(); for(sal_uInt32 nDoc = nBegin; nDoc < nEnd; ++nDoc) { - m_pWizard->EnterWait(); - SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc); + SwDocMergeInfo& rInfo = pConfigItem->GetDocumentMergeInfo(nDoc); //now extract a document from the target document // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here @@ -1161,7 +1068,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, pTempView->GetDocShell()->GetDoc()->ReplaceDefaults( *pTargetView->GetDocShell()->GetDoc()); pTempView->GetDocShell()->GetDoc()->ReplaceDocumentProperties( *pTargetView->GetDocShell()->GetDoc(), true ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), - documentStartPageNumber( nDoc ), documentEndPageNumber( nDoc )); + documentStartPageNumber(pConfigItem, nDoc), documentEndPageNumber(pConfigItem, nDoc)); pTargetView->GetWrtShell().EndAction(); //then save it @@ -1186,7 +1093,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, } xTempDocShell->DoClose(); - sal_Int32 nTarget = rConfigItem.MoveResultSet(rInfo.nDBRow); + sal_Int32 nTarget = pConfigItem->MoveResultSet(rInfo.nDBRow); OSL_ENSURE( nTarget == rInfo.nDBRow, "row of current document could not be selected"); (void)nTarget; OSL_ENSURE( !sEMailColumn.isEmpty(), "No email column selected"); @@ -1235,30 +1142,30 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, aDesc.sAttachmentName = sAttachment; aDesc.sMimeType = sMimeType; - if(rConfigItem.IsGreetingLine(true)) + if(pConfigItem->IsGreetingLine(true)) { - OUString sNameColumn = rConfigItem.GetAssignedColumn(MM_PART_LASTNAME); + OUString sNameColumn = pConfigItem->GetAssignedColumn(MM_PART_LASTNAME); OUString sName = lcl_GetColumnValueOf(sNameColumn, xColAccess); OUString sGreeting; - if(!sName.isEmpty() && rConfigItem.IsIndividualGreeting(true)) + if(!sName.isEmpty() && pConfigItem->IsIndividualGreeting(true)) { - OUString sGenderColumn = rConfigItem.GetAssignedColumn(MM_PART_GENDER); - const OUString& sFemaleValue = rConfigItem.GetFemaleGenderValue(); + OUString sGenderColumn = pConfigItem->GetAssignedColumn(MM_PART_GENDER); + const OUString& sFemaleValue = pConfigItem->GetFemaleGenderValue(); OUString sGenderValue = lcl_GetColumnValueOf(sGenderColumn, xColAccess); SwMailMergeConfigItem::Gender eGenderType = sGenderValue == sFemaleValue ? SwMailMergeConfigItem::FEMALE : SwMailMergeConfigItem::MALE; sGreeting = SwAddressPreview::FillData( - rConfigItem.GetGreetings(eGenderType) - [rConfigItem.GetCurrentGreeting(eGenderType)], - rConfigItem); + pConfigItem->GetGreetings(eGenderType) + [pConfigItem->GetCurrentGreeting(eGenderType)], + *pConfigItem); } else { sGreeting = - rConfigItem.GetGreetings(SwMailMergeConfigItem::NEUTRAL) - [rConfigItem.GetCurrentGreeting(SwMailMergeConfigItem::NEUTRAL)]; + pConfigItem->GetGreetings(SwMailMergeConfigItem::NEUTRAL) + [pConfigItem->GetCurrentGreeting(SwMailMergeConfigItem::NEUTRAL)]; } sGreeting += "\n"; @@ -1284,15 +1191,11 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, //stop creating of data when dialog has been closed if(!pDlg->IsVisible()) { - m_pWizard->LeaveWait(); break; } - m_pWizard->LeaveWait(); } pDlg->EnableDesctruction(); ::osl::File::remove( sTargetTempURL ); - - m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 5657543e431d..521bc4d66da1 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -43,91 +43,111 @@ namespace com{ namespace sun{ namespace star{ } }}} -class SwMailMergeOutputPage : public svt::OWizardPage +/// Dialog implementing the saving as of the result document. +class SwMMResultSaveDialog : public SfxModalDialog { - VclPtr<RadioButton> m_pSaveStartDocRB; - VclPtr<RadioButton> m_pSaveMergedDocRB; - VclPtr<RadioButton> m_pPrintRB; - VclPtr<RadioButton> m_pSendMailRB; - - VclPtr<VclFrame> m_pSeparator; - - VclPtr<PushButton> m_pSaveStartDocPB; - VclPtr<RadioButton> m_pSaveAsOneRB; VclPtr<RadioButton> m_pSaveIndividualRB; - VclPtr<RadioButton> m_pPrintAllRB; //has to be here for tab control reasons - VclPtr<RadioButton> m_pSendAllRB; //has to be here for tab control reasons - //this group is used in save and print VclPtr<RadioButton> m_pFromRB; VclPtr<NumericField> m_pFromNF; VclPtr<FixedText> m_pToFT; VclPtr<NumericField> m_pToNF; - VclPtr<PushButton> m_pSaveNowPB; + VclPtr<Button> m_pOKButton; + + bool m_bCancelSaving; + + DECL_LINK_TYPED(SaveOutputHdl_Impl, Button* , void); + DECL_LINK_TYPED(SaveCancelHdl_Impl, Button*, void); + DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); + +public: + SwMMResultSaveDialog(vcl::Window* pParent = nullptr); + virtual ~SwMMResultSaveDialog(); + + virtual void dispose() override; +}; + +/// Dialog implementing the printing of the result document. +class SwMMResultPrintDialog : public SfxModalDialog +{ VclPtr<FixedText> m_pPrinterFT; VclPtr<ListBox> m_pPrinterLB; VclPtr<PushButton> m_pPrinterSettingsPB; - VclPtr<PushButton> m_pPrintNowPB; + VclPtr<RadioButton> m_pPrintAllRB; + + VclPtr<RadioButton> m_pFromRB; + VclPtr<NumericField> m_pFromNF; + VclPtr<FixedText> m_pToFT; + VclPtr<NumericField> m_pToNF; + + VclPtr<Button> m_pOKButton; + + VclPtr<Printer> m_pTempPrinter; + + DECL_LINK_TYPED(PrinterChangeHdl_Impl, ListBox&,void ); + DECL_LINK_TYPED(PrintHdl_Impl, Button*, void); + DECL_LINK_TYPED(PrinterSetupHdl_Impl, Button*, void ); + DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); + + void FillInPrinterSettings(); + +public: + SwMMResultPrintDialog(vcl::Window* pParent = nullptr); + virtual ~SwMMResultPrintDialog(); + + virtual void dispose() override; +}; + +/// Dialog implementing the sending as email of the result document. +class SwMMResultEmailDialog : public SfxModalDialog +{ VclPtr<FixedText> m_pMailToFT; VclPtr<ListBox> m_pMailToLB; VclPtr<PushButton> m_pCopyToPB; + VclPtr<FixedText> m_pSubjectFT; VclPtr<Edit> m_pSubjectED; + VclPtr<FixedText> m_pSendAsFT; VclPtr<ListBox> m_pSendAsLB; + VclPtr<PushButton> m_pSendAsPB; + VclPtr<VclContainer> m_pAttachmentGroup; VclPtr<Edit> m_pAttachmentED; - VclPtr<PushButton> m_pSendAsPB; - VclPtr<PushButton> m_pSendDocumentsPB; - //some FixedLine labels - OUString m_sSaveStartST; - OUString m_sSaveMergedST; - OUString m_sPrintST; - OUString m_sSendMailST; + VclPtr<RadioButton> m_pSendAllRB; + + VclPtr<RadioButton> m_pFromRB; + VclPtr<NumericField> m_pFromNF; + VclPtr<FixedText> m_pToFT; + VclPtr<NumericField> m_pToNF; + + VclPtr<Button> m_pOKButton; - //misc strings OUString m_sDefaultAttachmentST; OUString m_sNoSubjectST; OUString m_sConfigureMail; - OUString m_sBody; - - bool m_bCancelSaving; - - VclPtr<SwMailMergeWizard> m_pWizard; - - //some dialog data - VclPtr<Printer> m_pTempPrinter; OUString m_sCC; OUString m_sBCC; - DECL_LINK_TYPED(OutputTypeHdl_Impl, Button*, void); + OUString m_sBody; + DECL_LINK_TYPED(CopyToHdl_Impl, Button*, void); - DECL_LINK_TYPED(SaveStartHdl_Impl, Button*, void ); - DECL_LINK_TYPED(SaveOutputHdl_Impl, Button* , void); - DECL_LINK_TYPED(PrinterChangeHdl_Impl, ListBox&,void ); - DECL_LINK_TYPED(PrintHdl_Impl, Button*, void); - DECL_LINK_TYPED(PrinterSetupHdl_Impl, Button*, void ); DECL_LINK_TYPED(SendTypeHdl_Impl, ListBox&, void); DECL_LINK_TYPED(SendAsHdl_Impl, Button*, void); DECL_LINK_TYPED(SendDocumentsHdl_Impl, Button*, void); DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); - DECL_LINK_TYPED(SaveCancelHdl_Impl, Button*, void); - int documentStartPageNumber( int document ) const; - int documentEndPageNumber( int document ) const; + void FillInEmailSettings(); -protected: - virtual bool canAdvance() const override; - virtual void ActivatePage() override; public: - SwMailMergeOutputPage( SwMailMergeWizard* _pParent); - virtual ~SwMailMergeOutputPage(); - virtual void dispose() override; + SwMMResultEmailDialog(vcl::Window* pParent = nullptr); + virtual ~SwMMResultEmailDialog(); + virtual void dispose() override; }; struct SwMailDescriptor diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index 1c198c435dba..a8d6e5499dff 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -32,7 +32,6 @@ class SwMailMergeConfigItem; #define MM_LAYOUTPAGE 4 #define MM_PREPAREMERGEPAGE 5 #define MM_MERGEPAGE 6 -#define MM_OUTPUTPAGE 7 class SwMailMergeWizard : public ::svt::RoadmapWizard { diff --git a/sw/uiconfig/swriter/ui/mmresultemaildialog.ui b/sw/uiconfig/swriter/ui/mmresultemaildialog.ui new file mode 100644 index 000000000000..222629fbadd1 --- /dev/null +++ b/sw/uiconfig/swriter/ui/mmresultemaildialog.ui @@ -0,0 +1,398 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="MMResultEmailDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">E-Mail merged document</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">Send Documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="mailtoft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">T_o</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">mailto</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="mailto"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="copyto"> + <property name="label" translatable="yes">_Copy to...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="subjectft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">S_ubject</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">subject</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="subject"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="sendasft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Sen_d as</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">sendas</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="sendas"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="sendassettings"> + <property name="label" translatable="yes">Pr_operties...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="hexpand">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="attachgroup"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkEntry" id="attach"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="attachft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Name of the a_ttachment</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">attach</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">E-Mail options</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkRadioButton" id="sendallrb"> + <property name="label" translatable="yes">S_end all documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">singlerb</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkRadioButton" id="fromrb"> + <property name="label" translatable="yes">_From</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">singlerb</property> + <accessibility> + <relation type="label-for" target="from-nospin"/> + </accessibility> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="toft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_To</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">to-nospin</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="from-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text" translatable="yes">1</property> + <accessibility> + <relation type="labelled-by" target="fromrb"/> + </accessibility> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="to-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text">1</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Send records</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> diff --git a/sw/uiconfig/swriter/ui/mmresultprintdialog.ui b/sw/uiconfig/swriter/ui/mmresultprintdialog.ui new file mode 100644 index 000000000000..6036fd9c5c1c --- /dev/null +++ b/sw/uiconfig/swriter/ui/mmresultprintdialog.ui @@ -0,0 +1,293 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="MMResultPrintDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Print merged document</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">Print Documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="printerft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Printer</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">printers</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="printers"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="printersettings"> + <property name="label" translatable="yes">P_roperties...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Printer options</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="printallrb"> + <property name="label" translatable="yes">Print _all documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">sendallrb</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkRadioButton" id="fromrb"> + <property name="label" translatable="yes">_From</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">singlerb</property> + <accessibility> + <relation type="label-for" target="from-nospin"/> + </accessibility> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="toft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_To</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">to-nospin</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="from-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text" translatable="yes">1</property> + <property name="adjustment">adjustment1</property> + <property name="value">1</property> + <accessibility> + <relation type="labelled-by" target="fromrb"/> + </accessibility> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="to-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text">1</property> + <property name="adjustment">adjustment1</property> + <property name="value">1</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Print records</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> diff --git a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui new file mode 100644 index 000000000000..bd2fcfa8f7b6 --- /dev/null +++ b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="MMResultSaveDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Save merged document</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">Save Documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkRadioButton" id="singlerb"> + <property name="label" translatable="yes">S_ave as a single large document</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">individualrb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="individualrb"> + <property name="label" translatable="yes">Sa_ve as individual documents</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">printallrb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkRadioButton" id="fromrb"> + <property name="label" translatable="yes">_From</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <accessibility> + <relation type="label-for" target="from-nospin"/> + </accessibility> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="toft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_To</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">to-nospin</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="from-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text" translatable="yes">1</property> + <accessibility> + <relation type="labelled-by" target="fromrb"/> + </accessibility> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="to-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="text">1</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Save As options</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |