summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/docsh2.cxx')
-rw-r--r--sw/source/uibase/app/docsh2.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index bc9647d77dd7..3cbd7673a6b7 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -161,14 +161,14 @@ void SwDocShell::ToggleLayoutMode(SwView* pView)
GetDoc()->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, rViewOptions.getBrowseMode());
UpdateFontList(); // Why is this necessary here?
- pView->GetViewFrame()->GetBindings().Invalidate(FN_SHADOWCURSOR);
+ pView->GetViewFrame().GetBindings().Invalidate(FN_SHADOWCURSOR);
if( !GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) )
pView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP );
GetDoc()->CheckDefaultPageFormat();
SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this, false);
while (pTmpFrame)
{
- if( pTmpFrame != pView->GetViewFrame() )
+ if( pTmpFrame != &pView->GetViewFrame() )
{
pTmpFrame->DoClose();
pTmpFrame = SfxViewFrame::GetFirst(this, false);
@@ -507,7 +507,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
nSlotId = SID_VIEWSHELL2;
if( pCurrView && pCurrView->GetDocShell() == this )
- pTmpFrame = pCurrView->GetViewFrame();
+ pTmpFrame = &pCurrView->GetViewFrame();
else
pTmpFrame = SfxViewFrame::GetFirst( this );
@@ -642,7 +642,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxViewShell* pViewShell = GetView()
? static_cast<SfxViewShell*>(GetView())
: SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
SwSrcView* pSrcView = dynamic_cast< SwSrcView *>( pViewShell );
if(!pSrcView)
{
@@ -661,7 +661,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
std::shared_ptr<const SfxFilter> pFlt = GetMedium()->GetFilter();
if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pViewFrame->GetFrameWeld(), "modules/swriter/ui/saveashtmldialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(rViewFrame.GetFrameWeld(), "modules/swriter/ui/saveashtmldialog.ui"));
std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("SaveAsHTMLDialog"));
if (RET_YES == xQuery->run())
bLocalHasName = false;
@@ -685,7 +685,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxStringItem aName(SID_FILE_NAME, sPath);
SfxStringItem aFilter(SID_FILTER_NAME, pHtmlFlt->GetName());
const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(
- pViewFrame->GetDispatcher()->ExecuteList(
+ rViewFrame.GetDispatcher()->ExecuteList(
SID_SAVEASDOC, SfxCallMode::SYNCHRON,
{ &aName, &aFilter }));
if(!pBool || !pBool->GetValue())
@@ -724,8 +724,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
nSlot = SID_VIEWSHELL0;
}
}
- if(nSlot)
- pViewFrame->GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON);
+ if (nSlot)
+ rViewFrame.GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON);
if(bSetModified)
GetDoc()->getIDocumentState().SetModified();
if(pSavePrinter)
@@ -733,10 +733,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
GetDoc()->getIDocumentDeviceAccess().setPrinter( pSavePrinter, true, true);
//pSavePrinter must not be deleted again
}
- pViewFrame->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, false)); // not SID_VIEWSHELL2
- pViewFrame->GetBindings().Invalidate( SID_NEWWINDOW );
- pViewFrame->GetBindings().Invalidate( SID_BROWSER_MODE );
- pViewFrame->GetBindings().Invalidate( FN_PRINT_LAYOUT );
+ rViewFrame.GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, false)); // not SID_VIEWSHELL2
+ rViewFrame.GetBindings().Invalidate( SID_NEWWINDOW );
+ rViewFrame.GetBindings().Invalidate( SID_BROWSER_MODE );
+ rViewFrame.GetBindings().Invalidate( FN_PRINT_LAYOUT );
}
break;
case SID_GET_COLORLIST:
@@ -1138,7 +1138,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
//search for the view that created the call
if(pViewShell->GetObjectShell() == this && pViewShell->GetDispatcher())
{
- SfxFrameItem aFrameItem( SID_DOCFRAME, pViewShell->GetViewFrame() );
+ SfxFrameItem aFrameItem(SID_DOCFRAME, &pViewShell->GetViewFrame());
SfxDispatcher* pDispatch = pViewShell->GetDispatcher();
pDispatch->ExecuteList(SID_OPENDOC,
SfxCallMode::ASYNCHRON,
@@ -1279,8 +1279,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
else
{
SfxViewShell* pViewShell = GetView() ? GetView() : SfxViewShell::Current();
- SfxBindings& rBindings( pViewShell->GetViewFrame()->GetBindings() );
- auto xDlg = std::make_shared<SwWatermarkDialog>(pViewShell->GetViewFrame()->GetFrameWeld(),
+ SfxBindings& rBindings( pViewShell->GetViewFrame().GetBindings() );
+ auto xDlg = std::make_shared<SwWatermarkDialog>(pViewShell->GetViewFrame().GetFrameWeld(),
rBindings);
weld::DialogController::runAsync(xDlg, [](sal_Int32 /*nResult*/){});
}
@@ -1291,7 +1291,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR );
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
- SfxBindings& rBindings( pViewShell->GetViewFrame()->GetBindings() );
+ SfxBindings& rBindings( pViewShell->GetViewFrame().GetBindings() );
if ( SfxNotebookBar::IsActive() )
sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : "" );
@@ -1334,7 +1334,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxViewShell* pViewShell = GetView()
? GetView()
: SfxViewShell::Current();
- pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pViewShell->GetViewFrame().GetDispatcher()->ExecuteList(
FN_REDLINE_SHOW, SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aShow });
bChangedHideChanges = true;
@@ -1361,7 +1361,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
SfxBoolItem aShow(FN_REDLINE_SHOW, false);
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
- pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pViewShell->GetViewFrame().GetDispatcher()->ExecuteList(
FN_REDLINE_SHOW, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, { &aShow });
}
@@ -1465,14 +1465,14 @@ void SwDocShell::UpdateChildWindows()
// if necessary newly initialize Fielddlg (i.e. for TYP_SETVAR)
if(!GetView())
return;
- SfxViewFrame* pVFrame = GetView()->GetViewFrame();
- SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame->
+ SfxViewFrame& rVFrame = GetView()->GetViewFrame();
+ SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(rVFrame.
GetChildWindow( SwFieldDlgWrapper::GetChildWindowId() ));
if( pWrp )
pWrp->ReInitDlg( this );
// if necessary newly initialize RedlineDlg
- SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(pVFrame->
+ SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(rVFrame.
GetChildWindow( SwRedlineAcceptChild::GetChildWindowId() ));
if( pRed )
pRed->ReInitDlg( this );
@@ -1526,7 +1526,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
SfxUnoAnyItem aShellItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, Any( GetModel() ) );
OUString aLibName( pBasic->GetName() );
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
- pSrcView->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pSrcView->GetViewFrame().GetDispatcher()->ExecuteList(
SID_BASICIDE_LIBREMOVED,
SfxCallMode::SYNCHRON,
{ &aShellItem, &aLibNameItem });
@@ -1565,8 +1565,8 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
SfxViewShell* pViewShell = GetView() ? static_cast<SfxViewShell*>(GetView())
: SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- pViewFrame->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON );
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ rViewFrame.GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON );
SubInitNew();