diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-22 17:30:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-23 14:48:03 +0200 |
commit | 1d524bc7a331e8381e88cfd1b6dea4678ad32514 (patch) | |
tree | cf001d2cbef5fe9be54548dcf67b864881b27898 /sw | |
parent | 5264c7dcef25492e94d2d2e9a3025a7ec7571699 (diff) |
rename AddressPreview back to SwAddressPreview
Change-Id: I2afd5580fd94621163a5217d08d5b60190673fd2
Reviewed-on: https://gerrit.libreoffice.org/77973
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.hxx | 10 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 38 | ||||
-rw-r--r-- | sw/source/uibase/inc/mailmergehelper.hxx | 6 |
7 files changed, 40 insertions, 40 deletions
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index f4b7359be648..b95d4344a402 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -74,8 +74,8 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz , m_xPrevSetIB(m_xBuilder->weld_button("prev")) , m_xNextSetIB(m_xBuilder->weld_button("next")) , m_xDifferentlist(m_xBuilder->weld_label("differentlist")) - , m_xSettings(new AddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin"))) - , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin"))) + , m_xSettings(new SwAddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin"))) + , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin"))) , m_xSettingsWIN(new weld::CustomWeld(*m_xBuilder, "settingspreview", *m_xSettings)) , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addresspreview", *m_xPreview)) { @@ -246,7 +246,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl, LinkPar const sal_uInt16 nSel = m_xSettings->GetSelectedAddress(); const uno::Sequence< OUString> aBlocks = m_pWizard->GetConfigItem().GetAddressBlocks(); - m_xPreview->SetAddress(AddressPreview::FillData(aBlocks[nSel], + m_xPreview->SetAddress(SwAddressPreview::FillData(aBlocks[nSel], m_pWizard->GetConfigItem())); m_pWizard->GetConfigItem().SetCurrentAddressBlockIndex( nSel ); GetWizard()->UpdateRoadmap(); @@ -291,7 +291,7 @@ void SwMailMergeAddressBlockPage::InsertDataHdl(weld::Button* pButton) const sal_uInt16 nSel = m_xSettings->GetSelectedAddress(); const uno::Sequence< OUString> aBlocks = m_pWizard->GetConfigItem().GetAddressBlocks(); - m_xPreview->SetAddress(AddressPreview::FillData(aBlocks[nSel], rConfig)); + m_xPreview->SetAddress(SwAddressPreview::FillData(aBlocks[nSel], rConfig)); } } m_xPrevSetIB->set_sensitive(bEnable); @@ -316,7 +316,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, weld::Button&, rButto SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(weld::Window* pParent, SwMailMergeConfigItem& rConfig) : SfxDialogController(pParent, "modules/swriter/ui/selectblockdialog.ui", "SelectBlockDialog") , m_rConfig(rConfig) - , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) + , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) , m_xNewPB(m_xBuilder->weld_button("new")) , m_xCustomizePB(m_xBuilder->weld_button("edit")) , m_xDeletePB(m_xBuilder->weld_button("delete")) @@ -472,7 +472,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( , m_xFieldFT(m_xBuilder->weld_label("customft")) , m_xFieldCB(m_xBuilder->weld_combo_box("custom")) , m_xOK(m_xBuilder->weld_button("ok")) - , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) + , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addrpreview", *m_xPreview)) , m_xDragED(new AddressMultiLineEdit(this)) , m_xDragWIN(new weld::CustomWeld(*m_xBuilder, "addressdest", *m_xDragED)) @@ -569,7 +569,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, weld::TreeView&, IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl, AddressMultiLineEdit&, void) { - m_xPreview->SetAddress(AddressPreview::FillData(GetAddress(), m_rConfigItem)); + m_xPreview->SetAddress(SwAddressPreview::FillData(GetAddress(), m_rConfigItem)); UpdateImageButtons_Impl(); } @@ -968,7 +968,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( , m_sNone(SwResId(SW_STR_NONE)) , m_rPreviewString(rPreview) , m_rConfigItem(rConfigItem) - , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) + , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) , m_xMatchingFI(m_xBuilder->weld_label("MATCHING_LABEL")) , m_xAddressTitle(m_xBuilder->weld_label("addresselem")) , m_xMatchTitle(m_xBuilder->weld_label("matchelem")) @@ -1026,7 +1026,7 @@ IMPL_LINK_NOARG(SwAssignFieldsDialog, OkHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, LinkParamNone*, void) { uno::Sequence< OUString > aAssignments = CreateAssignments(); - const OUString sPreview = AddressPreview::FillData( + const OUString sPreview = SwAddressPreview::FillData( m_rPreviewString, m_rConfigItem, &aAssignments); m_xPreview->SetAddress(sPreview); } diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 8d719ae1aa71..4d50cfaa4961 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -60,8 +60,8 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage std::unique_ptr<weld::Label> m_xDifferentlist; - std::unique_ptr<AddressPreview> m_xSettings; - std::unique_ptr<AddressPreview> m_xPreview; + std::unique_ptr<SwAddressPreview> m_xSettings; + std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::CustomWeld> m_xSettingsWIN; std::unique_ptr<weld::CustomWeld> m_xPreviewWIN; @@ -93,7 +93,7 @@ class SwSelectAddressBlockDialog : public SfxDialogController css::uno::Sequence< OUString> m_aAddressBlocks; SwMailMergeConfigItem& m_rConfig; - std::unique_ptr<AddressPreview> m_xPreview; + std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::Button> m_xNewPB; std::unique_ptr<weld::Button> m_xCustomizePB; std::unique_ptr<weld::Button> m_xDeletePB; @@ -214,7 +214,7 @@ private: std::unique_ptr<weld::Label> m_xFieldFT; std::unique_ptr<weld::ComboBox> m_xFieldCB; std::unique_ptr<weld::Button> m_xOK; - std::unique_ptr<AddressPreview> m_xPreview; + std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::CustomWeld> m_xPreviewWIN; std::unique_ptr<AddressMultiLineEdit> m_xDragED; std::unique_ptr<weld::CustomWeld> m_xDragWIN; @@ -254,7 +254,7 @@ class SwAssignFieldsDialog : public SfxDialogController SwMailMergeConfigItem& m_rConfigItem; - std::unique_ptr<AddressPreview> m_xPreview; + std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::Label> m_xMatchingFI; std::unique_ptr<weld::Label> m_xAddressTitle; std::unique_ptr<weld::Label> m_xMatchTitle; diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 92ae1631111f..fe4b57ca5be5 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -173,7 +173,7 @@ void SwMailMergeGreetingsPage::UpdatePreview() OUString sPreview = bFemale ? m_xFemaleLB->get_active_text() : bNoValue ? m_xNeutralCB->get_active_text() : m_xMaleLB->get_active_text(); - sPreview = AddressPreview::FillData(sPreview, m_rConfigItem); + sPreview = SwAddressPreview::FillData(sPreview, m_rConfigItem); m_xPreview->SetAddress(sPreview); } @@ -199,7 +199,7 @@ void SwGreetingsHandler::Contains(bool bContainsGreeting) SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* pWizard, TabPageParent pParent) : vcl::OWizardPage(pParent, "modules/swriter/ui/mmsalutationpage.ui", "MMSalutationPage") , SwGreetingsHandler(pWizard->GetConfigItem(), *m_xBuilder) - , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) + , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) , m_xPreviewFI(m_xBuilder->weld_label("previewft")) , m_xAssignPB(m_xBuilder->weld_button("assign")) , m_xDocumentIndexFI(m_xBuilder->weld_label("documentindex")) diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index b836d931d14e..b3e241a9fa82 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -85,7 +85,7 @@ protected: class SwMailMergeGreetingsPage : public vcl::OWizardPage , public SwGreetingsHandler { - std::unique_ptr<AddressPreview> m_xPreview; + std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::Label> m_xPreviewFI; std::unique_ptr<weld::Button> m_xAssignPB; std::unique_ptr<weld::Label> m_xDocumentIndexFI; diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 912cb9a3f8cd..f107758feda0 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -1134,7 +1134,7 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, SendDocumentsHdl_Impl, weld::Button&, voi SwMailMergeConfigItem::FEMALE : SwMailMergeConfigItem::MALE; - sGreeting = AddressPreview::FillData( + sGreeting = SwAddressPreview::FillData( xConfigItem->GetGreetings(eGenderType) [xConfigItem->GetCurrentGreeting(eGenderType)], *xConfigItem); diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 4d1aa49f3445..b63ac11632e1 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -180,7 +180,7 @@ struct SwAddressPreview_Impl } }; -OUString AddressPreview::FillData( +OUString SwAddressPreview::FillData( const OUString& rAddress, SwMailMergeConfigItem const & rConfigItem, const Sequence< OUString>* pAssignments) @@ -275,30 +275,30 @@ OUString AddressPreview::FillData( return sAddress.makeStringAndClear(); } -AddressPreview::AddressPreview(std::unique_ptr<weld::ScrolledWindow> xWindow) +SwAddressPreview::SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> xWindow) : pImpl(new SwAddressPreview_Impl()) , m_xVScrollBar(std::move(xWindow)) { m_xVScrollBar->set_user_managed_scrolling(); - m_xVScrollBar->connect_vadjustment_changed(LINK(this, AddressPreview, ScrollHdl)); + m_xVScrollBar->connect_vadjustment_changed(LINK(this, SwAddressPreview, ScrollHdl)); } -AddressPreview::~AddressPreview() +SwAddressPreview::~SwAddressPreview() { } -IMPL_LINK_NOARG(AddressPreview, ScrollHdl, weld::ScrolledWindow&, void) +IMPL_LINK_NOARG(SwAddressPreview, ScrollHdl, weld::ScrolledWindow&, void) { Invalidate(); } -void AddressPreview::AddAddress(const OUString& rAddress) +void SwAddressPreview::AddAddress(const OUString& rAddress) { pImpl->aAddresses.push_back(rAddress); UpdateScrollBar(); } -void AddressPreview::SetAddress(const OUString& rAddress) +void SwAddressPreview::SetAddress(const OUString& rAddress) { pImpl->aAddresses.clear(); pImpl->aAddresses.push_back(rAddress); @@ -306,13 +306,13 @@ void AddressPreview::SetAddress(const OUString& rAddress) Invalidate(); } -sal_uInt16 AddressPreview::GetSelectedAddress()const +sal_uInt16 SwAddressPreview::GetSelectedAddress()const { OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection invalid"); return pImpl->nSelectedAddress; } -void AddressPreview::SelectAddress(sal_uInt16 nSelect) +void SwAddressPreview::SelectAddress(sal_uInt16 nSelect) { OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection invalid"); pImpl->nSelectedAddress = nSelect; @@ -323,20 +323,20 @@ void AddressPreview::SelectAddress(sal_uInt16 nSelect) m_xVScrollBar->vadjustment_set_value(nSelectRow); } -void AddressPreview::Clear() +void SwAddressPreview::Clear() { pImpl->aAddresses.clear(); pImpl->nSelectedAddress = 0; UpdateScrollBar(); } -void AddressPreview::ReplaceSelectedAddress(const OUString& rNew) +void SwAddressPreview::ReplaceSelectedAddress(const OUString& rNew) { pImpl->aAddresses[pImpl->nSelectedAddress] = rNew; Invalidate(); } -void AddressPreview::RemoveSelectedAddress() +void SwAddressPreview::RemoveSelectedAddress() { pImpl->aAddresses.erase(pImpl->aAddresses.begin() + pImpl->nSelectedAddress); if(pImpl->nSelectedAddress) @@ -345,19 +345,19 @@ void AddressPreview::RemoveSelectedAddress() Invalidate(); } -void AddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns) +void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns) { pImpl->nRows = nRows; pImpl->nColumns = nColumns; UpdateScrollBar(); } -void AddressPreview::EnableScrollBar() +void SwAddressPreview::EnableScrollBar() { pImpl->bEnableScrollBar = true; } -void AddressPreview::UpdateScrollBar() +void SwAddressPreview::UpdateScrollBar() { if (pImpl->nColumns) { @@ -371,7 +371,7 @@ void AddressPreview::UpdateScrollBar() } } -void AddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetFillColor(rSettings.GetWindowColor()); @@ -420,7 +420,7 @@ void AddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rect rRenderContext.SetClipRegion(); } -bool AddressPreview::MouseButtonDown( const MouseEvent& rMEvt ) +bool SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt ) { if (rMEvt.IsLeft() && pImpl->nRows && pImpl->nColumns) { @@ -447,7 +447,7 @@ bool AddressPreview::MouseButtonDown( const MouseEvent& rMEvt ) return true; } -bool AddressPreview::KeyInput( const KeyEvent& rKEvt ) +bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt ) { sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode(); bool bHandled = false; @@ -491,7 +491,7 @@ bool AddressPreview::KeyInput( const KeyEvent& rKEvt ) return bHandled; } -void AddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress, +void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected) { rRenderContext.SetClipRegion(vcl::Region(tools::Rectangle(rTopLeft, rSize))); diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index 67948190dfc8..72b1c98a25d9 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -57,7 +57,7 @@ struct SwAddressPreview_Impl; // Preview window used to show the possible selection of address blocks // and also the resulting address filled with database data -class SW_DLLPUBLIC AddressPreview : public weld::CustomWidgetController +class SW_DLLPUBLIC SwAddressPreview : public weld::CustomWidgetController { std::unique_ptr<SwAddressPreview_Impl> pImpl; std::unique_ptr<weld::ScrolledWindow> m_xVScrollBar; @@ -74,8 +74,8 @@ class SW_DLLPUBLIC AddressPreview : public weld::CustomWidgetController DECL_LINK(ScrollHdl, weld::ScrolledWindow&,void); public: - AddressPreview(std::unique_ptr<weld::ScrolledWindow> xParent); - virtual ~AddressPreview() override; + SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> xParent); + virtual ~SwAddressPreview() override; /** The address string is a list of address elements separated by spaces and breaks. The addresses fit into the given layout. If more addresses then |