sw/source/ui/envelp/labprt.cxx | 16 +++--- sw/source/ui/envelp/labprt.hxx | 4 - sw/source/ui/envelp/mailmrge.cxx | 78 +++++++++++++++---------------- sw/source/ui/misc/docfnote.cxx | 6 +- sw/source/uibase/inc/docfnote.hxx | 2 sw/source/uibase/inc/mailmergewizard.hxx | 6 +- sw/source/uibase/inc/mailmrge.hxx | 10 +-- 7 files changed, 61 insertions(+), 61 deletions(-)
New commits: commit f0359fb2f01ecf9aed470ae90604f9bd6eec3380 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Sep 19 08:30:50 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Sep 19 09:58:28 2022 +0200 sw: prefix members of SwFootNoteOptionDlg, SwLabPrtPage, SwMailMergeDlg ... ... and SwMailMergeWizard See tdf#94879 for motivation. Change-Id: I01521a5b96e45483bb810ea0e8cfb26cbf55bc40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140133 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index d8129dce3aa8..fb48899d61e4 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -26,7 +26,7 @@ SwLabPrtPage::SwLabPrtPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "modules/swriter/ui/labeloptionspage.ui", "LabelOptionsPage", &rSet) - , pPrinter(nullptr) + , m_pPrinter(nullptr) , m_xPageButton(m_xBuilder->weld_radio_button("entirepage")) , m_xSingleButton(m_xBuilder->weld_radio_button("singlelabel")) , m_xSingleGrid(m_xBuilder->weld_widget("singlegrid")) @@ -54,20 +54,20 @@ SwLabPrtPage::SwLabPrtPage(weld::Container* pPage, weld::DialogController* pCont SwLabPrtPage::~SwLabPrtPage() { - pPrinter.disposeAndClear(); + m_pPrinter.disposeAndClear(); } IMPL_LINK( SwLabPrtPage, PrtSetupHdl, weld::Button&, rButton, void ) { // Call printer setup - if (!pPrinter) - pPrinter = VclPtr<Printer>::Create(); + if (!m_pPrinter) + m_pPrinter = VclPtr<Printer>::Create(); PrinterSetupDialog aDlg(GetFrameWeld()); - aDlg.SetPrinter(pPrinter); + aDlg.SetPrinter(m_pPrinter); aDlg.run(); rButton.grab_focus(); - m_xPrinterInfo->set_label(pPrinter->GetName()); + m_xPrinterInfo->set_label(m_pPrinter->GetName()); } IMPL_LINK(SwLabPrtPage, CountHdl, weld::Toggleable&, rButton, void) @@ -138,10 +138,10 @@ void SwLabPrtPage::Reset(const SfxItemSet* ) m_xSingleButton->set_active(true); } - if (pPrinter) + if (m_pPrinter) { // show printer - m_xPrinterInfo->set_label(pPrinter->GetName()); + m_xPrinterInfo->set_label(m_pPrinter->GetName()); } else m_xPrinterInfo->set_label(Printer::GetDefaultPrinterName()); diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index de3cac2e4cfa..6df616aa68bf 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -28,7 +28,7 @@ class SwLabItem; class SwLabPrtPage : public SfxTabPage { - VclPtr<Printer> pPrinter; // for the shaft setting - unfortunately + VclPtr<Printer> m_pPrinter; // for the shaft setting - unfortunately std::unique_ptr<weld::RadioButton> m_xPageButton; std::unique_ptr<weld::RadioButton> m_xSingleButton; @@ -58,7 +58,7 @@ public: void FillItem(SwLabItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; - Printer* GetPrt() { return pPrinter; } + Printer* GetPrt() { return m_pPrinter; } }; #endif diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index bf9dc812e16c..154a9c70e4a8 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -93,8 +93,8 @@ void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) { //call the parent to enable selection mode Sequence <Any> aSelection; - if(rParent.pImpl->xSelSupp.is()) - rParent.pImpl->xSelSupp->getSelection() >>= aSelection; + if(rParent.m_pImpl->xSelSupp.is()) + rParent.m_pImpl->xSelSupp->getSelection() >>= aSelection; bool bEnable = aSelection.hasElements(); rParent.m_xMarkedRB->set_sensitive(bEnable); @@ -118,9 +118,9 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, const uno::Reference< XConnection>& _xConnection, Sequence< Any > const * pSelection) : SfxDialogController(pParent, "modules/swriter/ui/mailmerge.ui", "MailmergeDialog") - , pImpl(new SwMailMergeDlg_Impl) - , rSh(rShell) - , nMergeType(DBMGR_MERGE_EMAIL) + , m_pImpl(new SwMailMergeDlg_Impl) + , m_rSh(rShell) + , m_nMergeType(DBMGR_MERGE_EMAIL) , m_xBeamerWin(m_xBuilder->weld_container("beamer")) , m_xAllRB(m_xBuilder->weld_radio_button("all")) , m_xMarkedRB(m_xBuilder->weld_radio_button("selected")) @@ -202,21 +202,21 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, m_xBeamerWin->show(); } uno::Reference<XController> xController = m_xFrame->getController(); - pImpl->xFController.set(xController, UNO_QUERY); - if(pImpl->xFController.is()) { - uno::Reference< awt::XControl > xCtrl = pImpl->xFController->getCurrentControl( ); - pImpl->xSelSupp.set(xCtrl, UNO_QUERY); - if(pImpl->xSelSupp.is()) { - pImpl->xChgLstnr = new SwXSelChgLstnr_Impl(*this); - pImpl->xSelSupp->addSelectionChangeListener( pImpl->xChgLstnr ); + m_pImpl->xFController.set(xController, UNO_QUERY); + if(m_pImpl->xFController.is()) { + uno::Reference< awt::XControl > xCtrl = m_pImpl->xFController->getCurrentControl( ); + m_pImpl->xSelSupp.set(xCtrl, UNO_QUERY); + if(m_pImpl->xSelSupp.is()) { + m_pImpl->xChgLstnr = new SwXSelChgLstnr_Impl(*this); + m_pImpl->xSelSupp->addSelectionChangeListener( m_pImpl->xChgLstnr ); } } } } - pModOpt = SW_MOD()->GetModuleConfig(); + m_pModOpt = SW_MOD()->GetModuleConfig(); - MailTextFormats nMailingMode(pModOpt->GetMailingFormats()); + MailTextFormats nMailingMode(m_pModOpt->GetMailingFormats()); m_xFormatSwCB->set_active(bool(nMailingMode & MailTextFormats::OFFICE)); m_xFormatHtmlCB->set_active(bool(nMailingMode & MailTextFormats::HTML)); m_xFormatRtfCB->set_active(bool(nMailingMode & MailTextFormats::RTF)); @@ -237,7 +237,7 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, OutputTypeHdl(bIsPrintable ? *m_xPrinterRB : *m_xFileRB); m_xGenerateFromDataBaseCB->connect_toggled(LINK(this, SwMailMergeDlg, FilenameHdl)); - bool bColumn = pModOpt->IsNameFromColumn(); + bool bColumn = m_pModOpt->IsNameFromColumn(); if(bColumn) m_xGenerateFromDataBaseCB->set_active(true); @@ -255,7 +255,7 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, m_xFromNF->set_max(SAL_MAX_INT32); m_xToNF->set_max(SAL_MAX_INT32); - SwDBManager* pDBManager = rSh.GetDBManager(); + SwDBManager* pDBManager = m_rSh.GetDBManager(); if(_xConnection.is()) SwDBManager::GetColumnNames(*m_xAddressFieldLB, _xConnection, rTableName); else @@ -268,7 +268,7 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, m_xAddressFieldLB->set_active_text("EMAIL"); - OUString sPath(pModOpt->GetMailingPath()); + OUString sPath(m_pModOpt->GetMailingPath()); if(sPath.isEmpty()) { SvtPathOptions aPathOpt; sPath = aPathOpt.GetWorkPath(); @@ -286,8 +286,8 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, } else { - m_xColumnLB->set_active_text(pModOpt->GetNameFromColumn()); - m_xPasswordLB->set_active_text(pModOpt->GetPasswordFromColumn()); + m_xColumnLB->set_active_text(m_pModOpt->GetNameFromColumn()); + m_xPasswordLB->set_active_text(m_pModOpt->GetPasswordFromColumn()); } if (m_xAddressFieldLB->get_active() == -1) @@ -459,7 +459,7 @@ bool SwMailMergeDlg::AskUserFilename() const OUString SwMailMergeDlg::GetURLfromPath() const { - SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium(); + SfxMedium* pMedium = m_rSh.GetView().GetDocShell()->GetMedium(); INetURLObject aAbs; if( pMedium ) aAbs = pMedium->GetURLObject(); @@ -474,29 +474,29 @@ OUString SwMailMergeDlg::GetURLfromPath() const bool SwMailMergeDlg::ExecQryShell() { - if(pImpl->xSelSupp.is()) { - pImpl->xSelSupp->removeSelectionChangeListener( pImpl->xChgLstnr ); + if(m_pImpl->xSelSupp.is()) { + m_pImpl->xSelSupp->removeSelectionChangeListener( m_pImpl->xChgLstnr ); } if (m_xPrinterRB->get_active()) - nMergeType = DBMGR_MERGE_PRINTER; + m_nMergeType = DBMGR_MERGE_PRINTER; else { - nMergeType = DBMGR_MERGE_FILE; - pModOpt->SetMailingPath( GetURLfromPath() ); - pModOpt->SetIsNameFromColumn(m_xGenerateFromDataBaseCB->get_active()); - pModOpt->SetIsFileEncryptedFromColumn(m_xPasswordCB->get_active()); + m_nMergeType = DBMGR_MERGE_FILE; + m_pModOpt->SetMailingPath( GetURLfromPath() ); + m_pModOpt->SetIsNameFromColumn(m_xGenerateFromDataBaseCB->get_active()); + m_pModOpt->SetIsFileEncryptedFromColumn(m_xPasswordCB->get_active()); if (!AskUserFilename()) { - pModOpt->SetNameFromColumn(m_xColumnLB->get_active_text()); - pModOpt->SetPasswordFromColumn(m_xPasswordLB->get_active_text()); + m_pModOpt->SetNameFromColumn(m_xColumnLB->get_active_text()); + m_pModOpt->SetPasswordFromColumn(m_xPasswordLB->get_active_text()); if (m_xFilterLB->get_active() != -1) m_sSaveFilter = m_xFilterLB->get_active_id(); m_sFilename = OUString(); } else { //#i97667# reset column name - otherwise it's remembered from the last run - pModOpt->SetNameFromColumn(OUString()); - pModOpt->SetPasswordFromColumn(OUString()); + m_pModOpt->SetNameFromColumn(OUString()); + m_pModOpt->SetPasswordFromColumn(OUString()); //start save as dialog OUString sFilter; m_sFilename = SwMailMergeHelper::CallSaveAsDialog(m_xDialog.get(), sFilter); @@ -521,11 +521,11 @@ bool SwMailMergeDlg::ExecQryShell() } else if (m_xAllRB->get_active() ) m_aSelection.realloc(0); // Empty selection = insert all else { - if(pImpl->xSelSupp.is()) { + if(m_pImpl->xSelSupp.is()) { //update selection uno::Reference< XRowLocate > xRowLocate(GetResultSet(),UNO_QUERY); uno::Reference< XResultSet > xRes(xRowLocate,UNO_QUERY); - pImpl->xSelSupp->getSelection() >>= m_aSelection; + m_pImpl->xSelSupp->getSelection() >>= m_aSelection; if ( xRowLocate.is() ) { for (Any& rRow : asNonConstRange(m_aSelection)) { if ( xRowLocate->moveToBookmark(rRow) ) @@ -534,12 +534,12 @@ bool SwMailMergeDlg::ExecQryShell() } } } - IDocumentDeviceAccess& rIDDA = rSh.getIDocumentDeviceAccess(); + IDocumentDeviceAccess& rIDDA = m_rSh.getIDocumentDeviceAccess(); SwPrintData aPrtData( rIDDA.getPrintData() ); aPrtData.SetPrintSingleJobs(m_xSingleJobsCB->get_active()); rIDDA.setPrintData(aPrtData); - pModOpt->SetSinglePrintJob(m_xSingleJobsCB->get_active()); + m_pModOpt->SetSinglePrintJob(m_xSingleJobsCB->get_active()); MailTextFormats nMailingMode = MailTextFormats::NONE; @@ -549,7 +549,7 @@ bool SwMailMergeDlg::ExecQryShell() nMailingMode |= MailTextFormats::HTML; if (m_xFormatRtfCB->get_active()) nMailingMode |= MailTextFormats::RTF; - pModOpt->SetMailingFormats(nMailingMode); + m_pModOpt->SetMailingFormats(nMailingMode); return true; } @@ -557,7 +557,7 @@ OUString SwMailMergeDlg::GetTargetURL() const { if( AskUserFilename() ) return m_sFilename; - OUString sPath( pModOpt->GetMailingPath() ); + OUString sPath( m_pModOpt->GetMailingPath() ); if( sPath.isEmpty() ) { SvtPathOptions aPathOpt; sPath = aPathOpt.GetWorkPath(); @@ -584,9 +584,9 @@ IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl, weld::Button&, void) uno::Reference<XResultSet> SwMailMergeDlg::GetResultSet() const { uno::Reference< XResultSet > xResSetClone; - if ( pImpl->xFController.is() ) { + if ( m_pImpl->xFController.is() ) { // we create a clone to do the task - uno::Reference< XResultSetAccess > xResultSetAccess( pImpl->xFController->getModel(),UNO_QUERY); + uno::Reference< XResultSetAccess > xResultSetAccess( m_pImpl->xFController->getModel(),UNO_QUERY); if ( xResultSetAccess.is() ) xResSetClone = xResultSetAccess->createResultSet(); } diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index e065a272eaa2..ffe251eed77a 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -37,7 +37,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rS) : SfxTabDialogController(pParent, "modules/swriter/ui/footendnotedialog.ui", "FootEndnoteDialog") - , rSh( rS ) + , m_rSh( rS ) { RemoveResetButton(); @@ -49,12 +49,12 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rS) void SwFootNoteOptionDlg::PageCreated(const OString& /*rId*/, SfxTabPage &rPage) { - static_cast<SwEndNoteOptionPage&>(rPage).SetShell(rSh); + static_cast<SwEndNoteOptionPage&>(rPage).SetShell(m_rSh); } IMPL_LINK(SwFootNoteOptionDlg, OkHdl, weld::Button&, rBtn, void) { - SfxItemSetFixed<1, 1> aDummySet(rSh.GetAttrPool()); + SfxItemSetFixed<1, 1> aDummySet(m_rSh.GetAttrPool()); SfxTabPage *pPage = GetTabPage("footnotes"); if ( pPage ) pPage->FillItemSet( &aDummySet ); diff --git a/sw/source/uibase/inc/docfnote.hxx b/sw/source/uibase/inc/docfnote.hxx index 1719349ab5ef..f8151db112af 100644 --- a/sw/source/uibase/inc/docfnote.hxx +++ b/sw/source/uibase/inc/docfnote.hxx @@ -25,7 +25,7 @@ class SwWrtShell; class SwFootNoteOptionDlg final : public SfxTabDialogController { - SwWrtShell& rSh; + SwWrtShell& m_rSh; virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index aabccbb887a0..b39167650439 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -37,7 +37,7 @@ using vcl::WizardTypes::CommitPageReason; class SwMailMergeWizard final : public ::vcl::RoadmapWizardMachine { SwView* m_pSwView; - OUString sDocumentURL; + OUString m_sDocumentURL; bool m_bDocumentLoad; std::shared_ptr<SwMailMergeConfigItem> m_xConfigItem; @@ -65,8 +65,8 @@ public: SwView* GetSwView() {return m_pSwView;} SwMailMergeConfigItem& GetConfigItem() { return *m_xConfigItem;} - void SetReloadDocument(const OUString& rURL) {sDocumentURL = rURL;} - const OUString& GetReloadDocument() const {return sDocumentURL;} + void SetReloadDocument(const OUString& rURL) {m_sDocumentURL = rURL;} + const OUString& GetReloadDocument() const {return m_sDocumentURL;} //next step requires loading of document void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;} diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx index c141029e3122..787561785301 100644 --- a/sw/source/uibase/inc/mailmrge.hxx +++ b/sw/source/uibase/inc/mailmrge.hxx @@ -45,12 +45,12 @@ class SwMailMergeDlg final : public SfxDialogController { friend class SwXSelChgLstnr_Impl; - std::unique_ptr<SwMailMergeDlg_Impl> pImpl; + std::unique_ptr<SwMailMergeDlg_Impl> m_pImpl; - SwWrtShell& rSh; - SwModuleOptions* pModOpt; + SwWrtShell& m_rSh; + SwModuleOptions* m_pModOpt; - DBManagerOptions nMergeType; + DBManagerOptions m_nMergeType; css::uno::Sequence< css::uno::Any > m_aSelection; css::uno::Reference< css::frame::XFrame2 > m_xFrame; @@ -122,7 +122,7 @@ public: css::uno::Sequence< css::uno::Any > const * pSelection); virtual ~SwMailMergeDlg() override; - DBManagerOptions GetMergeType() const { return nMergeType; } + DBManagerOptions GetMergeType() const { return m_nMergeType; } bool IsSaveSingleDoc() const { return m_xSaveSingleDocRB->get_active(); } bool IsGenerateFromDataBase() const { return m_xGenerateFromDataBaseCB->get_active(); }