sw/source/ui/misc/bookmark.cxx | 52 +++---- sw/source/ui/misc/num.cxx | 258 +++++++++++++++++++------------------- sw/source/ui/misc/outline.cxx | 126 +++++++++--------- sw/source/ui/misc/srtdlg.cxx | 76 +++++------ sw/source/uibase/inc/bookmark.hxx | 4 sw/source/uibase/inc/num.hxx | 24 +-- sw/source/uibase/inc/outline.hxx | 16 +- sw/source/uibase/inc/srtdlg.hxx | 12 - 8 files changed, 284 insertions(+), 284 deletions(-)
New commits: commit a93835da988134a7e14114701dcd90dd1f4dd26e Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Oct 3 08:05:35 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Oct 3 13:58:39 2022 +0200 sw: prefix members of SwInsertBookmarkDlg, SwNumPositionTabPage, ... ... SwOutlineSettingsTabPage and SwSortDlg See tdf#94879 for motivation. Change-Id: Idcc0425cd65b908ec6b92b9689d441fd185e51a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140899 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index e68a612dc09d..91406e54f97b 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -105,14 +105,14 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void) sw::mark::IMark* pBookmark = weld::fromId<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry)); OUString sRemoved = pBookmark->GetName(); - IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); + IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess(); pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved), false); - SfxRequest aReq(rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK); + SfxRequest aReq(m_rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK); aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved)); aReq.Done(); - aTableBookmarks.erase(std::remove(aTableBookmarks.begin(), aTableBookmarks.end(), - std::make_pair(pBookmark, sRemoved)), - aTableBookmarks.end()); + m_aTableBookmarks.erase(std::remove(m_aTableBookmarks.begin(), m_aTableBookmarks.end(), + std::make_pair(pBookmark, sRemoved)), + m_aTableBookmarks.end()); ++nSelectedRows; @@ -209,7 +209,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) sw::mark::IMark* pBookmark = weld::fromId<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected)); - uno::Reference<frame::XModel> xModel = rSh.GetView().GetDocShell()->GetBaseModel(); + uno::Reference<frame::XModel> xModel = m_rSh.GetView().GetDocShell()->GetBaseModel(); uno::Reference<text::XBookmarksSupplier> xBkms(xModel, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xNameAccess = xBkms->getBookmarks(); uno::Any aObj = xNameAccess->getByName(pBookmark->GetName()); @@ -237,8 +237,8 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) IMPL_LINK_NOARG(SwInsertBookmarkDlg, InsertHdl, weld::Button&, void) { OUString sBookmark = m_xEditBox->get_text(); - rSh.SetBookmark2(vcl::KeyCode(), sBookmark, m_xHideCB->get_active(), - m_xConditionED->get_text()); + m_rSh.SetBookmark2(vcl::KeyCode(), sBookmark, m_xHideCB->get_active(), + m_xConditionED->get_text()); m_xDialog->response(RET_OK); } @@ -272,18 +272,18 @@ IMPL_LINK(SwInsertBookmarkDlg, EditedHdl, weld::TreeView::iter_string const&, rI { return false; // don't allow editing if it spans multiple nodes } - rSh.Push(); - rSh.GotoMark(pBookmark); + m_rSh.Push(); + m_rSh.GotoMark(pBookmark); // GetSelText only works for 1 paragraph, but it's checked above - if (rSh.GetSelText() != rIterString.second) + if (m_rSh.GetSelText() != rIterString.second) { - bRet = rSh.Replace(rIterString.second, false); + bRet = m_rSh.Replace(rIterString.second, false); } - rSh.Pop(SwEditShell::PopMode::DeleteCurrent); + m_rSh.Pop(SwEditShell::PopMode::DeleteCurrent); } else if (pBookmark->IsExpanded() && !rIterString.second.isEmpty()) { // SwEditShell::Replace does nothing for empty selection - rSh.Insert(rIterString.second); + m_rSh.Insert(rIterString.second); bRet = true; } return bRet; @@ -302,8 +302,8 @@ void SwInsertBookmarkDlg::GotoSelectedBookmark() sw::mark::IMark* pBookmark = weld::fromId<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected)); - rSh.EnterStdMode(); - rSh.GotoMark(pBookmark); + m_rSh.EnterStdMode(); + m_rSh.GotoMark(pBookmark); } bool SwInsertBookmarkDlg::ValidateBookmarks() @@ -319,19 +319,19 @@ bool SwInsertBookmarkDlg::ValidateBookmarks() bool SwInsertBookmarkDlg::HaveBookmarksChanged() { - IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); + IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess(); if (pMarkAccess->getBookmarksCount() != m_nLastBookmarksCount) return true; std::vector<std::pair<sw::mark::IMark*, OUString>>::const_iterator aListIter - = aTableBookmarks.begin(); + = m_aTableBookmarks.begin(); for (IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin(); ppBookmark != pMarkAccess->getBookmarksEnd(); ++ppBookmark) { if (IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark)) { // more bookmarks then expected - if (aListIter == aTableBookmarks.end()) + if (aListIter == m_aTableBookmarks.end()) return true; if (aListIter->first != *ppBookmark || aListIter->second != (*ppBookmark)->GetName()) return true; @@ -339,22 +339,22 @@ bool SwInsertBookmarkDlg::HaveBookmarksChanged() } } // less bookmarks then expected - return aListIter != aTableBookmarks.end(); + return aListIter != m_aTableBookmarks.end(); } void SwInsertBookmarkDlg::PopulateTable() { - aTableBookmarks.clear(); + m_aTableBookmarks.clear(); m_xBookmarksBox->clear(); - IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); + IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess(); for (IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin(); ppBookmark != pMarkAccess->getBookmarksEnd(); ++ppBookmark) { if (IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark)) { - m_xBookmarksBox->InsertBookmark(rSh, *ppBookmark); - aTableBookmarks.emplace_back(*ppBookmark, (*ppBookmark)->GetName()); + m_xBookmarksBox->InsertBookmark(m_rSh, *ppBookmark); + m_aTableBookmarks.emplace_back(*ppBookmark, (*ppBookmark)->GetName()); } } m_nLastBookmarksCount = pMarkAccess->getBookmarksCount(); @@ -363,7 +363,7 @@ void SwInsertBookmarkDlg::PopulateTable() SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS, OUString const* const pSelected) : SfxDialogController(pParent, "modules/swriter/ui/insertbookmark.ui", "InsertBookmarkDialog") - , rSh(rS) + , m_rSh(rS) , m_nLastBookmarksCount(0) , m_bSorted(false) , m_xEditBox(m_xBuilder->weld_entry("name")) @@ -415,7 +415,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS, m_xConditionED->set_visible(false); } - m_bAreProtected = rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); + m_bAreProtected = m_rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); // disabled until "Hide" flag is not checked m_xConditionED->set_sensitive(false); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index b41e15b150af..aa92ff6dcd77 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -47,14 +47,14 @@ static bool bLastRelative = false; //merged SwNumPositionTabPage::SwNumPositionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "modules/swriter/ui/outlinepositionpage.ui", "OutlinePositionPage", &rSet) - , pSaveNum(nullptr) - , pWrtSh(nullptr) - , pOutlineDlg(nullptr) - , nActNumLvl(0) - , bModified(false) - , bPreset(false) - , bInInintControl(false) - , bLabelAlignmentPosAndSpaceModeActive(false) + , m_pSaveNum(nullptr) + , m_pWrtSh(nullptr) + , m_pOutlineDlg(nullptr) + , m_nActNumLvl(0) + , m_bModified(false) + , m_bPreset(false) + , m_bInInintControl(false) + , m_bLabelAlignmentPosAndSpaceModeActive(false) , m_xLevelLB(m_xBuilder->weld_tree_view("levellb")) , m_xPositionFrame(m_xBuilder->weld_widget("numberingframe")) , m_xDistBorderFT(m_xBuilder->weld_label("indent")) @@ -125,33 +125,33 @@ SwNumPositionTabPage::SwNumPositionTabPage(weld::Container* pPage, weld::DialogC SwNumPositionTabPage::~SwNumPositionTabPage() { - pActNum.reset(); - pOutlineDlg = nullptr; + m_pActNum.reset(); + m_pOutlineDlg = nullptr; } void SwNumPositionTabPage::InitControls() { - bInInintControl = true; - const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && + m_bInInintControl = true; + const bool bRelative = !m_bLabelAlignmentPosAndSpaceModeActive && m_xRelativeCB->get_sensitive() && m_xRelativeCB->get_active(); const bool bSingleSelection = m_xLevelLB->count_selected_rows() == 1 && - USHRT_MAX != nActNumLvl; + USHRT_MAX != m_nActNumLvl; - m_xDistBorderMF->set_sensitive( !bLabelAlignmentPosAndSpaceModeActive && - ( bSingleSelection || bRelative || pOutlineDlg != nullptr ) ); - m_xDistBorderFT->set_sensitive( !bLabelAlignmentPosAndSpaceModeActive && - ( bSingleSelection || bRelative || pOutlineDlg != nullptr ) ); + m_xDistBorderMF->set_sensitive( !m_bLabelAlignmentPosAndSpaceModeActive && + ( bSingleSelection || bRelative || m_pOutlineDlg != nullptr ) ); + m_xDistBorderFT->set_sensitive( !m_bLabelAlignmentPosAndSpaceModeActive && + ( bSingleSelection || bRelative || m_pOutlineDlg != nullptr ) ); bool bSetDistEmpty = false; - bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive; - bool bSameDist = !bLabelAlignmentPosAndSpaceModeActive; - bool bSameIndent = !bLabelAlignmentPosAndSpaceModeActive; + bool bSameDistBorderNum = !m_bLabelAlignmentPosAndSpaceModeActive; + bool bSameDist = !m_bLabelAlignmentPosAndSpaceModeActive; + bool bSameIndent = !m_bLabelAlignmentPosAndSpaceModeActive; bool bSameAdjust = true; - bool bSameLabelFollowedBy = bLabelAlignmentPosAndSpaceModeActive; - bool bSameListtab = bLabelAlignmentPosAndSpaceModeActive; - bool bSameAlignAt = bLabelAlignmentPosAndSpaceModeActive; - bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive; + bool bSameLabelFollowedBy = m_bLabelAlignmentPosAndSpaceModeActive; + bool bSameListtab = m_bLabelAlignmentPosAndSpaceModeActive; + bool bSameAlignAt = m_bLabelAlignmentPosAndSpaceModeActive; + bool bSameIndentAt = m_bLabelAlignmentPosAndSpaceModeActive; const SwNumFormat* aNumFormatArr[MAXLEVEL]; sal_uInt16 nMask = 1; @@ -159,8 +159,8 @@ void SwNumPositionTabPage::InitControls() tools::Long nFirstBorderTextRelative = -1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - aNumFormatArr[i] = &pActNum->Get(i); - if(nActNumLvl & nMask) + aNumFormatArr[i] = &m_pActNum->Get(i); + if(m_nActNumLvl & nMask) { if(USHRT_MAX == nLvl) { @@ -170,7 +170,7 @@ void SwNumPositionTabPage::InitControls() if( i > nLvl) { bSameAdjust &= aNumFormatArr[i]->GetNumAdjust() == aNumFormatArr[nLvl]->GetNumAdjust(); - if ( !bLabelAlignmentPosAndSpaceModeActive ) + if ( !m_bLabelAlignmentPosAndSpaceModeActive ) { if(bRelative) { @@ -324,34 +324,34 @@ void SwNumPositionTabPage::InitControls() if (bSetDistEmpty) m_xDistBorderMF->set_text(OUString()); - bInInintControl = false; + m_bInInintControl = false; } void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { const SfxPoolItem* pItem; sal_uInt16 nTmpNumLvl = - pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0; + m_pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0; const SfxItemSet* pExampleSet = GetDialogExampleSet(); if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SfxItemState::UNKNOWN) { - bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue(); + m_bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue(); } - bModified = (!pActNum->GetNumFormat( 0 ) || bPreset); - if(*pActNum != *pSaveNum || - nActNumLvl != nTmpNumLvl ) + m_bModified = (!m_pActNum->GetNumFormat( 0 ) || m_bPreset); + if(*m_pActNum != *m_pSaveNum || + m_nActNumLvl != nTmpNumLvl ) { - *pActNum = *pSaveNum; - nActNumLvl = nTmpNumLvl; + *m_pActNum = *m_pSaveNum; + m_nActNumLvl = nTmpNumLvl; sal_uInt16 nMask = 1; m_xLevelLB->unselect_all(); - if (nActNumLvl == USHRT_MAX) + if (m_nActNumLvl == USHRT_MAX) m_xLevelLB->select(MAXLEVEL); else { for (sal_uInt16 i = 0; i < MAXLEVEL; ++i) { - if (nActNumLvl & nMask) + if (m_nActNumLvl & nMask) m_xLevelLB->select(i); nMask <<= 1 ; } @@ -362,13 +362,13 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) InitControls(); } - m_xRelativeCB->set_sensitive(1 != nActNumLvl); + m_xRelativeCB->set_sensitive(1 != m_nActNumLvl); m_aPreviewWIN.Invalidate(); } DeactivateRC SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) { - SwOutlineTabDialog::SetActNumLevel(nActNumLvl); + SwOutlineTabDialog::SetActNumLevel(m_nActNumLvl); if(_pSet) FillItemSet(_pSet); return DeactivateRC::LeavePage; @@ -377,31 +377,31 @@ DeactivateRC SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) bool SwNumPositionTabPage::FillItemSet( SfxItemSet* rSet ) { - if(pOutlineDlg) - *pOutlineDlg->GetNumRule() = *pActNum; - else if(bModified && pActNum) + if(m_pOutlineDlg) + *m_pOutlineDlg->GetNumRule() = *m_pActNum; + else if(m_bModified && m_pActNum) { - *pSaveNum = *pActNum; - rSet->Put(SwUINumRuleItem( *pSaveNum )); + *m_pSaveNum = *m_pActNum; + rSet->Put(SwUINumRuleItem( *m_pSaveNum )); rSet->Put(SfxBoolItem(FN_PARAM_NUM_PRESET, false)); } - return bModified; + return m_bModified; } void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) { - if (pOutlineDlg) + if (m_pOutlineDlg) { - pSaveNum = pOutlineDlg->GetNumRule(); + m_pSaveNum = m_pOutlineDlg->GetNumRule(); m_xLevelLB->set_selection_mode(SelectionMode::Single); } else if(const SwUINumRuleItem* pNumberItem = rSet->GetItemIfSet(FN_PARAM_ACT_NUMBER, false)) - pSaveNum = const_cast<SwUINumRuleItem*>(pNumberItem)->GetNumRule(); + m_pSaveNum = const_cast<SwUINumRuleItem*>(pNumberItem)->GetNumRule(); - nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); + m_nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); sal_uInt16 nMask = 1; m_xLevelLB->unselect_all(); - if(nActNumLvl == USHRT_MAX) + if(m_nActNumLvl == USHRT_MAX) { m_xLevelLB->select(MAXLEVEL); } @@ -409,26 +409,26 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) { for (sal_uInt16 i = 0; i < MAXLEVEL; ++i) { - if (nActNumLvl & nMask) + if (m_nActNumLvl & nMask) m_xLevelLB->select(i); nMask <<= 1; } } - if(!pActNum) - pActNum.reset(new SwNumRule(*pSaveNum)); - else if(*pSaveNum != *pActNum) - *pActNum = *pSaveNum; - m_aPreviewWIN.SetNumRule(pActNum.get()); + if(!m_pActNum) + m_pActNum.reset(new SwNumRule(*m_pSaveNum)); + else if(*m_pSaveNum != *m_pActNum) + *m_pActNum = *m_pSaveNum; + m_aPreviewWIN.SetNumRule(m_pActNum.get()); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); InitControls(); - bModified = false; + m_bModified = false; } void SwNumPositionTabPage::InitPosAndSpaceMode() { - if ( pActNum == nullptr ) + if ( m_pActNum == nullptr ) { OSL_FAIL( "<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" ); return; @@ -439,9 +439,9 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { - SvxNumberFormat aNumFormat( pActNum->Get(i) ); + SvxNumberFormat aNumFormat( m_pActNum->Get(i) ); ePosAndSpaceMode = aNumFormat.GetPositionAndSpaceMode(); if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT ) { @@ -451,32 +451,32 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() nMask <<= 1; } - bLabelAlignmentPosAndSpaceModeActive = + m_bLabelAlignmentPosAndSpaceModeActive = ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT; } void SwNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode() { - m_xDistBorderFT->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xDistBorderMF->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xRelativeCB->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xIndentFT->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xIndentMF->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xDistNumFT->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xDistNumMF->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xAlignFT->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - m_xAlignLB->set_visible( !bLabelAlignmentPosAndSpaceModeActive ); - - m_xLabelFollowedByFT->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xLabelFollowedByLB->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xListtabFT->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xListtabMF->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xAlign2FT->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xAlign2LB->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xAlignedAtFT->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xAlignedAtMF->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xIndentAtFT->set_visible( bLabelAlignmentPosAndSpaceModeActive ); - m_xIndentAtMF->set_visible( bLabelAlignmentPosAndSpaceModeActive ); + m_xDistBorderFT->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xDistBorderMF->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xRelativeCB->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xIndentFT->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xIndentMF->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xDistNumFT->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xDistNumMF->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlignFT->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlignLB->set_visible( !m_bLabelAlignmentPosAndSpaceModeActive ); + + m_xLabelFollowedByFT->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xLabelFollowedByLB->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xListtabFT->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xListtabMF->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlign2FT->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlign2LB->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlignedAtFT->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xAlignedAtMF->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xIndentAtFT->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); + m_xIndentAtMF->set_visible( m_bLabelAlignmentPosAndSpaceModeActive ); } std::unique_ptr<SfxTabPage> SwNumPositionTabPage::Create( weld::Container* pPage, weld::DialogController* pController, @@ -487,9 +487,9 @@ std::unique_ptr<SfxTabPage> SwNumPositionTabPage::Create( weld::Container* pPage void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) { - pWrtSh = pSh; + m_pWrtSh = pSh; - const SwTwips nWidth = pWrtSh->GetAnyCurRect(CurRectType::Frame).Width(); + const SwTwips nWidth = m_pWrtSh->GetAnyCurRect(CurRectType::Frame).Width(); m_xDistBorderMF->set_max(m_xDistBorderMF->normalize( nWidth ), FieldUnit::TWIP ); m_xDistNumMF->set_max(m_xDistNumMF->normalize( nWidth ), FieldUnit::TWIP); @@ -498,9 +498,9 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) m_xAlignedAtMF->set_max(m_xAlignedAtMF->normalize( nWidth ), FieldUnit::TWIP ); m_xIndentAtMF->set_max(m_xIndentAtMF->normalize( nWidth ), FieldUnit::TWIP ); - const SwRect& rPrtRect = pWrtSh->GetAnyCurRect(CurRectType::Page); + const SwRect& rPrtRect = m_pWrtSh->GetAnyCurRect(CurRectType::Page); m_aPreviewWIN.SetPageWidth(rPrtRect.Width()); - FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &pWrtSh->GetView()) != nullptr ); + FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &m_pWrtSh->GetView()) != nullptr ); if(eMetric == FieldUnit::MM) { m_xDistBorderMF->set_digits(1); @@ -523,9 +523,9 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl, weld::ComboBox&, void) sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { - SwNumFormat aNumFormat(pActNum->Get(i)); + SwNumFormat aNumFormat(m_pActNum->Get(i)); const int nPos = m_xAlignLB->get_visible() ? m_xAlignLB->get_active() @@ -536,7 +536,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl, weld::ComboBox&, void) else if(nPos == 2) eAdjust = SvxAdjust::Right; aNumFormat.SetNumAdjust( eAdjust ); - pActNum->Set(i, aNumFormat); + m_pActNum->Set(i, aNumFormat); } nMask <<= 1; } @@ -545,13 +545,13 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl, weld::ComboBox&, void) IMPL_LINK( SwNumPositionTabPage, LevelHdl, weld::TreeView&, rBox, void ) { - sal_uInt16 nSaveNumLvl = nActNumLvl; - nActNumLvl = 0; + sal_uInt16 nSaveNumLvl = m_nActNumLvl; + m_nActNumLvl = 0; auto aRows = rBox.get_selected_rows(); if ((std::find(aRows.begin(), aRows.end(), MAXLEVEL) != aRows.end()) && (aRows.size() == 1 || nSaveNumLvl != 0xffff)) { - nActNumLvl = 0xFFFF; + m_nActNumLvl = 0xFFFF; for (sal_uInt16 i = 0; i < MAXLEVEL; ++i) rBox.unselect(i); } @@ -561,18 +561,18 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, weld::TreeView&, rBox, void ) for (sal_uInt16 i = 0; i < MAXLEVEL; ++i) { if (std::find(aRows.begin(), aRows.end(), i) != aRows.end()) - nActNumLvl |= nMask; + m_nActNumLvl |= nMask; nMask <<= 1; } rBox.unselect(MAXLEVEL); } else { - nActNumLvl = nSaveNumLvl; + m_nActNumLvl = nSaveNumLvl; sal_uInt16 nMask = 1; for (sal_uInt16 i = 0; i < MAXLEVEL; ++i) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { rBox.select(i); break; @@ -580,7 +580,7 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, weld::TreeView&, rBox, void ) nMask <<=1; } } - m_xRelativeCB->set_sensitive(1 != nActNumLvl); + m_xRelativeCB->set_sensitive(1 != m_nActNumLvl); SetModified(); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); @@ -589,15 +589,15 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, weld::TreeView&, rBox, void ) IMPL_LINK(SwNumPositionTabPage, DistanceHdl, weld::MetricSpinButton&, rField, void) { - if(bInInintControl) + if(m_bInInintControl) return; tools::Long nValue = static_cast< tools::Long >(rField.denormalize(rField.get_value(FieldUnit::TWIP))); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { - SwNumFormat aNumFormat( pActNum->Get( i ) ); + SwNumFormat aNumFormat( m_pActNum->Get( i ) ); if (&rField == m_xDistBorderMF.get()) { @@ -610,9 +610,9 @@ IMPL_LINK(SwNumPositionTabPage, DistanceHdl, weld::MetricSpinButton&, rField, vo } else { - tools::Long nTmp = pActNum->Get( i - 1 ).GetAbsLSpace() + - pActNum->Get( i - 1 ).GetFirstLineOffset() - - pActNum->Get( i ).GetFirstLineOffset(); + tools::Long nTmp = m_pActNum->Get( i - 1 ).GetAbsLSpace() + + m_pActNum->Get( i - 1 ).GetFirstLineOffset() - + m_pActNum->Get( i ).GetFirstLineOffset(); aNumFormat.SetAbsLSpace( nValue + nTmp ); } @@ -635,7 +635,7 @@ IMPL_LINK(SwNumPositionTabPage, DistanceHdl, weld::MetricSpinButton&, rField, vo aNumFormat.SetFirstLineOffset( -nValue ); } - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -648,7 +648,7 @@ IMPL_LINK(SwNumPositionTabPage, DistanceHdl, weld::MetricSpinButton&, rField, vo IMPL_LINK( SwNumPositionTabPage, RelativeHdl, weld::Toggleable&, rBox, void ) { bool bOn = rBox.get_active(); - bool bSingleSelection = m_xLevelLB->n_children() == 1 && USHRT_MAX != nActNumLvl; + bool bSingleSelection = m_xLevelLB->n_children() == 1 && USHRT_MAX != m_nActNumLvl; bool bSetValue = false; tools::Long nValue = 0; if(bOn || bSingleSelection) @@ -658,17 +658,17 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, weld::Toggleable&, rBox, void ) bSetValue = true; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { - const SwNumFormat &rNumFormat = pActNum->Get(i); + const SwNumFormat &rNumFormat = m_pActNum->Get(i); if(bFirst) { nValue = rNumFormat.GetAbsLSpace(); if(bOn && i) - nValue -= pActNum->Get(i - 1).GetAbsLSpace(); + nValue -= m_pActNum->Get(i - 1).GetAbsLSpace(); } else - bSetValue = nValue == rNumFormat.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace(); + bSetValue = nValue == rNumFormat.GetAbsLSpace() - m_pActNum->Get(i - 1).GetAbsLSpace(); bFirst = false; } nMask <<= 1; @@ -679,7 +679,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, weld::Toggleable&, rBox, void ) m_xDistBorderMF->set_value(m_xDistBorderMF->normalize(nValue), FieldUnit::TWIP); else m_xDistBorderMF->set_text(OUString()); - m_xDistBorderMF->set_sensitive(bOn || bSingleSelection || pOutlineDlg); + m_xDistBorderMF->set_sensitive(bOn || bSingleSelection || m_pOutlineDlg); bLastRelative = bOn; } @@ -709,11 +709,11 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl, weld::ComboBox&, sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { - if ( nActNumLvl & nMask ) + if ( m_nActNumLvl & nMask ) { - SwNumFormat aNumFormat( pActNum->Get(i) ); + SwNumFormat aNumFormat( m_pActNum->Get(i) ); aNumFormat.SetLabelFollowedBy( eLabelFollowedBy ); - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); if ( nFirstLvl == USHRT_MAX ) { @@ -722,7 +722,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl, weld::ComboBox&, else { bSameListtabPos &= aNumFormat.GetListtabPos() == - pActNum->Get( nFirstLvl ).GetListtabPos(); + m_pActNum->Get( nFirstLvl ).GetListtabPos(); } } nMask <<= 1; @@ -735,7 +735,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl, weld::ComboBox&, if ( bSameListtabPos && eLabelFollowedBy == SvxNumberFormat::LISTTAB ) { m_xListtabMF->set_value( - m_xListtabMF->normalize( pActNum->Get( nFirstLvl ).GetListtabPos() ), + m_xListtabMF->normalize( m_pActNum->Get( nFirstLvl ).GetListtabPos() ), FieldUnit::TWIP ); } else @@ -755,11 +755,11 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, weld::MetricSpinButton&, rF sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { - if ( nActNumLvl & nMask ) + if ( m_nActNumLvl & nMask ) { - SwNumFormat aNumFormat( pActNum->Get(i) ); + SwNumFormat aNumFormat( m_pActNum->Get(i) ); aNumFormat.SetListtabPos( nValue ); - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -776,12 +776,12 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, weld::MetricSpinButton&, rFiel sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { - if ( nActNumLvl & nMask ) + if ( m_nActNumLvl & nMask ) { - SwNumFormat aNumFormat( pActNum->Get(i) ); + SwNumFormat aNumFormat( m_pActNum->Get(i) ); const tools::Long nFirstLineIndent = nValue - aNumFormat.GetIndentAt(); aNumFormat.SetFirstLineIndent( nFirstLineIndent ); - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -798,15 +798,15 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, weld::MetricSpinButton&, rFie sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { - if ( nActNumLvl & nMask ) + if ( m_nActNumLvl & nMask ) { - SwNumFormat aNumFormat( pActNum->Get(i) ); + SwNumFormat aNumFormat( m_pActNum->Get(i) ); const tools::Long nAlignedAt = aNumFormat.GetIndentAt() + aNumFormat.GetFirstLineIndent(); aNumFormat.SetIndentAt( nValue ); const tools::Long nNewFirstLineIndent = nAlignedAt - nValue; aNumFormat.SetFirstLineIndent( nNewFirstLineIndent ); - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -819,12 +819,12 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl, weld::Button&, void) sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActNumLvl & nMask) + if(m_nActNumLvl & nMask) { - SwNumFormat aNumFormat( pActNum->Get( i ) ); - SwNumRule aTmpNumRule( pWrtSh->GetUniqueNumRuleName(), + SwNumFormat aNumFormat( m_pActNum->Get( i ) ); + SwNumRule aTmpNumRule( m_pWrtSh->GetUniqueNumRuleName(), aNumFormat.GetPositionAndSpaceMode(), - pOutlineDlg ? OUTLINE_RULE : NUM_RULE ); + m_pOutlineDlg ? OUTLINE_RULE : NUM_RULE ); const SwNumFormat& aTempFormat(aTmpNumRule.Get( i )); aNumFormat.SetPositionAndSpaceMode( aTempFormat.GetPositionAndSpaceMode() ); if ( aTempFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) @@ -841,7 +841,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl, weld::Button&, void) aNumFormat.SetFirstLineIndent( aTempFormat.GetFirstLineIndent() ); aNumFormat.SetIndentAt( aTempFormat.GetIndentAt() ); } - pActNum->Set( i, aNumFormat ); + m_pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -853,8 +853,8 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl, weld::Button&, void) #ifdef DBG_UTIL void SwNumPositionTabPage::SetModified() { - bModified = true; - m_aPreviewWIN.SetLevel(nActNumLvl); + m_bModified = true; + m_aPreviewWIN.SetLevel(m_nActNumLvl); m_aPreviewWIN.Invalidate(); } #endif diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index bc9da0c73231..7dda513c872a 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -381,11 +381,11 @@ short SwOutlineTabDialog::Ok() SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "modules/swriter/ui/outlinenumberingpage.ui", "OutlineNumberingPage", &rSet) - , aNoFormatName(SwResId(SW_STR_NONE)) - , pSh(nullptr) - , pNumRule(nullptr) - , pCollNames(nullptr) - , nActLevel(1) + , m_aNoFormatName(SwResId(SW_STR_NONE)) + , m_pSh(nullptr) + , m_pNumRule(nullptr) + , m_pCollNames(nullptr) + , m_nActLevel(1) , m_xLevelLB(m_xBuilder->weld_tree_view("level")) , m_xCollBox(m_xBuilder->weld_combo_box("style")) , m_xNumberBox(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box("numbering"))) @@ -401,7 +401,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(weld::Container* pPage, weld: m_xNumberBox->Reload(SwInsertNumTypes::NoNumbering | SwInsertNumTypes::Extended); m_xCollBox->make_sorted(); - m_xCollBox->append_text(aNoFormatName); + m_xCollBox->append_text(m_aNoFormatName); m_xLevelLB->connect_changed(LINK(this, SwOutlineSettingsTabPage, LevelHdl)); m_xAllLevelNF->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); m_xCollBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, CollSelect)); @@ -416,8 +416,8 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(weld::Container* pPage, weld: void SwOutlineSettingsTabPage::Update() { // if a template was already selected for this level, select it in the ListBox - m_xCollBox->set_sensitive(USHRT_MAX != nActLevel); - if(USHRT_MAX == nActLevel) + m_xCollBox->set_sensitive(USHRT_MAX != m_nActLevel); + if(USHRT_MAX == m_nActLevel) { bool bSamePrefix = true; bool bSameSuffix = true; @@ -432,7 +432,7 @@ void SwOutlineSettingsTabPage::Update() for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - aNumFormatArr[ i ] = &pNumRule->Get(i); + aNumFormatArr[ i ] = &m_pNumRule->Get(i); if(i == 0) pFirstFormat = aNumFormatArr[i]->GetCharFormat(); else @@ -489,13 +489,13 @@ void SwOutlineSettingsTabPage::Update() } else { - sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); - OUString aColl(pCollNames[nTmpLevel]); + sal_uInt16 nTmpLevel = lcl_BitToLevel(m_nActLevel); + OUString aColl(m_pCollNames[nTmpLevel]); if(!aColl.isEmpty()) m_xCollBox->set_active_text(aColl); else - m_xCollBox->set_active_text(aNoFormatName); - const SwNumFormat &rFormat = pNumRule->Get(nTmpLevel); + m_xCollBox->set_active_text(m_aNoFormatName); + const SwNumFormat &rFormat = m_pNumRule->Get(nTmpLevel); m_xNumberBox->SelectNumberingType( rFormat.GetNumberingType() ); m_xPrefixED->set_text(rFormat.GetPrefix()); @@ -528,11 +528,11 @@ void SwOutlineSettingsTabPage::Update() IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, weld::TreeView&, rBox, void ) { - nActLevel = 0; + m_nActLevel = 0; auto aRows = rBox.get_selected_rows(); if (std::find(aRows.begin(), aRows.end(), MAXLEVEL) != aRows.end()) { - nActLevel = 0xFFFF; + m_nActLevel = 0xFFFF; } else { @@ -540,7 +540,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, weld::TreeView&, rBox, void ) for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if (std::find(aRows.begin(), aRows.end(), i) != aRows.end()) - nActLevel |= nMask; + m_nActLevel |= nMask; nMask <<= 1; } } @@ -552,14 +552,14 @@ IMPL_LINK(SwOutlineSettingsTabPage, ToggleComplete, weld::SpinButton&, rEdit, vo sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActLevel & nMask) + if(m_nActLevel & nMask) { - SwNumFormat aNumFormat(pNumRule->Get(i)); + SwNumFormat aNumFormat(m_pNumRule->Get(i)); aNumFormat.SetIncludeUpperLevels( std::min( static_cast<sal_uInt8>(rEdit.get_value()), static_cast<sal_uInt8>(i + 1)) ); // Set the same prefix/suffix to generate list format with changed IncludedUpperLevels aNumFormat.SetListFormat(aNumFormat.GetPrefix(), aNumFormat.GetSuffix(), i); - pNumRule->Set(i, aNumFormat); + m_pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -572,37 +572,37 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, weld::ComboBox&, rBox, void ) const OUString aCollName(rBox.get_active_text()); //0xFFFF not allowed here (disable) - sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); - OUString sOldName( pCollNames[nTmpLevel] ); + sal_uInt16 nTmpLevel = lcl_BitToLevel(m_nActLevel); + OUString sOldName( m_pCollNames[nTmpLevel] ); for( i = 0; i < MAXLEVEL; ++i) - pCollNames[i] = aSaveCollNames[i]; + m_pCollNames[i] = m_aSaveCollNames[i]; - if(aCollName == aNoFormatName) - pCollNames[nTmpLevel].clear(); + if(aCollName == m_aNoFormatName) + m_pCollNames[nTmpLevel].clear(); else { - pCollNames[nTmpLevel] = aCollName; + m_pCollNames[nTmpLevel] = aCollName; // template already in use? for( i = 0; i < MAXLEVEL; ++i) - if(i != nTmpLevel && pCollNames[i] == aCollName ) - pCollNames[i].clear(); + if(i != nTmpLevel && m_pCollNames[i] == aCollName ) + m_pCollNames[i].clear(); } // search the oldname and put it into the current entries if( !sOldName.isEmpty() ) for( i = 0; i < MAXLEVEL; ++i) - if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel && - pCollNames[ i ].isEmpty() ) + if( m_aSaveCollNames[ i ] == sOldName && i != nTmpLevel && + m_pCollNames[ i ].isEmpty() ) { sal_uInt8 n; for( n = 0; n < MAXLEVEL; ++n ) - if( pCollNames[ n ] == sOldName ) + if( m_pCollNames[ n ] == sOldName ) break; if( MAXLEVEL == n ) // it was an outline level name and the current entries is zero. - pCollNames[ i ] = sOldName; + m_pCollNames[ i ] = sOldName; } SetModified(); @@ -612,7 +612,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, weld::ComboBox&, rBox, void ) void SwOutlineSettingsTabPage::CollSave() { for (sal_uInt8 i = 0; i < MAXLEVEL; ++i) - aSaveCollNames[i] = pCollNames[i]; + m_aSaveCollNames[i] = m_pCollNames[i]; } IMPL_LINK_NOARG(SwOutlineSettingsTabPage, NumberSelect, weld::ComboBox&, void) @@ -621,11 +621,11 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, NumberSelect, weld::ComboBox&, void) SvxNumType nNumberType = m_xNumberBox->GetSelectedNumberingType(); for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActLevel & nMask) + if(m_nActLevel & nMask) { - SwNumFormat aNumFormat(pNumRule->Get(i)); + SwNumFormat aNumFormat(m_pNumRule->Get(i)); aNumFormat.SetNumberingType(nNumberType); - pNumRule->Set(i, aNumFormat); + m_pNumRule->Set(i, aNumFormat); CheckForStartValue_Impl(nNumberType); } nMask <<= 1; @@ -638,11 +638,11 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify, weld::Entry&, void) sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActLevel & nMask) + if(m_nActLevel & nMask) { - SwNumFormat aNumFormat(pNumRule->Get(i)); + SwNumFormat aNumFormat(m_pNumRule->Get(i)); aNumFormat.SetListFormat( m_xPrefixED->get_text(), m_xSuffixED->get_text(), i ); - pNumRule->Set(i, aNumFormat); + m_pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -654,11 +654,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, weld::SpinButton&, rEdit, vo sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActLevel & nMask) + if(m_nActLevel & nMask) { - SwNumFormat aNumFormat(pNumRule->Get(i)); + SwNumFormat aNumFormat(m_pNumRule->Get(i)); aNumFormat.SetStart(o3tl::narrowing<sal_uInt16>(rEdit.get_value())); - pNumRule->Set(i, aNumFormat); + m_pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -673,10 +673,10 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, weld::ComboBox&, void) SwCharFormat* pFormat = nullptr; if(!bFormatNone) { - sal_uInt16 nChCount = pSh->GetCharFormatCount(); + sal_uInt16 nChCount = m_pSh->GetCharFormatCount(); for(sal_uInt16 i = 0; i < nChCount; i++) { - SwCharFormat& rChFormat = pSh->GetCharFormat(i); + SwCharFormat& rChFormat = m_pSh->GetCharFormat(i); if(rChFormat.GetName() == sEntry) { pFormat = &rChFormat; @@ -685,7 +685,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, weld::ComboBox&, void) } if(!pFormat) { - SfxStyleSheetBasePool* pPool = pSh->GetView().GetDocShell()->GetStyleSheetPool(); + SfxStyleSheetBasePool* pPool = m_pSh->GetView().GetDocShell()->GetStyleSheetPool(); SfxStyleSheetBase* pBase; pBase = pPool->Find(sEntry, SfxStyleFamily::Char); if(!pBase) @@ -697,14 +697,14 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl, weld::ComboBox&, void) for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - if(nActLevel & nMask) + if(m_nActLevel & nMask) { - SwNumFormat aNumFormat(pNumRule->Get(i)); + SwNumFormat aNumFormat(m_pNumRule->Get(i)); if(bFormatNone) aNumFormat.SetCharFormat(nullptr); else aNumFormat.SetCharFormat(pFormat); - pNumRule->Set(i, aNumFormat); + m_pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -716,18 +716,18 @@ SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage() void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) { - pSh = pShell; + m_pSh = pShell; // query this document's NumRules - pNumRule = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetNumRule(); - pCollNames = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetCollNames(); + m_pNumRule = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetNumRule(); + m_pCollNames = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetCollNames(); CollSave(); - m_aPreviewWIN.SetNumRule(pNumRule); - m_aPreviewWIN.SetOutlineNames(pCollNames); + m_aPreviewWIN.SetNumRule(m_pNumRule); + m_aPreviewWIN.SetOutlineNames(m_pCollNames); // set start value - nActLevel must be 1 here - sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); - const SwNumFormat& rNumFormat = pNumRule->Get( nTmpLevel ); + sal_uInt16 nTmpLevel = lcl_BitToLevel(m_nActLevel); + const SwNumFormat& rNumFormat = m_pNumRule->Get( nTmpLevel ); m_xStartEdit->set_value( rNumFormat.GetStart() ); // create pool formats for headlines @@ -741,10 +741,10 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) m_xLevelLB->append_text(sStr); // query the texttemplates' outlining levels - const sal_uInt16 nCount = pSh->GetTextFormatCollCount(); + const sal_uInt16 nCount = m_pSh->GetTextFormatCollCount(); for (sal_uInt16 i = 0; i < nCount; ++i) { - SwTextFormatColl &rTextColl = pSh->GetTextFormatColl(i); + SwTextFormatColl &rTextColl = m_pSh->GetTextFormatColl(i); if(!rTextColl.IsDefault()) { sStr = rTextColl.GetName(); @@ -754,11 +754,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) } m_xNumberBox->SelectNumberingType(rNumFormat.GetNumberingType()); - SwOutlineNodes::size_type nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); + SwOutlineNodes::size_type nOutlinePos = m_pSh->GetOutlinePos(MAXLEVEL); int nTmp = 0; if(nOutlinePos != SwOutlineNodes::npos) { - nTmp = o3tl::narrowing<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); + nTmp = o3tl::narrowing<sal_uInt16>(m_pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); } m_xLevelLB->select(nTmp-1); @@ -768,15 +768,15 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) // char styles ::FillCharStyleListBox(*m_xCharFormatLB, - pSh->GetView().GetDocShell()); + m_pSh->GetView().GetDocShell()); Update(); } void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& ) { - nActLevel = SwOutlineTabDialog::GetActNumLevel(); - if(nActLevel != USHRT_MAX) - m_xLevelLB->select(lcl_BitToLevel(nActLevel)); + m_nActLevel = SwOutlineTabDialog::GetActNumLevel(); + if(m_nActLevel != USHRT_MAX) + m_xLevelLB->select(lcl_BitToLevel(m_nActLevel)); else m_xLevelLB->select(MAXLEVEL); LevelHdl(*m_xLevelLB); @@ -784,7 +784,7 @@ void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& ) DeactivateRC SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*) { - SwOutlineTabDialog::SetActNumLevel(nActLevel); + SwOutlineTabDialog::SetActNumLevel(m_nActLevel); return DeactivateRC::LeavePage; } diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 52ca7ba66246..cd45654b8d08 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -115,18 +115,18 @@ SwSortDlg::SwSortDlg(weld::Window* pParent, SwWrtShell &rShell) , m_xDelimPB(m_xBuilder->weld_button("delimpb")) , m_xLangLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("langlb"))) , m_xCaseCB(m_xBuilder->weld_check_button("matchcase")) - , aColText(SwResId(STR_COL)) - , aRowText(SwResId(STR_ROW)) - , aNumericText(SwResId(STR_NUMERIC)) - , rSh(rShell) - , nX(99) - , nY(99) + , m_aColText(SwResId(STR_COL)) + , m_aRowText(SwResId(STR_ROW)) + , m_aNumericText(SwResId(STR_NUMERIC)) + , m_rSh(rShell) + , m_nX(99) + , m_nY(99) { - if(rSh.GetSelectionType() & + if(m_rSh.GetSelectionType() & (SelectionType::Table|SelectionType::TableCell) ) { m_xColumnRB->set_active(bCol); - m_xColLbl->set_label(bCol ? aRowText : aColText); + m_xColLbl->set_label(bCol ? m_aRowText : m_aColText); m_xRowRB->set_active(!bCol); m_xDelimTabRB->set_sensitive(false); m_xDelimFreeRB->set_sensitive(false); @@ -136,7 +136,7 @@ SwSortDlg::SwSortDlg(weld::Window* pParent, SwWrtShell &rShell) { m_xColumnRB->set_sensitive(false); m_xRowRB->set_active(true); - m_xColLbl->set_label(aColText); + m_xColLbl->set_label(m_aColText); } // Set accessible names here because text of m_xColLbl may be changed @@ -196,9 +196,9 @@ SwSortDlg::SwSortDlg(weld::Window* pParent, SwWrtShell &rShell) else DelimHdl(*m_xDelimTabRB); - if( ::lcl_GetSelTable( rSh, nX, nY) ) + if( ::lcl_GetSelTable( m_rSh, m_nX, m_nY) ) { - sal_uInt16 nMax = m_xRowRB->get_active()? nY : nX; + sal_uInt16 nMax = m_xRowRB->get_active()? m_nY : m_nX; m_xColEdt1->set_max(nMax); m_xColEdt2->set_max(nMax); m_xColEdt3->set_max(nMax); @@ -253,7 +253,7 @@ void SwSortDlg::Apply() if( bCheck1 ) { OUString sEntry( m_xTypDLB1->get_active_text() ); - if( sEntry == aNumericText ) + if( sEntry == m_aNumericText ) sEntry.clear(); else if (!m_xTypDLB1->get_active_id().isEmpty()) sEntry = m_xTypDLB1->get_active_id(); @@ -266,7 +266,7 @@ void SwSortDlg::Apply() if( bCheck2 ) { OUString sEntry( m_xTypDLB2->get_active_text() ); - if( sEntry == aNumericText ) + if( sEntry == m_aNumericText ) sEntry.clear(); else if (!m_xTypDLB2->get_active_id().isEmpty()) sEntry = m_xTypDLB2->get_active_id(); @@ -279,7 +279,7 @@ void SwSortDlg::Apply() if( bCheck3 ) { OUString sEntry( m_xTypDLB3->get_active_text() ); - if( sEntry == aNumericText ) + if( sEntry == m_aNumericText ) sEntry.clear(); else if (!m_xTypDLB3->get_active_id().isEmpty()) sEntry = m_xTypDLB3->get_active_id(); @@ -292,17 +292,17 @@ void SwSortDlg::Apply() aOptions.eDirection = bCol ? SwSortDirection::Columns : SwSortDirection::Rows; aOptions.cDeli = cDeli; aOptions.nLanguage = nLang; - aOptions.bTable = rSh.IsTableMode(); + aOptions.bTable = m_rSh.IsTableMode(); aOptions.bIgnoreCase = !bCsSens; bool bRet; { - SwWait aWait( *rSh.GetView().GetDocShell(), true ); - rSh.StartAllAction(); - bRet = rSh.Sort( aOptions ); + SwWait aWait( *m_rSh.GetView().GetDocShell(), true ); + m_rSh.StartAllAction(); + bRet = m_rSh.Sort( aOptions ); if( bRet ) - rSh.SetModified(); - rSh.EndAllAction(); + m_rSh.SetModified(); + m_rSh.EndAllAction(); } if (!bRet) @@ -324,7 +324,7 @@ IMPL_LINK( SwSortDlg, DelimHdl, weld::Toggleable&, rButton, void ) IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl, weld::Button&, void) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SfxAllItemSet aSet( rSh.GetAttrPool() ); + SfxAllItemSet aSet( m_rSh.GetAttrPool() ); aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog(m_xDialog.get(), aSet, nullptr)); if( RET_OK == pMap->Execute() ) @@ -339,25 +339,25 @@ IMPL_LINK( SwSortDlg, CheckHdl, weld::Toggleable&, rControl, void ) { if (&rControl == m_xRowRB.get()) { - m_xColLbl->set_label(aColText); - m_xColEdt1->set_max(nY); - m_xColEdt2->set_max(nY); - m_xColEdt3->set_max(nY); - - m_xColEdt1->set_accessible_name(aColText); - m_xColEdt2->set_accessible_name(aColText); - m_xColEdt3->set_accessible_name(aColText); + m_xColLbl->set_label(m_aColText); + m_xColEdt1->set_max(m_nY); + m_xColEdt2->set_max(m_nY); + m_xColEdt3->set_max(m_nY); + + m_xColEdt1->set_accessible_name(m_aColText); + m_xColEdt2->set_accessible_name(m_aColText); + m_xColEdt3->set_accessible_name(m_aColText); } else if (&rControl == m_xColumnRB.get()) { - m_xColLbl->set_label(aRowText); - m_xColEdt1->set_max(nX); - m_xColEdt2->set_max(nX); - m_xColEdt3->set_max(nX); - - m_xColEdt1->set_accessible_name(aRowText); - m_xColEdt2->set_accessible_name(aRowText); - m_xColEdt3->set_accessible_name(aRowText); + m_xColLbl->set_label(m_aRowText); + m_xColEdt1->set_max(m_nX); + m_xColEdt2->set_max(m_nX); + m_xColEdt3->set_max(m_nX); + + m_xColEdt1->set_accessible_name(m_aRowText); + m_xColEdt2->set_accessible_name(m_aRowText); + m_xColEdt3->set_accessible_name(m_aRowText); } else if(!m_xKeyCB1->get_active() && !m_xKeyCB2->get_active() && @@ -404,7 +404,7 @@ void SwSortDlg::LanguageHdl(weld::ComboBox const* pLBox) sUINm = m_xColRes->GetTranslation( sAlg ); } else - sUINm = sAlg = aNumericText; + sUINm = sAlg = m_aNumericText; for( int n = 0; n < nLstBoxCnt; ++n ) { diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index 4c1a9a2e79b9..51aea63748cd 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -67,8 +67,8 @@ public: class SwInsertBookmarkDlg final : public SfxDialogController { - SwWrtShell& rSh; - std::vector<std::pair<sw::mark::IMark*, OUString>> aTableBookmarks; + SwWrtShell& m_rSh; + std::vector<std::pair<sw::mark::IMark*, OUString>> m_aTableBookmarks; sal_Int32 m_nLastBookmarksCount; bool m_bSorted; bool m_bAreProtected; diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index 781023f0a949..463e8ea01b96 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -29,17 +29,17 @@ class SwOutlineTabDialog; class SwNumPositionTabPage final : public SfxTabPage { - std::unique_ptr<SwNumRule> pActNum; - SwNumRule* pSaveNum; - SwWrtShell* pWrtSh; + std::unique_ptr<SwNumRule> m_pActNum; + SwNumRule* m_pSaveNum; + SwWrtShell* m_pWrtSh; - SwOutlineTabDialog* pOutlineDlg; - sal_uInt16 nActNumLvl; + SwOutlineTabDialog* m_pOutlineDlg; + sal_uInt16 m_nActNumLvl; - bool bModified : 1; - bool bPreset : 1; - bool bInInintControl : 1; // work around modify-error; should be resolved from 391 on - bool bLabelAlignmentPosAndSpaceModeActive; + bool m_bModified : 1; + bool m_bPreset : 1; + bool m_bInInintControl : 1; // work around modify-error; should be resolved from 391 on + bool m_bLabelAlignmentPosAndSpaceModeActive; NumberingPreview m_aPreviewWIN; @@ -103,15 +103,15 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); - void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;} + void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){m_pOutlineDlg = pDlg;} void SetWrtShell(SwWrtShell* pSh); #ifdef DBG_UTIL void SetModified(); #else void SetModified() { - bModified = true; - m_aPreviewWIN.SetLevel(nActNumLvl); + m_bModified = true; + m_aPreviewWIN.SetLevel(m_nActNumLvl); m_aPreviewWIN.Invalidate(); } #endif diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index 6d9a23ab506a..1b1d76ccccd9 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -65,12 +65,12 @@ public: class SwOutlineSettingsTabPage final : public SfxTabPage { - OUString aNoFormatName; - OUString aSaveCollNames[MAXLEVEL]; - SwWrtShell* pSh; - SwNumRule* pNumRule; - OUString* pCollNames; - sal_uInt16 nActLevel; + OUString m_aNoFormatName; + OUString m_aSaveCollNames[MAXLEVEL]; + SwWrtShell* m_pSh; + SwNumRule* m_pNumRule; + OUString* m_pCollNames; + sal_uInt16 m_nActLevel; NumberingPreview m_aPreviewWIN; std::unique_ptr<weld::TreeView> m_xLevelLB; @@ -113,8 +113,8 @@ public: virtual void Reset( const SfxItemSet* rSet ) override; void SetNumRule(SwNumRule *pRule) { - pNumRule = pRule; - m_aPreviewWIN.SetNumRule(pNumRule); + m_pNumRule = pRule; + m_aPreviewWIN.SetNumRule(m_pNumRule); } }; diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index 2b6a39092f5b..590988735405 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -60,15 +60,15 @@ class SwSortDlg final : public weld::GenericDialogController std::unique_ptr<weld::CheckButton> m_xCaseCB; - OUString aColText; - OUString aRowText; - OUString aNumericText; + OUString m_aColText; + OUString m_aRowText; + OUString m_aNumericText; - SwWrtShell& rSh; + SwWrtShell& m_rSh; std::unique_ptr<CollatorResource> m_xColRes; - sal_uInt16 nX; - sal_uInt16 nY; + sal_uInt16 m_nX; + sal_uInt16 m_nY; void Apply(); sal_Unicode GetDelimChar() const;