summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/inc/sfx2/frame.hxx2
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/doc/objxtor.cxx4
-rw-r--r--sfx2/source/view/frame.cxx4
-rw-r--r--sfx2/source/view/ipclient.cxx12
-rw-r--r--sfx2/source/view/viewfrm.cxx10
-rw-r--r--sfx2/source/view/viewsh.cxx2
-rw-r--r--svx/source/cui/hltpbase.cxx2
-rw-r--r--svx/source/dialog/hyprlink.cxx2
11 files changed, 22 insertions, 22 deletions
diff --git a/sfx2/inc/sfx2/frame.hxx b/sfx2/inc/sfx2/frame.hxx
index 57e788c6f784..cfd0ee05c031 100644
--- a/sfx2/inc/sfx2/frame.hxx
+++ b/sfx2/inc/sfx2/frame.hxx
@@ -163,7 +163,7 @@ public:
SfxBroadcaster& GetBroadcaster() const;
SfxObjectShell* GetCurrentDocument() const;
SfxViewFrame* GetCurrentViewFrame() const;
- SfxFrame* GetTopFrame() const;
+ SfxFrame& GetTopFrame() const;
sal_Bool IsParent( SfxFrame* ) const;
sal_uInt32 GetFrameType() const;
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 7d1695d012b2..d1f3d18b501b 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -244,7 +244,7 @@ public:
BOOL DoClose();
ULONG GetFrameType() const
{ return GetFrame().GetFrameType(); }
- SfxFrame* GetTopFrame() const
+ SfxFrame& GetTopFrame() const
{ return GetFrame().GetTopFrame(); }
void GetTargetList( TargetList& rList ) const
{ GetFrame().GetTargetList( rList ); }
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 8a6622636c14..f8104f5fbe1c 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -975,7 +975,7 @@ void SfxHelp::OpenHelpAgent( SfxFrame *pFrame, ULONG nHelpId )
::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" ) ), UNO_QUERY );
xTrans->parseStrict(aURL);
- Reference< XDispatchProvider > xDispProv( pFrame->GetTopFrame()->GetFrameInterface(), UNO_QUERY );
+ Reference< XDispatchProvider > xDispProv( pFrame->GetTopFrame().GetFrameInterface(), UNO_QUERY );
Reference< XDispatch > xHelpDispatch;
if ( xDispProv.is() )
xHelpDispatch = xDispProv->queryDispatch(
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index ac38ebeb4b64..441bc846c4f9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1768,7 +1768,7 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
SetMenu_Impl();
SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
- SfxWorkWindow *pTaskWin = pImp->pFrame->GetTopFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pTaskWin = pImp->pFrame->GetTopFrame().GetWorkWindow_Impl();
pTaskWin->ResetStatusBar_Impl();
SfxDispatcher *pDispat = this;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 4212b3613f4b..a4fa3c845b91 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -573,8 +573,8 @@ sal_uInt16 SfxObjectShell::PrepareClose
if ( bUI && IsModified() && pFrame )
{
// minimierte restoren
- SfxFrame* pTop = pFrame->GetTopFrame();
- SfxViewFrame::SetViewFrame( pTop->GetCurrentViewFrame() );
+ SfxFrame& rTop = pFrame->GetTopFrame();
+ SfxViewFrame::SetViewFrame( rTop.GetCurrentViewFrame() );
pFrame->GetFrame().Appear();
// fragen, ob gespeichert werden soll
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 36eade11a1bc..25f6147ffdf5 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -284,12 +284,12 @@ void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame )
pChildArr->Remove( nPos );
};
-SfxFrame* SfxFrame::GetTopFrame() const
+SfxFrame& SfxFrame::GetTopFrame() const
{
const SfxFrame* pParent = this;
while ( pParent->pParentFrame )
pParent = pParent->pParentFrame;
- return const_cast< SfxFrame* >( pParent );
+ return *const_cast< SfxFrame* >( pParent );
}
sal_Bool SfxFrame::IsClosing_Impl() const
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index b9635c2f3bd7..97e5d46af7f7 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -986,7 +986,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame()->LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
try
{
m_pImp->m_xObject->setClientSite( m_pImp->m_xClient );
@@ -1036,8 +1036,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
if ( m_pViewSh )
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- pFrame->GetTopFrame()->LockResize_Impl(FALSE);
- pFrame->GetTopFrame()->Resize();
+ pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().Resize();
}
}
}
@@ -1097,7 +1097,7 @@ void SfxInPlaceClient::DeactivateObject()
}
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame()->LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1119,8 +1119,8 @@ void SfxInPlaceClient::DeactivateObject()
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
SfxViewFrame::SetViewFrame( pFrame );
- pFrame->GetTopFrame()->LockResize_Impl(FALSE);
- pFrame->GetTopFrame()->Resize();
+ pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().Resize();
}
}
catch (com::sun::star::uno::Exception& )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 63d2aedf2523..79c1a3914aad 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -844,7 +844,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
case SID_RELOAD:
{
- SfxFrame* pFrame = GetTopFrame();
+ SfxFrame* pFrame = &GetTopFrame();
if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
rSet.DisableItem(nWhich);
@@ -1794,7 +1794,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
}
else
{
- Window *pWindow = &GetFrame().GetTopFrame()->GetWindow();
+ Window *pWindow = &GetFrame().GetTopFrame().GetWindow();
if ( !bEnable )
pImp->bWindowWasEnabled = pWindow->IsInputEnabled();
if ( !bEnable || pImp->bWindowWasEnabled )
@@ -2598,7 +2598,7 @@ SfxFrame& SfxViewFrame::GetFrame() const
//-------------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::GetTopViewFrame() const
{
- return GetFrame().GetTopFrame()->GetCurrentViewFrame();
+ return GetFrame().GetTopFrame().GetCurrentViewFrame();
}
Window& SfxViewFrame::GetWindow() const
@@ -3239,7 +3239,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
return;
- Reference < XFrame > xFrame = GetFrame().GetTopFrame()->GetFrameInterface();
+ Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface();
Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) );
BOOL bShow = FALSE;
BOOL bHasChild = xBeamer.is();
@@ -3340,7 +3340,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
else if ( nSID == SID_BROWSER )
{
- Reference < XFrame > xFrame = GetFrame().GetTopFrame()->GetFrameInterface()->
+ Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface()->
findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN );
if ( !xFrame.is() )
rState.DisableItem( nSID );
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d624101f5e79..41188880b01d 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -689,7 +689,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// ausfuehren
if ( !pShowItem || bActive != pImp->bPlugInsActive )
{
- SfxFrame* pTopFrame = GetFrame()->GetTopFrame();
+ SfxFrame* pTopFrame = &GetFrame()->GetTopFrame();
if ( pTopFrame != &GetFrame()->GetFrame() )
{
// FramesetDocument
diff --git a/svx/source/cui/hltpbase.cxx b/svx/source/cui/hltpbase.cxx
index b727602255f7..5bcd915516bd 100644
--- a/svx/source/cui/hltpbase.cxx
+++ b/svx/source/cui/hltpbase.cxx
@@ -72,7 +72,7 @@ SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId,
{
TargetList* pList = new TargetList;
SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : 0;
- SfxFrame* pFrame = pViewFrame ? pViewFrame->GetTopFrame() : 0;
+ SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetTopFrame() : 0;
if ( pFrame )
{
pFrame->GetTargetList(*pList);
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
index 5b45296fa7f0..94dfcb196d84 100644
--- a/svx/source/dialog/hyprlink.cxx
+++ b/svx/source/dialog/hyprlink.cxx
@@ -475,7 +475,7 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute)
if (pVwFrm) // Alle moeglichen Target Frames zusammensammeln und anzeigen
{
TargetList aList;
- pVwFrm->GetTopFrame()->GetTargetList(aList);
+ pVwFrm->GetTopFrame().GetTargetList(aList);
USHORT nCount = (USHORT)aList.Count();
if( nCount )