sw/UIConfig_swriter.mk | 1 sw/inc/dbui.hrc | 1 sw/inc/helpid.h | 9 sw/source/ui/dbui/mmgreetingspage.cxx | 198 ++++------ sw/source/ui/dbui/mmgreetingspage.hxx | 37 -- sw/source/ui/dbui/mmgreetingspage.src | 70 --- sw/uiconfig/swriter/ui/mmsalutationpage.ui | 532 +++++++++++++++++++++++++++++ 7 files changed, 629 insertions(+), 219 deletions(-)
New commits: commit 81f331b0ace0eb28a4f6dd03ac9a89fa5eeaf816 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 18 15:05:39 2014 +0000 convert salutation wizard page to .ui Change-Id: I31d352038175cde43020655546c8216ab4442e3e diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 987669e..98b91b1 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -167,6 +167,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/mmcreatingdialog \ sw/uiconfig/swriter/ui/mmoutputtypepage \ sw/uiconfig/swriter/ui/mmselectpage \ + sw/uiconfig/swriter/ui/mmsalutationpage \ sw/uiconfig/swriter/ui/paradialog \ sw/uiconfig/swriter/ui/picturedialog \ sw/uiconfig/swriter/ui/picturepage \ diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc index 0185686..2bf18ec 100644 --- a/sw/inc/dbui.hrc +++ b/sw/inc/dbui.hrc @@ -27,7 +27,6 @@ #define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3) #define DLG_MM_DOCSELECT_PAGE (RC_DBUI_BEGIN + 4) #define DLG_MM_OUTPUTTYPE_PAGE (RC_DBUI_BEGIN + 5) -#define DLG_MM_GREETINGS_PAGE (RC_DBUI_BEGIN + 7) #define DLG_MM_PREPAREMERGE_PAGE (RC_DBUI_BEGIN + 8) #define DLG_MM_MERGE_PAGE (RC_DBUI_BEGIN + 9) #define DLG_MM_OUTPUT_PAGE (RC_DBUI_BEGIN + 10) diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 411b567..55fe598 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -364,7 +364,6 @@ #define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE" #define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX" -#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE" #define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE" #define HID_MM_MERGEPAGE "SW_HID_MM_MERGEPAGE" #define HID_MM_OUTPUTPAGE "SW_HID_MM_OUTPUTPAGE" @@ -404,14 +403,6 @@ #define HID_NID_NEXT "SW_HID_NID_NEXT" #define HID_MM_NEXT_PAGE "SW_HID_MM_NEXT_PAGE" #define HID_MM_PREV_PAGE "SW_HID_MM_PREV_PAGE" -#define HID_MM_GREETINGS_CB_PERSONALIZED "SW_HID_MM_GREETINGS_CB_PERSONALIZED" -#define HID_MM_GREETINGS_LB_FEMALE "SW_HID_MM_GREETINGS_LB_FEMALE" -#define HID_MM_GREETINGS_PB_FEMALE "SW_HID_MM_GREETINGS_PB_FEMALE" -#define HID_MM_GREETINGS_LB_MALE "SW_HID_MM_GREETINGS_LB_MALE" -#define HID_MM_GREETINGS_PB_MALE "SW_HID_MM_GREETINGS_PB_MALE" -#define HID_MM_GREETINGS_LB_FEMALECOLUMN "SW_HID_MM_GREETINGS_LB_FEMALECOLUMN" -#define HID_MM_GREETINGS_CB_FEMALEFIELD "SW_HID_MM_GREETINGS_CB_FEMALEFIELD" -#define HID_MM_GREETINGS_CB_NEUTRAL "SW_HID_MM_GREETINGS_CB_NEUTRAL" #define HID_MM_BODY_CB_PERSONALIZED "SW_HID_MM_BODY_CB_PERSONALIZED" #define HID_MM_BODY_LB_FEMALE "SW_HID_MM_BODY_LB_FEMALE" #define HID_MM_BODY_PB_FEMALE "SW_HID_MM_BODY_PB_FEMALE" diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index da9d8fa..083415f 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -133,9 +133,9 @@ void SwGreetingsHandler::UpdatePreview() IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton) { - OUString sPreview = m_aFemaleLB.GetSelectEntry(); + OUString sPreview = m_pFemaleLB->GetSelectEntry(); sPreview += "\n"; - sPreview += m_aMaleLB.GetSelectEntry(); + sPreview += m_pMaleLB->GetSelectEntry(); boost::scoped_ptr<SwAssignFieldsDialog> pDlg( new SwAssignFieldsDialog(pButton, m_pWizard->GetConfigItem(), sPreview, false)); if(RET_OK == pDlg->Execute()) @@ -160,8 +160,8 @@ void SwMailMergeGreetingsPage::UpdatePreview() bool bNoValue = !m_pFemaleColumnLB->IsEnabled(); if( !bNoValue ) { - OUString sFemaleValue = m_aFemaleFieldCB.GetText(); - OUString sFemaleColumn = m_aFemaleColumnLB.GetSelectEntry(); + OUString sFemaleValue = m_pFemaleFieldCB->GetText(); + OUString sFemaleColumn = m_pFemaleColumnLB->GetSelectEntry(); Reference< sdbcx::XColumnsSupplier > xColsSupp( m_pWizard->GetConfigItem().GetResultSet(), UNO_QUERY); Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0; if(!sFemaleValue.isEmpty() && !sFemaleColumn.isEmpty() && @@ -201,11 +201,11 @@ void SwMailMergeGreetingsPage::UpdatePreview() } } - OUString sPreview = bFemale ? OUString(m_aFemaleLB.GetSelectEntry()) : - bNoValue ? m_aNeutralCB.GetText() : OUString(m_aMaleLB.GetSelectEntry()); + OUString sPreview = bFemale ? OUString(m_pFemaleLB->GetSelectEntry()) : + bNoValue ? m_pNeutralCB->GetText() : OUString(m_pMaleLB->GetSelectEntry()); sPreview = SwAddressPreview::FillData(sPreview, m_pWizard->GetConfigItem()); - m_aPreviewWIN.SetAddress(sPreview); + m_pPreviewWIN->SetAddress(sPreview); } void SwGreetingsHandler::Contains(sal_Bool bContainsGreeting) @@ -228,91 +228,71 @@ void SwGreetingsHandler::Contains(sal_Bool bContainsGreeting) m_pNeutralCB->Enable(bContainsGreeting); } -SwMailMergeGreetingsPage::SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent) : - svt::OWizardPage(_pParent, SW_RES(DLG_MM_GREETINGS_PAGE)), - m_aHeaderFI(this, SW_RES( FI_HEADER ) ), - m_aGreetingLineCB(this, SW_RES( CB_GREETINGLINE ) ), - m_aPersonalizedCB(this, SW_RES( CB_PERSONALIZED ) ), - m_aFemaleFT(this, SW_RES( FT_FEMALE ) ), - m_aFemaleLB(this, SW_RES( LB_FEMALE ) ), - m_aFemalePB(this, SW_RES( PB_FEMALE ) ), - m_aMaleFT(this, SW_RES( FT_MALE ) ), - m_aMaleLB(this, SW_RES( LB_MALE ) ), - m_aMalePB(this, SW_RES( PB_MALE ) ), - m_aFemaleFI(this, SW_RES( FI_FEMALE ) ), - m_aFemaleColumnFT(this, SW_RES( FT_FEMALECOLUMN ) ), - m_aFemaleColumnLB(this, SW_RES( LB_FEMALECOLUMN ) ), - m_aFemaleFieldFT(this, SW_RES( FT_FEMALEFIELD ) ), - m_aFemaleFieldCB(this, SW_RES( CB_FEMALEFIELD ) ), - m_aNeutralFT(this, SW_RES( FT_NEUTRAL ) ), - m_aNeutralCB(this, SW_RES( CB_NEUTRAL ) ), - m_aPreviewFI( this, SW_RES( FI_PREVIEW ) ), - m_aPreviewWIN( this, SW_RES( WIN_PREVIEW ) ), - m_aAssignPB( this, SW_RES( PB_ASSIGN ) ), - m_aDocumentIndexFI( this, SW_RES( FI_DOCINDEX ) ), - m_aPrevSetIB( this, SW_RES( IB_PREVSET ) ), - m_aNextSetIB( this, SW_RES( IB_NEXTSET ) ), - m_sDocument( SW_RES( STR_DOCUMENT ) ) +SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) + : svt::OWizardPage(_pParent, "MMSalutationPage", + "modules/swriter/ui/mmsalutationpage.ui") { m_pWizard = _pParent; - m_pGreetingLineCB = &m_aGreetingLineCB; - m_pPersonalizedCB = &m_aPersonalizedCB; - m_pFemaleFT = & m_aFemaleFT; - m_pFemaleLB = & m_aFemaleLB; - m_pFemalePB = & m_aFemalePB; - m_pMaleFT = & m_aMaleFT; - m_pMaleLB = & m_aMaleLB; - m_pMalePB = & m_aMalePB; - m_pFemaleFI = & m_aFemaleFI; - m_pFemaleColumnFT = &m_aFemaleColumnFT; - m_pFemaleColumnLB = &m_aFemaleColumnLB; - m_pFemaleFieldFT = & m_aFemaleFieldFT; - m_pFemaleFieldCB = & m_aFemaleFieldCB; - m_pNeutralFT = & m_aNeutralFT; - m_pNeutralCB = &m_aNeutralCB; - m_bIsTabPage = true; - m_pPersonalizedCB->SetHelpId( HID_MM_GREETINGS_CB_PERSONALIZED); - m_pFemaleLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALE ); - m_pFemalePB->SetHelpId( HID_MM_GREETINGS_PB_FEMALE ); - m_pMaleLB->SetHelpId( HID_MM_GREETINGS_LB_MALE ); - m_pMalePB->SetHelpId( HID_MM_GREETINGS_PB_MALE ); - m_pFemaleColumnLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALECOLUMN); - m_pFemaleFieldCB->SetHelpId( HID_MM_GREETINGS_CB_FEMALEFIELD ); - m_pNeutralCB->SetHelpId( HID_MM_GREETINGS_CB_NEUTRAL ); + get(m_pGreetingLineCB, "greeting"); + get(m_pPersonalizedCB, "personalized"); + get(m_pFemaleFT, "femaleft"); + get(m_pFemaleLB, "female"); + get(m_pFemalePB, "newfemale"); + get(m_pMaleFT, "maleft"); + get(m_pMaleLB, "male"); + get(m_pMalePB, "newmale"); + get(m_pFemaleFI, "femalefi"); + get(m_pFemaleColumnFT, "femalecolft"); + get(m_pFemaleColumnLB, "femalecol"); + get(m_pFemaleFieldFT, "femalefieldft"); + get(m_pFemaleFieldCB, "femalefield"); + get(m_pNeutralFT, "generalft"); + get(m_pNeutralCB, "general"); + get(m_pPreviewFI, "previewft"); + get(m_pPreviewWIN, "preview"); + Size aSize(LogicToPixel(Size(186, 21), MapMode(MAP_APPFONT))); + m_pPreviewWIN->set_width_request(aSize.Width()); + m_pPreviewWIN->set_height_request(aSize.Height()); + get(m_pAssignPB, "assign"); + get(m_pDocumentIndexFI, "documentindex"); + m_sDocument = m_pDocumentIndexFI->GetText(); + get(m_pPrevSetIB, "prev"); + get(m_pNextSetIB, "next"); - FreeResource(); - m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailMergeGreetingsPage, ContainsHdl_Impl)); + m_bIsTabPage = true; + + m_pGreetingLineCB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, ContainsHdl_Impl)); Link aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl); - m_aPersonalizedCB.SetClickHdl(aIndividualLink); + m_pPersonalizedCB->SetClickHdl(aIndividualLink); Link aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl); - m_aFemalePB.SetClickHdl(aGreetingLink); - m_aMalePB.SetClickHdl(aGreetingLink); - m_aAssignPB.SetClickHdl(LINK(this, SwMailMergeGreetingsPage, AssignHdl_Impl)); + m_pFemalePB->SetClickHdl(aGreetingLink); + m_pMalePB->SetClickHdl(aGreetingLink); + m_pAssignPB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, AssignHdl_Impl)); Link aLBoxLink = LINK(this, SwMailMergeGreetingsPage, GreetingSelectHdl_Impl); - m_aFemaleLB.SetSelectHdl(aLBoxLink); - m_aMaleLB.SetSelectHdl(aLBoxLink); - m_aFemaleColumnLB.SetSelectHdl(aLBoxLink); - m_aFemaleFieldCB.SetSelectHdl(aLBoxLink); - m_aFemaleFieldCB.SetModifyHdl(aLBoxLink); - m_aNeutralCB.SetSelectHdl(aLBoxLink); - m_aNeutralCB.SetModifyHdl(aLBoxLink); + m_pFemaleLB->SetSelectHdl(aLBoxLink); + m_pMaleLB->SetSelectHdl(aLBoxLink); + m_pFemaleColumnLB->SetSelectHdl(aLBoxLink); + m_pFemaleFieldCB->SetSelectHdl(aLBoxLink); + m_pFemaleFieldCB->SetModifyHdl(aLBoxLink); + m_pNeutralCB->SetSelectHdl(aLBoxLink); + m_pNeutralCB->SetModifyHdl(aLBoxLink); Link aDataLink = LINK(this, SwMailMergeGreetingsPage, InsertDataHdl_Impl); - m_aPrevSetIB.SetClickHdl(aDataLink); - m_aNextSetIB.SetClickHdl(aDataLink); + m_pPrevSetIB->SetClickHdl(aDataLink); + m_pNextSetIB->SetClickHdl(aDataLink); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - m_aGreetingLineCB.Check(rConfig.IsGreetingLine(sal_False)); - m_aPersonalizedCB.Check(rConfig.IsIndividualGreeting(sal_False)); - ContainsHdl_Impl(&m_aGreetingLineCB); + m_pGreetingLineCB->Check(rConfig.IsGreetingLine(sal_False)); + m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(sal_False)); + ContainsHdl_Impl(m_pGreetingLineCB); aIndividualLink.Call(0); - lcl_FillGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); - lcl_FillGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE); - lcl_FillGreetingsBox(m_aNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL); + lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); + lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE); + lcl_FillGreetingsBox(*m_pNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL); - m_aDocumentIndexFI.SetText(m_sDocument.replaceFirst("%1", OUString::number(1))); + m_pDocumentIndexFI->SetText(m_sDocument.replaceFirst("%1", OUString::number(1))); } SwMailMergeGreetingsPage::~SwMailMergeGreetingsPage() @@ -324,22 +304,22 @@ void SwMailMergeGreetingsPage::ActivatePage() SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); //try to find the gender setting - m_aFemaleColumnLB.Clear(); + m_pFemaleColumnLB->Clear(); Reference< sdbcx::XColumnsSupplier > xColsSupp = rConfig.GetColumnsSupplier(); if(xColsSupp.is()) { Reference < container::XNameAccess> xColAccess = xColsSupp->getColumns(); Sequence< OUString > aColumns = xColAccess->getElementNames(); for(sal_Int32 nName = 0; nName < aColumns.getLength(); ++nName) - m_aFemaleColumnLB.InsertEntry(aColumns[nName]); + m_pFemaleColumnLB->InsertEntry(aColumns[nName]); } OUString sGenderColumn = rConfig.GetAssignedColumn(MM_PART_GENDER); - m_aFemaleColumnLB.SelectEntry(sGenderColumn); - m_aFemaleColumnLB.SaveValue(); + m_pFemaleColumnLB->SelectEntry(sGenderColumn); + m_pFemaleColumnLB->SaveValue(); - m_aFemaleFieldCB.SetText(rConfig.GetFemaleGenderValue()); - m_aFemaleFieldCB.SaveValue(); + m_pFemaleFieldCB->SetText(rConfig.GetFemaleGenderValue()); + m_pFemaleFieldCB->SaveValue(); UpdatePreview(); m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); @@ -349,31 +329,31 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage { SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - if(m_aFemaleColumnLB.GetSelectEntryPos() != m_aFemaleColumnLB.GetSavedValue()) + if (m_pFemaleColumnLB->GetSelectEntryPos() != m_pFemaleColumnLB->GetSavedValue()) { const SwDBData& rDBData = rConfig.GetCurrentDBData(); Sequence< OUString> aAssignment = rConfig.GetColumnAssignment( rDBData ); if(aAssignment.getLength() <= MM_PART_GENDER) aAssignment.realloc(MM_PART_GENDER + 1); - aAssignment[MM_PART_GENDER] = m_aFemaleColumnLB.GetSelectEntry(); + aAssignment[MM_PART_GENDER] = m_pFemaleColumnLB->GetSelectEntry(); rConfig.SetColumnAssignment( rDBData, aAssignment ); } - if(m_aFemaleFieldCB.GetText() != m_aFemaleFieldCB.GetSavedValue()) - rConfig.SetFemaleGenderValue(m_aFemaleFieldCB.GetText()); + if (m_pFemaleFieldCB->GetText() != m_pFemaleFieldCB->GetSavedValue()) + rConfig.SetFemaleGenderValue(m_pFemaleFieldCB->GetText()); - lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); - lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE); + lcl_StoreGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); + lcl_StoreGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE); - sal_Int32 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() ); + sal_Int32 nCurrentTextPos = m_pNeutralCB->GetEntryPos(m_pNeutralCB->GetText()); if(COMBOBOX_ENTRY_NOTFOUND == nCurrentTextPos) { - sal_Int32 nCount = m_aNeutralCB.GetEntryCount(); - m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount ); - m_aNeutralCB.SelectEntryPos(nCount); + sal_Int32 nCount = m_pNeutralCB->GetEntryCount(); + m_pNeutralCB->InsertEntry(m_pNeutralCB->GetText(), nCount); + m_pNeutralCB->SelectEntryPos(nCount); } - lcl_StoreGreetingsBox(m_aNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL); - rConfig.SetGreetingLine(m_aGreetingLineCB.IsChecked(), sal_False); - rConfig.SetIndividualGreeting(m_aPersonalizedCB.IsChecked(), sal_False); + lcl_StoreGreetingsBox(*m_pNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL); + rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), sal_False); + rConfig.SetIndividualGreeting(m_pPersonalizedCB->IsChecked(), sal_False); return sal_True; } @@ -381,14 +361,14 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox) { sal_Bool bContainsGreeting = pBox->IsChecked(); SwGreetingsHandler::Contains(bContainsGreeting); - m_aPreviewFI. Enable(bContainsGreeting); - m_aPreviewWIN.Enable(bContainsGreeting); - m_aAssignPB. Enable(bContainsGreeting); - m_aDocumentIndexFI. Enable(bContainsGreeting); - m_aPrevSetIB.Enable(bContainsGreeting); - m_aNextSetIB.Enable(bContainsGreeting); + m_pPreviewFI-> Enable(bContainsGreeting); + m_pPreviewWIN->Enable(bContainsGreeting); + m_pAssignPB-> Enable(bContainsGreeting); + m_pDocumentIndexFI-> Enable(bContainsGreeting); + m_pPrevSetIB->Enable(bContainsGreeting); + m_pNextSetIB->Enable(bContainsGreeting); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - rConfig.SetGreetingLine(m_aGreetingLineCB.IsChecked(), sal_False); + rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), sal_False); m_pWizard->UpdateRoadmap(); return 0; } @@ -403,7 +383,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) } else { - bool bNext = pButton == &m_aNextSetIB; + bool bNext = pButton == m_pNextSetIB; sal_Int32 nPos = rConfig.GetResultSetPosition(); rConfig.MoveResultSet( bNext ? ++nPos : --nPos); } @@ -416,10 +396,10 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) } else UpdatePreview(); - m_aPrevSetIB.Enable(bEnable); - m_aNextSetIB.Enable(bEnable); - m_aDocumentIndexFI.Enable(bEnable); - m_aDocumentIndexFI.SetText(m_sDocument.replaceFirst("%1", OUString::number(nPos))); + m_pPrevSetIB->Enable(bEnable); + m_pNextSetIB->Enable(bEnable); + m_pDocumentIndexFI->Enable(bEnable); + m_pDocumentIndexFI->SetText(m_sDocument.replaceFirst("%1", OUString::number(nPos))); return 0; } diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 93d3abd..8939dd0 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -45,7 +45,7 @@ protected: ListBox* m_pMaleLB; PushButton* m_pMalePB; - FixedInfo* m_pFemaleFI; + FixedText* m_pFemaleFI; FixedText* m_pFemaleColumnFT; ListBox* m_pFemaleColumnLB; FixedText* m_pFemaleFieldFT; @@ -70,35 +70,12 @@ protected: class SwMailMergeGreetingsPage : public svt::OWizardPage, public SwGreetingsHandler { - SwBoldFixedInfo m_aHeaderFI; - - CheckBox m_aGreetingLineCB; - - CheckBox m_aPersonalizedCB; - - FixedText m_aFemaleFT; - ListBox m_aFemaleLB; - PushButton m_aFemalePB; - - FixedText m_aMaleFT; - ListBox m_aMaleLB; - PushButton m_aMalePB; - - FixedInfo m_aFemaleFI; - FixedText m_aFemaleColumnFT; - ListBox m_aFemaleColumnLB; - FixedText m_aFemaleFieldFT; - ComboBox m_aFemaleFieldCB; - - FixedText m_aNeutralFT; - ComboBox m_aNeutralCB; - - FixedInfo m_aPreviewFI; - SwAddressPreview m_aPreviewWIN; - PushButton m_aAssignPB; - FixedInfo m_aDocumentIndexFI; - ImageButton m_aPrevSetIB; - ImageButton m_aNextSetIB; + FixedText* m_pPreviewFI; + SwAddressPreview* m_pPreviewWIN; + PushButton* m_pAssignPB; + FixedText* m_pDocumentIndexFI; + PushButton* m_pPrevSetIB; + PushButton* m_pNextSetIB; OUString m_sDocument; diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src index 311122e..09b0934 100644 --- a/sw/source/ui/dbui/mmgreetingspage.src +++ b/sw/source/ui/dbui/mmgreetingspage.src @@ -119,76 +119,6 @@ Border = TRUE; \ }; -#define TOP_OFFSET 24 -#define LEFT_OFFSET 6 - -TabPage DLG_MM_GREETINGS_PAGE -{ - HelpID = HID_MM_GREETINGSPAGE ; - Size = MAP_APPFONT ( 260 , 250 ) ; - Hide = TRUE ; - - FixedText FI_HEADER - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Create a salutation"; - }; - CheckBox CB_GREETINGLINE - { - HelpID = "sw:CheckBox:DLG_MM_GREETINGS_PAGE:CB_GREETINGLINE"; - Pos = MAP_APPFONT ( 12 , 27 ); - Size = MAP_APPFONT ( 242 , 10 ); - Text[ en-US ] = "This document should contain a salutation"; - }; - GREETINGS_BODY - FixedText FI_PREVIEW - { - Pos = MAP_APPFONT ( 12 , 168 ) ; - Size = MAP_APPFONT ( 242 , 8 ) ; - Text[ en-US ] = "Preview"; - }; - Window WIN_PREVIEW - { - Pos = MAP_APPFONT ( 12 , 179 ); - Size = MAP_APPFONT ( 186 , 21 ) ; - Border = TRUE; - }; - PushButton PB_ASSIGN - { - HelpID = "sw:PushButton:DLG_MM_GREETINGS_PAGE:PB_ASSIGN"; - Pos = MAP_APPFONT ( 204 , 179 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text[ en-US ] = "~Match fields..."; - }; - FixedText FI_DOCINDEX - { - Pos = MAP_APPFONT ( 121 , 206 ) ; - Size = MAP_APPFONT ( 50, 8 ) ; - Right = TRUE; - }; - ImageButton IB_PREVSET - { - HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_PREVSET"; - Pos = MAP_APPFONT ( 177 , 204 ) ; - Size = MAP_APPFONT ( 10 , 10 ) ; - SYMBOL = IMAGEBUTTON_PREV; - QuickHelpText[ en-US ] = "Preview Previous Salutation"; - }; - ImageButton IB_NEXTSET - { - HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_NEXTSET"; - Pos = MAP_APPFONT ( 188 , 204 ) ; - Size = MAP_APPFONT ( 10 , 10 ) ; - SYMBOL = IMAGEBUTTON_NEXT ; - QuickHelpText[ en-US ] = "Preview Next Salutation"; - }; - String STR_DOCUMENT - { - Text[ en-US ] = "Document: %1"; - }; -}; - #undef TOP_OFFSET #undef LEFT_OFFSET diff --git a/sw/uiconfig/swriter/ui/mmsalutationpage.ui b/sw/uiconfig/swriter/ui/mmsalutationpage.ui new file mode 100644 index 0000000..28b1580 --- /dev/null +++ b/sw/uiconfig/swriter/ui/mmsalutationpage.ui @@ -0,0 +1,532 @@ +<?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="MMSalutationPage"> + <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">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> + <child> + <object class="GtkLabel" id="previewft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Preview</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">preview:border</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="GtkGrid" id="grid3"> + <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="assign"> + <property name="label" translatable="yes">_Match fields...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="valign">start</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">2</property> + </packing> + </child> + <child> + <object class="swlo-SwAddressPreview" id="preview:border"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">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="GtkGrid" id="grid10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkButton" id="prev"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Preview Previous Address Block</property> + <property name="image">image1</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="next"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Preview Next Address Block</property> + <property name="image">image2</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="documentindex"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Document: %1</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">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">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">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid4"> + <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="GtkCheckButton" id="greeting"> + <property name="label" translatable="yes">This document should contain a salutation</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">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="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="left_padding">12</property> + <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> + <child> + <object class="GtkLabel" id="generalft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">General salutation</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">general</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="GtkComboBoxText" id="general"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="has_entry">True</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry"> + <property name="can_focus">False</property> + </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> + <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="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid8"> + <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> + <property name="row_homogeneous">True</property> + <child> + <object class="GtkLabel" id="femalefi"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Address list field indicating a female recipient</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="femaleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Female</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">female</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="GtkLabel" id="maleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Male</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">male</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="femalecolft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Field name</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">fieldname</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="GtkLabel" id="femalefieldft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Field value</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">fieldvalue</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="GtkButton" id="newfemale"> + <property name="label" translatable="yes">_New...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="valign">center</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="GtkButton" id="newmale"> + <property name="label" translatable="yes">N_ew...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="valign">center</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="GtkComboBoxText" id="female"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</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="GtkComboBoxText" id="male"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">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="GtkComboBoxText" id="femalecol"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">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> + <object class="GtkComboBoxText" id="femalefield"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">True</property> + <property name="has_entry">True</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry2"> + <property name="can_focus">True</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + </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="GtkCheckButton" id="personalized"> + <property name="label" translatable="yes">Insert personalized salutation</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">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> + </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> + <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">Create a salutation</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="sizegroup2"> + <widgets> + <widget name="assign"/> + <widget name="newfemale"/> + <widget name="newmale"/> + </widgets> + </object> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-media-previous</property> + <property name="icon_size">1</property> + </object> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-media-next</property> + <property name="icon_size">1</property> + </object> +</interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits