diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-09-12 08:38:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-09-12 10:37:28 +0200 |
commit | bc4271c544dbeb3c27e4041e77d255f2c23b6b0b (patch) | |
tree | d2fda377dd065297fafeab1032ee8eafab5ed1cb /sw/source/ui/fldui | |
parent | 9caf9f8fde68f075a9ae1377bcc0cf6127c1737f (diff) |
sw: prefix members of SwFieldEditDlg, SwFieldInputDlg, ...
... SwInsertDBColAutoPilot and SwInsertSectionTabDialog
See tdf#94879 for motivation.
Change-Id: Id3e8c7fef6ef0d801a008636c1ff57218186effc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139786
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r-- | sw/source/ui/fldui/fldedt.cxx | 46 | ||||
-rw-r--r-- | sw/source/ui/fldui/inpdlg.cxx | 64 |
2 files changed, 55 insertions, 55 deletions
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 2b1190a2f509..6e0ca5caf07e 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -47,13 +47,13 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) { - if (pSh->CursorInsideInputField()) + if (m_pSh->CursorInsideInputField()) { // move cursor to start of Input Field SwInputField* pInputField = dynamic_cast<SwInputField*>(pCurField); if (pInputField && pInputField->GetFormatField()) { - pSh->GotoField( *(pInputField->GetFormatField()) ); + m_pSh->GotoField( *(pInputField->GetFormatField()) ); } else { @@ -61,7 +61,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) if (pSetField) { assert(pSetField->GetFormatField()); - pSh->GotoField( *(pSetField->GetFormatField()) ); + m_pSh->GotoField( *(pSetField->GetFormatField()) ); } else { @@ -72,15 +72,15 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) /* Only create selection if there is none already. Normalize PaM instead of swapping. */ - if (!pSh->HasSelection()) + if (!m_pSh->HasSelection()) { - SwShellCursor* pCursor = pSh->getShellCursor(true); + SwShellCursor* pCursor = m_pSh->getShellCursor(true); SwPosition aOrigPos(*pCursor->GetPoint()); //After this attempt it is possible that rMgr.GetCurField() != pCurField if //the field was in e.g. a zero height portion and so invisible in which //case it will be skipped over - pSh->Right(SwCursorSkipMode::Chars, true, 1, false ); + m_pSh->Right(SwCursorSkipMode::Chars, true, 1, false ); //So (fdo#50640) if it didn't work then reposition back to the original //location where the field was SwField *pRealCurField = rMgr.GetCurField(); @@ -92,7 +92,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) } } - pSh->NormalizePam(); + m_pSh->NormalizePam(); assert(pCurField == rMgr.GetCurField()); } @@ -100,12 +100,12 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) SwFieldEditDlg::SwFieldEditDlg(SwView const & rVw) : SfxSingleTabDialogController(rVw.GetViewFrame()->GetFrameWeld(), nullptr, "modules/swriter/ui/editfielddialog.ui", "EditFieldDialog") - , pSh(rVw.GetWrtShellPtr()) + , m_pSh(rVw.GetWrtShellPtr()) , m_xPrevBT(m_xBuilder->weld_button("prev")) , m_xNextBT(m_xBuilder->weld_button("next")) , m_xAddressBT(m_xBuilder->weld_button("edit")) { - SwFieldMgr aMgr(pSh); + SwFieldMgr aMgr(m_pSh); SwField *pCurField = aMgr.GetCurField(); if (!pCurField) @@ -143,9 +143,9 @@ void SwFieldEditDlg::Init() return; // Traveling only when more than one field - pSh->StartAction(); - pSh->ClearMark(); - pSh->CreateCursor(); + m_pSh->StartAction(); + m_pSh->ClearMark(); + m_pSh->CreateCursor(); bool bMove = rMgr.GoNext(); if( bMove ) @@ -162,12 +162,12 @@ void SwFieldEditDlg::Init() else m_xAddressBT->set_sensitive(false); - pSh->DestroyCursor(); - pSh->EndAction(); + m_pSh->DestroyCursor(); + m_pSh->EndAction(); } - GetOKButton().set_sensitive(!pSh->IsReadOnlyAvailable() || - !pSh->HasReadonlySel()); + GetOKButton().set_sensitive(!m_pSh->IsReadOnlyAvailable() || + !m_pSh->HasReadonlySel()); } SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) @@ -205,7 +205,7 @@ SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS case GRP_DB: xTabPage = SwFieldDBPage::Create(get_content_area(), this, nullptr); - static_cast<SwFieldDBPage*>(xTabPage.get())->SetWrtShell(*pSh); + static_cast<SwFieldDBPage*>(xTabPage.get())->SetWrtShell(*m_pSh); break; #endif case GRP_VAR: @@ -216,7 +216,7 @@ SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) assert(xTabPage); - static_cast<SwFieldPage*>(xTabPage.get())->SetWrtShell(pSh); + static_cast<SwFieldPage*>(xTabPage.get())->SetWrtShell(m_pSh); SetTabPage(std::move(xTabPage)); return GetTabPage(); @@ -225,12 +225,12 @@ SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) SwFieldEditDlg::~SwFieldEditDlg() { SwViewShell::SetCareDialog(nullptr); - pSh->EnterStdMode(); + m_pSh->EnterStdMode(); } void SwFieldEditDlg::EnableInsert(bool bEnable) { - if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() ) + if( bEnable && m_pSh->IsReadOnlyAvailable() && m_pSh->HasReadonlySel() ) bEnable = false; GetOKButton().set_sensitive(bEnable); } @@ -263,7 +263,7 @@ IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button&, rButton, void) { bool bNext = &rButton == m_xNextBT.get(); - pSh->EnterStdMode(); + m_pSh->EnterStdMode(); SwFieldType *pOldTyp = nullptr; SwFieldPage* pTabPage = static_cast<SwFieldPage*>(GetTabPage()); @@ -298,7 +298,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, weld::Button&, void) SwFieldMgr& rMgr = pTabPage->GetFieldMgr(); SwField *pCurField = rMgr.GetCurField(); - SfxItemSetFixed<SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS> aSet( pSh->GetAttrPool() ); + SfxItemSetFixed<SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS> aSet( m_pSh->GetAttrPool() ); EditPosition nEditPos = EditPosition::UNKNOWN; @@ -329,7 +329,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, weld::Button&, void) ScopedVclPtr<SfxAbstractDialog> pDlg(rFact.CreateSwAddressAbstractDlg(m_xDialog.get(), aSet)); if (RET_OK == pDlg->Execute()) { - pSh->UpdateOneField(*pCurField); + m_pSh->UpdateOneField(*pCurField); } } diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 7eaa19e9f0c0..f5ed2c33e934 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -29,10 +29,10 @@ SwFieldInputDlg::SwFieldInputDlg(weld::Widget *pParent, SwWrtShell &rS, SwField* pField, bool bPrevButton, bool bNextButton) : GenericDialogController(pParent, "modules/swriter/ui/inputfielddialog.ui", "InputFieldDialog") - , rSh( rS ) - , pInpField(nullptr) - , pSetField(nullptr) - , pUsrType(nullptr) + , m_rSh( rS ) + , m_pInpField(nullptr) + , m_pSetField(nullptr) + , m_pUsrType(nullptr) , m_pPressedButton(nullptr) , m_xLabelED(m_xBuilder->weld_entry("name")) , m_xEditED(m_xBuilder->weld_text_view("text")) @@ -58,44 +58,44 @@ SwFieldInputDlg::SwFieldInputDlg(weld::Widget *pParent, SwWrtShell &rS, if( SwFieldIds::Input == pField->GetTyp()->Which() ) { // it is an input field - pInpField = static_cast<SwInputField*>(pField); - m_xLabelED->set_text(pInpField->GetPar2()); - sal_uInt16 nSubType = pInpField->GetSubType(); + m_pInpField = static_cast<SwInputField*>(pField); + m_xLabelED->set_text(m_pInpField->GetPar2()); + sal_uInt16 nSubType = m_pInpField->GetSubType(); switch(nSubType & 0xff) { case INP_TXT: - aStr = pInpField->GetPar1(); + aStr = m_pInpField->GetPar1(); break; case INP_USR: // user field - pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType( - SwFieldIds::User, pInpField->GetPar1() )); - if( nullptr != pUsrType ) - aStr = pUsrType->GetContent(); + m_pUsrType = static_cast<SwUserFieldType*>(m_rSh.GetFieldType( + SwFieldIds::User, m_pInpField->GetPar1() )); + if( nullptr != m_pUsrType ) + aStr = m_pUsrType->GetContent(); break; } } else { // it is a SetExpression - pSetField = static_cast<SwSetExpField*>(pField); - OUString sFormula(pSetField->GetFormula()); + m_pSetField = static_cast<SwSetExpField*>(pField); + OUString sFormula(m_pSetField->GetFormula()); //values are formatted - formulas are not - CharClass aCC( LanguageTag( pSetField->GetLanguage() )); + CharClass aCC( LanguageTag( m_pSetField->GetLanguage() )); if( aCC.isNumeric( sFormula )) { - aStr = pSetField->ExpandField(true, rS.GetLayout()); + aStr = m_pSetField->ExpandField(true, rS.GetLayout()); } else aStr = sFormula; - m_xLabelED->set_text(pSetField->GetPromptText()); + m_xLabelED->set_text(m_pSetField->GetPromptText()); } // JP 31.3.00: Inputfields in readonly regions must be allowed to // input any content. - 74639 - bool bEnable = !rSh.IsCursorReadonly(); + bool bEnable = !m_rSh.IsCursorReadonly(); m_xOKBT->set_sensitive( bEnable ); m_xEditED->set_editable( bEnable ); @@ -117,37 +117,37 @@ SwFieldInputDlg::~SwFieldInputDlg() void SwFieldInputDlg::Apply() { OUString aTmp = m_xEditED->get_text().replaceAll("\r", ""); - rSh.StartAllAction(); + m_rSh.StartAllAction(); bool bModified = false; - if(pInpField) + if(m_pInpField) { - if(pUsrType) + if(m_pUsrType) { - if( aTmp != pUsrType->GetContent() ) + if( aTmp != m_pUsrType->GetContent() ) { - pUsrType->SetContent(aTmp); - pUsrType->UpdateFields(); + m_pUsrType->SetContent(aTmp); + m_pUsrType->UpdateFields(); bModified = true; } } - else if( aTmp != pInpField->GetPar1() ) + else if( aTmp != m_pInpField->GetPar1() ) { - pInpField->SetPar1(aTmp); - rSh.SwEditShell::UpdateOneField(*pInpField); + m_pInpField->SetPar1(aTmp); + m_rSh.SwEditShell::UpdateOneField(*m_pInpField); bModified = true; } } - else if( aTmp != pSetField->GetPar2()) + else if( aTmp != m_pSetField->GetPar2()) { - pSetField->SetPar2(aTmp); - rSh.SwEditShell::UpdateOneField(*pSetField); + m_pSetField->SetPar2(aTmp); + m_rSh.SwEditShell::UpdateOneField(*m_pSetField); bModified = true; } if( bModified ) - rSh.SetUndoNoResetModified(); + m_rSh.SetUndoNoResetModified(); - rSh.EndAllAction(); + m_rSh.EndAllAction(); } bool SwFieldInputDlg::PrevButtonPressed() const |