include/sfx2/viewsh.hxx                         |    8 ++---
 sd/source/ui/view/GraphicViewShellBase.cxx      |    4 +-
 sd/source/ui/view/ImpressViewShellBase.cxx      |    4 +-
 sd/source/ui/view/OutlineViewShellBase.cxx      |    4 +-
 sd/source/ui/view/PresentationViewShellBase.cxx |    4 +-
 sd/source/ui/view/SlideSorterViewShellBase.cxx  |    4 +-
 sw/source/uibase/inc/scroll.hxx                 |   16 +++++------
 sw/source/uibase/sidebar/PageStylesPanel.cxx    |   10 +++----
 sw/source/uibase/sidebar/PageStylesPanel.hxx    |    2 -
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx  |   32 +++++++++++-----------
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx  |   10 +++----
 sw/source/uibase/uiview/scroll.cxx              |   34 ++++++++++++------------
 12 files changed, 66 insertions(+), 66 deletions(-)

New commits:
commit 1cdff0363727327d3bf0e7d5eb105e867ba2d806
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Jan 31 09:24:26 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 31 17:25:31 2022 +0100

    sw: prefix members of SwPagePreview, SwScrollbar, ...
    
    ... sw::sidebar::PageStylesPanel and sw::sidebar::WrapPropertyPanel
    
    See tdf#94879 for motivation.
    
    Change-Id: I8eb8be59b9fad087fadb2735c46133aca4810415
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129199
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index d3faf93eadc3..c748d957d503 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -122,20 +122,20 @@ enum class LOKDeviceFormFactor
 class SfxViewFactory;
 #define SFX_DECL_VIEWFACTORY(Class) \
 private: \
-    static SfxViewFactory *pFactory; \
+    static SfxViewFactory *m_pFactory; \
 public: \
     static SfxViewShell  *CreateInstance(SfxViewFrame *pFrame, SfxViewShell 
*pOldView); \
     static void           RegisterFactory( SfxInterfaceId nPrio ); \
-    static SfxViewFactory*Factory() { return pFactory; } \
+    static SfxViewFactory*Factory() { return m_pFactory; } \
     static void           InitFactory()
 
 #define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
-    SfxViewFactory* Class::pFactory; \
+    SfxViewFactory* Class::m_pFactory; \
     SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell 
*pOldView) \
     { return new Class(pFrame, pOldView); } \
     void Class::RegisterFactory( SfxInterfaceId nPrio ) \
     { \
-        pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\
+        m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\
         InitFactory(); \
     } \
     void Class::InitFactory()
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx 
b/sd/source/ui/view/GraphicViewShellBase.cxx
index eab3a5c02fd3..95dbe71dc1e9 100644
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -33,7 +33,7 @@ namespace sd
 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
 // new GraphicViewShellBase object has been constructed.
 
-SfxViewFactory* GraphicViewShellBase::pFactory;
+SfxViewFactory* GraphicViewShellBase::m_pFactory;
 SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame* pFrame, 
SfxViewShell* pOldView)
 {
     GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView);
@@ -42,7 +42,7 @@ SfxViewShell* 
GraphicViewShellBase::CreateInstance(SfxViewFrame* pFrame, SfxView
 }
 void GraphicViewShellBase::RegisterFactory(SfxInterfaceId nPrio)
 {
-    pFactory = new SfxViewFactory(&CreateInstance, nPrio, "Default");
+    m_pFactory = new SfxViewFactory(&CreateInstance, nPrio, "Default");
     InitFactory();
 }
 void GraphicViewShellBase::InitFactory() { 
SFX_VIEW_REGISTRATION(GraphicDocShell); }
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx 
b/sd/source/ui/view/ImpressViewShellBase.cxx
index 37fa4000fe99..047b06e8f4ec 100644
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -36,7 +36,7 @@ namespace sd {
 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
 // new ImpressViewShellBase object has been constructed.
 
-SfxViewFactory* ImpressViewShellBase::pFactory;
+SfxViewFactory* ImpressViewShellBase::m_pFactory;
 SfxViewShell* ImpressViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -46,7 +46,7 @@ SfxViewShell* ImpressViewShellBase::CreateInstance (
 }
 void ImpressViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
+    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
     InitFactory();
 }
 void ImpressViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx 
b/sd/source/ui/view/OutlineViewShellBase.cxx
index 59e6be4ed220..2e566e5c7d48 100644
--- a/sd/source/ui/view/OutlineViewShellBase.cxx
+++ b/sd/source/ui/view/OutlineViewShellBase.cxx
@@ -32,7 +32,7 @@ class DrawDocShell;
 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
 // new OutlineViewShellBase object has been constructed.
 
-SfxViewFactory* OutlineViewShellBase::pFactory;
+SfxViewFactory* OutlineViewShellBase::m_pFactory;
 SfxViewShell* OutlineViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -42,7 +42,7 @@ SfxViewShell* OutlineViewShellBase::CreateInstance (
 }
 void OutlineViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Outline");
+    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Outline");
     InitFactory();
 }
 void OutlineViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx 
b/sd/source/ui/view/PresentationViewShellBase.cxx
index 1d73a4bea974..57393ac07060 100644
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -39,7 +39,7 @@ class DrawDocShell;
 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
 // new PresentationViewShellBase object has been constructed.
 
-SfxViewFactory* PresentationViewShellBase::pFactory;
+SfxViewFactory* PresentationViewShellBase::m_pFactory;
 SfxViewShell* PresentationViewShellBase::CreateInstance (
     SfxViewFrame *_pFrame, SfxViewShell *pOldView)
 {
@@ -50,7 +50,7 @@ SfxViewShell* PresentationViewShellBase::CreateInstance (
 }
 void PresentationViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    pFactory = new SfxViewFactory(
+    m_pFactory = new SfxViewFactory(
         &CreateInstance,nPrio,"FullScreenPresentation");
     InitFactory();
 }
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx 
b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index a4aff567350e..3d56ab5fed78 100644
--- a/sd/source/ui/view/SlideSorterViewShellBase.cxx
+++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx
@@ -32,7 +32,7 @@ class DrawDocShell;
 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
 // new SlideSorterViewShellBase object has been constructed.
 
-SfxViewFactory* SlideSorterViewShellBase::pFactory;
+SfxViewFactory* SlideSorterViewShellBase::m_pFactory;
 SfxViewShell* SlideSorterViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -43,7 +43,7 @@ SfxViewShell* SlideSorterViewShellBase::CreateInstance (
 
 void SlideSorterViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    pFactory = new SfxViewFactory(&CreateInstance,nPrio,"SlideSorter");
+    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"SlideSorter");
     InitFactory();
 }
 
diff --git a/sw/source/uibase/inc/scroll.hxx b/sw/source/uibase/inc/scroll.hxx
index 6a532b0ed28d..8527e796966e 100644
--- a/sw/source/uibase/inc/scroll.hxx
+++ b/sw/source/uibase/inc/scroll.hxx
@@ -22,11 +22,11 @@
 
 class SwScrollbar final : public ScrollBar
 {
-    Size    aDocSz;
-    bool    bHori       :1;     // horizontal = salTrue, otherwise vertical
-    bool    bAuto       :1;     // for scrolling mode
-    bool    bVisible    :1;     // show/hide should only set this flag
-    bool    bSizeSet    :1;     // was the size already set?
+    Size    m_aDocSz;
+    bool    m_bHori       :1;     // horizontal = salTrue, otherwise vertical
+    bool    m_bAuto       :1;     // for scrolling mode
+    bool    m_bVisible    :1;     // show/hide should only set this flag
+    bool    m_bSizeSet    :1;     // was the size already set?
 
     void    AutoShow();
 
@@ -36,17 +36,17 @@ class SwScrollbar final : public ScrollBar
 public:
     void    ExtendedShow( bool bVisible = true );
     void    SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) 
override;
-    bool    IsVisible(bool bReal) const { return bReal ? 
ScrollBar::IsVisible() : bVisible; }
+    bool    IsVisible(bool bReal) const { return bReal ? 
ScrollBar::IsVisible() : m_bVisible; }
 
         // changing of document size
     void    DocSzChgd(const Size &rNewSize);
         // changing of visible region
     void    ViewPortChgd(const tools::Rectangle &rRectangle);
         // what is it??
-    bool    IsHoriScroll() const { return bHori; }
+    bool    IsHoriScroll() const { return m_bHori; }
 
     void    SetAuto(bool bSet);
-    bool    IsAuto() const { return bAuto;}
+    bool    IsAuto() const { return m_bAuto;}
 
     SwScrollbar(vcl::Window *pParent, bool bHori );
     virtual ~SwScrollbar() override;
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx 
b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 114349ba194d..c0e1e89b43e0 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -139,7 +139,7 @@ void PageStylesPanel::Initialize()
 {
     SvxFillTypeBox::Fill(*mxBgFillType);
 
-    aCustomEntry = mxCustomEntry->get_label();
+    m_aCustomEntry = mxCustomEntry->get_label();
     mpBindings->Invalidate(SID_ATTR_PAGE_COLUMN);
     mpBindings->Invalidate(SID_ATTR_PAGE);
     mpBindings->Invalidate(SID_ATTR_PAGE_FILLSTYLE);
@@ -330,15 +330,15 @@ void PageStylesPanel::NotifyItemUpdate(
                 if(mpPageColumnItem->GetValue() <= 5)
                 {
                     mxColumnCount->set_active(mpPageColumnItem->GetValue() - 
1);
-                    int nIndex = mxColumnCount->find_text(aCustomEntry);
+                    int nIndex = mxColumnCount->find_text(m_aCustomEntry);
                     if (nIndex != -1)
                         mxColumnCount->remove(nIndex);
                 }
                 else
                 {
-                    if (mxColumnCount->find_text(aCustomEntry) == -1)
-                        mxColumnCount->append_text(aCustomEntry);
-                    mxColumnCount->set_active_text(aCustomEntry);
+                    if (mxColumnCount->find_text(m_aCustomEntry) == -1)
+                        mxColumnCount->append_text(m_aCustomEntry);
+                    mxColumnCount->set_active_text(m_aCustomEntry);
                 }
             }
         }
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx 
b/sw/source/uibase/sidebar/PageStylesPanel.hxx
index 6047d2535666..d39d2a073e67 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.hxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx
@@ -88,7 +88,7 @@ private:
     std::unique_ptr<SvxPageNumberListBox> mxNumberSelectLB;
     std::unique_ptr<weld::ComboBox> mxBgFillType;
     std::unique_ptr<weld::Label> mxCustomEntry;
-    OUString aCustomEntry;
+    OUString m_aCustomEntry;
 
     void Initialize();
     void Update();
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx 
b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index c45b0a6078ab..45cf0e61f646 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -55,12 +55,12 @@ WrapPropertyPanel::WrapPropertyPanel(
     : PanelLayout(pParent, "WrapPropertyPanel", 
"modules/swriter/ui/sidebarwrap.ui")
     , mpBindings(pBindings)
     // spacing
-    , nTop(0)
-    , nBottom(0)
-    , nLeft(0)
-    , nRight(0)
+    , m_nTop(0)
+    , m_nBottom(0)
+    , m_nLeft(0)
+    , m_nRight(0)
     // resources
-    , aCustomEntry(SwResId(STR_WRAP_PANEL_CUSTOM_STR))
+    , m_aCustomEntry(SwResId(STR_WRAP_PANEL_CUSTOM_STR))
     // controller items
     , maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
     , maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
@@ -94,15 +94,15 @@ void WrapPropertyPanel::Initialize()
 
 void WrapPropertyPanel::UpdateSpacingLB()
 {
-    if( (nLeft == nRight) && (nTop == nBottom) && (nLeft == nTop) )
+    if( (m_nLeft == m_nRight) && (m_nTop == m_nBottom) && (m_nLeft == m_nTop) )
     {
         sal_Int32 nCount = mxSpacingLB->get_count();
         for (sal_Int32 i = 0; i < nCount; i++)
         {
-            if (mxSpacingLB->get_id(i).toUInt32() == nLeft)
+            if (mxSpacingLB->get_id(i).toUInt32() == m_nLeft)
             {
                 mxSpacingLB->set_active(i);
-                int nCustomEntry = mxSpacingLB->find_text(aCustomEntry);
+                int nCustomEntry = mxSpacingLB->find_text(m_aCustomEntry);
                 if (nCustomEntry != -1)
                     mxSpacingLB->remove(nCustomEntry);
                 return;
@@ -110,9 +110,9 @@ void WrapPropertyPanel::UpdateSpacingLB()
         }
     }
 
-    if (mxSpacingLB->find_text(aCustomEntry) == -1)
-        mxSpacingLB->append_text(aCustomEntry);
-    mxSpacingLB->set_active_text(aCustomEntry);
+    if (mxSpacingLB->find_text(m_aCustomEntry) == -1)
+        mxSpacingLB->append_text(m_aCustomEntry);
+    mxSpacingLB->set_active_text(m_aCustomEntry);
 }
 
 IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, weld::ComboBox&, rBox, void)
@@ -122,7 +122,7 @@ IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, weld::ComboBox&, 
rBox, void)
     SvxLRSpaceItem aLRItem(nVal, nVal, 0, 0, RES_LR_SPACE);
     SvxULSpaceItem aULItem(nVal, nVal, RES_UL_SPACE);
 
-    nTop = nBottom = nLeft = nRight = nVal;
+    m_nTop = m_nBottom = m_nLeft = m_nRight = nVal;
     mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_LRSPACE,
             SfxCallMode::RECORD, { &aLRItem });
     mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_ULSPACE,
@@ -143,8 +143,8 @@ void WrapPropertyPanel::NotifyItemUpdate(
                 const SvxLRSpaceItem* pItem = dynamic_cast< const 
SvxLRSpaceItem* >(pState);
                 if(pItem)
                 {
-                    nLeft = pItem->GetLeft();
-                    nRight = pItem->GetRight();
+                    m_nLeft = pItem->GetLeft();
+                    m_nRight = pItem->GetRight();
 
                     UpdateSpacingLB();
                 }
@@ -158,8 +158,8 @@ void WrapPropertyPanel::NotifyItemUpdate(
                 const SvxULSpaceItem* pItem = dynamic_cast< const 
SvxULSpaceItem* >(pState);
                 if(pItem)
                 {
-                    nTop = pItem->GetUpper();
-                    nBottom = pItem->GetLower();
+                    m_nTop = pItem->GetUpper();
+                    m_nBottom = pItem->GetLower();
 
                     UpdateSpacingLB();
                 }
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx 
b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index 319085513e1b..d81cf71c97d0 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -57,13 +57,13 @@ namespace sw::sidebar {
         SfxBindings* mpBindings;
 
         //Spacing
-        sal_uInt16 nTop;
-        sal_uInt16 nBottom;
-        sal_uInt16 nLeft;
-        sal_uInt16 nRight;
+        sal_uInt16 m_nTop;
+        sal_uInt16 m_nBottom;
+        sal_uInt16 m_nLeft;
+        sal_uInt16 m_nRight;
 
         //custom entry
-        OUString aCustomEntry;
+        OUString m_aCustomEntry;
 
         // Controller Items
         ::sfx2::sidebar::ControllerItem maSwLRSpacingControl;
diff --git a/sw/source/uibase/uiview/scroll.cxx 
b/sw/source/uibase/uiview/scroll.cxx
index 1bd4bd1e9338..a277a5972276 100644
--- a/sw/source/uibase/uiview/scroll.cxx
+++ b/sw/source/uibase/uiview/scroll.cxx
@@ -24,10 +24,10 @@
 SwScrollbar::SwScrollbar( vcl::Window *pWin, bool bHoriz ) :
     ScrollBar( pWin,
     WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL)  ) ),
-    bHori( bHoriz ),
-    bAuto( false ),
-    bVisible(false),
-    bSizeSet(false)
+    m_bHori( bHoriz ),
+    m_bAuto( false ),
+    m_bVisible(false),
+    m_bSizeSet(false)
 {
     // No mirroring for horizontal scrollbars
     if( bHoriz )
@@ -41,8 +41,8 @@ SwScrollbar::SwScrollbar( vcl::Window *pWin, bool bHoriz ) :
 
 void SwScrollbar::DocSzChgd( const Size &rSize )
 {
-    aDocSz = rSize;
-    SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
+    m_aDocSz = rSize;
+    SetRange( Range( 0, m_bHori ? rSize.Width() : rSize.Height()) );
     const sal_uLong nVisSize = GetVisibleSize();
     SetLineSize( SCROLL_LINE_SIZE );
     SetPageSize( nVisSize * 77 / 100 );
@@ -53,7 +53,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
 void SwScrollbar::ViewPortChgd( const tools::Rectangle &rRect )
 {
     tools::Long nThumb, nVisible;
-    if( bHori )
+    if( m_bHori )
     {
         nThumb = rRect.Left();
         nVisible = rRect.GetWidth();
@@ -65,38 +65,38 @@ void SwScrollbar::ViewPortChgd( const tools::Rectangle 
&rRect )
     }
 
     SetVisibleSize( nVisible );
-    DocSzChgd(aDocSz);
+    DocSzChgd(m_aDocSz);
     SetThumbPos( nThumb );
-    if(bAuto)
+    if(m_bAuto)
         AutoShow();
 }
 
 void SwScrollbar::ExtendedShow( bool bSet )
 {
-    bVisible = bSet;
-    if( (!bSet ||  !bAuto) && IsUpdateMode() && bSizeSet)
+    m_bVisible = bSet;
+    if( (!bSet ||  !m_bAuto) && IsUpdateMode() && m_bSizeSet)
         ScrollBar::Show(bSet);
 }
 
 void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
 {
     ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
-    bSizeSet = true;
-    if(bVisible)
+    m_bSizeSet = true;
+    if(m_bVisible)
         ExtendedShow();
 
 }
 
 void SwScrollbar::SetAuto(bool bSet)
 {
-    if(bAuto != bSet)
+    if(m_bAuto != bSet)
     {
-        bAuto = bSet;
+        m_bAuto = bSet;
 
         // hide automatically - then show
-        if(!bAuto && bVisible && !ScrollBar::IsVisible())
+        if(!m_bAuto && m_bVisible && !ScrollBar::IsVisible())
             ExtendedShow();
-        else if(bAuto)
+        else if(m_bAuto)
             AutoShow(); // or hide automatically
     }
 }

Reply via email to