summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-01-05 11:16:51 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-18 09:13:56 +0100
commit94779d7b72037a02e163e88c0832e23cad92ebee (patch)
tree9f940546d351c589967a75d3c3fc5cbedd924038 /sw
parent84405da245d7162e7484b2e48553b0eaab5c2a35 (diff)
mailmerge: Kill SwMailMergeChildWindow.
It was used to return to the Mail Merge wizard after pressing the [Edit Document] button in the wizard. The wizard pages that had such a button are gone now, so the childwindow for returning to the wizard can go too. Change-Id: I53284633979179fd67ed6fd21a2188aa859a8a22
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/sdi/_viewsh.sdi5
-rw-r--r--sw/sdi/swriter.sdi18
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx1
-rw-r--r--sw/source/uibase/app/apphdl.cxx40
-rw-r--r--sw/source/uibase/app/swmodule.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergechildwindow.cxx99
-rw-r--r--sw/source/uibase/inc/mailmergechildwindow.hxx52
-rw-r--r--sw/source/uibase/uiview/view0.cxx1
-rw-r--r--sw/source/uibase/uiview/view2.cxx1
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx8
-rw-r--r--sw/uiconfig/swriter/ui/floatingmmchild.ui54
15 files changed, 1 insertions, 285 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index d912130b450c..3d130cd1c133 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -765,7 +765,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/dbui/dbtree \
sw/source/uibase/dbui/dbui \
sw/source/uibase/dbui/maildispatcher \
- sw/source/uibase/dbui/mailmergechildwindow \
sw/source/uibase/dbui/mailmergehelper \
sw/source/uibase/dbui/mailmergetoolbarcontrols \
sw/source/uibase/dbui/mmconfigitem \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 2dfe8b18cebc..39a2b1da7afe 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -132,7 +132,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/fldfuncpage \
sw/uiconfig/swriter/ui/fldrefpage \
sw/uiconfig/swriter/ui/fldvarpage \
- sw/uiconfig/swriter/ui/floatingmmchild \
sw/uiconfig/swriter/ui/floatingnavigation \
sw/uiconfig/swriter/ui/floatingsync \
sw/uiconfig/swriter/ui/formatsectiondialog \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index bbb953e737c0..09cd1f48513c 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -249,7 +249,6 @@
#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */
#define FN_TOOL_ANCHOR_FRAME (FN_INSERT + 66) /* anchor Draw-Object to frame*/
#define FN_QRY_MERGE (FN_INSERT + 67) /* insert record (serial letter) */
-#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/
#define FN_INSERT_SMA (FN_INSERT + 69) /* insert StarMath */
#define FN_MAILMERGE_FIRST_ENTRY (FN_INSERT + 70) /* mail merge toolbar - go to the first entry */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 9a57bdd24a29..36c85706d9af 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -300,8 +300,6 @@ public:
};
#define RET_LOAD_DOC 100
-#define RET_EDIT_DOC 101
-#define RET_EDIT_RESULT_DOC 102
#define RET_TARGET_CREATED 103
#define RET_REMOVE_TARGET 104
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 183f752977eb..6113dc92ca66 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -569,11 +569,6 @@ interface BaseTextEditView
[
ExecMethod = Execute ;
]
- FN_MAILMERGE_CHILDWINDOW
- [
- ExecMethod = Execute ;
- StateMethod = GetState;
- ]
FN_MAILMERGE_SENDMAIL_CHILDWINDOW
[
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 3a8e31543291..1b6c16a6a6f5 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -6863,24 +6863,6 @@ SfxBoolItem RowSplit FN_TABLE_ROW_SPLIT
GroupId = GID_FORMAT;
]
-SfxBoolItem MailmergeChildWindow FN_MAILMERGE_CHILDWINDOW
-()
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_EDIT;
-]
-
SfxVoidItem WordCountDialog FN_WORDCOUNT_DIALOG
()
[
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 2c473e29858f..ed2dcec8123d 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -20,7 +20,6 @@
#include <mmresultdialogs.hxx>
#include <mailmergewizard.hxx>
#include <mmconfigitem.hxx>
-#include <mailmergechildwindow.hxx>
#include <mailconfigpage.hxx>
#include <swmessdialog.hxx>
#include <cmdid.h>
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index e99dcc8bfb30..a3a837ca44d9 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -83,7 +83,6 @@
#include <uinums.hxx>
#include <dbconfig.hxx>
#include <mmconfigitem.hxx>
-#include <mailmergechildwindow.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
@@ -381,25 +380,8 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
// keep self alive until done.
acquire();
- // if called from the child window - get the config item and close the ChildWindow, then restore
- // the wizard
- SwMailMergeChildWindow* pChildWin =
- static_cast<SwMailMergeChildWindow*>(m_pView->GetViewFrame()->GetChildWindow(FN_MAILMERGE_CHILDWINDOW));
- bool bRestoreWizard = false;
- sal_uInt16 nRestartPage = 0;
-
- SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
- if (pChildWin && pChildWin->IsVisible())
- {
- nRestartPage = m_pView->GetMailMergeRestartPage();
- if (m_pView->IsMailMergeSourceView())
- pMMConfig->SetSourceView(m_pView);
- SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
- bRestoreWizard = true;
- }
-
// create if it does not exist yet
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
if (!pMMConfig)
{
pMMConfig = new SwMailMergeConfigItem;
@@ -459,11 +441,6 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *pMMConfig);
- if (bRestoreWizard)
- {
- m_pWizard->ShowPage(nRestartPage);
- }
-
ExecuteWizard();
}
@@ -543,21 +520,6 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
}
break;
}
- case RET_EDIT_DOC:
- case RET_EDIT_RESULT_DOC:
- {
- //create a non-modal dialog that allows to return to the wizard
- //the ConfigItem ownership moves to this dialog
- SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
- bool bResult = nRet == RET_EDIT_RESULT_DOC && pMMConfig->GetTargetView();
- SwView* pTempView = bResult ? pMMConfig->GetTargetView() : pMMConfig->GetSourceView();
- pTempView->SetMailMergeConfigItem(pMMConfig, m_pWizard->GetRestartPage(), !bResult);
- SfxViewFrame* pViewFrame = pTempView->GetViewFrame();
- pViewFrame->GetDispatcher()->Execute(
- FN_MAILMERGE_CHILDWINDOW, SfxCallMode::SYNCHRON);
- ExecutionFinished();
- break;
- }
case RET_REMOVE_TARGET:
{
SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 7388e67df65e..963164651352 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -95,7 +95,6 @@
#include <fldwrap.hxx>
#include <redlndlg.hxx>
#include <syncbtn.hxx>
-#include <mailmergechildwindow.hxx>
#include <modcfg.hxx>
#include <fontcfg.hxx>
#include <sfx2/sidebar/SidebarChildWindow.hxx>
@@ -342,7 +341,6 @@ void SwDLL::RegisterControls()
SwInputChild::RegisterChildWindow( false, pMod, SfxChildWindowFlags::FORCEDOCK );
SwRedlineAcceptChild::RegisterChildWindow( false, pMod );
SwSyncChildWin::RegisterChildWindow( true, pMod );
- SwMailMergeChildWindow::RegisterChildWindow( false, pMod );
SwInsertIdxMarkWrapper::RegisterChildWindow( false, pMod );
SwInsertAuthMarkWrapper::RegisterChildWindow( false, pMod );
SwWordCountWrapper::RegisterChildWindow( false, pMod );
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.cxx b/sw/source/uibase/dbui/mailmergechildwindow.cxx
deleted file mode 100644
index ebd2343199cd..000000000000
--- a/sw/source/uibase/dbui/mailmergechildwindow.cxx
+++ /dev/null
@@ -1,99 +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 <sfx2/viewfrm.hxx>
-#include <sfx2/dispatch.hxx>
-
-#include <cmdid.h>
-#include <swmodule.hxx>
-#include <view.hxx>
-#include <edtwin.hxx>
-#include <vcl/layout.hxx>
-#include <mailmergechildwindow.hxx>
-#include <mmconfigitem.hxx>
-#include <svtools/svmedit.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/image.hxx>
-#include <dbui.hrc>
-#include <helpid.h>
-
-using namespace ::com::sun::star;
-
-SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
-
-SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent,
- sal_uInt16 nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo ) :
- SfxChildWindow( _pParent, nId )
-{
- SetWindow( VclPtr<SwMailMergeChildWin>::Create( pBindings, this, _pParent) );
-
- if (!pInfo->aSize.Width() || !pInfo->aSize.Height())
- {
- SwView* pActiveView = ::GetActiveView();
- if(pActiveView)
- {
- const SwEditWin &rEditWin = pActiveView->GetEditWin();
- GetWindow()->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0)));
- }
- else
- GetWindow()->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0)));
- pInfo->aPos = GetWindow()->GetPosPixel();
- pInfo->aSize = GetWindow()->GetSizePixel();
- }
-
- static_cast<SwMailMergeChildWin *>(GetWindow())->Initialize(pInfo);
- GetWindow()->Show();
-}
-
-SwMailMergeChildWin::SwMailMergeChildWin(SfxBindings* _pBindings,
- SfxChildWindow* pChild, vcl::Window *pParent)
- : SfxFloatingWindow(_pBindings, pChild, pParent, "FloatingMMChild",
- "modules/swriter/ui/floatingmmchild.ui")
-{
- get(m_pBackTB, "back");
- m_pBackTB->SetSelectHdl(LINK(this, SwMailMergeChildWin, BackHdl));
- m_pBackTB->SetButtonType( ButtonType::SYMBOLTEXT );
-}
-
-SwMailMergeChildWin::~SwMailMergeChildWin()
-{
- disposeOnce();
-}
-
-void SwMailMergeChildWin::dispose()
-{
- m_pBackTB.clear();
- SfxFloatingWindow::dispose();
-}
-
-IMPL_LINK_NOARG_TYPED(SwMailMergeChildWin, BackHdl, ToolBox *, void)
-{
- GetBindings().GetDispatcher()->Execute(FN_MAILMERGE_WIZARD, SfxCallMode::ASYNCHRON);
-}
-
-void SwMailMergeChildWin::FillInfo(SfxChildWinInfo& rInfo) const
-{
- SfxFloatingWindow::FillInfo(rInfo);
- rInfo.aWinState.clear();
- rInfo.bVisible = false;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/mailmergechildwindow.hxx b/sw/source/uibase/inc/mailmergechildwindow.hxx
deleted file mode 100644
index 8b5fd12c7ff0..000000000000
--- a/sw/source/uibase/inc/mailmergechildwindow.hxx
+++ /dev/null
@@ -1,52 +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_UIBASE_INC_MAILMERGECHILDWINDOW_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_MAILMERGECHILDWINDOW_HXX
-#include <sfx2/childwin.hxx>
-#include <sfx2/basedlgs.hxx>
-#include <vcl/toolbox.hxx>
-#include "swdllapi.h"
-
-class SwMailMergeChildWin : public SfxFloatingWindow
-{
- VclPtr<ToolBox> m_pBackTB;
- DECL_LINK_TYPED( BackHdl, ToolBox*, void );
-
-public:
- SwMailMergeChildWin(SfxBindings*, SfxChildWindow*, vcl::Window *pParent);
- virtual ~SwMailMergeChildWin();
- virtual void dispose() override;
-
- virtual void FillInfo(SfxChildWinInfo&) const override;
-};
-
-class SwMailMergeChildWindow : public SfxChildWindow
-{
-public:
- SwMailMergeChildWindow( vcl::Window* ,
- sal_uInt16 nId,
- SfxBindings*,
- SfxChildWinInfo* );
-
- SFX_DECL_CHILDWINDOW( SwMailMergeChildWindow );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 77614df261d1..281b009f7fb6 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -110,7 +110,6 @@ void SwView::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD_DATA_ONLY);
GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, CHILDWIN_LABEL);
- GetStaticInterface()->RegisterChildWindow(FN_MAILMERGE_CHILDWINDOW, false, CHILDWIN_MAILMERGE);
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
RID_TOOLS_TOOLBOX);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 6fb27c85ed73..990513f769fb 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -800,7 +800,6 @@ void SwView::Execute(SfxRequest &rReq)
}
break;
case FN_SYNC_LABELS:
- case FN_MAILMERGE_CHILDWINDOW:
GetViewFrame()->ShowChildWindow(nSlot);
break;
case FN_ESCAPE:
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 627e944f912f..a2200e1d1a9d 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -395,14 +395,6 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case FN_MAILMERGE_SENDMAIL_CHILDWINDOW:
break;
-#if HAVE_FEATURE_DBCONNECTIVITY
- case FN_MAILMERGE_CHILDWINDOW:
- {
- if(!GetMailMergeConfigItem())
- rSet.DisableItem(nWhich);
- }
- break;
-#endif
case SID_ALIGN_ANY_LEFT :
case SID_ALIGN_ANY_HCENTER :
case SID_ALIGN_ANY_RIGHT :
diff --git a/sw/uiconfig/swriter/ui/floatingmmchild.ui b/sw/uiconfig/swriter/ui/floatingmmchild.ui
deleted file mode 100644
index af65a1467781..000000000000
--- a/sw/uiconfig/swriter/ui/floatingmmchild.ui
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
-<interface>
- <requires lib="gtk+" version="3.0"/>
- <object class="GtkWindow" id="FloatingMMChild">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Mail Merge Wizard</property>
- <property name="resizable">False</property>
- <property name="type_hint">utility</property>
- <property name="deletable">False</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkToolbar" id="back">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="toolbar_style">both-horiz</property>
- <property name="show_arrow">False</property>
- <child>
- <object class="GtkToolButton" id="return">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="label" translatable="yes">Return to Mail Merge Wizard</property>
- <property name="use_underline">True</property>
- <property name="icon_name">sw/imglst/sc20234.png</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>