From bc01ebe47c04228cf729a8f87af3efeab213dc3a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 16 Sep 2013 20:25:59 +0100 Subject: convert copy to (cc) dialog to .ui Change-Id: I1d5ef0410a0e3d325fb6cf42dad2c07eeb89a87a --- sw/UIConfig_swriter.mk | 1 + sw/inc/dbui.hrc | 2 +- sw/inc/helpid.h | 1 - sw/source/ui/dbui/mmoutputpage.cxx | 57 +++-------- sw/source/ui/dbui/mmoutputpage.hrc | 4 - sw/source/ui/dbui/mmoutputpage.src | 72 -------------- sw/uiconfig/swriter/ui/ccdialog.ui | 197 +++++++++++++++++++++++++++++++++++++ 7 files changed, 212 insertions(+), 122 deletions(-) create mode 100644 sw/uiconfig/swriter/ui/ccdialog.ui diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index b118f47a5f8d..9df802142a39 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -75,6 +75,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/captionoptions \ sw/uiconfig/swriter/ui/cardformatpage \ sw/uiconfig/swriter/ui/cardmediumpage \ + sw/uiconfig/swriter/ui/ccdialog \ sw/uiconfig/swriter/ui/characterproperties \ sw/uiconfig/swriter/ui/charurlpage \ sw/uiconfig/swriter/ui/columndialog \ diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc index 361b7dae14c3..0ced6d16925f 100644 --- a/sw/inc/dbui.hrc +++ b/sw/inc/dbui.hrc @@ -42,7 +42,7 @@ #define DLG_MM_ASSIGNFIELDS (RC_DBUI_BEGIN + 20) #define DLG_MM_LAYOUT_PAGE (RC_DBUI_BEGIN + 22) -#define DLG_MM_COPYTO (RC_DBUI_BEGIN + 23) + #define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24) #define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25) #define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26) diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 34f861eb8909..344a790c83d9 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -381,7 +381,6 @@ #define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST" #define HID_MM_ASSIGNFIELDS "SW_HID_MM_ASSIGNFIELDS" #define HID_MM_LAYOUT_PAGE "SW_HID_MM_LAYOUT_PAGE" -#define HID_MM_COPYTO "SW_HID_MM_COPYTO" #define HID_MM_ADDRESSLIST_HB "SW_HID_MM_ADDRESSLIST_HB" #define HID_MM_TESTACCOUNTSETTINGS "SW_HID_MM_TESTACCOUNTSETTINGS" #define HID_MM_TESTACCOUNTSETTINGS_TLB "SW_HID_MM_TESTACCOUNTSETTINGS_TLB" diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 2a5de59450fc..bf1ec91fdc57 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -213,56 +213,25 @@ IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit) class SwCopyToDialog : public SfxModalDialog { - FixedInfo m_aDescriptionFI; - FixedText m_aCCFT; - Edit m_aCCED; - FixedText m_aBCCFT; - Edit m_aBCCED; - - FixedInfo m_aNoteFI; - FixedLine m_aSeparatorFL; - - OKButton m_aOK; - CancelButton m_aCancel; - HelpButton m_aHelp; + Edit* m_pCCED; + Edit* m_pBCCED; public: - SwCopyToDialog(Window* pParent); - ~SwCopyToDialog(); + SwCopyToDialog(Window* pParent) + : SfxModalDialog(pParent, "CCDialog", + "modules/swriter/ui/ccdialog.ui") + { + get(m_pCCED, "cc"); + get(m_pBCCED, "bcc"); + } - String GetCC() {return m_aCCED.GetText();} - void SetCC(const String& rSet) {m_aCCED.SetText(rSet);} + OUString GetCC() {return m_pCCED->GetText();} + void SetCC(const OUString& rSet) {m_pCCED->SetText(rSet);} - String GetBCC() {return m_aBCCED.GetText();} - void SetBCC(const String& rSet) {m_aBCCED.SetText(rSet);} + OUString GetBCC() {return m_pBCCED->GetText();} + void SetBCC(const OUString& rSet) {m_pBCCED->SetText(rSet);} }; -SwCopyToDialog::SwCopyToDialog(Window* pParent) : - SfxModalDialog(pParent, SW_RES(DLG_MM_COPYTO)), -#ifdef _MSC_VER -#pragma warning (disable : 4355) -#endif - m_aDescriptionFI( this, SW_RES( FI_DESCRIPTION )), - m_aCCFT( this, SW_RES( FT_CC )), - m_aCCED( this, SW_RES( ED_CC )), - m_aBCCFT( this, SW_RES( FT_BCC )), - m_aBCCED( this, SW_RES( ED_BCC )), - m_aNoteFI( this, SW_RES( FI_NOTE )), - m_aSeparatorFL( this, SW_RES( FL_SEPARATOR )), - m_aOK( this, SW_RES( PB_OK )), - m_aCancel( this, SW_RES( PB_CANCEL )), - m_aHelp( this, SW_RES( PB_HELP )) -#ifdef _MSC_VER -#pragma warning (default : 4355) -#endif -{ - FreeResource(); -} - -SwCopyToDialog::~SwCopyToDialog() -{ -} - SwMailMergeOutputPage::SwMailMergeOutputPage( SwMailMergeWizard* _pParent) : svt::OWizardPage( _pParent, SW_RES(DLG_MM_OUTPUT_PAGE)), #ifdef _MSC_VER diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc index 94825ee82457..8a06731ff4cb 100644 --- a/sw/source/ui/dbui/mmoutputpage.hrc +++ b/sw/source/ui/dbui/mmoutputpage.hrc @@ -58,10 +58,6 @@ #define PB_SENDDOCUMENTS 40 #define FI_DESCRIPTION 41 -#define FT_CC 42 -#define ED_CC 43 -#define FT_BCC 44 -#define ED_BCC 45 #define PB_OK 47 #define PB_CANCEL 48 #define PB_HELP 49 diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src index d9fa4e3ada0b..8426048d8719 100644 --- a/sw/source/ui/dbui/mmoutputpage.src +++ b/sw/source/ui/dbui/mmoutputpage.src @@ -312,78 +312,6 @@ TabPage DLG_MM_OUTPUT_PAGE }; }; -ModalDialog DLG_MM_COPYTO -{ - OutputSize = TRUE ; - SVLook = TRUE ; - HelpID = HID_MM_COPYTO; - Size = MAP_APPFONT ( 250 , 100 ) ; - Moveable = TRUE ; - - Text [ en-US ] = "Copy To"; - - FixedText FI_DESCRIPTION - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 238 , 8 ) ; - Text[ en-US ] = "Send a copy of this mail to:"; - }; - FixedText FT_CC - { - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 30 , 8 ) ; - Text[ en-US ] = "~Cc"; - }; - Edit ED_CC - { - HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC"; - Pos = MAP_APPFONT ( 40 , 15 ) ; - Size = MAP_APPFONT ( 204 , 12 ) ; - Border = TRUE; - }; - FixedText FT_BCC - { - Pos = MAP_APPFONT ( 6 , 33 ) ; - Size = MAP_APPFONT ( 30 , 8 ) ; - Text[ en-US ] = "~Bcc"; - }; - Edit ED_BCC - { - HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC"; - Pos = MAP_APPFONT ( 40 , 31 ) ; - Size = MAP_APPFONT ( 204 , 12 ) ; - Border = TRUE; - }; - FixedText FI_NOTE - { - Pos = MAP_APPFONT ( 6 , 47 ) ; - Size = MAP_APPFONT ( 204 , 20 ) ; - WordBreak = TRUE; - Text[ en-US ] = "Note:\nSeparate e-mail addresses with a semicolon (;)."; - }; - FixedLine FL_SEPARATOR - { - Pos = MAP_APPFONT ( 0 , 66 ) ; - Size = MAP_APPFONT ( 250 , 8 ) ; - }; - OKButton PB_OK - { - Pos = MAP_APPFONT ( 85 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton PB_CANCEL - { - Pos = MAP_APPFONT ( 138 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton PB_HELP - { - Pos = MAP_APPFONT ( 194 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - ModalDialog DLG_MM_QUERY { OutputSize = TRUE ; diff --git a/sw/uiconfig/swriter/ui/ccdialog.ui b/sw/uiconfig/swriter/ui/ccdialog.ui new file mode 100644 index 000000000000..0c8c7544f419 --- /dev/null +++ b/sw/uiconfig/swriter/ui/ccdialog.ui @@ -0,0 +1,197 @@ + + + + + False + 6 + Copy To + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + True + 6 + 12 + + + True + False + 0 + _Cc + True + cc + + + 0 + 0 + 1 + 1 + + + + + True + False + 0 + _Bcc + True + bcc + + + 0 + 1 + 1 + 1 + + + + + True + False + 0 + Note: Separate e-mail addresses with a semicolon (;). + True + + + 0 + 2 + 2 + 1 + + + + + True + True + True + + + + 1 + 0 + 1 + 1 + + + + + True + True + True + + + + 1 + 1 + 1 + 1 + + + + + + + + + True + False + Send a copy of this mail to... + + + + + + + + False + True + 1 + + + + + + ok + cancel + help + + + -- cgit