Kaydet (Commit) 1f3ad1e3 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert mail merge outputtype page to .ui

Change-Id: I3b4779bb36ad791ca4cc7d077da59af6bd04278a
üst 35a16a88
......@@ -80,7 +80,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/dbui/mmlayoutpage.src \
sw/source/ui/dbui/mmmergepage.src \
sw/source/ui/dbui/mmoutputpage.src \
sw/source/ui/dbui/mmoutputtypepage.src \
sw/source/ui/dbui/mmpreparemergepage.src \
sw/source/ui/dbui/selectdbtabledialog.src \
sw/source/ui/dialog/dialog.src \
......
......@@ -159,6 +159,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/querydefaultcompatdialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
sw/uiconfig/swriter/ui/mmoutputtypepage \
sw/uiconfig/swriter/ui/mmselectpage \
sw/uiconfig/swriter/ui/paradialog \
sw/uiconfig/swriter/ui/picturedialog \
......
......@@ -368,7 +368,6 @@
#define HID_MERGE_SOURCE_UNAVAILABLE "SW_HID_MERGE_SOURCE_UNAVAILABLE"
#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX"
#define HID_MM_OUTPUTTYPEPAGE "SW_HID_MM_OUTPUTTYPEPAGE"
#define HID_MM_ADDRESSBLOCKPAGE "SW_HID_MM_ADDRESSBLOCKPAGE"
#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE"
#define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE"
......
......@@ -23,51 +23,35 @@
#include <vcl/msgbox.hxx>
#include <dbui.hrc>
#include <swtypes.hxx>
#include <mmoutputtypepage.hrc>
SwMailMergeOutputTypePage::SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent) :
svt::OWizardPage( _pParent, SW_RES(DLG_MM_OUTPUTTYPE_PAGE)),
#ifdef _MSC_VER
#pragma warning (disable : 4355)
#endif
m_aHeaderFI( this, SW_RES( FI_HEADER )),
m_aTypeFT( this, SW_RES( FT_TYPE )),
m_aLetterRB( this, SW_RES( RB_LETTER )),
m_aMailRB( this, SW_RES( RB_MAIL )),
m_aHintHeaderFI(this, SW_RES( FI_HINTHEADER)),
m_aHintFI( this, SW_RES( FI_HINT)),
#ifdef _MSC_VER
#pragma warning (default : 4355)
#endif
m_sLetterHintHeader( SW_RES( ST_LETTERHINTHEADER)),
m_sMailHintHeader( SW_RES( ST_MAILHINTHEADER)),
m_sLetterHint( SW_RES( ST_LETTERHINT)),
m_sMailHint( SW_RES( ST_MAILHINT)),
m_pWizard(_pParent)
SwMailMergeOutputTypePage::SwMailMergeOutputTypePage(SwMailMergeWizard* pParent)
: svt::OWizardPage(pParent, "MMOutputTypePage",
"modules/swriter/ui/mmoutputtypepage.ui")
, m_pWizard(pParent)
{
FreeResource();
get(m_pLetterRB, "letter");
get(m_pMailRB, "email");
get(m_pLetterHint, "letterft");
get(m_pMailHint, "emailft");
Link aLink = LINK(this, SwMailMergeOutputTypePage, TypeHdl_Impl);
m_aLetterRB.SetClickHdl(aLink);
m_aMailRB.SetClickHdl(aLink);
m_pLetterRB->SetClickHdl(aLink);
m_pMailRB->SetClickHdl(aLink);
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
if(rConfigItem.IsOutputToLetter())
m_aLetterRB.Check();
m_pLetterRB->Check();
else
m_aMailRB.Check();
TypeHdl_Impl(&m_aLetterRB);
}
m_pMailRB->Check();
TypeHdl_Impl(m_pLetterRB);
SwMailMergeOutputTypePage::~SwMailMergeOutputTypePage()
{
}
IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl)
{
bool bLetter = m_aLetterRB.IsChecked();
m_aHintHeaderFI.SetText(bLetter ? m_sLetterHintHeader : m_sMailHintHeader);
m_aHintFI.SetText(bLetter ? m_sLetterHint : m_sMailHint);
bool bLetter = m_pLetterRB->IsChecked();
m_pLetterHint->Show(bLetter);
m_pMailHint->Show(!bLetter);
m_pWizard->GetConfigItem().SetOutputToLetter(bLetter);
m_pWizard->updateRoadmapItemLabel( MM_ADDRESSBLOCKPAGE );
m_pWizard->UpdateRoadmap();
......
/* -*- 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 _MAILMERGEOUTPUTTYPEPAGE_HRC
#define _MAILMERGEOUTPUTTYPEPAGE_HRC
#define FT_TYPE 1
#define RB_LETTER 2
#define RB_MAIL 3
#define FI_HEADER 4
#define FI_HINTHEADER 5
#define FI_HINT 6
#define ST_LETTERHINTHEADER 7
#define ST_MAILHINTHEADER 8
#define ST_LETTERHINT 9
#define ST_MAILHINT 10
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -27,29 +27,19 @@ class SwMailMergeWizard;
class SwMailMergeOutputTypePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
FixedInfo m_aTypeFT;
RadioButton m_aLetterRB;
RadioButton m_aMailRB;
RadioButton* m_pLetterRB;
RadioButton* m_pMailRB;
SwBoldFixedInfo m_aHintHeaderFI;
FixedInfo m_aHintFI;
String m_sLetterHintHeader;
String m_sMailHintHeader;
String m_sLetterHint;
String m_sMailHint;
FixedText* m_pLetterHint;
FixedText* m_pMailHint;
SwMailMergeWizard* m_pWizard;
DECL_LINK(TypeHdl_Impl, void *);
public:
SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent);
~SwMailMergeOutputTypePage();
SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 <mmoutputtypepage.hrc>
#include <dbui.hrc>
#include <helpid.h>
TabPage DLG_MM_OUTPUTTYPE_PAGE
{
HelpID = HID_MM_OUTPUTTYPEPAGE ;
Size = MAP_APPFONT ( 260 , 250 ) ;
Hide = TRUE ;
FixedText FI_HEADER
{
Pos = MAP_APPFONT ( 6 , 8 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text[ en-US ] = "Select a document type";
};
FixedText FT_TYPE
{
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text[ en-US ] = "What type of document do you want to create?";
};
RadioButton RB_LETTER
{
HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_LETTER";
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 240 , 10 ) ;
Text[ en-US ] = "~Letter";
};
RadioButton RB_MAIL
{
HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_MAIL";
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 240 , 10 ) ;
Text[ en-US ] = "~E-mail message";
};
FixedText FI_HINTHEADER
{
Pos = MAP_APPFONT ( 12 , 72) ;
Size = MAP_APPFONT ( 242 , 8 ) ;
};
FixedText FI_HINT
{
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 242 , 26 ) ;
WordBreak = TRUE;
};
String ST_LETTERHINTHEADER
{
Text[ en-US ] = "Letter:";
};
String ST_MAILHINTHEADER
{
Text[ en-US ] = "E-Mail Message:";
};
String ST_LETTERHINT
{
Text[ en-US ] = "Send letters to a group of recipients. The letters can contain an address block and a salutation. The letters can be personalized for each recipient.";
};
String ST_MAILHINT
{
Text[ en-US ] = "Send e-mail messages to a group of recipients. The e-mail messages can contain a salutation. The e-mail messages can be personalized for each recipient.";
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkBox" id="MMOutputTypePage">
<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="vexpand">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">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="letterft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Send letters to a group of recipients. The letters can contain an address block and a salutation. The letters can be personalized for each recipient.</property>
<property name="wrap">True</property>
<property name="max_width_chars">72</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="emailft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Send e-mail messages to a group of recipients. The e-mail messages can contain a salutation. The e-mail messages can be personalized for each recipient.</property>
<property name="wrap">True</property>
<property name="max_width_chars">72</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="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkRadioButton" id="letter">
<property name="label" translatable="yes">_Letter</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">email</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="email">
<property name="label" translatable="yes">_E-mail message</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>
</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="GtkButton" id="button1">
<property name="label">layoutdetail-forheight</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</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>
</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">What type of document do you want to create?</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>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="mode">vertical</property>
<widgets>
<widget name="letter"/>
<widget name="email"/>
<widget name="button1"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup2">
<property name="mode">both</property>
<widgets>
<widget name="letterft"/>
<widget name="emailft"/>
</widgets>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment