summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-19 11:18:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-19 12:12:38 +0100
commit5c80c7defccdc8e1a5545dfa0f304c77c71c479d (patch)
tree7cb81e9a64ac27bc68fe9c2e1342b30991c3aa2c
parent588ce1c3dcd9d3cb67fb19fe785fb807d75a5fa0 (diff)
convert mail merge subject/attachment dialogs to .ui
Factor out SwMessageAndEditDialog as a reusable base class. Split the attachment and subjects dialogs apart and base them on top of that. Change-Id: I321ef375b154f070715a3e8091e02974b376c9db
-rw-r--r--sw/Library_swui.mk1
-rw-r--r--sw/UIConfig_swriter.mk2
-rw-r--r--sw/inc/dbui.hrc1
-rw-r--r--sw/inc/helpid.h1
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx108
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hrc2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.src53
-rw-r--r--sw/source/ui/dialog/swmessdialog.cxx33
-rw-r--r--sw/source/ui/inc/swmessdialog.hxx30
-rw-r--r--sw/uiconfig/swriter/ui/alreadyexistsdialog.ui4
-rw-r--r--sw/uiconfig/swriter/ui/attachnamedialog.ui194
-rw-r--r--sw/uiconfig/swriter/ui/subjectdialog.ui194
13 files changed, 495 insertions, 130 deletions
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 2f1d4bc16a88..ab0c2642e78b 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -86,6 +86,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
sw/source/ui/dialog/macassgn \
sw/source/ui/dialog/swdialmgr \
sw/source/ui/dialog/swdlgfact \
+ sw/source/ui/dialog/swmessdialog \
sw/source/ui/dialog/swuiexp \
sw/source/ui/dialog/uiregionsw \
sw/source/ui/dialog/wordcountdialog \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 8160b80867ad..5be26fd58987 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/alreadyexistsdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
sw/uiconfig/swriter/ui/assignstylesdialog \
+ sw/uiconfig/swriter/ui/attachnamedialog \
sw/uiconfig/swriter/ui/authenticationsettingsdialog \
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
@@ -183,6 +184,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
sw/uiconfig/swriter/ui/stringinput \
+ sw/uiconfig/swriter/ui/subjectdialog \
sw/uiconfig/swriter/ui/testmailsettings \
sw/uiconfig/swriter/ui/tocdialog \
sw/uiconfig/swriter/ui/tocentriespage \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 0ced6d16925f..057375e23a3a 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -46,7 +46,6 @@
#define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24)
#define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25)
#define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26)
-#define DLG_MM_QUERY (RC_DBUI_BEGIN + 28)
#define DLG_MM_SENDWARNING (RC_DBUI_BEGIN + 29)
#define DLG_MM_CREATIONMONITOR (RC_DBUI_BEGIN + 30)
// Strings ------------------------------------------------------------------
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 6148039dcaa8..ecbf662af03d 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -388,7 +388,6 @@
#define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD"
#define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB"
#define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE"
-#define HID_MM_QUERY "SW_HID_MM_QUERY"
#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING"
#define HID_NID_TBL "SW_HID_NID_TBL"
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index bf1ec91fdc57..668969f4ff91 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -22,6 +22,7 @@
#include <mmconfigitem.hxx>
#include <mailmergechildwindow.hxx>
#include <mailconfigpage.hxx>
+#include <swmessdialog.hxx>
#include <cmdid.h>
#include <swtypes.hxx>
#include <view.hxx>
@@ -106,76 +107,56 @@ static OUString lcl_GetColumnValueOf(const OUString& rColumn, Reference < contai
return sRet;
}
-class SwSaveWarningBox_Impl : public ModalDialog
+class SwSaveWarningBox_Impl : public SwMessageAndEditDialog
{
- OKButton* m_pOKPB;
- FixedImage* m_pWarningImageIM;
- VclMultiLineEdit* m_pPrimaryMessage;
- VclMultiLineEdit* m_pSecondaryMessage;
- Edit* m_pFileNameED;
-
DECL_LINK( ModifyHdl, Edit*);
public:
SwSaveWarningBox_Impl(Window* pParent, const OUString& rFileName);
OUString GetFileName() const
{
- return m_pFileNameED->GetText();
+ return m_pEdit->GetText();
}
};
-class SwSendQueryBox_Impl : public ModalDialog
+class SwSendQueryBox_Impl : public SwMessageAndEditDialog
{
- FixedImage aQueryImageIM;
- FixedInfo aQueryFI;
-
- Edit aTextED;
-
- FixedLine aSeparatorFL;
- OKButton aOKPB;
- CancelButton aCancelPB;
-
bool bIsEmptyAllowed;
DECL_LINK( ModifyHdl, Edit*);
public:
- SwSendQueryBox_Impl(Window* pParent, const String& rQueryText);
- ~SwSendQueryBox_Impl();
-
- void SetValue(const String& rSet)
- {
- aTextED.SetText(rSet);
- ModifyHdl( &aTextED );
- }
- String GetValue() const {return aTextED.GetText();}
-
- void SetIsEmptyTextAllowed(bool bSet)
- {
- bIsEmptyAllowed = bSet;
- ModifyHdl( &aTextED );
- }
+ SwSendQueryBox_Impl(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription);
+
+ void SetValue(const OUString& rSet)
+ {
+ m_pEdit->SetText(rSet);
+ ModifyHdl(m_pEdit);
+ }
+
+ OUString GetValue() const
+ {
+ return m_pEdit->GetText();
+ }
+
+ void SetIsEmptyTextAllowed(bool bSet)
+ {
+ bIsEmptyAllowed = bSet;
+ ModifyHdl(m_pEdit);
+ }
};
SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(Window* pParent, const OUString& rFileName)
- : ModalDialog(pParent, "AlreadyExistsDialog",
+ : SwMessageAndEditDialog(pParent, "AlreadyExistsDialog",
"modules/swriter/ui/alreadyexistsdialog.ui")
{
- get(m_pOKPB, "ok");
- get(m_pPrimaryMessage, "primarymessage");
- m_pPrimaryMessage->SetPaintTransparent(true);
- get(m_pSecondaryMessage, "secondarymessage");
- m_pSecondaryMessage->SetPaintTransparent(true);
- MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, m_pSecondaryMessage);
- get(m_pWarningImageIM, "image");
- get(m_pFileNameED, "filename");
- m_pWarningImageIM->SetImage(WarningBox::GetStandardImage());
- m_pFileNameED->SetText(rFileName);
- m_pFileNameED->SetModifyHdl(LINK(this, SwSaveWarningBox_Impl, ModifyHdl));
+ m_pEdit->SetText(rFileName);
+ m_pEdit->SetModifyHdl(LINK(this, SwSaveWarningBox_Impl, ModifyHdl));
INetURLObject aTmp(rFileName);
m_pPrimaryMessage->SetText(m_pPrimaryMessage->GetText().replaceAll("%1", aTmp.getName(
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)));
- ModifyHdl(m_pFileNameED);
+ ModifyHdl(m_pEdit);
}
IMPL_LINK( SwSaveWarningBox_Impl, ModifyHdl, Edit*, pEdit)
@@ -184,30 +165,19 @@ IMPL_LINK( SwSaveWarningBox_Impl, ModifyHdl, Edit*, pEdit)
return 0;
}
-SwSendQueryBox_Impl::SwSendQueryBox_Impl(Window* pParent, const String& rText) :
- ModalDialog(pParent, SW_RES( DLG_MM_QUERY )),
- aQueryImageIM( this, SW_RES( IM_QUERY )),
- aQueryFI( this, SW_RES( FI_QUERY )),
- aTextED( this, SW_RES( ED_TEXT )),
- aSeparatorFL(this, SW_RES( FL_SEPARATOR )),
- aOKPB(this, SW_RES( PB_OK )),
- aCancelPB(this, SW_RES( PB_CANCEL )),
- bIsEmptyAllowed(true)
-{
- FreeResource();
- aQueryFI.SetText(rText);
- aQueryImageIM.SetImage(QueryBox::GetStandardImage());
- aTextED.SetModifyHdl(LINK(this, SwSendQueryBox_Impl, ModifyHdl));
- ModifyHdl( &aTextED );
-}
-
-SwSendQueryBox_Impl::~SwSendQueryBox_Impl()
+SwSendQueryBox_Impl::SwSendQueryBox_Impl(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription)
+ : SwMessageAndEditDialog(pParent, rID, rUIXMLDescription)
+ , bIsEmptyAllowed(true)
{
+ m_pImageIM->SetImage(QueryBox::GetStandardImage());
+ m_pEdit->SetModifyHdl(LINK(this, SwSendQueryBox_Impl, ModifyHdl));
+ ModifyHdl(m_pEdit);
}
IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
{
- aOKPB.Enable(bIsEmptyAllowed || !pEdit->GetText().isEmpty());
+ m_pOKPB->Enable(bIsEmptyAllowed || !pEdit->GetText().isEmpty());
return 0;
}
@@ -282,9 +252,7 @@ SwMailMergeOutputPage::SwMailMergeOutputPage( SwMailMergeWizard* _pParent) :
m_sSendMailST(SW_RES( ST_SENDMAIL ) ),
m_sDefaultAttachmentST(SW_RES( ST_DEFAULTATTACHMENT )),
- m_sNoSubjectQueryST(SW_RES( ST_SUBJECTQUERY )),
m_sNoSubjectST(SW_RES( ST_NOSUBJECT )),
- m_sNoAttachmentNameST(SW_RES( ST_NOATTACHMENTNAME )),
m_sConfigureMail(SW_RES( ST_CONFIGUREMAIL)),
#ifdef _MSC_VER
#pragma warning (default : 4355)
@@ -1068,7 +1036,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(m_aSubjectED.GetText().isEmpty())
{
- SwSendQueryBox_Impl aQuery(pButton, m_sNoSubjectQueryST);
+ SwSendQueryBox_Impl aQuery(pButton, "SubjectDialog",
+ "modules/swriter/ui/subjectdialog.ui");
aQuery.SetIsEmptyTextAllowed(true);
aQuery.SetValue(m_sNoSubjectST);
if(RET_OK == aQuery.Execute())
@@ -1081,7 +1050,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
if(!bAsBody && m_aAttachmentED.GetText().isEmpty())
{
- SwSendQueryBox_Impl aQuery(pButton, m_sNoAttachmentNameST);
+ SwSendQueryBox_Impl aQuery(pButton, "AttachNameDialog",
+ "modules/swriter/ui/attachnamedialog.ui");
aQuery.SetIsEmptyTextAllowed(false);
if(RET_OK == aQuery.Execute())
{
diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc
index 8a06731ff4cb..145c8e58e52e 100644
--- a/sw/source/ui/dbui/mmoutputpage.hrc
+++ b/sw/source/ui/dbui/mmoutputpage.hrc
@@ -65,9 +65,7 @@
#define FT_ATTACHMENT 51
#define ED_ATTACHMENT 52
#define ST_DEFAULTATTACHMENT 53
-#define ST_SUBJECTQUERY 54
#define ST_NOSUBJECT 55
-#define ST_NOATTACHMENTNAME 56
#define ST_CONFIGUREMAIL 57
#define IM_QUERY 58
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 1956d2bd9691..eb0b0a3f34b3 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -91,9 +91,7 @@ class SwMailMergeOutputPage : public svt::OWizardPage
//misc strings
String m_sDefaultAttachmentST;
- String m_sNoSubjectQueryST;
String m_sNoSubjectST;
- String m_sNoAttachmentNameST;
String m_sConfigureMail;
String m_sBody;
diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src
index 8426048d8719..4409b433f401 100644
--- a/sw/source/ui/dbui/mmoutputpage.src
+++ b/sw/source/ui/dbui/mmoutputpage.src
@@ -294,67 +294,14 @@ TabPage DLG_MM_OUTPUT_PAGE
{
Text[ en-US ] = "Untitled";
};
- String ST_SUBJECTQUERY
- {
- Text[ en-US ] = "You did not specify a subject for this message. If you would like to provide one, please type it now.";
- };
String ST_NOSUBJECT
{
Text[ en-US ] = "No subject";
};
- String ST_NOATTACHMENTNAME
- {
- Text[ en-US ] = "You did not specify a new name for the attachment. If you would like to provide one, please type it now.";
- };
String ST_CONFIGUREMAIL
{
Text[ en-US ] = "In order to be able to send mail merge documents by e-mail, %PRODUCTNAME requires information about the e-mail account to be used.\n\nDo you want to enter e-mail account information now?";
};
};
-ModalDialog DLG_MM_QUERY
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_MM_QUERY;
- Size = MAP_APPFONT ( 240 , 88 ) ;
- Moveable = TRUE ;
-
- Text = "%PRODUCTNAME";
- FixedImage IM_QUERY
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 30 , 30 ) ;
- };
- FixedText FI_QUERY
- {
- Pos = MAP_APPFONT ( 40 , 6 ) ;
- Size = MAP_APPFONT ( 190 , 30 ) ;
- WordBreak = TRUE;
- };
- Edit ED_TEXT
- {
- HelpID = "sw:Edit:DLG_MM_QUERY:ED_TEXT";
- Pos = MAP_APPFONT ( 40 , 39 ) ;
- Size = MAP_APPFONT ( 194 , 12 ) ;
- Border = TRUE;
- };
- FixedLine FL_SEPARATOR
- {
- Pos = MAP_APPFONT ( 0 , 57 ) ;
- Size = MAP_APPFONT ( 240 , 8 ) ;
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 69 , 68) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 122 , 68 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swmessdialog.cxx b/sw/source/ui/dialog/swmessdialog.cxx
new file mode 100644
index 000000000000..78ae502eb84f
--- /dev/null
+++ b/sw/source/ui/dialog/swmessdialog.cxx
@@ -0,0 +1,33 @@
+/* -*- 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/.
+ */
+
+#include <swmessdialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/vclmedit.hxx>
+
+SwMessageAndEditDialog::SwMessageAndEditDialog(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription)
+ : ModalDialog(pParent, rID, rUIXMLDescription)
+{
+ get(m_pOKPB, "ok");
+ get(m_pPrimaryMessage, "primarymessage");
+ m_pPrimaryMessage->SetPaintTransparent(true);
+ get(m_pSecondaryMessage, "secondarymessage");
+ m_pSecondaryMessage->SetPaintTransparent(true);
+ MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, m_pSecondaryMessage);
+ get(m_pImageIM, "image");
+ m_pImageIM->SetImage(WarningBox::GetStandardImage());
+ get(m_pEdit, "edit");
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swmessdialog.hxx b/sw/source/ui/inc/swmessdialog.hxx
new file mode 100644
index 000000000000..1937e3723058
--- /dev/null
+++ b/sw/source/ui/inc/swmessdialog.hxx
@@ -0,0 +1,30 @@
+/* -*- 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/.
+ */
+
+#include <vcl/dialog.hxx>
+
+class Edit;
+class FixedImage;
+class OKButton;
+class VclMultiLineEdit;
+
+class SwMessageAndEditDialog : public ModalDialog
+{
+protected:
+ OKButton* m_pOKPB;
+ FixedImage* m_pImageIM;
+ VclMultiLineEdit* m_pPrimaryMessage;
+ VclMultiLineEdit* m_pSecondaryMessage;
+ Edit* m_pEdit;
+public:
+ SwMessageAndEditDialog(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/swriter/ui/alreadyexistsdialog.ui b/sw/uiconfig/swriter/ui/alreadyexistsdialog.ui
index e62e04c729c8..eeb165ead0c5 100644
--- a/sw/uiconfig/swriter/ui/alreadyexistsdialog.ui
+++ b/sw/uiconfig/swriter/ui/alreadyexistsdialog.ui
@@ -125,7 +125,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">New document name:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">filename</property>
+ <property name="mnemonic_widget">edit</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -135,7 +135,7 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="filename">
+ <object class="GtkEntry" id="edit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
diff --git a/sw/uiconfig/swriter/ui/attachnamedialog.ui b/sw/uiconfig/swriter/ui/attachnamedialog.ui
new file mode 100644
index 000000000000..66dff499389f
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/attachnamedialog.ui
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkTextBuffer" id="textbuffer1">
+ <property name="text" translatable="yes">You did not specify a new name for the attachment.</property>
+ </object>
+ <object class="GtkDialog" id="AttachNameDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">No Attachment Name</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">24</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="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>
+ <property name="column_spacing">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="GtkTextView" id="primarymessage">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ <property name="buffer">textbuffer1</property>
+ <property name="accepts_tab">False</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="GtkTextView" id="secondarymessage">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ <property name="buffer">textbuffer2</property>
+ <property name="accepts_tab">False</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">1</property>
+ <property name="top_attach">0</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="hexpand">True</property>
+ <property name="row_spacing">7</property>
+ <child>
+ <object class="GtkEntry" id="edit">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</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="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit</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>
+ </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="GtkImage" id="image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkTextBuffer" id="textbuffer2">
+ <property name="text" translatable="yes">If you would like to provide one, please type it now.</property>
+ </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/subjectdialog.ui b/sw/uiconfig/swriter/ui/subjectdialog.ui
new file mode 100644
index 000000000000..d0a5dc8572e2
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/subjectdialog.ui
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="SubjectDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">No Subject</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">24</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="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>
+ <property name="column_spacing">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="GtkTextView" id="primarymessage">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ <property name="buffer">textbuffer1</property>
+ <property name="accepts_tab">False</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="GtkTextView" id="secondarymessage">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ <property name="buffer">textbuffer2</property>
+ <property name="accepts_tab">False</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">1</property>
+ <property name="top_attach">0</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="hexpand">True</property>
+ <property name="row_spacing">7</property>
+ <child>
+ <object class="GtkEntry" id="edit">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</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="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Subject:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit</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>
+ </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="GtkImage" id="image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkTextBuffer" id="textbuffer1">
+ <property name="text" translatable="yes">You did not specify a subject for this message.</property>
+ </object>
+ <object class="GtkTextBuffer" id="textbuffer2">
+ <property name="text" translatable="yes">If you would like to provide one, please type it now.</property>
+ </object>
+</interface>