summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basidesh.cxx4
-rw-r--r--basctl/source/inc/basidesh.hxx2
-rw-r--r--include/sfx2/viewfac.hxx4
-rw-r--r--include/sfx2/viewsh.hxx8
-rw-r--r--sc/source/ui/inc/prevwsh.hxx3
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx3
-rw-r--r--sc/source/ui/view/prevwsh.cxx10
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx9
-rw-r--r--sd/source/ui/inc/GraphicViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/ImpressViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/OutlineViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/PresentationViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/SlideSorterViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx2
-rw-r--r--sd/source/ui/view/GraphicViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/ImpressViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/OutlineViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/PresentationViewShellBase.cxx10
-rw-r--r--sd/source/ui/view/SlideSorterViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx10
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
-rw-r--r--sfx2/source/view/viewfac.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx12
-rw-r--r--starmath/inc/view.hxx2
-rw-r--r--starmath/source/view.cxx6
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/srcview.hxx2
-rw-r--r--sw/source/uibase/inc/wview.hxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx10
-rw-r--r--sw/source/uibase/uiview/srcview.cxx6
-rw-r--r--sw/source/uibase/uiview/view.cxx8
-rw-r--r--sw/source/uibase/web/wview.cxx4
33 files changed, 84 insertions, 87 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index ae61007c7bf8..0c3c5bb16de7 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -161,8 +161,8 @@ void basctl_Shell::InitInterface_Impl()
unsigned Shell::nShellCount = 0;
-Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) :
- SfxViewShell( pFrame_, SfxViewShellFlags::NO_NEWWINDOW ),
+Shell::Shell( SfxViewFrame& rFrame_, SfxViewShell* /* pOldShell */ ) :
+ SfxViewShell( rFrame_, SfxViewShellFlags::NO_NEWWINDOW ),
m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
aHScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame()->GetWindow(), true) ),
aVScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame()->GetWindow(), false) ),
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 7c8779d62d12..f907abe6f214 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -156,7 +156,7 @@ private:
static void InitInterface_Impl();
public:
- Shell( SfxViewFrame *pFrame, SfxViewShell *pOldSh );
+ Shell(SfxViewFrame& rFrame, SfxViewShell *pOldSh);
virtual ~Shell() override;
BaseWindow* GetCurWindow() const { return pCurWin; }
diff --git a/include/sfx2/viewfac.hxx b/include/sfx2/viewfac.hxx
index efd511ea2b3d..c09791216f0e 100644
--- a/include/sfx2/viewfac.hxx
+++ b/include/sfx2/viewfac.hxx
@@ -27,7 +27,7 @@
class SfxViewFrame;
class SfxViewShell;
-typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame*, SfxViewShell*);
+typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame&, SfxViewShell*);
// CLASS -----------------------------------------------------------------
class SFX2_DLLPUBLIC SfxViewFactory
@@ -36,7 +36,7 @@ public:
SfxViewFactory( SfxViewCtor fnC,
SfxInterfaceId nOrdinal, const char* asciiViewName );
- SfxViewShell* CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
+ SfxViewShell* CreateInstance(SfxViewFrame& rViewFrame, SfxViewShell *pOldSh);
SfxInterfaceId GetOrdinal() const { return nOrd; }
/// returns a legacy view name. This is "view" with an appended ordinal/ID.
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index a948f0f5baea..1e70f8301bda 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -128,15 +128,15 @@ class SfxViewFactory;
private: \
static SfxViewFactory *s_pFactory; \
public: \
- static SfxViewShell *CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView); \
+ static SfxViewShell *CreateInstance(SfxViewFrame& rFrame, SfxViewShell *pOldView); \
static void RegisterFactory( SfxInterfaceId nPrio ); \
static SfxViewFactory*Factory() { return s_pFactory; } \
static void InitFactory()
#define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
SfxViewFactory* Class::s_pFactory; \
- SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
- { return new Class(pFrame, pOldView); } \
+ SfxViewShell* Class::CreateInstance(SfxViewFrame& rFrame, SfxViewShell *pOldView) \
+ { return new Class(rFrame, pOldView); } \
void Class::RegisterFactory( SfxInterfaceId nPrio ) \
{ \
s_pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\
@@ -211,7 +211,7 @@ private:
public:
- SfxViewShell( SfxViewFrame *pFrame, SfxViewShellFlags nFlags );
+ SfxViewShell( SfxViewFrame& rFrame, SfxViewShellFlags nFlags );
virtual ~SfxViewShell() override;
SfxInPlaceClient* GetIPClient() const;
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index c1260a7dbb0d..5c2a37c4a519 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -84,8 +84,7 @@ private:
static void InitInterface_Impl();
public:
- ScPreviewShell( SfxViewFrame* pViewFrame,
- SfxViewShell* pOldSh );
+ ScPreviewShell(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh);
virtual ~ScPreviewShell() override;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index a1688fb11f83..31709a47c16a 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -225,8 +225,7 @@ private:
public:
/** -> Clone Method for Factory
Created from a general shell and inherit as much as possible */
- ScTabViewShell( SfxViewFrame* pViewFrame,
- SfxViewShell* pOldSh );
+ ScTabViewShell(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh);
virtual ~ScTabViewShell() override;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 5ae90d6be22a..a35122cbfad5 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -143,17 +143,17 @@ void ScPreviewShell::Construct( vcl::Window* pParent )
SetName("Preview");
}
-ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
- SfxViewShell* pOldSh ) :
- SfxViewShell( pViewFrame, SfxViewShellFlags::HAS_PRINTOPTIONS ),
- pDocShell( static_cast<ScDocShell*>(pViewFrame->GetObjectShell()) ),
+ScPreviewShell::ScPreviewShell(SfxViewFrame& rViewFrame,
+ SfxViewShell* pOldSh) :
+ SfxViewShell(rViewFrame, SfxViewShellFlags::HAS_PRINTOPTIONS),
+ pDocShell( static_cast<ScDocShell*>(rViewFrame.GetObjectShell()) ),
mpFrameWindow(nullptr),
nSourceDesignMode( TRISTATE_INDET ),
nMaxVertPos(0),
nPrevHThumbPos(0),
nPrevVThumbPos(0)
{
- Construct( &pViewFrame->GetWindow() );
+ Construct(&rViewFrame.GetWindow());
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Printpreview));
if ( auto pTabViewShell = dynamic_cast<ScTabViewShell*>( pOldSh) )
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 63cbf1f2229a..43084c917971 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1130,8 +1130,7 @@ IMPL_LINK_NOARG(ScTabViewShell, SimpleRefClose, const OUString*, void)
static ScTabViewObj* lcl_GetViewObj( const ScTabViewShell& rShell )
{
ScTabViewObj* pRet = nullptr;
- SfxViewFrame* pViewFrame = rShell.GetViewFrame();
- if (pViewFrame)
+ if (SfxViewFrame* pViewFrame = rShell.GetViewFrame())
{
SfxFrame& rFrame = pViewFrame->GetFrame();
uno::Reference<frame::XController> xController = rFrame.GetController();
@@ -1690,10 +1689,10 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
SetBorderPixel( aBorder );
}
-ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
+ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame,
SfxViewShell* pOldSh ) :
- SfxViewShell( pViewFrame, SfxViewShellFlags::HAS_PRINTOPTIONS ),
- ScDBFunc( &pViewFrame->GetWindow(), static_cast<ScDocShell&>(*pViewFrame->GetObjectShell()), this ),
+ SfxViewShell(rViewFrame, SfxViewShellFlags::HAS_PRINTOPTIONS),
+ ScDBFunc( &rViewFrame.GetWindow(), static_cast<ScDocShell&>(*rViewFrame.GetObjectShell()), this ),
eCurOST(OST_NONE),
nDrawSfxId(0),
aTarget(this),
diff --git a/sd/source/ui/inc/GraphicViewShellBase.hxx b/sd/source/ui/inc/GraphicViewShellBase.hxx
index 89a96cf51887..ffec962fc844 100644
--- a/sd/source/ui/inc/GraphicViewShellBase.hxx
+++ b/sd/source/ui/inc/GraphicViewShellBase.hxx
@@ -34,7 +34,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- GraphicViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
+ GraphicViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell);
virtual ~GraphicViewShellBase() override;
/** Callback function for general slot calls.
diff --git a/sd/source/ui/inc/ImpressViewShellBase.hxx b/sd/source/ui/inc/ImpressViewShellBase.hxx
index 80070e7c8022..402013fa7ff9 100644
--- a/sd/source/ui/inc/ImpressViewShellBase.hxx
+++ b/sd/source/ui/inc/ImpressViewShellBase.hxx
@@ -34,7 +34,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- ImpressViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
+ ImpressViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell);
virtual ~ImpressViewShellBase() override;
/** Callback function for general slot calls.
diff --git a/sd/source/ui/inc/OutlineViewShellBase.hxx b/sd/source/ui/inc/OutlineViewShellBase.hxx
index 13527d80dc7d..96458bba1b87 100644
--- a/sd/source/ui/inc/OutlineViewShellBase.hxx
+++ b/sd/source/ui/inc/OutlineViewShellBase.hxx
@@ -34,7 +34,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- OutlineViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
+ OutlineViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell);
virtual ~OutlineViewShellBase() override;
};
diff --git a/sd/source/ui/inc/PresentationViewShellBase.hxx b/sd/source/ui/inc/PresentationViewShellBase.hxx
index 684e5ee6166e..d8779c4a5029 100644
--- a/sd/source/ui/inc/PresentationViewShellBase.hxx
+++ b/sd/source/ui/inc/PresentationViewShellBase.hxx
@@ -34,7 +34,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- PresentationViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
+ PresentationViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell);
virtual ~PresentationViewShellBase() override;
protected:
diff --git a/sd/source/ui/inc/SlideSorterViewShellBase.hxx b/sd/source/ui/inc/SlideSorterViewShellBase.hxx
index e1ca1b57b9d2..38bf64919881 100644
--- a/sd/source/ui/inc/SlideSorterViewShellBase.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShellBase.hxx
@@ -34,7 +34,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- SlideSorterViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
+ SlideSorterViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell);
virtual ~SlideSorterViewShellBase() override;
};
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 06b46514a487..ed80658d096c 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -67,7 +67,7 @@ public:
terminates and before doing anything else.
*/
ViewShellBase (
- SfxViewFrame *pFrame,
+ SfxViewFrame& rFrame,
SfxViewShell* pOldShell);
virtual ~ViewShellBase() override;
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index 98706271ebf9..a3f8ece26c11 100644
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -35,9 +35,9 @@ namespace sd
// new GraphicViewShellBase object has been constructed.
SfxViewFactory* GraphicViewShellBase::s_pFactory;
-SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame* pFrame, SfxViewShell* pOldView)
+SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame& rFrame, SfxViewShell* pOldView)
{
- GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView);
+ GraphicViewShellBase* pBase = new GraphicViewShellBase(rFrame, pOldView);
pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
return pBase;
}
@@ -48,8 +48,8 @@ void GraphicViewShellBase::RegisterFactory(SfxInterfaceId nPrio)
}
void GraphicViewShellBase::InitFactory() { SFX_VIEW_REGISTRATION(GraphicDocShell); }
-GraphicViewShellBase::GraphicViewShellBase(SfxViewFrame* _pFrame, SfxViewShell* pOldShell)
- : ViewShellBase(_pFrame, pOldShell)
+GraphicViewShellBase::GraphicViewShellBase(SfxViewFrame& _rFrame, SfxViewShell* pOldShell)
+ : ViewShellBase(_rFrame, pOldShell)
{
}
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx b/sd/source/ui/view/ImpressViewShellBase.cxx
index c28a00e7989d..929b607dbbdd 100644
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -39,9 +39,9 @@ namespace sd {
SfxViewFactory* ImpressViewShellBase::s_pFactory;
SfxViewShell* ImpressViewShellBase::CreateInstance (
- SfxViewFrame *pFrame, SfxViewShell *pOldView)
+ SfxViewFrame& rFrame, SfxViewShell *pOldView)
{
- ImpressViewShellBase* pBase = new ImpressViewShellBase(pFrame, pOldView);
+ ImpressViewShellBase* pBase = new ImpressViewShellBase(rFrame, pOldView);
pBase->LateInit(comphelper::LibreOfficeKit::isActive() ? framework::FrameworkHelper::msImpressViewURL : "");
return pBase;
}
@@ -56,9 +56,9 @@ void ImpressViewShellBase::InitFactory()
}
ImpressViewShellBase::ImpressViewShellBase (
- SfxViewFrame* _pFrame,
+ SfxViewFrame& _rFrame,
SfxViewShell* pOldShell)
- : ViewShellBase (_pFrame, pOldShell)
+ : ViewShellBase (_rFrame, pOldShell)
{
MasterPageObserver::Instance().RegisterDocument (*GetDocShell()->GetDoc());
}
diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx b/sd/source/ui/view/OutlineViewShellBase.cxx
index 8da1bcbcae08..e3efb3ed59d5 100644
--- a/sd/source/ui/view/OutlineViewShellBase.cxx
+++ b/sd/source/ui/view/OutlineViewShellBase.cxx
@@ -34,9 +34,9 @@ class DrawDocShell;
SfxViewFactory* OutlineViewShellBase::s_pFactory;
SfxViewShell* OutlineViewShellBase::CreateInstance (
- SfxViewFrame *pFrame, SfxViewShell *pOldView)
+ SfxViewFrame& rFrame, SfxViewShell *pOldView)
{
- OutlineViewShellBase* pBase = new OutlineViewShellBase(pFrame, pOldView);
+ OutlineViewShellBase* pBase = new OutlineViewShellBase(rFrame, pOldView);
pBase->LateInit(framework::FrameworkHelper::msOutlineViewURL);
return pBase;
}
@@ -51,9 +51,9 @@ void OutlineViewShellBase::InitFactory()
}
OutlineViewShellBase::OutlineViewShellBase (
- SfxViewFrame* _pFrame,
+ SfxViewFrame& _rFrame,
SfxViewShell* pOldShell)
- : ImpressViewShellBase (_pFrame, pOldShell)
+ : ImpressViewShellBase (_rFrame, pOldShell)
{
}
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index 5a0f13d75881..525c0813d9d6 100644
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -42,10 +42,10 @@ class DrawDocShell;
SfxViewFactory* PresentationViewShellBase::s_pFactory;
SfxViewShell* PresentationViewShellBase::CreateInstance (
- SfxViewFrame *_pFrame, SfxViewShell *pOldView)
+ SfxViewFrame& _rFrame, SfxViewShell *pOldView)
{
PresentationViewShellBase* pBase =
- new PresentationViewShellBase(_pFrame, pOldView);
+ new PresentationViewShellBase(_rFrame, pOldView);
pBase->LateInit(framework::FrameworkHelper::msPresentationViewURL);
return pBase;
}
@@ -61,13 +61,13 @@ void PresentationViewShellBase::InitFactory()
}
PresentationViewShellBase::PresentationViewShellBase (
- SfxViewFrame* _pFrame,
+ SfxViewFrame& _rFrame,
SfxViewShell* pOldShell)
- : ViewShellBase (_pFrame, pOldShell)
+ : ViewShellBase (_rFrame, pOldShell)
{
// Hide the automatic (non-context sensitive) tool bars.
Reference<beans::XPropertySet> xFrameSet (
- _pFrame->GetFrame().GetFrameInterface(),
+ _rFrame.GetFrame().GetFrameInterface(),
UNO_QUERY);
if (xFrameSet.is())
{
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index ecf679c981f2..3c5578e8a191 100644
--- a/sd/source/ui/view/SlideSorterViewShellBase.cxx
+++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx
@@ -34,9 +34,9 @@ class DrawDocShell;
SfxViewFactory* SlideSorterViewShellBase::s_pFactory;
SfxViewShell* SlideSorterViewShellBase::CreateInstance (
- SfxViewFrame *pFrame, SfxViewShell *pOldView)
+ SfxViewFrame& rFrame, SfxViewShell *pOldView)
{
- SlideSorterViewShellBase* pBase = new SlideSorterViewShellBase(pFrame, pOldView);
+ SlideSorterViewShellBase* pBase = new SlideSorterViewShellBase(rFrame, pOldView);
pBase->LateInit(framework::FrameworkHelper::msSlideSorterURL);
return pBase;
}
@@ -53,9 +53,9 @@ void SlideSorterViewShellBase::InitFactory()
}
SlideSorterViewShellBase::SlideSorterViewShellBase (
- SfxViewFrame* _pFrame,
+ SfxViewFrame& _rFrame,
SfxViewShell* pOldShell)
- : ImpressViewShellBase (_pFrame, pOldShell)
+ : ImpressViewShellBase (_rFrame, pOldShell)
{
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index a3a154ce0ee6..a4af703afb38 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -220,17 +220,17 @@ void ViewShellBase::InitInterface_Impl()
}
ViewShellBase::ViewShellBase (
- SfxViewFrame* _pFrame,
+ SfxViewFrame& _rFrame,
SfxViewShell*)
- : SfxViewShell (_pFrame, SfxViewShellFlags::HAS_PRINTOPTIONS),
+ : SfxViewShell(_rFrame, SfxViewShellFlags::HAS_PRINTOPTIONS),
mpDocShell (nullptr),
mpDocument (nullptr)
{
mpImpl.reset(new Implementation(*this));
- mpImpl->mpViewWindow = VclPtr<FocusForwardingWindow>::Create(_pFrame->GetWindow(),*this);
+ mpImpl->mpViewWindow = VclPtr<FocusForwardingWindow>::Create(_rFrame.GetWindow(),*this);
mpImpl->mpViewWindow->SetBackground(Wallpaper());
- _pFrame->GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
+ _rFrame.GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
// Set up the members in the correct order.
if (auto pDrawDocShell = dynamic_cast< DrawDocShell *>( GetViewFrame()->GetObjectShell() ))
@@ -242,7 +242,7 @@ ViewShellBase::ViewShellBase (
SetWindow(mpImpl->mpViewWindow.get());
// Hide the window to avoid complaints from Sfx...SwitchViewShell...
- _pFrame->GetWindow().Hide();
+ _rFrame.GetWindow().Hide();
}
/** In this destructor the order in which some of the members are destroyed
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index dcc559fc4f87..84797484d3a3 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -4262,11 +4262,11 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createViewController(
// determine the ViewFrame belonging to the given XFrame
SfxViewFrame* pViewFrame = FindOrCreateViewFrame_Impl( i_rFrame, aViewCreationGuard );
- SAL_WARN_IF( !pViewFrame , "sfx.doc", "SfxBaseModel::createViewController: no frame?" );
+ assert(pViewFrame && "SfxBaseModel::createViewController: no frame");
// delegate to SFX' view factory
pViewFrame->GetBindings().ENTERREGISTRATIONS();
- SfxViewShell* pViewShell = pViewFactory->CreateInstance( pViewFrame, pOldViewShell );
+ SfxViewShell* pViewShell = pViewFactory->CreateInstance(*pViewFrame, pOldViewShell);
pViewFrame->GetBindings().LEAVEREGISTRATIONS();
ENSURE_OR_THROW( pViewShell, "invalid view shell provided by factory" );
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index b83f4184725e..fbcb8c2c14f6 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -21,9 +21,9 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldSh )
+SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame& rFrame, SfxViewShell *pOldSh)
{
- return (*fnCreate)(pFrame, pOldSh);
+ return (*fnCreate)(rFrame, pOldSh);
}
OUString SfxViewFactory::GetLegacyViewName() const
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index cd4ffe676f2b..535784ea6300 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1054,14 +1054,14 @@ ViewShellDocId SfxViewShell::mnCurrentDocId(0);
SfxViewShell::SfxViewShell
(
- SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
+ SfxViewFrame& rViewFrame, /* <SfxViewFrame>, which will be
displayed in this View */
SfxViewShellFlags nFlags /* See <SfxViewShell-Flags> */
)
: SfxShell(this)
, pImpl( new SfxViewShell_Impl(nFlags, SfxViewShell::mnCurrentDocId) )
-, pFrame(pViewFrame)
+, pFrame(&rViewFrame)
, pWindow(nullptr)
, bNoNewWindow( nFlags & SfxViewShellFlags::NO_NEWWINDOW )
, mbPrinterSettingsModified(false)
@@ -1069,10 +1069,10 @@ SfxViewShell::SfxViewShell
, maLOKLocale(LANGUAGE_NONE)
, maLOKDeviceFormFactor(LOKDeviceFormFactor::UNKNOWN)
{
- SetMargin( pViewFrame->GetMargin_Impl() );
+ SetMargin( rViewFrame.GetMargin_Impl() );
- SetPool( &pViewFrame->GetObjectShell()->GetPool() );
- StartListening(*pViewFrame->GetObjectShell());
+ SetPool( &rViewFrame.GetObjectShell()->GetPool() );
+ StartListening(*rViewFrame.GetObjectShell());
// Insert into list
std::vector<SfxViewShell*> &rViewArr = SfxGetpApp()->GetViewShells_Impl();
@@ -1089,7 +1089,7 @@ SfxViewShell::SfxViewShell
maLOKDeviceFormFactor = SfxLokHelper::getDeviceFormFactor();
- vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow();
+ vcl::Window* pFrameWin = rViewFrame.GetWindow().GetFrameWindow();
if (pFrameWin && !pFrameWin->GetLOKNotifier())
pFrameWin->SetLOKNotifier(this, true);
}
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 41e28a44c3df..662923af0528 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -291,7 +291,7 @@ class SmViewShell final : public SfxViewShell
public:
- SmViewShell(SfxViewFrame *pFrame, SfxViewShell *pOldSh);
+ SmViewShell(SfxViewFrame& rFrame, SfxViewShell *pOldSh);
virtual ~SmViewShell() override;
SmDocShell * GetDoc() const
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 1b51c8b71a6e..055805c8cc20 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2193,10 +2193,10 @@ private:
};
}
-SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *)
- : SfxViewShell(pFrame_, SfxViewShellFlags::HAS_PRINTOPTIONS)
+SmViewShell::SmViewShell(SfxViewFrame& rFrame_, SfxViewShell *)
+ : SfxViewShell(rFrame_, SfxViewShellFlags::HAS_PRINTOPTIONS)
, mxGraphicWindow(VclPtr<SmGraphicWindow>::Create(*this))
- , maGraphicController(mxGraphicWindow->GetGraphicWidget(), SID_GRAPHIC_SM, pFrame_->GetBindings())
+ , maGraphicController(mxGraphicWindow->GetGraphicWidget(), SID_GRAPHIC_SM, rFrame_.GetBindings())
, mbPasteState(false)
, mbInsertIntoEditWindow(false)
{
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index c3ed0f5808d7..ff0099ace634 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -618,7 +618,7 @@ public:
//apply Accessibility options
void ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAccessibilityOptions);
- SwView(SfxViewFrame* pFrame, SfxViewShell*);
+ SwView(SfxViewFrame& rFrame, SfxViewShell*);
virtual ~SwView() override;
void NotifyDBChanged();
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index f37a55863bb8..af0f31d94788 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -293,7 +293,7 @@ public:
*/
void SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos );
- SwPagePreview( SfxViewFrame* pFrame, SfxViewShell* );
+ SwPagePreview(SfxViewFrame& rFrame, SfxViewShell*);
virtual ~SwPagePreview() override;
};
diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx
index caaecad67d6d..4b540aed2faa 100644
--- a/sw/source/uibase/inc/srcview.hxx
+++ b/sw/source/uibase/inc/srcview.hxx
@@ -56,7 +56,7 @@ private:
static void InitInterface_Impl();
public:
- SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
+ SwSrcView(SfxViewFrame& rFrame, SfxViewShell*);
virtual ~SwSrcView() override;
diff --git a/sw/source/uibase/inc/wview.hxx b/sw/source/uibase/inc/wview.hxx
index 1aa807b2ff21..90ce5af8940f 100644
--- a/sw/source/uibase/inc/wview.hxx
+++ b/sw/source/uibase/inc/wview.hxx
@@ -36,7 +36,7 @@ private:
static void InitInterface_Impl();
public:
- SwWebView(SfxViewFrame* pFrame, SfxViewShell*);
+ SwWebView(SfxViewFrame& rFrame, SfxViewShell*);
virtual ~SwWebView() override;
};
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 84c1cf06680c..fd16c5b90725 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1141,8 +1141,8 @@ void SwPagePreview::Init()
pESh->ResetModified();
}
-SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
- SfxViewShell( pViewFrame, SWVIEWFLAGS ),
+SwPagePreview::SwPagePreview(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh):
+ SfxViewShell(rViewFrame, SWVIEWFLAGS),
m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&GetViewFrame()->GetWindow(), *this ) ),
m_nNewPage(USHRT_MAX),
m_sPageStr(SwResId(STR_PAGE)),
@@ -1159,12 +1159,12 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Printpreview));
- SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
+ SfxObjectShell* pObjShell = rViewFrame.GetObjectShell();
if ( !pOldSh )
{
// Exists already a view on the document?
SfxViewFrame *pF = SfxViewFrame::GetFirst( pObjShell );
- if ( pF == pViewFrame )
+ if (pF == &rViewFrame)
pF = SfxViewFrame::GetNext( *pF, pObjShell );
if ( pF )
pOldSh = pF->GetViewShell();
@@ -1207,7 +1207,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pNew = new SwViewShell( *pVS, m_pViewWin, nullptr, VSHELLFLAG_ISPREVIEW );
else
pNew = new SwViewShell(
- *static_cast<SwDocShell*>(pViewFrame->GetObjectShell())->GetDoc(),
+ *static_cast<SwDocShell*>(rViewFrame.GetObjectShell())->GetDoc(),
m_pViewWin, nullptr, nullptr, VSHELLFLAG_ISPREVIEW );
m_pViewWin->SetViewShell( pNew );
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 2a4487f9251f..bce3f54f3314 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -187,9 +187,9 @@ static OUString lcl_ConvertTabsToSpaces( const OUString& sLine )
return aRet;
}
-SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
- SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
- m_aEditWin( VclPtr<SwSrcEditWindow>::Create( &pViewFrame->GetWindow(), this ) ),
+SwSrcView::SwSrcView(SfxViewFrame& rViewFrame, SfxViewShell*) :
+ SfxViewShell( rViewFrame, SWSRCVIEWFLAGS ),
+ m_aEditWin( VclPtr<SwSrcEditWindow>::Create( &rViewFrame.GetWindow(), this ) ),
m_bSourceSaved(false),
m_eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 0dad5e371de9..7d346e945e0d 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -746,13 +746,13 @@ void SwView::CheckReadonlySelection()
}
}
-SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
- : SfxViewShell( _pFrame, SWVIEWFLAGS ),
+SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
+ : SfxViewShell(_rFrame, SWVIEWFLAGS),
m_aTimer( "sw::SwView m_aTimer" ),
m_nNewPage(USHRT_MAX),
m_nOldPageNum(0),
m_pNumRuleNodeFromDoc(nullptr),
- m_pEditWin( VclPtr<SwEditWin>::Create( &_pFrame->GetWindow(), *this ) ),
+ m_pEditWin( VclPtr<SwEditWin>::Create( &_rFrame.GetWindow(), *this ) ),
m_pShell(nullptr),
m_pFormShell(nullptr),
m_pHScrollbar(nullptr),
@@ -821,7 +821,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_aTimer.SetTimeout( 120 );
- SwDocShell& rDocSh = dynamic_cast<SwDocShell&>(*_pFrame->GetObjectShell());
+ SwDocShell& rDocSh = dynamic_cast<SwDocShell&>(*_rFrame.GetObjectShell());
bool bOldModifyFlag = rDocSh.IsEnableSetModified();
if (bOldModifyFlag)
rDocSh.EnableSetModified( false );
diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx
index 2fa09630e65a..98be7a6508ea 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -81,8 +81,8 @@ void SwWebView::InitInterface_Impl()
}
-SwWebView::SwWebView(SfxViewFrame* _pFrame, SfxViewShell* _pShell) :
- SwView(_pFrame, _pShell)
+SwWebView::SwWebView(SfxViewFrame& _rFrame, SfxViewShell* _pShell) :
+ SwView(_rFrame, _pShell)
{
}