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/uivwimp.hxx                |   28 ++++++++--------
 sw/source/uibase/uiview/uivwimp.cxx             |   42 ++++++++++++------------
 8 files changed, 49 insertions(+), 49 deletions(-)

New commits:
commit b78ef5d55b891d8f6788ac53adfab0087d49c7be
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu Feb 3 20:08:41 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Feb 4 08:18:44 2022 +0100

    sw: prefix members of SwClipboardChangeListener, SwPagePreview, ...
    
    ... SwScannerEventListener and SwView_Impl
    
    See tdf#94879 for motivation.
    
    Change-Id: I19958bc70e7dd80ea3f1c75e06b9ac192d40f254
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129472
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index c748d957d503..ea7d966c8cc7 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 *m_pFactory; \
+    static SfxViewFactory *s_pFactory; \
 public: \
     static SfxViewShell  *CreateInstance(SfxViewFrame *pFrame, SfxViewShell 
*pOldView); \
     static void           RegisterFactory( SfxInterfaceId nPrio ); \
-    static SfxViewFactory*Factory() { return m_pFactory; } \
+    static SfxViewFactory*Factory() { return s_pFactory; } \
     static void           InitFactory()
 
 #define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
-    SfxViewFactory* Class::m_pFactory; \
+    SfxViewFactory* Class::s_pFactory; \
     SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell 
*pOldView) \
     { return new Class(pFrame, pOldView); } \
     void Class::RegisterFactory( SfxInterfaceId nPrio ) \
     { \
-        m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\
+        s_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 95dbe71dc1e9..d58c8a0d2479 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::m_pFactory;
+SfxViewFactory* GraphicViewShellBase::s_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)
 {
-    m_pFactory = new SfxViewFactory(&CreateInstance, nPrio, "Default");
+    s_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 047b06e8f4ec..96b0b5aa9154 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::m_pFactory;
+SfxViewFactory* ImpressViewShellBase::s_pFactory;
 SfxViewShell* ImpressViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -46,7 +46,7 @@ SfxViewShell* ImpressViewShellBase::CreateInstance (
 }
 void ImpressViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
+    s_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 2e566e5c7d48..8da1bcbcae08 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::m_pFactory;
+SfxViewFactory* OutlineViewShellBase::s_pFactory;
 SfxViewShell* OutlineViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -42,7 +42,7 @@ SfxViewShell* OutlineViewShellBase::CreateInstance (
 }
 void OutlineViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Outline");
+    s_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 57393ac07060..56f6c27fc20b 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::m_pFactory;
+SfxViewFactory* PresentationViewShellBase::s_pFactory;
 SfxViewShell* PresentationViewShellBase::CreateInstance (
     SfxViewFrame *_pFrame, SfxViewShell *pOldView)
 {
@@ -50,7 +50,7 @@ SfxViewShell* PresentationViewShellBase::CreateInstance (
 }
 void PresentationViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    m_pFactory = new SfxViewFactory(
+    s_pFactory = new SfxViewFactory(
         &CreateInstance,nPrio,"FullScreenPresentation");
     InitFactory();
 }
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx 
b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index 3d56ab5fed78..ecf679c981f2 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::m_pFactory;
+SfxViewFactory* SlideSorterViewShellBase::s_pFactory;
 SfxViewShell* SlideSorterViewShellBase::CreateInstance (
     SfxViewFrame *pFrame, SfxViewShell *pOldView)
 {
@@ -43,7 +43,7 @@ SfxViewShell* SlideSorterViewShellBase::CreateInstance (
 
 void SlideSorterViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
 {
-    m_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"SlideSorter");
+    s_pFactory = new SfxViewFactory(&CreateInstance,nPrio,"SlideSorter");
     InitFactory();
 }
 
diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx
index 1b407b73e2dd..1cb5fd6590ed 100644
--- a/sw/source/uibase/inc/uivwimp.hxx
+++ b/sw/source/uibase/inc/uivwimp.hxx
@@ -45,25 +45,25 @@ namespace com::sun::star {
 class SwScannerEventListener final : public ::cppu::WeakImplHelper<
     css::lang::XEventListener >
 {
-    SwView* pView;
+    SwView* m_pView;
 
 public:
 
-    SwScannerEventListener( SwView& rView ) : pView( &rView )  {}
+    SwScannerEventListener( SwView& rView ) : m_pView( &rView )  {}
     virtual ~SwScannerEventListener() override;
 
     // XEventListener
     virtual void SAL_CALL disposing(
                     const css::lang::EventObject& rEventObject ) override;
 
-    void ViewDestroyed() { pView = nullptr; }
+    void ViewDestroyed() { m_pView = nullptr; }
 };
 
 // Clipboard EventListener
 class SwClipboardChangeListener final : public ::cppu::WeakImplHelper<
     css::datatransfer::clipboard::XClipboardListener >
 {
-    SwView* pView;
+    SwView* m_pView;
 
     // XEventListener
     virtual void SAL_CALL disposing( const css::lang::EventObject& 
rEventObject ) override;
@@ -72,10 +72,10 @@ class SwClipboardChangeListener final : public 
::cppu::WeakImplHelper<
     virtual void SAL_CALL changedContents( const 
css::datatransfer::clipboard::ClipboardEvent& rEventObject ) override;
 
 public:
-    SwClipboardChangeListener( SwView& rView ) : pView( &rView ) {}
+    SwClipboardChangeListener( SwView& rView ) : m_pView( &rView ) {}
     virtual ~SwClipboardChangeListener() override;
 
-    void ViewDestroyed() { pView = nullptr; }
+    void ViewDestroyed() { m_pView = nullptr; }
 
     void AddRemoveListener( bool bAdd );
 };
@@ -84,23 +84,23 @@ class SwMailMergeConfigItem;
 
 class SwView_Impl
 {
-    css::uno::Reference< css::frame::XDispatchProviderInterceptor >   
xDisProvInterceptor;
+    css::uno::Reference< css::frame::XDispatchProviderInterceptor >   
m_xDispatchProviderInterceptor;
     css::uno::Reference< css::view::XSelectionSupplier >              
mxXTextView;       // UNO object
     std::vector< css::uno::WeakReference< css::lang::XUnoTunnel > > 
mxTransferables;
 
     // temporary document for printing text of selection / multi selection
     // in PDF export.
-    SfxObjectShellLock          xTmpSelDocSh;
+    SfxObjectShellLock          m_xTmpSelDocShell;
 
-    SwView*                     pView;
+    SwView*                     m_pView;
     rtl::Reference<SwScannerEventListener>
                                 mxScanEvtLstnr;
     rtl::Reference<SwClipboardChangeListener>
                                 mxClipEvtLstnr;
-    ShellMode                   eShellMode;
+    ShellMode                   m_eShellMode;
 
     std::shared_ptr<SwMailMergeConfigItem>
-                                xConfigItem;
+                                m_xConfigItem;
 
     std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter;
     std::unique_ptr<SfxRequest>             m_pRequest;
@@ -123,7 +123,7 @@ public:
     SwXTextView*                    GetUNOObject_Impl();
     void                            Invalidate();
 
-    ShellMode                       GetShellMode() const {return eShellMode;}
+    ShellMode                       GetShellMode() const {return m_eShellMode;}
 
     void                            ExecuteScan(SfxRequest& rReq);
     SwScannerEventListener&         GetScannerEventListener();
@@ -134,9 +134,9 @@ public:
 
     void SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & 
rItem)
     {
-        xConfigItem = rItem;
+        m_xConfigItem = rItem;
     }
-    std::shared_ptr<SwMailMergeConfigItem> const & GetMailMergeConfigItem() 
const {return xConfigItem;}
+    std::shared_ptr<SwMailMergeConfigItem> const & GetMailMergeConfigItem() 
const {return m_xConfigItem;}
 
     //#i33307# restore editing position
     void                    SetRestorePosition(const Point& rCursorPos, bool 
bSelectObj)
diff --git a/sw/source/uibase/uiview/uivwimp.cxx 
b/sw/source/uibase/uiview/uivwimp.cxx
index b8eb61ea6c1a..cea09ed3b5ba 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -49,19 +49,19 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::datatransfer::clipboard;
 
 SwView_Impl::SwView_Impl(SwView* pShell)
-    : pView(pShell)
-    , eShellMode(ShellMode::Text)
+    : m_pView(pShell)
+    , m_eShellMode(ShellMode::Text)
     , m_nParam(0)
     , m_bSelectObject(false)
     , m_bEditingPositionSet(false)
 {
-    mxXTextView = new SwXTextView(pView);
-    xDisProvInterceptor = new SwXDispatchProviderInterceptor(*pView);
+    mxXTextView = new SwXTextView(m_pView);
+    m_xDispatchProviderInterceptor = new 
SwXDispatchProviderInterceptor(*m_pView);
 }
 
 SwView_Impl::~SwView_Impl()
 {
-    auto pInterceptor = 
comphelper::getFromUnoTunnel<SwXDispatchProviderInterceptor>(xDisProvInterceptor);
+    auto pInterceptor = 
comphelper::getFromUnoTunnel<SwXDispatchProviderInterceptor>(m_xDispatchProviderInterceptor);
     if(pInterceptor)
         pInterceptor->Invalidate();
     view::XSelectionSupplier* pTextView = mxXTextView.get();
@@ -75,7 +75,7 @@ SwView_Impl::~SwView_Impl()
         mxClipEvtLstnr->ViewDestroyed();
     }
 #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
-    xConfigItem.reset();
+    m_xConfigItem.reset();
 #endif
     m_pDocInserter.reset();
     m_pRequest.reset();
@@ -83,7 +83,7 @@ SwView_Impl::~SwView_Impl()
 
 void SwView_Impl::SetShellMode(ShellMode eSet)
 {
-    eShellMode = eSet;
+    m_eShellMode = eSet;
 }
 
 view::XSelectionSupplier*   SwView_Impl::GetUNOObject()
@@ -182,7 +182,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
             else
             {
                 rReq.Done();
-                SfxBindings& rBind = pView->GetViewFrame()->GetBindings();
+                SfxBindings& rBind = m_pView->GetViewFrame()->GetBindings();
                 rBind.Invalidate( SID_TWAIN_SELECT );
                 rBind.Invalidate( SID_TWAIN_TRANSFER );
             }
@@ -194,7 +194,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
 SwScannerEventListener& SwView_Impl::GetScannerEventListener()
 {
     if(!mxScanEvtLstnr.is())
-        mxScanEvtLstnr = new SwScannerEventListener(*pView);
+        mxScanEvtLstnr = new SwScannerEventListener(*m_pView);
     return *mxScanEvtLstnr;
 }
 
@@ -202,7 +202,7 @@ void SwView_Impl::AddClipboardListener()
 {
     if(!mxClipEvtLstnr.is())
     {
-        mxClipEvtLstnr = new SwClipboardChangeListener( *pView );
+        mxClipEvtLstnr = new SwClipboardChangeListener( *m_pView );
         mxClipEvtLstnr->AddRemoveListener( true );
     }
 }
@@ -254,7 +254,7 @@ void SwView_Impl::StartDocumentInserter(
             break;
     }
 
-    m_pDocInserter.reset(new ::sfx2::DocumentInserter(pView->GetFrameWeld(), 
rFactory, mode));
+    m_pDocInserter.reset(new ::sfx2::DocumentInserter(m_pView->GetFrameWeld(), 
rFactory, mode));
     m_pDocInserter->StartExecuteModal( rEndDialogHdl );
 }
 
@@ -276,8 +276,8 @@ void SAL_CALL SwScannerEventListener::disposing( const 
EventObject& /*rEventObje
 {
 #if defined(_WIN32) || defined UNX
     SolarMutexGuard aGuard;
-    if( pView )
-        pView->ScannerEventHdl();
+    if( m_pView )
+        m_pView->ScannerEventHdl();
 #endif
 }
 
@@ -288,29 +288,29 @@ SwClipboardChangeListener::~SwClipboardChangeListener()
 void SAL_CALL SwClipboardChangeListener::disposing( const EventObject& 
/*rEventObject*/ )
 {
     SolarMutexGuard aGuard;
-    pView = nullptr; // so we don't touch the view if changedContents somehow 
fires afterwards
+    m_pView = nullptr; // so we don't touch the view if changedContents 
somehow fires afterwards
 }
 
 void SAL_CALL SwClipboardChangeListener::changedContents( const 
css::datatransfer::clipboard::ClipboardEvent& rEventObject )
 
 {
     const SolarMutexGuard aGuard;
-    if( !pView )
+    if( !m_pView )
         return;
 
     {
         TransferableDataHelper aDataHelper( rEventObject.Contents );
-        SwWrtShell& rSh = pView->GetWrtShell();
+        SwWrtShell& rSh = m_pView->GetWrtShell();
 
-        pView->m_nLastPasteDestination = SwTransferable::GetSotDestination( 
rSh );
-        pView->m_bPasteState = aDataHelper.GetXTransferable().is() &&
+        m_pView->m_nLastPasteDestination = SwTransferable::GetSotDestination( 
rSh );
+        m_pView->m_bPasteState = aDataHelper.GetXTransferable().is() &&
                         SwTransferable::IsPaste( rSh, aDataHelper );
 
-        pView->m_bPasteSpecialState = aDataHelper.GetXTransferable().is() &&
+        m_pView->m_bPasteSpecialState = aDataHelper.GetXTransferable().is() &&
                     SwTransferable::IsPasteSpecial( rSh, aDataHelper );
     }
 
-    SfxBindings& rBind = pView->GetViewFrame()->GetBindings();
+    SfxBindings& rBind = m_pView->GetViewFrame()->GetBindings();
     rBind.Invalidate( SID_PASTE );
     rBind.Invalidate( SID_PASTE_SPECIAL );
     rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
@@ -318,7 +318,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( 
const css::datatransfe
 
 void SwClipboardChangeListener::AddRemoveListener( bool bAdd )
 {
-    pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this 
), bAdd );
+    m_pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this 
), bAdd );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to