include/svx/svdpagv.hxx | 54 +++++++++++++++++++++--------------------- svx/source/svdraw/svdpagv.cxx | 44 +++++++++++++++++----------------- 2 files changed, 49 insertions(+), 49 deletions(-)
New commits: commit 7aece6a3399c0fe29a49e3d7218f98d5f0383e65 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Sep 9 08:00:44 2024 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Sep 9 09:33:31 2024 +0200 svx: prefix members of SdrPageView See tdf#94879 for motivation. Change-Id: Ia11aaae771deb99f72af86670318c3822c1d139f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173056 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx index 58354a3d8d50..e52814bb08ae 100644 --- a/include/svx/svdpagv.hxx +++ b/include/svx/svdpagv.hxx @@ -59,19 +59,19 @@ private: SdrPage* mpPage; Point maPageOrigin; // The Page's point of origin - tools::Rectangle aMarkBound; - tools::Rectangle aMarkSnap; + tools::Rectangle m_aMarkBound; + tools::Rectangle m_aMarkSnap; bool mbHasMarked; bool mbVisible; - SdrLayerIDSet aLayerVisi; // Set of visible Layers - SdrLayerIDSet aLayerLock; // Set of non-editable Layers - SdrLayerIDSet aLayerPrn; // Set of printable Layers + SdrLayerIDSet m_aLayerVisi; // Set of visible Layers + SdrLayerIDSet m_aLayerLock; // Set of non-editable Layers + SdrLayerIDSet m_aLayerPrn; // Set of printable Layers - SdrObjList* pCurrentList; // Current List, usually the Page - SdrObject* pCurrentGroup; // Current Group; nullptr means none + SdrObjList* m_pCurrentList; // Current List, usually the Page + SdrObject* m_pCurrentGroup; // Current Group; nullptr means none - SdrHelpLineList aHelpLines; // Helper lines and points + SdrHelpLineList m_aHelpLines; // Helper lines and points // #103911# Use one reserved slot (bReserveBool2) for the document color Color maDocumentColor; @@ -167,10 +167,10 @@ public: SdrPage* GetPage() const { return mpPage; } /// Return current List - SdrObjList* GetObjList() const { return pCurrentList; } + SdrObjList* GetObjList() const { return m_pCurrentList; } /// Return current Group - SdrObject* GetCurrentGroup() const { return pCurrentGroup; } + SdrObject* GetCurrentGroup() const { return m_pCurrentGroup; } /// Set current Group and List void SetCurrentGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList); @@ -178,26 +178,26 @@ public: bool HasMarkedObjPageView() const { return mbHasMarked; } void SetHasMarkedObj(bool bOn) { mbHasMarked = bOn; } - const tools::Rectangle& MarkBound() const { return aMarkBound; } - const tools::Rectangle& MarkSnap() const { return aMarkSnap; } - tools::Rectangle& MarkBound() { return aMarkBound; } - tools::Rectangle& MarkSnap() { return aMarkSnap; } + const tools::Rectangle& MarkBound() const { return m_aMarkBound; } + const tools::Rectangle& MarkSnap() const { return m_aMarkSnap; } + tools::Rectangle& MarkBound() { return m_aMarkBound; } + tools::Rectangle& MarkSnap() { return m_aMarkSnap; } bool SetLayerVisible(const OUString& rName, bool bShow) { - const bool bChanged = SetLayer(rName, aLayerVisi, bShow); + const bool bChanged = SetLayer(rName, m_aLayerVisi, bShow); if (!bChanged) return false; if(!bShow) AdjHdl(); InvalidateAllWin(); return true; } - bool IsLayerVisible(const OUString& rName) const { return IsLayer(rName, aLayerVisi); } + bool IsLayerVisible(const OUString& rName) const { return IsLayer(rName, m_aLayerVisi); } - void SetLayerLocked(const OUString& rName, bool bLock) { SetLayer(rName, aLayerLock, bLock); if(bLock) AdjHdl(); } - bool IsLayerLocked(const OUString& rName) const { return IsLayer(rName,aLayerLock); } + void SetLayerLocked(const OUString& rName, bool bLock) { SetLayer(rName, m_aLayerLock, bLock); if(bLock) AdjHdl(); } + bool IsLayerLocked(const OUString& rName) const { return IsLayer(rName,m_aLayerLock); } - void SetLayerPrintable(const OUString& rName, bool bPrn) { SetLayer(rName, aLayerPrn, bPrn); } - bool IsLayerPrintable(const OUString& rName) const { return IsLayer(rName, aLayerPrn); } + void SetLayerPrintable(const OUString& rName, bool bPrn) { SetLayer(rName, m_aLayerPrn, bPrn); } + bool IsLayerPrintable(const OUString& rName) const { return IsLayer(rName, m_aLayerPrn); } /// PV represents a RefPage or a SubList of a RefObj, or the Model is ReadOnly bool IsReadOnly() const; @@ -210,14 +210,14 @@ public: void LogicToPagePos(tools::Rectangle& rRect) const { rRect.Move(-maPageOrigin.X(),-maPageOrigin.Y()); } void PagePosToLogic(Point& rPnt) const { rPnt+=maPageOrigin; } - void SetVisibleLayers(const SdrLayerIDSet& rSet) { aLayerVisi=rSet; } - const SdrLayerIDSet& GetVisibleLayers() const { return aLayerVisi; } - void SetPrintableLayers(const SdrLayerIDSet& rSet) { aLayerPrn=rSet; } - const SdrLayerIDSet& GetPrintableLayers() const { return aLayerPrn; } - void SetLockedLayers(const SdrLayerIDSet& rSet) { aLayerLock=rSet; } - const SdrLayerIDSet& GetLockedLayers() const { return aLayerLock; } + void SetVisibleLayers(const SdrLayerIDSet& rSet) { m_aLayerVisi=rSet; } + const SdrLayerIDSet& GetVisibleLayers() const { return m_aLayerVisi; } + void SetPrintableLayers(const SdrLayerIDSet& rSet) { m_aLayerPrn=rSet; } + const SdrLayerIDSet& GetPrintableLayers() const { return m_aLayerPrn; } + void SetLockedLayers(const SdrLayerIDSet& rSet) { m_aLayerLock=rSet; } + const SdrLayerIDSet& GetLockedLayers() const { return m_aLayerLock; } - const SdrHelpLineList& GetHelpLines() const { return aHelpLines; } + const SdrHelpLineList& GetHelpLines() const { return m_aHelpLines; } void SetHelpLines(const SdrHelpLineList& rHLL); //void SetHelpLinePos(sal_uInt16 nNum, const Point& rNewPos); void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine); diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 4e5d7a47286c..8b1f837a6301 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -102,13 +102,13 @@ SdrPageView::SdrPageView(SdrPage* pPage1, SdrView& rNewView) // For example, in the case of charts, there is a LayerAdmin, but it has no valid values. Therefore // a solution like pLayerAdmin->getVisibleLayersODF(aLayerVisi) is not possible. So use the // generic SetAll() for now. - aLayerVisi.SetAll(); - aLayerPrn.SetAll(); + m_aLayerVisi.SetAll(); + m_aLayerPrn.SetAll(); mbHasMarked = false; mbVisible = false; - pCurrentList = nullptr; - pCurrentGroup = nullptr; + m_pCurrentList = nullptr; + m_pCurrentGroup = nullptr; SetCurrentGroupAndList(nullptr, mpPage); for(sal_uInt32 a(0); a < rNewView.PaintWindowCount(); a++) @@ -636,9 +636,9 @@ bool SdrPageView::IsObjMarkable(SdrObject const * pObj) const // the layer has to be visible and must not be locked SdrLayerID nL = pObj->GetLayer(); - if (!aLayerVisi.IsSet(nL)) + if (!m_aLayerVisi.IsSet(nL)) return false; - if (aLayerLock.IsSet(nL)) + if (m_aLayerLock.IsSet(nL)) return false; return true; } @@ -657,9 +657,9 @@ void SdrPageView::SetPageOrigin(const Point& rOrg) void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const { - if (!(GetView().IsHlplVisible() && nNum<aHelpLines.GetCount())) return; + if (!(GetView().IsHlplVisible() && nNum<m_aHelpLines.GetCount())) return; - const SdrHelpLine& rHL=aHelpLines[nNum]; + const SdrHelpLine& rHL=m_aHelpLines[nNum]; for(sal_uInt32 a(0); a < GetView().PaintWindowCount(); a++) { @@ -681,40 +681,40 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL) { - aHelpLines=rHLL; + m_aHelpLines=rHLL; InvalidateAllWin(); } void SdrPageView::SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine) { - if (nNum >= aHelpLines.GetCount() || aHelpLines[nNum] == rNewHelpLine) + if (nNum >= m_aHelpLines.GetCount() || m_aHelpLines[nNum] == rNewHelpLine) return; bool bNeedRedraw = true; - if (aHelpLines[nNum].GetKind()==rNewHelpLine.GetKind()) { + if (m_aHelpLines[nNum].GetKind()==rNewHelpLine.GetKind()) { switch (rNewHelpLine.GetKind()) { - case SdrHelpLineKind::Vertical : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw = false; break; - case SdrHelpLineKind::Horizontal: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw = false; break; + case SdrHelpLineKind::Vertical : if (m_aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw = false; break; + case SdrHelpLineKind::Horizontal: if (m_aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw = false; break; default: break; } // switch } if (bNeedRedraw) ImpInvalidateHelpLineArea(nNum); - aHelpLines[nNum]=rNewHelpLine; + m_aHelpLines[nNum]=rNewHelpLine; if (bNeedRedraw) ImpInvalidateHelpLineArea(nNum); } void SdrPageView::DeleteHelpLine(sal_uInt16 nNum) { - if (nNum<aHelpLines.GetCount()) { + if (nNum<m_aHelpLines.GetCount()) { ImpInvalidateHelpLineArea(nNum); - aHelpLines.Delete(nNum); + m_aHelpLines.Delete(nNum); } } void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL) { - sal_uInt16 nNum = aHelpLines.GetCount(); - aHelpLines.Insert(rHL,nNum); + sal_uInt16 nNum = m_aHelpLines.GetCount(); + m_aHelpLines.Insert(rHL,nNum); if (GetView().IsHlplVisible()) ImpInvalidateHelpLineArea(nNum); } @@ -722,13 +722,13 @@ void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL) // set current group and list void SdrPageView::SetCurrentGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList) { - if(pCurrentGroup != pNewGroup) + if(m_pCurrentGroup != pNewGroup) { - pCurrentGroup = pNewGroup; + m_pCurrentGroup = pNewGroup; } - if(pCurrentList != pNewList) + if(m_pCurrentList != pNewList) { - pCurrentList = pNewList; + m_pCurrentList = pNewList; } }