summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/Library_swui.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx22
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx103
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx57
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx1
-rw-r--r--sw/source/uibase/inc/mailmergewizard.hxx1
-rw-r--r--sw/uiconfig/swriter/ui/mmmergepage.ui263
8 files changed, 4 insertions, 445 deletions
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 0d20c61d758a..2d49d3c357d1 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -168,7 +168,6 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
sw/source/ui/dbui/mmdocselectpage \
sw/source/ui/dbui/mmgreetingspage \
sw/source/ui/dbui/mmlayoutpage \
- sw/source/ui/dbui/mmmergepage \
sw/source/ui/dbui/mmoutputtypepage \
sw/source/ui/dbui/mmpreparemergepage \
sw/source/ui/dbui/mmresultdialogs \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index af1f09f4e36a..216ffb12e4d5 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -195,7 +195,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmlayoutpage \
sw/uiconfig/swriter/ui/mmmailbody \
- sw/uiconfig/swriter/ui/mmmergepage \
sw/uiconfig/swriter/ui/mmoutputtypepage \
sw/uiconfig/swriter/ui/mmpreparepage \
sw/uiconfig/swriter/ui/mmresultemaildialog \
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 2ab51277da26..9b853e8f6b0d 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -22,7 +22,6 @@
#include <mmoutputtypepage.hxx>
#include <mmaddressblockpage.hxx>
#include <mmpreparemergepage.hxx>
-#include <mmmergepage.hxx>
#include <mmgreetingspage.hxx>
#include <mmlayoutpage.hxx>
#include <mmconfigitem.hxx>
@@ -74,7 +73,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
MM_GREETINGSPAGE,
MM_LAYOUTPAGE,
MM_PREPAREMERGEPAGE,
- MM_MERGEPAGE,
WZS_INVALID_STATE
);
else
@@ -85,7 +83,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
MM_GREETINGSPAGE,
MM_LAYOUTPAGE,
MM_PREPAREMERGEPAGE,
- MM_MERGEPAGE,
WZS_INVALID_STATE
);
@@ -108,7 +105,6 @@ VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState)
case MM_GREETINGSPAGE : pRet = VclPtr<SwMailMergeGreetingsPage>::Create(this); break;
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;
}
OSL_ENSURE(pRet, "no page created in ::createPage");
return pRet;
@@ -130,14 +126,8 @@ void SwMailMergeWizard::enterState( WizardState _nState )
SwMailMergeLayoutPage::InsertAddressAndGreeting(m_rConfigItem.GetSourceView(),
m_rConfigItem, Point(-1, -1), true);
}
- if(_nState >= MM_MERGEPAGE && !m_rConfigItem.GetTargetView())
- {
- CreateTargetDocument();
- m_nRestartPage = _nState;
- EndDialog(RET_TARGET_CREATED);
- return;
- }
- else if(_nState < MM_MERGEPAGE && m_rConfigItem.GetTargetView())
+
+ if(m_rConfigItem.GetTargetView())
{
//close the dialog, remove the target view, show the source view
m_nRestartPage = _nState;
@@ -156,7 +146,7 @@ void SwMailMergeWizard::enterState( WizardState _nState )
case MM_ADDRESSBLOCKPAGE :
bEnableNext = m_rConfigItem.GetResultSet().is();
break;
- case MM_MERGEPAGE:
+ case MM_PREPAREMERGEPAGE:
bEnableNext = false;
break;
}
@@ -183,8 +173,6 @@ OUString SwMailMergeWizard::getStateDisplayName( WizardState _nState ) const
return m_sLayout;
case MM_PREPAREMERGEPAGE:
return m_sPrepareMerge;
- case MM_MERGEPAGE:
- return m_sMerge;
}
return OUString();
}
@@ -202,7 +190,6 @@ void SwMailMergeWizard::UpdateRoadmap()
or are already inserted into the source document
MM_PREPAREMERGEPAGE > only active if address data has been selected
inactive after preparemerge page
- MM_MERGEPAGE > only active if address data has been selected
*/
// enableState( <page id>, false );
@@ -221,7 +208,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_MERGEPAGE; ++nPage)
+ for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_PREPAREMERGEPAGE; ++nPage)
{
bool bEnable = true;
switch(nPage)
@@ -246,7 +233,6 @@ void SwMailMergeWizard::UpdateRoadmap()
(m_rConfigItem.IsGreetingLine(false) && !m_rConfigItem.IsGreetingInserted() ));
// fall-through
case MM_PREPAREMERGEPAGE:
- case MM_MERGEPAGE:
bEnable = bEnable && !m_bDocumentLoad && bEnableOutputTypePage &&
m_rConfigItem.GetResultSet().is() &&
bAddressFieldsConfigured &&
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx
deleted file mode 100644
index 17cdfc792eb9..000000000000
--- a/sw/source/ui/dbui/mmmergepage.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <mmmergepage.hxx>
-#include <mailmergewizard.hxx>
-#include <mmconfigitem.hxx>
-#include <swtypes.hxx>
-#include <view.hxx>
-#include <dbui.hrc>
-#include <svl/srchitem.hxx>
-#include <sfx2/dispatch.hxx>
-#include <svl/eitem.hxx>
-#include <swabstdlg.hxx>
-
-SwMailMergeMergePage::SwMailMergeMergePage(SwMailMergeWizard* _pParent)
- : svt::OWizardPage(_pParent, "MMMergePage",
- "modules/swriter/ui/mmmergepage.ui")
- , m_pWizard(_pParent)
-{
- get(m_pEditFI, "helplabel");
- get(m_pEditPB, "edit");
- get(m_pFindPB, "find");
- get(m_pWholeWordsCB, "wholewords");
- get(m_pBackwardsCB, "backwards");
- get(m_pMatchCaseCB, "matchcase");
- get(m_pFindED, "entry");
- OUString sTemp(m_pEditFI->GetText());
- sTemp = sTemp.replaceFirst("%1", m_pEditPB->GetText());
- m_pEditFI->SetText(sTemp);
- m_pEditPB->SetClickHdl( LINK( this, SwMailMergeMergePage, EditDocumentHdl_Impl));
- m_pFindPB->SetClickHdl( LINK( this, SwMailMergeMergePage, FindHdl_Impl ));
-
- m_pFindED->SetReturnActionLink( LINK(this, SwMailMergeMergePage, EnteredFindStringHdl_Impl ));
-
-}
-
-SwMailMergeMergePage::~SwMailMergeMergePage()
-{
- disposeOnce();
-}
-
-void SwMailMergeMergePage::dispose()
-{
- m_pEditFI.clear();
- m_pEditPB.clear();
- m_pFindED.clear();
- m_pFindPB.clear();
- m_pWholeWordsCB.clear();
- m_pBackwardsCB.clear();
- m_pMatchCaseCB.clear();
- m_pWizard.clear();
- svt::OWizardPage::dispose();
-}
-
-
-IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, EditDocumentHdl_Impl, Button*, void)
-{
- m_pWizard->SetRestartPage(MM_MERGEPAGE);
- m_pWizard->EndDialog(RET_EDIT_RESULT_DOC);
-}
-
-IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, FindHdl_Impl, Button*, void)
-{
- SvxSearchItem aSearchItem( SID_SEARCH_ITEM );
-
- SfxBoolItem aQuiet( SID_SEARCH_QUIET, false );
- aSearchItem.SetSearchString(m_pFindED->GetText());
-
- aSearchItem.SetWordOnly(m_pWholeWordsCB->IsChecked());
- aSearchItem.SetExact(m_pMatchCaseCB->IsChecked());
- aSearchItem.SetBackward(m_pBackwardsCB->IsChecked());
-
- SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView();
- OSL_ENSURE(pTargetView, "no target view exists");
- if(pTargetView)
- {
- pTargetView->GetViewFrame()->GetDispatcher()->Execute(
- FID_SEARCH_NOW, SfxCallMode::SYNCHRON, &aSearchItem, &aQuiet, 0L );
- }
-}
-
-IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, EnteredFindStringHdl_Impl, ReturnActionEdit&, void)
-{
- m_pFindPB->GetClickHdl().Call(m_pFindPB);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx
deleted file mode 100644
index 510f33ded7c1..000000000000
--- a/sw/source/ui/dbui/mmmergepage.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_SOURCE_UI_DBUI_MMMERGEPAGE_HXX
-#define INCLUDED_SW_SOURCE_UI_DBUI_MMMERGEPAGE_HXX
-
-#include <svtools/wizardmachine.hxx>
-#include <vcl/button.hxx>
-#include <vcl/edit.hxx>
-#include <svtools/stdctrl.hxx>
-#include <mailmergehelper.hxx>
-#include <actctrl.hxx>
-class SwMailMergeWizard;
-
-class SwMailMergeMergePage : public svt::OWizardPage
-{
- VclPtr<FixedText> m_pEditFI;
- VclPtr<PushButton> m_pEditPB;
-
- VclPtr<ReturnActionEdit> m_pFindED;
- VclPtr<PushButton> m_pFindPB;
-
- VclPtr<CheckBox> m_pWholeWordsCB;
- VclPtr<CheckBox> m_pBackwardsCB;
- VclPtr<CheckBox> m_pMatchCaseCB;
-
- VclPtr<SwMailMergeWizard> m_pWizard;
-
- DECL_LINK_TYPED(EditDocumentHdl_Impl, Button*, void);
- DECL_LINK_TYPED(FindHdl_Impl, Button*, void);
- DECL_LINK_TYPED(EnteredFindStringHdl_Impl, ReturnActionEdit&, void);
-
-public:
- SwMailMergeMergePage( SwMailMergeWizard* _pParent);
- virtual ~SwMailMergeMergePage();
- virtual void dispose() override;
-
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index 662f94f885a6..0b241230aa42 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -160,7 +160,6 @@ bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReas
if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone())
{
m_pWizard->CreateTargetDocument();
- m_pWizard->SetRestartPage(MM_MERGEPAGE);
m_pWizard->EndDialog(RET_TARGET_CREATED);
}
return true;
diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx
index a8d6e5499dff..dba59f493119 100644
--- a/sw/source/uibase/inc/mailmergewizard.hxx
+++ b/sw/source/uibase/inc/mailmergewizard.hxx
@@ -31,7 +31,6 @@ class SwMailMergeConfigItem;
#define MM_GREETINGSPAGE 3
#define MM_LAYOUTPAGE 4
#define MM_PREPAREMERGEPAGE 5
-#define MM_MERGEPAGE 6
class SwMailMergeWizard : public ::svt::RoadmapWizard
{
diff --git a/sw/uiconfig/swriter/ui/mmmergepage.ui b/sw/uiconfig/swriter/ui/mmmergepage.ui
deleted file mode 100644
index 79ca07173e61..000000000000
--- a/sw/uiconfig/swriter/ui/mmmergepage.ui
+++ /dev/null
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
-<interface>
- <requires lib="gtk+" version="3.0"/>
- <!-- interface-requires LibreOffice 1.0 -->
- <object class="GtkBox" id="MMMergePage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkFrame" id="frame1">
- <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="alignment1">
- <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="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">12</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <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="GtkLabel" id="helplabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">You can personalize particular documents. Clicking '%1' will temporarily reduce the wizard to a small window so you can edit your document. After editing the document, return to the wizard by clicking 'Return to Mail Merge Wizard' in the small window.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="edit">
- <property name="label" translatable="yes">_Edit individual documents...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">center</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">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">Personalize the Mail Merge Documents</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="frame2">
- <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="vexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkButton" id="find">
- <property name="label" translatable="yes">_Find...</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>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Search for:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">entry</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="swlo-ReturnActionEdit" id="entry">
- <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">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="wholewords">
- <property name="label" translatable="yes">Whole wor_ds only</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>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="backwards">
- <property name="label" translatable="yes">Back_wards</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>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="matchcase">
- <property name="label" translatable="yes">Ma_tch case</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>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </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">Find</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>
-</interface>