[Libreoffice-commits] core.git: Branch 'feature/mailmerge-toolbar' - 5 commits - sw/Library_swui.mk sw/source sw/uiconfig sw/UIConfig_swriter.mk

Jan Holesovsky kendy at collabora.com
Mon Dec 28 03:26:55 PST 2015


 sw/Library_swui.mk                            |    1 
 sw/UIConfig_swriter.mk                        |    2 
 sw/source/ui/dbui/mailmergewizard.cxx         |   22 
 sw/source/ui/dbui/mmmergepage.cxx             |  103 ---
 sw/source/ui/dbui/mmmergepage.hxx             |   57 --
 sw/source/ui/dbui/mmpreparemergepage.cxx      |    1 
 sw/source/ui/dbui/mmresultdialogs.cxx         |   76 +-
 sw/source/uibase/app/apphdl.cxx               |    9 
 sw/source/uibase/inc/mailmergewizard.hxx      |    1 
 sw/uiconfig/swriter/ui/mmmergepage.ui         |  263 ----------
 sw/uiconfig/swriter/ui/mmoutputpage.ui        |  674 --------------------------
 sw/uiconfig/swriter/ui/mmresultemaildialog.ui |    1 
 sw/uiconfig/swriter/ui/mmresultprintdialog.ui |    3 
 sw/uiconfig/swriter/ui/mmresultsavedialog.ui  |    2 
 14 files changed, 54 insertions(+), 1161 deletions(-)

New commits:
commit 46ab09b993708314a15f8268cfce8828b9c0c504
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Dec 28 12:22:52 2015 +0100

    mailmerge: Kill the "Personalize document" mail merge wizard page.
    
    The new workflow expects the user to use the "Edit individual documents"
    toolbar button instead, and then edit the newly created document as necessary.
    
    Change-Id: I3bda01a06f2e317a41ce0c766e35dfa361b45f91

diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 0d20c61..2d49d3c 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 5d687e6..1b8c7f1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -181,7 +181,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 2ab5127..9b853e8 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 17cdfc7..0000000
--- 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 510f33d..0000000
--- 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 662f94f..0b24123 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 a8d6e54..dba59f4 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 79ca071..0000000
--- 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>
commit 79db37345547540fdcf591b6fa43989c9e529454
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Dec 28 12:10:34 2015 +0100

    mailmerge: Disable printing / email when they are not available.
    
    Change-Id: Id6ad5c5b5fa8ce3d39ca07da1430fd5aad1bc3c7

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 2021a09..ec12358 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -232,8 +232,15 @@ void SwModule::StateOther(SfxItemSet &rSet)
             {
                 SwView* pView = ::GetActiveView();
                 SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
-                if (!pConfigItem)
+
+                // #i51949# hide e-Mail option if e-Mail is not supported
+                // #i63267# printing might be disabled
+                if (!pConfigItem ||
+                    (nWhich == FN_MAILMERGE_PRINT_DOCUMENTS && Application::GetSettings().GetMiscSettings().GetDisablePrinting()) ||
+                    (nWhich == FN_MAILMERGE_EMAIL_DOCUMENTS && !pConfigItem->IsMailAvailable()))
+                {
                     rSet.DisableItem(nWhich);
+                }
             }
             break;
             default:
commit ccc7ac97a21e6bf44497fcd82648b95756b6734c
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Dec 28 12:03:23 2015 +0100

    mailmerge: mmoutputpage.ui is not needed any more.
    
    Change-Id: If941292cb83b941d51bfca414ad63dc48fd07dff

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index e90f3d0..5d687e6 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -182,7 +182,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/mmlayoutpage \
 	sw/uiconfig/swriter/ui/mmmailbody \
 	sw/uiconfig/swriter/ui/mmmergepage \
-	sw/uiconfig/swriter/ui/mmoutputpage \
 	sw/uiconfig/swriter/ui/mmoutputtypepage \
 	sw/uiconfig/swriter/ui/mmpreparepage \
 	sw/uiconfig/swriter/ui/mmresultemaildialog \
diff --git a/sw/uiconfig/swriter/ui/mmoutputpage.ui b/sw/uiconfig/swriter/ui/mmoutputpage.ui
deleted file mode 100644
index ba03db4..0000000
--- a/sw/uiconfig/swriter/ui/mmoutputpage.ui
+++ /dev/null
@@ -1,674 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
-<interface>
-  <requires lib="gtk+" version="3.0"/>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">1</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkListStore" id="liststore1">
-    <columns>
-      <!-- column-name gchararray1 -->
-      <column type="gchararray"/>
-      <!-- column-name gint1 -->
-      <column type="gint"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">OpenDocument Text</col>
-        <col id="1">1</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Adobe PDF-Document</col>
-        <col id="1">2</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Microsoft Word Document</col>
-        <col id="1">3</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">HTML Message</col>
-        <col id="1">4</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Plain Text</col>
-        <col id="1">5</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkBox" id="MMOutputPage">
-    <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="top_padding">6</property>
-            <property name="left_padding">12</property>
-            <child>
-              <object class="GtkFrame" id="frame3">
-                <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="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="row_spacing">6</property>
-                        <child>
-                          <object class="GtkRadioButton" id="savestarting">
-                            <property name="label" translatable="yes">_Save starting 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="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">savemerged</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="GtkRadioButton" id="savemerged">
-                            <property name="label" translatable="yes">Save _merged 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">printmerged</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>
-                        <child>
-                          <object class="GtkRadioButton" id="printmerged">
-                            <property name="label" translatable="yes">_Print merged 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">sendmerged</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="sendmerged">
-                            <property name="label" translatable="yes">Send merged document as _E-Mail</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">savestarting</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">3</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Select one of the options below:</property>
-                  </object>
-                </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">Save, Print or Send the Document</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="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="GtkButton" id="savestartingdoc">
-                    <property name="label" translatable="yes">Save starting _document</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="halign">start</property>
-                    <property name="use_underline">True</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="GtkRadioButton" id="singlerb">
-                    <property name="label" translatable="yes">S_ave as single 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="active">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">individualrb</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">1</property>
-                    <property name="height">1</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">4</property>
-                    <property name="width">1</property>
-                    <property name="height">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="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>
-                        <property name="width">1</property>
-                        <property name="height">1</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>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="from-nospin">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="adjustment">adjustment1</property>
-                        <accessibility>
-                          <relation type="labelled-by" target="fromrb"/>
-                        </accessibility>
-                      </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="GtkSpinButton" id="to-nospin">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="text" translatable="no">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>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">7</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="savenow">
-                    <property name="label" translatable="yes">Save Do_cuments</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="halign">start</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">8</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <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="active">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">sendallrb</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">5</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="printnow">
-                    <property name="label" translatable="yes">Prin_t Documents</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="halign">start</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">9</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <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="active">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">singlerb</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">6</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="sendnow">
-                    <property name="label" translatable="yes">Se_nd documents</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="halign">start</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">10</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <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">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</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">2</property>
-                        <property name="width">1</property>
-                        <property name="height">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">3</property>
-                        <property name="width">1</property>
-                        <property name="height">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">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBoxText" id="mailto">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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="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">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</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="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="sendas">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="model">liststore1</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>
-                      <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>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBoxText" id="printers">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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="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>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </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>
-                <child>
-                  <object class="GtkAlignment" id="attachgroup">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <object class="GtkGrid" id="grid6">
-                        <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="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>
-                          <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="GtkEntry" id="attach">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hexpand">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>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
-                    <property name="width">1</property>
-                    <property name="height">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>
-            <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>
commit 281c6f8163d96f5b225c09b221f55a1dfe8666b9
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Dec 28 12:00:14 2015 +0100

    mailmerge: Fix indentation.
    
    Change-Id: Id66c165adf27a49fc65877103339668f1276d336

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 1e1578d..104395a 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -396,52 +396,54 @@ void SwMMResultEmailDialog::FillInEmailSettings()
 
     SwView* pSourceView = pConfigItem->GetSourceView();
     OSL_ENSURE(pSourceView, "no source view exists");
-    if(pSourceView)
+    if (pSourceView)
     {
         SwDocShell* pDocShell = pSourceView->GetDocShell();
-        if ( pDocShell->HasName() )
+        if (pDocShell->HasName())
         {
-            INetURLObject aTmp( pDocShell->GetMedium()->GetName() );
+            INetURLObject aTmp(pDocShell->GetMedium()->GetName());
             m_pAttachmentED->SetText(aTmp.getName(
                     INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ));
         }
     }
 
-        if(m_pAttachmentED->GetText().isEmpty())
-        {
-            OUString sAttach( m_sDefaultAttachmentST );
-            sAttach += ".";
-            sAttach += lcl_GetExtensionForDocType(
-                        reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData()));
-            m_pAttachmentED->SetText( sAttach );
+    if (m_pAttachmentED->GetText().isEmpty())
+    {
+        OUString sAttach(m_sDefaultAttachmentST);
+        sAttach += ".";
+        sAttach += lcl_GetExtensionForDocType(
+                    reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData()));
+        m_pAttachmentED->SetText(sAttach);
 
-        }
-        //fill mail address ListBox
-        if(!m_pMailToLB->GetEntryCount())
-        {
-            //select first column
-            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;
-            if(xColAccess.is())
-                aFields = xColAccess->getElementNames();
-            const OUString* pFields = aFields.getConstArray();
-            for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField)
-                m_pMailToLB->InsertEntry(pFields[nField]);
-
-            m_pMailToLB->SelectEntryPos(0);
-            // then select the right one - may not be available
-            const ResStringArray& rHeaders = pConfigItem->GetDefaultAddressHeaders();
-            OUString sEMailColumn = rHeaders.GetString( MM_PART_E_MAIL );
-            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);
-            // HTML format pre-selected
-            m_pSendAsLB->SelectEntryPos(3);
-            SendTypeHdl_Impl(*m_pSendAsLB);
-        }
+    }
+
+    //fill mail address ListBox
+    if (!m_pMailToLB->GetEntryCount())
+    {
+        //select first column
+        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;
+        if (xColAccess.is())
+            aFields = xColAccess->getElementNames();
+        const OUString* pFields = aFields.getConstArray();
+        for (sal_Int32 nField = 0; nField < aFields.getLength(); ++nField)
+            m_pMailToLB->InsertEntry(pFields[nField]);
+
+        m_pMailToLB->SelectEntryPos(0);
+        // then select the right one - may not be available
+        const ResStringArray& rHeaders = pConfigItem->GetDefaultAddressHeaders();
+        OUString sEMailColumn = rHeaders.GetString( MM_PART_E_MAIL );
+        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);
+
+        // HTML format pre-selected
+        m_pSendAsLB->SelectEntryPos(3);
+        SendTypeHdl_Impl(*m_pSendAsLB);
+    }
 }
 
 IMPL_LINK_TYPED(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, Button*, pButton, void)
commit db7bdea496ff8f6802c9676e5f0783fe8a137e30
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Dec 28 11:28:48 2015 +0100

    mailmerge: Select the 1st radiobutton when opened.
    
    Change-Id: Ib99138e13861c386348c17f3c57e9cb149a75a45

diff --git a/sw/uiconfig/swriter/ui/mmresultemaildialog.ui b/sw/uiconfig/swriter/ui/mmresultemaildialog.ui
index 52140e5..fba65e5 100644
--- a/sw/uiconfig/swriter/ui/mmresultemaildialog.ui
+++ b/sw/uiconfig/swriter/ui/mmresultemaildialog.ui
@@ -288,6 +288,7 @@
                         <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>
                         <property name="group">fromrb</property>
                       </object>
diff --git a/sw/uiconfig/swriter/ui/mmresultprintdialog.ui b/sw/uiconfig/swriter/ui/mmresultprintdialog.ui
index 5ced128..2045ae6 100644
--- a/sw/uiconfig/swriter/ui/mmresultprintdialog.ui
+++ b/sw/uiconfig/swriter/ui/mmresultprintdialog.ui
@@ -177,6 +177,7 @@
                             <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>
                             <property name="group">fromrb</property>
                           </object>
@@ -230,7 +231,6 @@
                             <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"/>
@@ -246,7 +246,6 @@
                             <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>
diff --git a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui
index dc040e7..5c66f80 100644
--- a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui
+++ b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui
@@ -97,6 +97,7 @@
                         <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>
                         <property name="group">individualrb</property>
                       </object>
@@ -134,7 +135,6 @@
                             <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>
                             <property name="group">singlerb</property>
                             <accessibility>


More information about the Libreoffice-commits mailing list