diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-11-21 08:20:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-21 09:09:00 +0100 |
commit | 3dc7aa719006aaf62be93ae92311c1859c2c7e19 (patch) | |
tree | a183f9ae3a753a5d97987017d5388be70a0bdcda /sw | |
parent | d687d74a4e3ba70a4e21fcd7db532c3cffc7d4d2 (diff) |
sw: prefix members of BookmarkTable, SwCreateAuthEntryDlg_Impl, ...
... SwTOXButton and SwTOXEdit
See tdf#94879 for motivation.
Change-Id: I0fa3d1c6023ce42f3a1c23cc6b873ffa75516455
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143013
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 98 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 44 | ||||
-rw-r--r-- | sw/source/ui/misc/bookmark.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/bookmark.hxx | 2 |
4 files changed, 75 insertions, 75 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 15158f4e41f3..4db6f48abcbf 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1443,10 +1443,10 @@ public: class SwTOXEdit : public SwTOXWidget { std::unique_ptr<weld::Builder> m_xBuilder; - SwFormToken aFormToken; - Link<SwTOXEdit&,void> aModifiedLink; - Link<SwTOXEdit&,void> aPrevNextControlLink; - bool bNextControl; + SwFormToken m_aFormToken; + Link<SwTOXEdit&,void> m_aModifiedLink; + Link<SwTOXEdit&,void> m_aPrevNextControlLink; + bool m_bNextControl; SwTokenWindow* m_pParent; std::unique_ptr<weld::Entry> m_xEntry; @@ -1454,8 +1454,8 @@ class SwTOXEdit : public SwTOXWidget public: SwTOXEdit(SwTokenWindow* pTokenWin, const SwFormToken& rToken) : m_xBuilder(Application::CreateBuilder(pTokenWin->get_child_container(), "modules/swriter/ui/toxentrywidget.ui")) - , aFormToken(rToken) - , bNextControl(false) + , m_aFormToken(rToken) + , m_bNextControl(false) , m_pParent(pTokenWin) , m_xEntry(m_xBuilder->weld_entry("entry")) { @@ -1527,25 +1527,25 @@ public: void SetModifyHdl(const Link<SwTOXEdit&,void>& rLink) { - aModifiedLink = rLink; + m_aModifiedLink = rLink; } DECL_LINK(KeyInputHdl, const KeyEvent&, bool); DECL_LINK(FocusInHdl, weld::Widget&, void); - bool IsNextControl() const { return bNextControl; } - void SetPrevNextLink(const Link<SwTOXEdit&,void>& rLink) { aPrevNextControlLink = rLink; } + bool IsNextControl() const { return m_bNextControl; } + void SetPrevNextLink(const Link<SwTOXEdit&,void>& rLink) { m_aPrevNextControlLink = rLink; } const SwFormToken& GetFormToken() { - aFormToken.sText = m_xEntry->get_text(); - return aFormToken; + m_aFormToken.sText = m_xEntry->get_text(); + return m_aFormToken; } void SetCharStyleName(const OUString& rSet, sal_uInt16 nPoolId) { - aFormToken.sCharStyleName = rSet; - aFormToken.nPoolId = nPoolId; + m_aFormToken.sCharStyleName = rSet; + m_aFormToken.nPoolId = nPoolId; } void AdjustSize(); @@ -1553,7 +1553,7 @@ public: IMPL_LINK_NOARG(SwTOXEdit, ModifyHdl, weld::Entry&, void) { - aModifiedLink.Call(*this); + m_aModifiedLink.Call(*this); } IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool) @@ -1568,12 +1568,12 @@ IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool) vcl::KeyCode aCode = rKEvt.GetKeyCode(); if (aCode.GetCode() == KEY_RIGHT && nMin == nTextLen) { - bNextControl = true; + m_bNextControl = true; bCall = true; } else if (aCode.GetCode() == KEY_LEFT && !nMin) { - bNextControl = false; + m_bNextControl = false; bCall = true; } else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() ) @@ -1583,8 +1583,8 @@ IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool) m_pParent->SetFocus2theAllBtn(); } } - if (bCall && aPrevNextControlLink.IsSet()) - aPrevNextControlLink.Call(*this); + if (bCall && m_aPrevNextControlLink.IsSet()) + m_aPrevNextControlLink.Call(*this); else bCall = false; @@ -1607,16 +1607,16 @@ void SwTOXEdit::AdjustSize() class SwTOXButton : public SwTOXWidget { std::unique_ptr<weld::Builder> m_xBuilder; - SwFormToken aFormToken; - Link<SwTOXButton&,void> aPrevNextControlLink; - bool bNextControl; + SwFormToken m_aFormToken; + Link<SwTOXButton&,void> m_aPrevNextControlLink; + bool m_bNextControl; SwTokenWindow* m_pParent; std::unique_ptr<weld::ToggleButton> m_xButton; public: SwTOXButton(SwTokenWindow* pTokenWin, const SwFormToken& rToken) : m_xBuilder(Application::CreateBuilder(pTokenWin->get_child_container(), "modules/swriter/ui/toxbuttonwidget.ui")) - , aFormToken(rToken) - , bNextControl(false) + , m_aFormToken(rToken) + , m_bNextControl(false) , m_pParent(pTokenWin) , m_xButton(m_xBuilder->weld_toggle_button("button")) { @@ -1673,24 +1673,24 @@ public: DECL_LINK(KeyInputHdl, const KeyEvent&, bool); DECL_LINK(FocusInHdl, weld::Widget&, void); - bool IsNextControl() const {return bNextControl;} - void SetPrevNextLink(const Link<SwTOXButton&,void>& rLink) {aPrevNextControlLink = rLink;} - const SwFormToken& GetFormToken() const {return aFormToken;} + bool IsNextControl() const {return m_bNextControl;} + void SetPrevNextLink(const Link<SwTOXButton&,void>& rLink) {m_aPrevNextControlLink = rLink;} + const SwFormToken& GetFormToken() const {return m_aFormToken;} void SetCharStyleName(const OUString& rSet, sal_uInt16 nPoolId) { - aFormToken.sCharStyleName = rSet; - aFormToken.nPoolId = nPoolId; + m_aFormToken.sCharStyleName = rSet; + m_aFormToken.nPoolId = nPoolId; } void SetTabPosition(SwTwips nSet) - { aFormToken.nTabStopPosition = nSet; } + { m_aFormToken.nTabStopPosition = nSet; } void SetFillChar( sal_Unicode cSet ) - { aFormToken.cTabFillChar = cSet; } + { m_aFormToken.cTabFillChar = cSet; } void SetTabAlign(SvxTabAdjust eAlign) - { aFormToken.eTabAlign = eAlign;} + { m_aFormToken.eTabAlign = eAlign;} //---> i89791 //used for entry number format, in TOC only @@ -1700,10 +1700,10 @@ public: { default: case 0: - aFormToken.nChapterFormat = CF_NUMBER; + m_aFormToken.nChapterFormat = CF_NUMBER; break; case 1: - aFormToken.nChapterFormat = CF_NUM_NOPREPST_TITLE; + m_aFormToken.nChapterFormat = CF_NUM_NOPREPST_TITLE; break; } } @@ -1713,18 +1713,18 @@ public: { default: case 0: - aFormToken.nChapterFormat = CF_NUM_NOPREPST_TITLE; + m_aFormToken.nChapterFormat = CF_NUM_NOPREPST_TITLE; break; case 1: - aFormToken.nChapterFormat = CF_TITLE; + m_aFormToken.nChapterFormat = CF_TITLE; break; case 2: - aFormToken.nChapterFormat = CF_NUMBER_NOPREPST; + m_aFormToken.nChapterFormat = CF_NUMBER_NOPREPST; break; } } - void SetOutlineLevel( sal_uInt16 nSet ) { aFormToken.nOutlineLevel = nSet;}//i53420 + void SetOutlineLevel( sal_uInt16 nSet ) { m_aFormToken.nOutlineLevel = nSet;}//i53420 void SetText(const OUString& rText) { @@ -1733,20 +1733,20 @@ public: void SetLinkEnd() { - OSL_ENSURE(TOKEN_LINK_START == aFormToken.eTokenType, + OSL_ENSURE(TOKEN_LINK_START == m_aFormToken.eTokenType, "call SetLinkEnd for link start only!"); - aFormToken.eTokenType = TOKEN_LINK_END; - aFormToken.sText = SwForm::GetFormLinkEnd(); - SetText(aFormToken.sText); + m_aFormToken.eTokenType = TOKEN_LINK_END; + m_aFormToken.sText = SwForm::GetFormLinkEnd(); + SetText(m_aFormToken.sText); } void SetLinkStart() { - OSL_ENSURE(TOKEN_LINK_END == aFormToken.eTokenType, + OSL_ENSURE(TOKEN_LINK_END == m_aFormToken.eTokenType, "call SetLinkStart for link start only!"); - aFormToken.eTokenType = TOKEN_LINK_START; - aFormToken.sText = SwForm::GetFormLinkStt(); - SetText(aFormToken.sText); + m_aFormToken.eTokenType = TOKEN_LINK_START; + m_aFormToken.sText = SwForm::GetFormLinkStt(); + SetText(m_aFormToken.sText); } }; @@ -1756,12 +1756,12 @@ IMPL_LINK(SwTOXButton, KeyInputHdl, const KeyEvent&, rKEvt, bool) vcl::KeyCode aCode = rKEvt.GetKeyCode(); if (aCode.GetCode() == KEY_RIGHT) { - bNextControl = true; + m_bNextControl = true; bCall = true; } else if (aCode.GetCode() == KEY_LEFT) { - bNextControl = false; + m_bNextControl = false; bCall = true; } else if (aCode.GetCode() == KEY_DELETE) @@ -1777,8 +1777,8 @@ IMPL_LINK(SwTOXButton, KeyInputHdl, const KeyEvent&, rKEvt, bool) m_pParent->SetFocus2theAllBtn(); } } - if (bCall && aPrevNextControlLink.IsSet()) - aPrevNextControlLink.Call(*this); + if (bCall && m_aPrevNextControlLink.IsSet()) + m_aPrevNextControlLink.Call(*this); else bCall = false; return bCall; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 09a84fda058e..a60e556d7974 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1067,9 +1067,9 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController { std::vector<std::unique_ptr<weld::Builder>> m_aBuilders; - Link<weld::Entry&,bool> aShortNameCheckLink; + Link<weld::Entry&,bool> m_aShortNameCheckLink; - SwWrtShell& rWrtSh; + SwWrtShell& m_rWrtSh; bool m_bNewEntryMode; bool m_bNameAllowed; @@ -1077,7 +1077,7 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController std::vector<std::unique_ptr<weld::Container>> m_aOrigContainers; std::vector<std::unique_ptr<weld::Label>> m_aFixedTexts; std::unique_ptr<weld::Box> m_pBoxes[AUTH_FIELD_END]; - std::unique_ptr<weld::Entry> pEdits[AUTH_FIELD_END]; + std::unique_ptr<weld::Entry> m_pEdits[AUTH_FIELD_END]; std::unique_ptr<weld::Button> m_xOKBT; std::unique_ptr<weld::Container> m_xBox; std::unique_ptr<weld::Container> m_xLeft; @@ -1103,7 +1103,7 @@ public: OUString GetEntryText(ToxAuthorityField eField) const; - void SetCheckNameHdl(const Link<weld::Entry&,bool>& rLink) {aShortNameCheckLink = rLink;} + void SetCheckNameHdl(const Link<weld::Entry&,bool>& rLink) {m_aShortNameCheckLink = rLink;} }; @@ -1567,7 +1567,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, bool bNewEntry, bool bCreate) : GenericDialogController(pParent, "modules/swriter/ui/createauthorentry.ui", "CreateAuthorEntryDialog") - , rWrtSh(rSh) + , m_rWrtSh(rSh) , m_bNewEntryMode(bNewEntry) , m_bNameAllowed(true) , m_xOKBT(m_xBuilder->weld_button("ok")) @@ -1649,7 +1649,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, else { m_pBoxes[nIndex] = m_aBuilders.back()->weld_box("vbox"); - pEdits[nIndex] = m_aBuilders.back()->weld_entry("entry"); + m_pEdits[nIndex] = m_aBuilders.back()->weld_entry("entry"); if (bLeft) m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xLeft.get()); else @@ -1678,31 +1678,31 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, int nPageNumber; if (SplitUrlAndPage(aText, aUrl, nPageNumber)) { - pEdits[nIndex]->set_text(aUrl); + m_pEdits[nIndex]->set_text(aUrl); m_xLocalPageCB->set_active(true); m_xLocalPageSB->set_sensitive(true); m_xLocalPageSB->set_value(nPageNumber); } else { - pEdits[nIndex]->set_text(aText); + m_pEdits[nIndex]->set_text(aText); } } else { - pEdits[nIndex]->set_text(aText); + m_pEdits[nIndex]->set_text(aText); } - pEdits[nIndex]->show(); - pEdits[nIndex]->set_help_id(aCurInfo.pHelpId); + m_pEdits[nIndex]->show(); + m_pEdits[nIndex]->set_help_id(aCurInfo.pHelpId); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { - pEdits[nIndex]->connect_changed(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); + m_pEdits[nIndex]->connect_changed(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); m_bNameAllowed = !pFields[nIndex].isEmpty(); if(!bCreate) { m_aFixedTexts.back()->set_sensitive(false); - pEdits[nIndex]->set_sensitive(false); + m_pEdits[nIndex]->set_sensitive(false); } } else if (aCurInfo.nToxField == AUTH_FIELD_LOCAL_URL) @@ -1712,7 +1712,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, m_xLocalPageSB->show(); } - m_aFixedTexts.back()->set_mnemonic_widget(pEdits[nIndex].get()); + m_aFixedTexts.back()->set_mnemonic_widget(m_pEdits[nIndex].get()); } if(bLeft) ++nLeftRow; @@ -1745,11 +1745,11 @@ OUString SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) cons { if (aCurInfo.nToxField == AUTH_FIELD_LOCAL_URL) { - return MergeUrlAndPage(pEdits[nIndex]->get_text(), m_xLocalPageSB); + return MergeUrlAndPage(m_pEdits[nIndex]->get_text(), m_xLocalPageSB); } else { - return pEdits[nIndex]->get_text(); + return m_pEdits[nIndex]->get_text(); } } } @@ -1760,7 +1760,7 @@ OUString SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) cons IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, weld::ComboBox&, rBox, void) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rWrtSh.GetFieldType(SwFieldIds::TableOfAuthorities, OUString())); + m_rWrtSh.GetFieldType(SwFieldIds::TableOfAuthorities, OUString())); if(!pFType) return; @@ -1778,16 +1778,16 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, weld::ComboBox&, rBox, void) m_xTypeListBox->set_active_text( pEntry->GetAuthorField(aCurInfo.nToxField)); else - pEdits[i]->set_text( + m_pEdits[i]->set_text( pEntry->GetAuthorField(aCurInfo.nToxField)); } } IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, weld::Entry&, rEdit, void) { - if (aShortNameCheckLink.IsSet()) + if (m_aShortNameCheckLink.IsSet()) { - bool bEnable = aShortNameCheckLink.Call(rEdit); + bool bEnable = m_aShortNameCheckLink.Call(rEdit); m_bNameAllowed |= bEnable; m_xOKBT->set_sensitive(m_xTypeListBox->get_active() != -1 && bEnable); } @@ -1814,7 +1814,7 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, BrowseHdl, weld::Button&, rButton, void) } else { - OUString aBaseURL = rWrtSh.GetDoc()->GetDocShell()->getDocumentBaseURL(); + OUString aBaseURL = m_rWrtSh.GetDoc()->GetDocShell()->getDocumentBaseURL(); if (!aBaseURL.isEmpty()) { aFileDlg.SetDisplayDirectory(aBaseURL); @@ -1833,7 +1833,7 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, BrowseHdl, weld::Button&, rButton, void) const TextInfo& rCurInfo = aTextInfoArr[nIndex]; if (rCurInfo.nToxField == AUTH_FIELD_LOCAL_URL && &rButton == m_xLocalBrowseButton.get()) { - pEdits[nIndex]->set_text(aPath); + m_pEdits[nIndex]->set_text(aPath); break; } } diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 91406e54f97b..959ceacad2d5 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -40,7 +40,7 @@ using namespace ::com::sun::star; -const char BookmarkTable::cSeparator(';'); +const char BookmarkTable::s_cSeparator(';'); // callback to modify EditBox IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) @@ -72,7 +72,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) sal_Int32 nTokenIndex = 0; while (!sTmp.isEmpty() && nTokenIndex >= 0) { - OUString aToken = sTmp.getToken(0, BookmarkTable::cSeparator, nTokenIndex); + OUString aToken = sTmp.getToken(0, BookmarkTable::s_cSeparator, nTokenIndex); if (m_xBookmarksBox->GetBookmarkByName(aToken)) { m_xBookmarksBox->SelectByName(aToken); @@ -220,7 +220,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg( rFact.CreateSwRenameXNamedDlg(m_xDialog.get(), xNamed, xNameAccess)); pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars - + OUStringChar(BookmarkTable::cSeparator)); + + OUStringChar(BookmarkTable::s_cSeparator)); if (pDlg->Execute()) { diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index 51aea63748cd..4e2582432673 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -62,7 +62,7 @@ public: void set_sort_column(int nColumn) { m_xControl->set_sort_column(nColumn); } static constexpr OUStringLiteral aForbiddenChars = u"/\\@*?\",#"; - static const char cSeparator; + static const char s_cSeparator; }; class SwInsertBookmarkDlg final : public SfxDialogController |