summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-16 10:42:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-16 15:13:21 +0000
commit0908c7c1184ab7acb7b6f6740a82c2f12c296fae (patch)
tree7bfe09dce871f6f2bc59a81b689d7ab5a3a6f3ea /sw/source
parente71080e19365aa074c56d1136dad2b09783949a2 (diff)
SfxViewShell::GetViewFrame never returns null, change to a reference
various null checks can be seen to be redundant and removed Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accpara.cxx8
-rw-r--r--sw/source/core/graphic/GraphicSizeCheck.cxx4
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx2
-rw-r--r--sw/source/ui/dialog/macassgn.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx6
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/ui/fldui/fldedt.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx4
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx2
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx4
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx14
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/vba/vbawindow.cxx12
-rw-r--r--sw/source/uibase/app/apphdl.cxx32
-rw-r--r--sw/source/uibase/app/appopt.cxx12
-rw-r--r--sw/source/uibase/app/docsh.cxx4
-rw-r--r--sw/source/uibase/app/docsh2.cxx48
-rw-r--r--sw/source/uibase/app/docst.cxx8
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx16
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx10
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx8
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx6
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx10
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx106
-rw-r--r--sw/source/uibase/docvw/romenu.cxx12
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx21
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx34
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx4
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/ribbar/conrect.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx12
-rw-r--r--sw/source/uibase/ribbar/dselect.cxx2
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx14
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx6
-rw-r--r--sw/source/uibase/shells/annotsh.cxx24
-rw-r--r--sw/source/uibase/shells/basesh.cxx84
-rw-r--r--sw/source/uibase/shells/beziersh.cxx6
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx6
-rw-r--r--sw/source/uibase/shells/drawsh.cxx12
-rw-r--r--sw/source/uibase/shells/drformsh.cxx4
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx6
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx20
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx24
-rw-r--r--sw/source/uibase/shells/frmsh.cxx14
-rw-r--r--sw/source/uibase/shells/grfsh.cxx8
-rw-r--r--sw/source/uibase/shells/grfshex.cxx4
-rw-r--r--sw/source/uibase/shells/langhelper.cxx4
-rw-r--r--sw/source/uibase/shells/listsh.cxx4
-rw-r--r--sw/source/uibase/shells/tabsh.cxx25
-rw-r--r--sw/source/uibase/shells/textfld.cxx38
-rw-r--r--sw/source/uibase/shells/textidx.cxx12
-rw-r--r--sw/source/uibase/shells/textsh.cxx6
-rw-r--r--sw/source/uibase/shells/textsh1.cxx62
-rw-r--r--sw/source/uibase/shells/textsh2.cxx6
-rw-r--r--sw/source/uibase/shells/txtattr.cxx4
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx2
-rw-r--r--sw/source/uibase/shells/txtnum.cxx6
-rw-r--r--sw/source/uibase/table/chartins.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx42
-rw-r--r--sw/source/uibase/uiview/srcview.cxx10
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx4
-rw-r--r--sw/source/uibase/uiview/view.cxx85
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/uiview/view1.cxx27
-rw-r--r--sw/source/uibase/uiview/view2.cxx98
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx28
-rw-r--r--sw/source/uibase/uiview/viewling.cxx8
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx14
-rw-r--r--sw/source/uibase/uiview/viewport.cxx20
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx6
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx4
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx16
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx4
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx18
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx12
-rw-r--r--sw/source/uibase/utlui/gotodlg.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx8
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx2
-rw-r--r--sw/source/uibase/web/wview.cxx4
-rw-r--r--sw/source/uibase/wrtsh/move.cxx2
-rw-r--r--sw/source/uibase/wrtsh/navmgr.cxx12
-rw-r--r--sw/source/uibase/wrtsh/select.cxx10
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx10
-rw-r--r--sw/source/uibase/wrtsh/wrtsh3.cxx4
99 files changed, 644 insertions, 664 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8121d1c62389..67b12571f412 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -464,12 +464,8 @@ void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot )
if( !pSfxShell )
return;
- SfxViewFrame *pFrame = pSfxShell->GetViewFrame();
- OSL_ENSURE( pFrame != nullptr, "View frame expected!" );
- if( !pFrame )
- return;
-
- SfxDispatcher *pDispatcher = pFrame->GetDispatcher();
+ SfxViewFrame& rFrame = pSfxShell->GetViewFrame();
+ SfxDispatcher *pDispatcher = rFrame.GetDispatcher();
OSL_ENSURE( pDispatcher != nullptr, "Dispatcher expected!" );
if( !pDispatcher )
return;
diff --git a/sw/source/core/graphic/GraphicSizeCheck.cxx b/sw/source/core/graphic/GraphicSizeCheck.cxx
index 9fe2de879777..e35f31507c49 100644
--- a/sw/source/core/graphic/GraphicSizeCheck.cxx
+++ b/sw/source/core/graphic/GraphicSizeCheck.cxx
@@ -135,8 +135,8 @@ void GraphicSizeCheckGUIEntry::runProperties()
{
markObject();
SwWrtShell* pWrtShell = m_pDocument->GetDocShell()->GetWrtShell();
- pWrtShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG,
- SfxCallMode::SYNCHRON);
+ pWrtShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG,
+ SfxCallMode::SYNCHRON);
}
GraphicSizeCheckGUIResult::GraphicSizeCheckGUIResult(SwDoc* pDocument)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a1ea83c57867..1fe1ae2c9e22 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -670,8 +670,8 @@ weld::Window* SwViewShell::CareChildWin(SwViewShell const & rVSh)
return nullptr;
#if HAVE_FEATURE_DESKTOP
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
- SfxViewFrame* pVFrame = rVSh.mpSfxViewShell->GetViewFrame();
- SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
+ SfxViewFrame& rVFrame = rVSh.mpSfxViewShell->GetViewFrame();
+ SfxChildWindow* pChWin = rVFrame.GetChildWindow( nId );
if (!pChWin)
return nullptr;
weld::DialogController* pController = pChWin->GetController().get();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 48e50acaab1d..890ff796a033 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1049,7 +1049,7 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* )
FN_TABLE_MODE_VARIABLE,
0
};
- m_pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva );
+ m_pWrtShell->GetView().GetViewFrame().GetBindings().Invalidate( aInva );
}
bRet = true;
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 3c23b05820f3..93667179a21d 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -821,7 +821,7 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, weld::Button&, void)
pTargetView->SetPrinter(pDocumentPrinter);
}
- SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell();
+ SfxObjectShell* pObjSh = pTargetView->GetViewFrame().GetObjectShell();
SfxGetpApp()->NotifyEvent(SfxEventHint(SfxEventHintId::SwMailMerge, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh));
uno::Sequence aProps{ comphelper::makePropertyValue("MonitorVisible", true),
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index e4591970a0d1..375b1aca4f3b 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -116,7 +116,7 @@ bool SwMacroAssignDlg::INetFormatDlg(weld::Window* pParent, SwWrtShell& rSh,
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractDialog> pMacroDlg( pFact->CreateEventConfigDialog(pParent, aSet,
- rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface() ) );
+ rSh.GetView().GetViewFrame().GetFrame().GetFrameInterface() ) );
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index b2259f3cb8b5..bf3831f29e0b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1423,12 +1423,12 @@ short SwInsertSectionTabDialog::Ok()
OSL_ENSURE(m_pSectionData, "SwInsertSectionTabDialog: no SectionData?");
const SfxItemSet* pOutputItemSet = GetOutputItemSet();
m_rWrtSh.InsertSection(*m_pSectionData, pOutputItemSet);
- SfxViewFrame* pViewFrame = m_rWrtSh.GetView().GetViewFrame();
+ SfxViewFrame& rViewFrame = m_rWrtSh.GetView().GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aRequest( pViewFrame, FN_INSERT_REGION);
+ SfxRequest aRequest( &rViewFrame, FN_INSERT_REGION);
if(const SwFormatCol* pCol = pOutputItemSet->GetItemIfSet(RES_COL, false))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 5c004207c36c..a1e1803d9037 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::uno;
// edit insert-field
SwChangeDBDlg::SwChangeDBDlg(SwView const & rVw)
- : SfxDialogController(rVw.GetViewFrame()->GetFrameWeld(), "modules/swriter/ui/exchangedatabases.ui",
+ : SfxDialogController(rVw.GetViewFrame().GetFrameWeld(), "modules/swriter/ui/exchangedatabases.ui",
"ExchangeDatabasesDialog")
, m_pSh(rVw.GetWrtShellPtr())
, m_xUsedDBTLB(m_xBuilder->weld_tree_view("inuselb"))
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index e4f5824f9ad9..306d864fab02 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -98,7 +98,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr)
}
SwFieldEditDlg::SwFieldEditDlg(SwView const & rVw)
- : SfxSingleTabDialogController(rVw.GetViewFrame()->GetFrameWeld(), nullptr,
+ : SfxSingleTabDialogController(rVw.GetViewFrame().GetFrameWeld(), nullptr,
"modules/swriter/ui/editfielddialog.ui", "EditFieldDialog")
, m_pSh(rVw.GetWrtShellPtr())
, m_xPrevBT(m_xBuilder->weld_button("prev"))
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 71ff3d33246e..d3cee669e971 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -128,7 +128,7 @@ void SwFieldPage::InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, con
m_aMgr.InsertField( aData );
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pView->GetViewFrame()->GetBindings().GetRecorder();
+ pView->GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
bool bRecordDB = SwFieldTypesEnum::Database == nTypeId ||
@@ -137,7 +137,7 @@ void SwFieldPage::InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, con
SwFieldTypesEnum::DatabaseNextSet == nTypeId ||
SwFieldTypesEnum::DatabaseName == nTypeId ;
- SfxRequest aReq( pView->GetViewFrame(),
+ SfxRequest aReq( &pView->GetViewFrame(),
bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD );
if(bRecordDB)
{
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 3c83365a206f..9f81d6841ef4 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -298,7 +298,7 @@ void SwFieldDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
if(pViewFrame)
{
SfxViewShell* pViewShell = SfxViewShell::GetFirst( true, checkSfxViewShell<SwView> );
- while(pViewShell && pViewShell->GetViewFrame() != pViewFrame)
+ while(pViewShell && &pViewShell->GetViewFrame() != pViewFrame)
{
pViewShell = SfxViewShell::GetNext( *pViewShell, true, checkSfxViewShell<SwView> );
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 8ebf75129db7..656600c6b52e 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -527,7 +527,7 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage
SfxAllItemSet aNewSet(*aSet.GetPool());
aNewSet.Put( SwMacroAssignDlg::AddEvents(MACASSGN_ALLFRM) );
if ( m_pWrtShell )
- rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() );
+ rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame().GetFrame().GetFrameInterface() );
rPage.PageCreated(aNewSet);
}
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 5692a906e279..8a82dd04d95c 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -264,7 +264,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl, weld::Button&, void)
const SwFormatCol& rColItem = m_pSelectionSet->Get(RES_COL);
//only if there actually are columns!
if(rColItem.GetNumCols() > 1)
- m_rWrtShell.GetView().GetViewFrame()->GetDispatcher()->Execute(
+ m_rWrtShell.GetView().GetViewFrame().GetDispatcher()->Execute(
FN_INSERT_REGION, SfxCallMode::ASYNCHRON, *m_pSelectionSet );
}
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 5ce1d903cea4..2a958bcf3853 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -159,7 +159,7 @@ void SwFrameDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
aNewSet.Put( SwMacroAssignDlg::AddEvents(
m_sDlgType == "PictureDialog" ? MACASSGN_GRAPHIC : m_sDlgType == "ObjectDialog" ? MACASSGN_OLE : MACASSGN_FRMURL ) );
if (m_pWrtShell)
- rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() );
+ rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame().GetFrame().GetFrameInterface() );
rPage.PageCreated(aNewSet);
}
else if (rId == "borders")
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index e821d7ca9c07..43ffeb3ba279 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2306,7 +2306,7 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, EditStyleHdl, weld::Button&, void)
SfxStringItem aStyle(SID_STYLE_EDIT, m_xCharStyleLB->get_active_text());
SfxUInt16Item aFamily(SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Char));
static_cast<SwMultiTOXTabDialog*>(GetDialogController())->GetWrtShell().
- GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT,
+ GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_STYLE_EDIT,
SfxCallMode::SYNCHRON,
{ &aStyle, &aFamily });
}
@@ -3646,7 +3646,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EditStyleHdl, weld::Button&, void)
SfxStringItem aStyle(SID_STYLE_EDIT, m_xParaLayLB->get_selected_text());
SfxUInt16Item aFamily(SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para));
SwWrtShell& rSh = static_cast<SwMultiTOXTabDialog*>(GetDialogController())->GetWrtShell();
- rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT,
+ rSh.GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_STYLE_EDIT,
SfxCallMode::SYNCHRON,
{ &aStyle, &aFamily });
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 959ceacad2d5..593753f263f4 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -107,7 +107,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void)
OUString sRemoved = pBookmark->GetName();
IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess();
pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved), false);
- SfxRequest aReq(m_rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
+ SfxRequest aReq(&m_rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved));
aReq.Done();
m_aTableBookmarks.erase(std::remove(m_aTableBookmarks.begin(), m_aTableBookmarks.end(),
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index a1e4a60fe883..e76702250033 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -413,9 +413,9 @@ IMPL_LINK(SwGlossaryDlg, GrpSelect, weld::TreeView&, rBox, void)
ShowAutoText("", "");
// update controls
NameModify(*m_xShortNameEdit);
- if( SfxRequest::HasMacroRecorder( m_pShell->GetView().GetViewFrame() ) )
+ if( SfxRequest::HasMacroRecorder( &m_pShell->GetView().GetViewFrame() ) )
{
- SfxRequest aReq( m_pShell->GetView().GetViewFrame(), FN_SET_ACT_GLOSSARY );
+ SfxRequest aReq( &m_pShell->GetView().GetViewFrame(), FN_SET_ACT_GLOSSARY );
aReq.AppendItem(SfxStringItem(FN_SET_ACT_GLOSSARY, getCurrentGlossary()));
aReq.Done();
}
@@ -436,9 +436,9 @@ void SwGlossaryDlg::Apply()
{
m_pGlossaryHdl->InsertGlossary(aGlosName);
}
- if( SfxRequest::HasMacroRecorder( m_pShell->GetView().GetViewFrame() ) )
+ if( SfxRequest::HasMacroRecorder( &m_pShell->GetView().GetViewFrame() ) )
{
- SfxRequest aReq( m_pShell->GetView().GetViewFrame(), FN_INSERT_GLOSSARY );
+ SfxRequest aReq( &m_pShell->GetView().GetViewFrame(), FN_INSERT_GLOSSARY );
aReq.AppendItem(SfxStringItem(FN_INSERT_GLOSSARY, getCurrentGlossary()));
aReq.AppendItem(SfxStringItem(FN_PARAM_1, aGlosName));
aReq.Done();
@@ -593,9 +593,9 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OString&, rItemIdent, void)
m_xShortNameEdit->set_text(aShortName);
NameModify(*m_xNameED); // for toggling the buttons
- if( SfxRequest::HasMacroRecorder( m_pShell->GetView().GetViewFrame() ) )
+ if( SfxRequest::HasMacroRecorder( &m_pShell->GetView().GetViewFrame() ) )
{
- SfxRequest aReq(m_pShell->GetView().GetViewFrame(), FN_NEW_GLOSSARY);
+ SfxRequest aReq(&m_pShell->GetView().GetViewFrame(), FN_NEW_GLOSSARY);
aReq.AppendItem(SfxStringItem(FN_NEW_GLOSSARY, getCurrentGlossary()));
aReq.AppendItem(SfxStringItem(FN_PARAM_1, aShortName));
aReq.AppendItem(SfxStringItem(FN_PARAM_2, aStr));
@@ -660,7 +660,7 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OString&, rItemIdent, void)
const SvxMacroItem* pMacroItem;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog(m_xDialog.get(), aSet,
- m_pShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ));
+ m_pShell->GetView().GetViewFrame().GetFrame().GetFrameInterface() ));
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK &&
(pMacroItem = pMacroDlg->GetOutputItemSet()->GetItemIfSet( RES_FRMMACRO, false )) )
{
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 72adb140b219..8e9ad04111bc 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -63,7 +63,7 @@ static void lcl_setLineNumbering(const OUString& rName, SwWrtShell* pSh, bool bL
}
SwLineNumberingDlg::SwLineNumberingDlg(const SwView& rVw)
- : SfxDialogController(rVw.GetViewFrame()->GetFrameWeld(),
+ : SfxDialogController(rVw.GetViewFrame().GetFrameWeld(),
"modules/swriter/ui/linenumbering.ui", "LineNumberingDialog")
, m_pSh(rVw.GetWrtShellPtr())
, m_xBodyContent(m_xBuilder->weld_widget("content"))
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
index 1f5822efe2ca..9114f4b8d44d 100644
--- a/sw/source/ui/vba/vbawindow.cxx
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -80,8 +80,8 @@ SwVbaWindow::getWindowState()
{
sal_Int32 nwindowState = word::WdWindowState::wdWindowStateNormal;
SwView* pView = word::getView( m_xModel );
- SfxViewFrame* pViewFrame = pView -> GetViewFrame();
- WorkWindow* pWork = static_cast<WorkWindow*>( pViewFrame->GetFrame().GetSystemWindow() );
+ SfxViewFrame& rViewFrame = pView->GetViewFrame();
+ WorkWindow* pWork = static_cast<WorkWindow*>( rViewFrame.GetFrame().GetSystemWindow() );
if ( pWork )
{
if ( pWork -> IsMaximized())
@@ -98,8 +98,8 @@ SwVbaWindow::setWindowState( const uno::Any& _windowstate )
sal_Int32 nwindowState = word::WdWindowState::wdWindowStateMaximize;
_windowstate >>= nwindowState;
SwView* pView = word::getView( m_xModel );
- SfxViewFrame* pViewFrame = pView -> GetViewFrame();
- WorkWindow* pWork = static_cast<WorkWindow*>( pViewFrame->GetFrame().GetSystemWindow() );
+ SfxViewFrame& rViewFrame = pView->GetViewFrame();
+ WorkWindow* pWork = static_cast<WorkWindow*>( rViewFrame.GetFrame().GetSystemWindow() );
if ( pWork )
{
if ( nwindowState == word::WdWindowState::wdWindowStateMaximize )
@@ -120,7 +120,7 @@ SwVbaWindow::getCaption()
if( !pView )
return "";
- uno::Reference< css::beans::XPropertySet > xFrameProps( pView->GetViewFrame()->GetFrame().GetFrameInterface()->getController()->getFrame(), uno::UNO_QUERY );
+ uno::Reference< css::beans::XPropertySet > xFrameProps( pView->GetViewFrame().GetFrame().GetFrameInterface()->getController()->getFrame(), uno::UNO_QUERY );
if( !xFrameProps.is() )
return "";
@@ -137,7 +137,7 @@ SwVbaWindow::setCaption( const OUString& _caption )
if( !pView )
return;
- uno::Reference< css::beans::XPropertySet > xFrameProps( pView->GetViewFrame()->GetFrame().GetFrameInterface()->getController()->getFrame(), uno::UNO_QUERY );
+ uno::Reference< css::beans::XPropertySet > xFrameProps( pView->GetViewFrame().GetFrame().GetFrameInterface()->getController()->getFrame(), uno::UNO_QUERY );
if( !xFrameProps.is() )
return;
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 8078729a7f38..5d6a0a66514a 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -310,7 +310,7 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
SfxBoolItem aHidden( SID_HIDDEN, true );
SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle());
const SfxObjectItem* pItem = static_cast<const SfxObjectItem*>(
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_OPENDOC,
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(SID_OPENDOC,
SfxCallMode::SYNCHRON,
{ &aURL, &aHidden, &aReferer, &aTargetFrameName }));
SfxShell* pShell = pItem ? pItem->GetShell() : nullptr;
@@ -323,11 +323,11 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
pNewView = dynamic_cast<SwView*>(pViewShell);
if (pNewView)
{
- pNewView->GetViewFrame()->GetFrame().Appear();
+ pNewView->GetViewFrame().GetFrame().Appear();
}
else
{
- pViewShell->GetViewFrame()->DoClose();
+ pViewShell->GetViewFrame().DoClose();
}
}
}
@@ -336,7 +336,7 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
{
SfxStringItem aFactory(SID_NEWDOCDIRECT, SwDocShell::Factory().GetFilterContainer()->GetName());
const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>(
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(
SID_NEWDOCDIRECT, SfxCallMode::SYNCHRON, { &aFactory }));
SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr;
SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr;
@@ -493,7 +493,7 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
FN_MAILMERGE_PRINT_DOCUMENTS,
FN_MAILMERGE_EMAIL_DOCUMENTS,
0 };
- m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+ m_pView->GetViewFrame().GetBindings().Invalidate(slotIds);
}
// release/destroy asynchronously
@@ -579,8 +579,8 @@ void SwMailMergeWizardExecutor::EndDialogHdl(sal_Int32 nRet)
if(pTargetView && pSourceView)
{
m_pView2Close = pTargetView;
- pTargetView->GetViewFrame()->GetTopViewFrame()->GetWindow().Hide();
- pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate();
+ pTargetView->GetViewFrame().GetTopViewFrame()->GetWindow().Hide();
+ pSourceView->GetViewFrame().GetFrame().AppearWithUpdate();
// the current view has be set when the target is destroyed
m_pView = pSourceView;
xMMConfig->SetTargetView(nullptr);
@@ -617,7 +617,7 @@ void SwMailMergeWizardExecutor::EndDialogHdl(sal_Int32 nRet)
SwView* pSourceView = xMMConfig ? xMMConfig->GetSourceView() : nullptr;
if(pSourceView)
{
- xMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear();
+ xMMConfig->GetSourceView()->GetViewFrame().GetFrame().Appear();
}
ExecutionFinished();
break;
@@ -645,13 +645,13 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void)
{
if (xMMConfig->GetTargetView())
{
- xMMConfig->GetTargetView()->GetViewFrame()->DoClose();
+ xMMConfig->GetTargetView()->GetViewFrame().DoClose();
xMMConfig->SetTargetView(nullptr);
}
if (xMMConfig->GetSourceView())
{
- auto pViewFrame(xMMConfig->GetSourceView()->GetViewFrame());
- pViewFrame->GetFrame().AppearWithUpdate();
+ auto& rViewFrame(xMMConfig->GetSourceView()->GetViewFrame());
+ rViewFrame.GetFrame().AppearWithUpdate();
}
xMMConfig->Commit();
}
@@ -670,7 +670,7 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void)
{
if ( m_pView2Close )
{
- m_pView2Close->GetViewFrame()->DoClose();
+ m_pView2Close->GetViewFrame().DoClose();
m_pView2Close = nullptr;
}
m_pWizardToDestroyInCallback.disposeAndClear();
@@ -788,7 +788,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
rSh.GetDBManager()->Merge(aMergeDesc);
// update enabled / disabled status of the buttons in the toolbar
- SfxBindings& rBindings = rSh.GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = rSh.GetView().GetViewFrame().GetBindings();
rBindings.Invalidate(FN_MAILMERGE_FIRST_ENTRY);
rBindings.Invalidate(FN_MAILMERGE_PREV_ENTRY);
rBindings.Invalidate(FN_MAILMERGE_NEXT_ENTRY);
@@ -819,7 +819,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
// The connection has been attempted, but failed or no results found,
// so invalidate the toolbar buttons in case they need to be disabled.
SfxBindings& rBindings
- = GetActiveView()->GetWrtShell().GetView().GetViewFrame()->GetBindings();
+ = GetActiveView()->GetWrtShell().GetView().GetViewFrame().GetBindings();
rBindings.Invalidate(FN_MAILMERGE_CREATE_DOCUMENTS);
rBindings.Invalidate(FN_MAILMERGE_SAVE_DOCUMENTS);
rBindings.Invalidate(FN_MAILMERGE_PRINT_DOCUMENTS);
@@ -837,7 +837,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
xConfigItem = SwDBManager::PerformMailMerge(GetActiveView());
if (xConfigItem && xConfigItem->GetTargetView())
- xConfigItem->GetTargetView()->GetViewFrame()->GetFrame().Appear();
+ xConfigItem->GetTargetView()->GetViewFrame().GetFrame().Appear();
}
else
{
@@ -879,7 +879,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
// assume that not calling via SwEditShell::SetFixFields
// is allowed, because the shell hasn't been created yet
- assert(!pWrtSh || pWrtSh->GetView().GetViewFrame()->GetFrame().IsClosing_Impl());
+ assert(!pWrtSh || pWrtSh->GetView().GetViewFrame().GetFrame().IsClosing_Impl());
pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(nullptr);
}
}
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 6e338564e124..4f06d121ff78 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -70,7 +70,7 @@ std::optional<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref.get() : m_pWebUsrPref.get();
// no MakeUsrPref, because only options from textdoks can be used here
SwView* pAppView = GetView();
- if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
+ if(pAppView && &pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = nullptr;
if(pAppView)
{
@@ -215,7 +215,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
- if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
+ if(pAppView && &pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = nullptr;
if(pAppView)
{
@@ -228,7 +228,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref.get() : m_pWebUsrPref.get();
- SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame()->GetBindings()
+ SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame().GetBindings()
: nullptr;
// Interpret the page Documentview
@@ -273,7 +273,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
// Outline-folding options have change which require to show all content.
// Either outline-folding is being switched off or outline-folding is currently on
// and the treat subs option has changed.
- pWrtShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
+ pWrtShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
if (bTreatSubsChanged)
bReFoldOutlineFolding = true; // folding method changed, set flag to refold below
}
@@ -400,8 +400,8 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
if (bReFoldOutlineFolding)
{
- GetActiveWrtShell()->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
- GetActiveWrtShell()->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
+ GetActiveWrtShell()->GetView().GetViewFrame().GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
+ GetActiveWrtShell()->GetView().GetViewFrame().GetDispatcher()->Execute(FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON);
}
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 72dd3319fc4b..22c9a18c45ae 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -341,7 +341,7 @@ bool SwDocShell::Save()
SetError(nErr ? nErr : nVBWarning);
SfxViewFrame *const pFrame =
- m_pWrtShell ? m_pWrtShell->GetView().GetViewFrame() : nullptr;
+ m_pWrtShell ? &m_pWrtShell->GetView().GetViewFrame() : nullptr;
if( pFrame )
{
pFrame->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false));
@@ -1106,7 +1106,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case SID_NOTEBOOKBAR:
{
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
- bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(),
+ bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame().GetBindings(),
u"modules/swriter/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
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();
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 436335302c7e..84aacfa1d47d 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -104,9 +104,9 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
}
else
{
- SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
+ SfxViewFrame& rFrame = pShell->GetView().GetViewFrame();
std::unique_ptr<SfxUInt16Item> pFamilyItem;
- pFrame->GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
+ rFrame.GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
if (pFamilyItem)
{
nActualFamily = static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
@@ -328,7 +328,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SID_STYLE_APPLY:
if( !pArgs )
{
- GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER);
+ GetView()->GetViewFrame().GetDispatcher()->Execute(SID_STYLE_DESIGNER);
break;
}
else
@@ -606,7 +606,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL,
FN_TABLE_INSERT_COL_BEFORE,
FN_TABLE_INSERT_COL_AFTER, 0};
- pView->GetViewFrame()->GetBindings().Invalidate(aInval);
+ pView->GetViewFrame().GetBindings().Invalidate(aInval);
}
SfxItemSet aTmpSet( *m_pDlg->GetOutputItemSet() );
if( SfxStyleFamily::Char == m_nFamily )
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 781c30a5e74a..a74b43821643 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -367,7 +367,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
void SwModule::ShowDBObj(SwView const & rView, const SwDBData& rData)
{
- Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
+ Reference<XFrame> xFrame = rView.GetViewFrame().GetFrame().GetFrameInterface();
uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame("_beamer", FrameSearchFlag::CHILDREN);
if (!xBeamerFrame.is())
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index a62bd62b869b..81544fe8eb2e 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2958,7 +2958,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
pFound = FindDSConnection(sDataSource, true);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- m_pImpl->pMergeDialog = pFact->CreateMailMergeDlg(rSh.GetView().GetViewFrame()->GetFrameWeld(), rSh,
+ m_pImpl->pMergeDialog = pFact->CreateMailMergeDlg(rSh.GetView().GetViewFrame().GetFrameWeld(), rSh,
sDataSource,
sDataTableOrQuery,
nCmdType,
@@ -2972,7 +2972,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
aDescriptor[svx::DataAccessDescriptorProperty::Cursor] <<= xResSet;
// SfxObjectShellRef is ok, since there should be no control over the document lifetime here
- SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell();
+ SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame().GetObjectShell();
lcl_emitEvent(SfxEventHintId::SwMailMerge, STR_SW_EVENT_MAIL_MERGE, xDocShell.get());
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 44e06191929a..da1fd5377054 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -696,7 +696,7 @@ void SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
Point aPt(LONG_MIN, LONG_MIN);
// go out of the frame
rShell.SelectObj(aPt, SW_LEAVE_FRAME);
- SfxBindings& rBind = rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBind = rView.GetViewFrame().GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
rShell.EnterStdMode();
rView.AttrChangedNotify(nullptr);
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 0e1bff91ba67..29e2a770b469 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -857,7 +857,7 @@ void SwTransferable::DeleteSelection()
m_pWrtShell->DeleteTable();
else
{
- SfxDispatcher* pDispatch = m_pWrtShell->GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = m_pWrtShell->GetView().GetViewFrame().GetDispatcher();
pDispatch->Execute(FN_TABLE_DELETE_COL, SfxCallMode::SYNCHRON);
}
}
@@ -1517,7 +1517,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
if (!bSingleCellTable && rData.HasFormat( SotClipboardFormatId::HTML ) &&
SwDoc::IsInTable(rSh.GetCursor()->GetPointNode()) != nullptr && rSh.DoesUndo())
{
- SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame().GetDispatcher();
sal_uInt32 nLevel = 0;
// within Writer table cells, inserting worksheets using HTML format results only plain text, not a native table,
@@ -1619,7 +1619,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
rSh.GetCursor()->GetPointNode().GetIndex() == rSh.GetCursor()->GetPointNode().FindTableBoxStartNode()->GetIndex()+1 &&
// beginning of the paragraph?
!rSh.GetCursor()->GetPoint()->GetContentIndex();
- SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame().GetDispatcher();
// go start of the cell
if (!bStartTableBoxNode)
@@ -2574,7 +2574,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrame,
if( bSelectFrame )
{
// select frames/objects
- if( pPt && !rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
+ if( pPt && !rSh.GetView().GetViewFrame().GetDispatcher()->IsLocked() )
{
rSh.GetView().NoRotate();
if( rSh.SelectObj( *pPt ))
@@ -3135,7 +3135,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, ""/*TODO?*/ ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aMediaURLStr );
- rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ rSh.GetView().GetViewFrame().GetDispatcher()->ExecuteList(
SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
{ &aMediaURLItem });
}
@@ -3281,7 +3281,7 @@ bool SwTransferable::PasteDBData( const TransferableDataHelper& rData,
rView.StopShellTimer();
SfxStringItem aDataDesc( nWh, sText );
- rView.GetViewFrame()->GetDispatcher()->ExecuteList(
+ rView.GetViewFrame().GetDispatcher()->ExecuteList(
nWh, SfxCallMode::ASYNCHRON,
{ &aDataDesc, pConnectionItem.get(), pColumnItem.get(),
pSourceItem.get(), pCommandItem.get(), pCommandTypeItem.get(),
@@ -3998,7 +3998,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.StartAction();
rSrcSh.StartAction();
- SfxDispatcher* pDispatch = rSrcSh.GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = rSrcSh.GetView().GetViewFrame().GetDispatcher();
pDispatch->Execute(SID_COPY, SfxCallMode::SYNCHRON);
rSrcSh.Push(); // save selection for later restoration
@@ -4306,7 +4306,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
}
else if ( bRet && bTableMove )
{
- SfxDispatcher* pDispatch = rSrcSh.GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = rSrcSh.GetView().GetViewFrame().GetDispatcher();
pDispatch->Execute(FN_TABLE_DELETE_TABLE, SfxCallMode::SYNCHRON);
}
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 3f8dd2333b9d..d6f7d75eda4e 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1067,7 +1067,7 @@ void SwAnnotationWin::ToggleInsMode()
//change document
mrView.GetWrtShell().ToggleInsMode();
//update statusbar
- SfxBindings &rBnd = mrView.GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = mrView.GetViewFrame().GetBindings();
rBnd.Invalidate(SID_ATTR_INSERT);
rBnd.Update(SID_ATTR_INSERT);
}
@@ -1092,7 +1092,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
if (mrMgr.HasActiveSidebarWin())
mrMgr.SetActiveSidebarWin(nullptr);
SwitchToFieldPos();
- mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+ mrView.GetViewFrame().GetDispatcher()->Execute(FN_POSTIT);
if (nSlot == FN_REPLY)
{
@@ -1126,7 +1126,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
case FN_DELETE_ALL_NOTES:
case FN_HIDE_ALL_NOTES:
// not possible as slot as this would require that "this" is the active postit
- mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame().GetBindings().Execute( nSlot, nullptr, SfxCallMode::ASYNCHRON );
break;
case FN_DELETE_NOTE_AUTHOR:
case FN_HIDE_NOTE_AUTHOR:
@@ -1136,11 +1136,11 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
const SfxPoolItem* aItems[2];
aItems[0] = &aItem;
aItems[1] = nullptr;
- mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame().GetBindings().Execute( nSlot, aItems, SfxCallMode::ASYNCHRON );
}
break;
default:
- mrView.GetViewFrame()->GetBindings().Execute( nSlot );
+ mrView.GetViewFrame().GetBindings().Execute( nSlot );
break;
}
}
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 539a310b08aa..763d6d729e12 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -532,13 +532,13 @@ void SwHeaderFooterWin::ExecuteCommand(std::string_view rIdent)
}
else if (rIdent == "insert_pagenumber")
{
- SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
- pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGNUMBER);
+ SfxViewFrame& rVFrame = rSh.GetView().GetViewFrame();
+ rVFrame.GetBindings().Execute(FN_INSERT_FLD_PGNUMBER);
}
else if (rIdent == "insert_pagecount")
{
- SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
- pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGCOUNT);
+ SfxViewFrame& rVFrame = rSh.GetView().GetViewFrame();
+ rVFrame.GetBindings().Execute(FN_INSERT_FLD_PGCOUNT);
}
}
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 50b1dcfa88de..1af030258d01 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -314,7 +314,7 @@ void SwBreakDashedLine::execute(std::string_view rIdent)
rSh.SetSelection( SwPaM(rNd) );
SfxStringItem aItem(m_pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), "textflow");
- m_pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ m_pEditWin->GetView().GetViewFrame().GetDispatcher()->ExecuteList(
FN_FORMAT_TABLE_DLG,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
{ &aItem });
@@ -326,7 +326,7 @@ void SwBreakDashedLine::execute(std::string_view rIdent)
SwPaM aPaM( rNd );
SwPaMItem aPaMItem( m_pEditWin->GetView().GetPool( ).GetWhich( FN_PARAM_PAM ), &aPaM );
SfxStringItem aItem( SID_PARA_DLG, "textflow" );
- m_pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ m_pEditWin->GetView().GetViewFrame().GetDispatcher()->ExecuteList(
SID_PARA_DLG,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
{ &aItem, &aPaMItem });
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index e0ceb396fc81..cc11be02b7d6 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -521,7 +521,7 @@ void SwPostItMgr::Focus(const SfxBroadcaster& rBC)
{
if (!mpWrtShell->GetViewOptions()->IsPostIts())
{
- SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_NOTES);
+ SfxRequest aRequest(&mpView->GetViewFrame(), SID_TOGGLE_NOTES);
mpView->ExecViewOptions(aRequest);
}
@@ -535,7 +535,7 @@ void SwPostItMgr::Focus(const SfxBroadcaster& rBC)
if (postItField->mpPostIt->IsResolved() &&
!mpWrtShell->GetViewOptions()->IsResolvedPostIts())
{
- SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_RESOLVED_NOTES);
+ SfxRequest aRequest(&mpView->GetViewFrame(), SID_TOGGLE_RESOLVED_NOTES);
mpView->ExecViewOptions(aRequest);
}
postItField->mpPostIt->GrabFocus();
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index bdf343bc80d1..b08758a611a0 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -345,7 +345,7 @@ bool SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
}
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(false);
+ mrDocView.GetViewFrame().GetBindings().InvalidateAll(false);
return bDone;
}
@@ -382,7 +382,7 @@ bool SidebarTextControl::MouseButtonDown(const MouseEvent& rMEvt)
bool bRet = WeldEditView::MouseButtonDown(rMEvt);
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(false);
+ mrDocView.GetViewFrame().GetBindings().InvalidateAll(false);
return bRet;
}
@@ -404,7 +404,7 @@ IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, v
{
if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
{
- mrDocView.GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
+ mrDocView.GetViewFrame().GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
}
}
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index 8631226e55bf..d172f371872a 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -73,7 +73,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true );
if( rSh.GetDrawView()->Command( aDragEvent, this ) )
{
- m_rView.GetViewFrame()->GetBindings().InvalidateAll(false);
+ m_rView.GetViewFrame().GetBindings().InvalidateAll(false);
return; // Event evaluated by SdrView
}
}
@@ -496,12 +496,8 @@ IMPL_LINK_NOARG(SwEditWin, DDHandler, Timer *, void)
m_bMBPressed = false;
ReleaseMouse();
g_bFrameDrag = false;
-
- if ( m_rView.GetViewFrame() )
- {
- g_bExecuteDrag = true;
- StartExecuteDrag();
- }
+ g_bExecuteDrag = true;
+ StartExecuteDrag();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 7d0e82cb107e..f127a5a64c24 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -989,7 +989,7 @@ void SwEditWin::FlushInBuffer()
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_rView.GetViewFrame()->GetBindings().GetRecorder();
+ m_rView.GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
// determine shell
@@ -997,7 +997,7 @@ void SwEditWin::FlushInBuffer()
// generate request and record
if (pSfxShell)
{
- SfxRequest aReq( m_rView.GetViewFrame(), FN_INSERT_STRING );
+ SfxRequest aReq(&m_rView.GetViewFrame(), FN_INSERT_STRING);
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, m_aInBuffer ) );
aReq.Done();
}
@@ -1381,7 +1381,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
{
m_pApplyTempl->m_pFormatClipboard->Erase();
SetApplyTemplate(SwApplyTemplate());
- m_rView.GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
+ m_rView.GetViewFrame().GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
}
else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
rSh.IsHeaderFooterEdit( ) )
@@ -1394,7 +1394,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
rSh.ToggleHeaderFooterEdit();
}
- SfxObjectShell *pObjSh = m_rView.GetViewFrame()->GetObjectShell();
+ SfxObjectShell *pObjSh = m_rView.GetViewFrame().GetObjectShell();
if ( m_bLockInput || (pObjSh && pObjSh->GetProgress()) )
// When the progress bar is active or a progress is
// running on a document, no order is being taken
@@ -1426,7 +1426,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// OS:the DrawView also needs a readonly-Flag as well
if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( false );
+ rSh.GetView().GetViewFrame().GetBindings().InvalidateAll( false );
rSh.SetModified();
return; // Event evaluated by SdrView
}
@@ -1634,7 +1634,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SvxAutoCorrect* pACorr = nullptr;
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_rView.GetViewFrame()->GetBindings().GetRecorder();
+ m_rView.GetViewFrame().GetBindings().GetRecorder();
if ( !xRecorder.is() )
{
pACfg = &SvxAutoCorrCfg::Get();
@@ -2107,7 +2107,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() )
{
- GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
+ GetView().GetViewFrame().GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
eKeyState = SwKeyState::End;
}
else if( rSh.GetNumRuleAtCurrCursorPos()
@@ -2182,7 +2182,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() )
{
- GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
+ GetView().GetViewFrame().GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
eKeyState = SwKeyState::End;
}
else if( rSh.GetNumRuleAtCurrCursorPos()
@@ -2318,7 +2318,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() )
{
- GetView().GetViewFrame()->GetDispatcher()->Execute(
+ GetView().GetViewFrame().GetDispatcher()->Execute(
KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD );
}
else
@@ -2403,7 +2403,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
// enabled at the last status update, copy has to called
// 'forcefully' by us if necessary.
if( rKeyCode.GetFunction() == KeyFuncType::COPY )
- GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);
+ GetView().GetViewFrame().GetBindings().Execute(SID_COPY);
if( !bIsDocReadOnly && bNormalChar )
{
@@ -2745,9 +2745,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
const sal_uInt16 nId = SwInputChild::GetChildWindowId();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- pVFrame->ToggleChildWindow( nId );
- SwInputChild* pChildWin = static_cast<SwInputChild*>(pVFrame->
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.ToggleChildWindow( nId );
+ SwInputChild* pChildWin = static_cast<SwInputChild*>(rVFrame.
GetChildWindow( nId ));
if( pChildWin )
pChildWin->SetFormula( sFormulaEntry );
@@ -2785,9 +2785,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
default:
break;
}
- if( nSlotId && m_rView.GetViewFrame()->GetBindings().GetRecorder().is() )
+ if( nSlotId && m_rView.GetViewFrame().GetBindings().GetRecorder().is() )
{
- SfxRequest aReq(m_rView.GetViewFrame(), nSlotId );
+ SfxRequest aReq(&m_rView.GetViewFrame(), nSlotId);
aReq.Done();
}
eKeyState = SwKeyState::End;
@@ -2798,7 +2798,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
// update the page number in the statusbar
sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if( KEY_UP == nKey || KEY_DOWN == nKey || KEY_PAGEUP == nKey || KEY_PAGEDOWN == nKey )
- GetView().GetViewFrame()->GetBindings().Update( FN_STAT_PAGE );
+ GetView().GetViewFrame().GetBindings().Update( FN_STAT_PAGE );
// in case the buffered characters are inserted
if( bFlushBuffer && !m_aInBuffer.isEmpty() )
@@ -2816,7 +2816,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
// get the word count dialog to update itself
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if( pWrdCnt )
pWrdCnt->UpdateCounts();
@@ -3076,7 +3076,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
if (pSdrView->MouseButtonDown(aMEvt, GetOutDev()))
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ rSh.GetView().GetViewFrame().GetBindings().InvalidateAll(false);
return; // SdrView's event evaluated
}
}
@@ -3120,7 +3120,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
m_rView.SetTabColFromDocPos( aDocPos );
m_rView.InvalidateRulerPos();
- SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_rView.GetViewFrame().GetBindings();
rBind.Update();
if (RulerColumnDrag(
aMEvt, (SwTab::COL_VERT == nMouseTabCol || SwTab::ROW_HORI == nMouseTabCol)))
@@ -3143,7 +3143,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwTextNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPos );
m_rView.SetNumRuleNodeFromDoc( pNodeAtPos );
m_rView.InvalidateRulerPos();
- SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_rView.GetViewFrame().GetBindings();
rBind.Update();
if (RulerMarginDrag(aMEvt, SwFEShell::IsVerticalModeAtNdAndPos(*pNodeAtPos, aDocPos)))
@@ -3290,7 +3290,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// only try to select frame, if pointer already was
// switched accordingly
if ( m_aActHitType != SdrHitKind::NONE && !rSh.IsSelFrameMode() &&
- !GetView().GetViewFrame()->GetDispatcher()->IsLocked())
+ !GetView().GetViewFrame().GetDispatcher()->IsLocked())
{
// Test if there is a draw object at that position and if it should be selected.
bool bShould = rSh.ShouldObjectBeSelected(aDocPos);
@@ -3426,7 +3426,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
ResetMouseButtonDownFlags();
if (!comphelper::LibreOfficeKit::isActive())
{
- GetView().GetViewFrame()->GetBindings().Execute(
+ GetView().GetViewFrame().GetBindings().Execute(
FN_FORMAT_GRAFIC_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
@@ -3442,7 +3442,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
ResetMouseButtonDownFlags();
if (!comphelper::LibreOfficeKit::isActive())
{
- GetView().GetViewFrame()->GetBindings().Execute(
+ GetView().GetViewFrame().GetBindings().Execute(
FN_FORMAT_FRAME_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
@@ -3473,11 +3473,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
ResetMouseButtonDownFlags();
if( bFootnote )
- GetView().GetViewFrame()->GetBindings().Execute( FN_EDIT_FOOTNOTE );
+ GetView().GetViewFrame().GetBindings().Execute( FN_EDIT_FOOTNOTE );
else
{
SwFieldTypesEnum nTypeId = pField->GetTypeId();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
switch( nTypeId )
{
case SwFieldTypesEnum::Postit:
@@ -3486,20 +3486,20 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// if it's a Readonly region, status has to be enabled
sal_uInt16 nSlot = SwFieldTypesEnum::Postit == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
SfxBoolItem aItem(nSlot, true);
- pVFrame->GetBindings().SetState(aItem);
- pVFrame->GetBindings().Execute(nSlot);
+ rVFrame.GetBindings().SetState(aItem);
+ rVFrame.GetBindings().Execute(nSlot);
break;
}
case SwFieldTypesEnum::Authority :
- pVFrame->GetBindings().Execute(FN_EDIT_AUTH_ENTRY_DLG);
+ rVFrame.GetBindings().Execute(FN_EDIT_AUTH_ENTRY_DLG);
break;
case SwFieldTypesEnum::Input:
case SwFieldTypesEnum::Dropdown:
case SwFieldTypesEnum::SetInput:
- pVFrame->GetBindings().Execute(FN_UPDATE_INPUTFIELDS);
+ rVFrame.GetBindings().Execute(FN_UPDATE_INPUTFIELDS);
break;
default:
- pVFrame->GetBindings().Execute(FN_EDIT_FIELD);
+ rVFrame.GetBindings().Execute(FN_EDIT_FIELD);
}
}
return;
@@ -3534,7 +3534,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
ResetMouseButtonDownFlags();
rSh.getIDocumentMarkAccess()->ClearFieldActivation();
- GetView().GetViewFrame()->GetBindings().Execute(SID_FM_CTL_PROPERTIES);
+ GetView().GetViewFrame().GetBindings().Execute(SID_FM_CTL_PROPERTIES);
return;
}
}
@@ -3551,7 +3551,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (pTType && pTType->GetType() == TOXTypes::TOX_INDEX)
{
ResetMouseButtonDownFlags();
- GetView().GetViewFrame()->GetBindings().Execute(
+ GetView().GetViewFrame().GetBindings().Execute(
FN_EDIT_IDX_ENTRY_DLG);
return;
}
@@ -3716,7 +3716,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// dispatch its dialog in this case.
if (rSh.GetSelectionType() == SelectionType::Graphic)
{
- GetView().GetViewFrame()->GetBindings().Execute(
+ GetView().GetViewFrame().GetBindings().Execute(
FN_FORMAT_GRAFIC_DLG, nullptr,
SfxCallMode::RECORD | SfxCallMode::SLOT);
return;
@@ -4212,7 +4212,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
else if(!rSh.IsFrameSelected() && !rSh.IsObjSelected())
{
- SfxBindings &rBnd = rSh.GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = rSh.GetView().GetViewFrame().GetBindings();
Point aRelPos = rSh.GetRelativePagePosition(aDocPt);
if(aRelPos.X() >= 0)
{
@@ -4295,7 +4295,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
{
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
}
@@ -4620,7 +4620,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( pSdrView->MouseButtonUp( rMEvt,GetOutDev() ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ rSh.GetView().GetViewFrame().GetBindings().InvalidateAll(false);
return; // SdrView's event evaluated
}
}
@@ -4696,7 +4696,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (!m_rView.IsDrawMode())
{
m_rView.SetDrawFuncPtr(nullptr);
- SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_rView.GetViewFrame().GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
rBind.Invalidate( SID_TABLE_CELL );
}
@@ -5238,13 +5238,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_rView.GetViewFrame()->GetBindings().GetRecorder();
+ m_rView.GetViewFrame().GetBindings().GetRecorder();
if ( !aStyleName.isEmpty() && xRecorder.is() )
{
SfxShell *pSfxShell = lcl_GetTextShellFromDispatcher( m_rView );
if ( pSfxShell )
{
- SfxRequest aReq( m_rView.GetViewFrame(), SID_STYLE_APPLY );
+ SfxRequest aReq( &m_rView.GetViewFrame(), SID_STYLE_APPLY );
aReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aStyleName ) );
aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, static_cast<sal_uInt16>(m_pApplyTempl->eType) ) );
aReq.Done();
@@ -5337,7 +5337,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
SID_ATTR_CHAR_COLOR_BACKGROUND_EXT,
0
};
- m_rView.GetViewFrame()->GetBindings().Invalidate(aInva);
+ m_rView.GetViewFrame().GetBindings().Invalidate(aInva);
}
/**
@@ -5536,7 +5536,7 @@ void SwEditWin::LoseFocus()
void SwEditWin::Command( const CommandEvent& rCEvt )
{
- if (!m_rView.GetViewFrame() || isDisposed())
+ if (isDisposed())
{
// If ViewFrame dies shortly, no popup anymore!
Window::Command(rCEvt);
@@ -5564,7 +5564,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case CommandEventId::ContextMenu:
{
const sal_uInt16 nId = SwInputChild::GetChildWindowId();
- SwInputChild* pChildWin = static_cast<SwInputChild*>(GetView().GetViewFrame()->
+ SwInputChild* pChildWin = static_cast<SwInputChild*>(GetView().GetViewFrame().
GetChildWindow( nId ));
if (m_rView.GetPostItMgr()->IsHit(rCEvt.GetMousePosPixel()))
@@ -5623,7 +5623,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
css::uno::Reference<css::awt::XWindowPeer> xParent(aEvent.SourceWindow, css::uno::UNO_QUERY);
sal_uInt16 nExecId = xMenu->execute(xParent, css::awt::Rectangle(aPixPos.X(), aPixPos.Y(), 1, 1),
css::awt::PopupMenuDirection::EXECUTE_DOWN);
- if (!::ExecuteMenuCommand(xMenu, *m_rView.GetViewFrame(), nExecId))
+ if (!::ExecuteMenuCommand(xMenu, m_rView.GetViewFrame(), nExecId))
aROPopup.Execute(this, nExecId);
}
else
@@ -5710,7 +5710,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
bCallBase = false;
OUString sRecord = rSh.DeleteExtTextInput();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_rView.GetViewFrame()->GetBindings().GetRecorder();
+ m_rView.GetViewFrame().GetBindings().GetRecorder();
if ( !sRecord.isEmpty() )
{
@@ -5735,7 +5735,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// generate request and record
if (pSfxShell)
{
- SfxRequest aReq( m_rView.GetViewFrame(), FN_INSERT_STRING );
+ SfxRequest aReq( &m_rView.GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sRecord ) );
aReq.Done();
}
@@ -5769,7 +5769,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_rView.GetViewFrame()->GetBindings().GetRecorder();
+ m_rView.GetViewFrame().GetBindings().GetRecorder();
if(!xRecorder.is())
{
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
@@ -5835,7 +5835,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
else if(!pCommandData->IsLeftShift() && pCommandData->IsRightShift())
nSlot = SID_ATTR_PARA_RIGHT_TO_LEFT;
if(nSlot && SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
- GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
+ GetView().GetViewFrame().GetDispatcher()->Execute(nSlot);
}
}
break;
@@ -5973,7 +5973,7 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
m_rView.GetDrawFuncPtr()->Deactivate();
m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
- SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_rView.GetViewFrame().GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
rBind.Invalidate( SID_TABLE_CELL );
}
@@ -6018,7 +6018,7 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if (pSdrView->MouseButtonDown( aMEvt, GetOutDev() ) )
{
pSdrView->MouseButtonUp( aMEvt, GetOutDev() );
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ rSh.GetView().GetViewFrame().GetBindings().InvalidateAll(false);
return;
}
}
@@ -6037,7 +6037,7 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
UpdatePointer( aDocPos );
if( !rSh.IsSelFrameMode() &&
- !GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
+ !GetView().GetViewFrame().GetDispatcher()->IsLocked() )
{
// Test if there is a draw object at that position and if it should be selected.
bool bShould = rSh.ShouldObjectBeSelected(aDocPos);
@@ -6168,7 +6168,7 @@ static SfxShell* lcl_GetTextShellFromDispatcher( SwView const & rView )
{
// determine Shell
SfxShell* pShell;
- SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = rView.GetViewFrame().GetDispatcher();
for(sal_uInt16 i = 0; true; ++i )
{
pShell = pDispatcher->GetShell( i );
@@ -6218,7 +6218,7 @@ void SwEditWin::SetChainMode( bool bOn )
{
FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0
};
- m_rView.GetViewFrame()->GetBindings().Invalidate(aInva);
+ m_rView.GetViewFrame().GetBindings().Invalidate(aInva);
}
uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible()
@@ -6630,7 +6630,7 @@ void SwEditWin::SetUseInputLanguage( bool bNew )
{
if ( bNew || m_bUseInputLanguage )
{
- SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetView().GetViewFrame().GetBindings();
rBind.Invalidate( SID_ATTR_CHAR_FONT );
rBind.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
}
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index a9319e70d158..ed568562587f 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -147,8 +147,8 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView &rV)
m_xMenu->EnableItem(m_nReadonlyGraphictogallery, bEnableGraphicToGallery);
- SfxViewFrame * pVFrame = rV.GetViewFrame();
- SfxDispatcher &rDis = *pVFrame->GetDispatcher();
+ SfxViewFrame& rVFrame = rV.GetViewFrame();
+ SfxDispatcher &rDis = *rVFrame.GetDispatcher();
const SwPageDesc &rDesc = rSh.GetPageDesc( rSh.GetCurPageDesc() );
m_xBrushItem = rDesc.GetMaster().makeBackgroundBrushItem();
bool bEnableBackGallery = false,
@@ -195,12 +195,12 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView &rV)
std::unique_ptr<SfxPoolItem> pState;
- SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
+ SfxItemState eState = rVFrame.GetBindings().QueryState( SID_COPY, pState );
Check(m_nReadonlyCopy, SID_COPY, rDis);
if (eState < SfxItemState::DEFAULT)
m_xMenu->EnableItem(m_nReadonlyCopy, false);
- eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
+ eState = rVFrame.GetBindings().QueryState( SID_EDITDOC, pState );
if (
eState < SfxItemState::DEFAULT ||
(rSh.IsGlobalDoc() && m_rView.GetDocShell()->IsReadOnlyUI())
@@ -230,7 +230,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, const Point &rPixPos )
void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
{
SwWrtShell &rSh = m_rView.GetWrtShell();
- SfxDispatcher &rDis = *m_rView.GetViewFrame()->GetDispatcher();
+ SfxDispatcher &rDis = *m_rView.GetViewFrame().GetDispatcher();
if (nId >= MN_READONLY_GRAPHICTOGALLERY)
{
OUString sTmp;
@@ -280,7 +280,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
else if (nId == m_nReadonlySelectionMode)
nExecId = FN_READONLY_SELECTION_MODE;
else if (nId == m_nReadonlyReload || nId == m_nReadonlyReloadFrame)
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(SID_RELOAD);
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute(SID_RELOAD);
else if (nId == m_nReadonlyBrowseBackward)
nExecId = SID_BROWSE_BACKWARD;
else if (nId == m_nReadonlyBrowseForward)
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 2684b2c6aa7d..732553e2bbf4 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -391,14 +391,11 @@ void TextViewOutWin::MouseButtonUp( const MouseEvent &rEvt )
if ( m_pTextView )
{
m_pTextView->MouseButtonUp( rEvt );
- SfxViewFrame *pFrame = static_cast<SwSrcEditWindow*>(GetParent())->GetSrcView()->GetViewFrame();
- if ( pFrame )
- {
- SfxBindings& rBindings = pFrame->GetBindings();
- rBindings.Invalidate( SID_TABLE_CELL );
- rBindings.Invalidate( SID_CUT );
- rBindings.Invalidate( SID_COPY );
- }
+ SfxViewFrame& rFrame = static_cast<SwSrcEditWindow*>(GetParent())->GetSrcView()->GetViewFrame();
+ SfxBindings& rBindings = rFrame.GetBindings();
+ rBindings.Invalidate( SID_TABLE_CELL );
+ rBindings.Invalidate( SID_CUT );
+ rBindings.Invalidate( SID_COPY );
}
}
@@ -444,7 +441,7 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
if(bChange)
bDone = m_pTextView->KeyInput( rKEvt );
- SfxBindings& rBindings = static_cast<SwSrcEditWindow*>(GetParent())->GetSrcView()->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = static_cast<SwSrcEditWindow*>(GetParent())->GetSrcView()->GetViewFrame().GetBindings();
if ( !bDone )
{
if ( !SfxViewShell::Current()->KeyInput( rKEvt ) )
@@ -526,7 +523,7 @@ void SwSrcEditWindow::CreateTextEngine()
InitScrollBars();
StartListening( *m_pTextEngine );
- SfxBindings& rBind = GetSrcView()->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetSrcView()->GetViewFrame().GetBindings();
rBind.Invalidate( SID_TABLE_CELL );
}
@@ -560,7 +557,7 @@ IMPL_LINK_NOARG(SwSrcEditWindow, HorzScrollHdl, weld::Scrollbar&, void)
GetTextView()->Scroll( nDiff, 0 );
m_pTextView->ShowCursor( false );
m_pHScrollbar->SetThumbPos( m_pTextView->GetStartDocPos().X() );
- GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL );
+ GetSrcView()->GetViewFrame().GetBindings().Invalidate( SID_TABLE_CELL );
}
IMPL_LINK_NOARG(SwSrcEditWindow, VertScrollHdl, weld::Scrollbar&, void)
@@ -569,7 +566,7 @@ IMPL_LINK_NOARG(SwSrcEditWindow, VertScrollHdl, weld::Scrollbar&, void)
GetTextView()->Scroll( 0, nDiff );
m_pTextView->ShowCursor( false );
m_pVScrollbar->SetThumbPos( m_pTextView->GetStartDocPos().Y() );
- GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL );
+ GetSrcView()->GetViewFrame().GetBindings().Invalidate( SID_TABLE_CELL );
}
IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer*, pIdle, void )
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index d8f1fcc04ad0..a556ffa23e9b 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1445,7 +1445,7 @@ bool SwFieldMgr::InsertField(
if (pEntry)
{
SfxStringItem aFormat(FN_NUMBER_FORMAT, pEntry->GetFormatstring());
- pCurShell->GetView().GetViewFrame()->GetDispatcher()->
+ pCurShell->GetView().GetViewFrame().GetDispatcher()->
ExecuteList(FN_NUMBER_FORMAT, SfxCallMode::SYNCHRON,
{ &aFormat });
}
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index b7dc2e106221..c56a199ad022 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -144,7 +144,7 @@ void SwSpellPopup::fillLangPopupMenu(
//6--all languages used in current document
uno::Reference< css::frame::XModel > xModel;
- uno::Reference< css::frame::XController > xController = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController();
+ uno::Reference< css::frame::XController > xController = pWrtSh->GetView().GetViewFrame().GetFrame().GetFrameInterface()->getController();
if ( xController.is() )
xModel = xController->getModel();
uno::Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, uno::UNO_QUERY );
@@ -270,7 +270,7 @@ SwSpellPopup::SwSpellPopup(
}
}
- uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame().GetFrame().GetFrameInterface();
OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
{
@@ -487,7 +487,7 @@ SwSpellPopup::SwSpellPopup(
m_xPopupMenu->InsertSeparator(OString(), nPos++);
}
- uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame().GetFrame().GetFrameInterface();
OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) );
@@ -687,7 +687,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
sApplyRule += m_xPopupMenu->GetItemText(nId);
SfxStringItem aApplyItem(FN_PARAM_1, sApplyRule);
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_SPELLCHECK_APPLY_SUGGESTION, SfxCallMode::SYNCHRON, { &aApplyItem });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_SPELLCHECK_APPLY_SUGGESTION, SfxCallMode::SYNCHRON, { &aApplyItem });
}
else if(MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)
{
@@ -750,23 +750,23 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
{
m_pSh->Left(SwCursorSkipMode::Chars, false, 1, false );
{
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->
Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON );
}
}
else if (nId == m_nCorrectDialogId)
{
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
}
else if (nId == MN_IGNORE_SELECTION)
{
SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? OUString("Grammar") : OUString("Spelling"));
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE, SfxCallMode::SYNCHRON, { &aIgnoreString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE, SfxCallMode::SYNCHRON, { &aIgnoreString });
}
else if (nId == m_nIgnoreWordId)
{
SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? OUString("Grammar") : OUString("Spelling"));
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE_ALL, SfxCallMode::SYNCHRON, { &aIgnoreString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE_ALL, SfxCallMode::SYNCHRON, { &aIgnoreString });
}
else if ((MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) || nId == m_nAddId)
{
@@ -832,7 +832,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
else if (nId == m_nRedlinePrevId)
nId = FN_REDLINE_PREV_CHANGE;
// Let SwView::Execute() handle the redline actions.
- SfxRequest aReq(m_pSh->GetView().GetViewFrame(), nId);
+ SfxRequest aReq(&m_pSh->GetView().GetViewFrame(), nId);
m_pSh->GetView().Execute(aReq);
}
else
@@ -840,41 +840,41 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_" + m_aLangTable_Text[nId]);
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_SELECTION_NONE)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_LANGUAGE_NONE");
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_SELECTION_RESET)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_RESET_LANGUAGES");
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_SELECTION_MORE)
{
SfxStringItem aDlgString(FN_PARAM_1, "font");
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_CHAR_DLG, SfxCallMode::SYNCHRON, { &aDlgString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_CHAR_DLG, SfxCallMode::SYNCHRON, { &aDlgString });
}
else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_" + m_aLangTable_Paragraph[nId]);
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_PARA_NONE)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_LANGUAGE_NONE");
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_PARA_RESET)
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_RESET_LANGUAGES");
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString });
}
else if (nId == MN_SET_PARA_MORE)
{
- m_pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG_FOR_PARAGRAPH );
+ m_pSh->GetView().GetViewFrame().GetDispatcher()->Execute( SID_CHAR_DLG_FOR_PARAGRAPH );
}
}
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 7f61f8a7863f..eab58f58c571 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -105,7 +105,7 @@ void SwModelessRedlineAcceptDlg::Activate()
bool bMod = pSh->IsModified();
SfxBoolItem aShow(FN_REDLINE_SHOW, true);
- pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(
FN_REDLINE_SHOW, SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aShow });
if (!bMod)
@@ -1082,7 +1082,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, RejectAllHdl, SvxTPView*, void)
IMPL_LINK_NOARG(SwRedlineAcceptDlg, UndoHdl, SvxTPView*, void)
{
SwView * pView = ::GetActiveView();
- pView->GetViewFrame()->GetDispatcher()->
+ pView->GetViewFrame().GetDispatcher()->
Execute(SID_UNDO, SfxCallMode::SYNCHRON);
m_pTPView->EnableUndo(pView->GetSlotState(SID_UNDO) != nullptr);
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 4166a754bf77..48ce19524065 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -224,7 +224,7 @@ void SwCommentRuler::MouseButtonDown(const MouseEvent& rMEvt)
// Toggle notes visibility
SwView& rView = mpSwWin->GetView();
- SfxRequest aRequest(rView.GetViewFrame(), SID_TOGGLE_NOTES);
+ SfxRequest aRequest(&rView.GetViewFrame(), SID_TOGGLE_NOTES);
rView.ExecViewOptions(aRequest);
// It is inside comment control, so update help text
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index 9e222085965f..8d9d468a92f2 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -130,7 +130,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
m_pView->BeginTextEdit( pObj, pPV, m_pWin, true );
}
m_pView->LeaveDrawCreate(); // Switch to selection mode
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
break;
case SdrObjKind::Caption:
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index 228911e5ecea..e117c7295861 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -278,10 +278,10 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if (SdrObjKind::NONE == nDrawMode) // Text border inserted
{
uno::Reference< frame::XDispatchRecorder > xRecorder =
- m_pSh->GetView().GetViewFrame()->GetBindings().GetRecorder();
+ m_pSh->GetView().GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
+ SfxRequest aReq(&m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
aReq .AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
static_cast<sal_uInt16>(RndStdIds::FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
@@ -336,7 +336,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
m_pView->LeaveDrawCreate(); // Switch to selection mode
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
if (m_pSh->IsSelFrameMode())
m_pSh->LeaveSelFrameMode();
@@ -394,7 +394,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
m_pView->LeaveDrawCreate(); // Switch to selection mode
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
if (m_pSh->IsSelFrameMode())
m_pSh->LeaveSelFrameMode();
@@ -458,7 +458,7 @@ void SwDrawBase::Deactivate()
if (m_pWin->GetApplyTemplate())
m_pWin->SetApplyTemplate(SwApplyTemplate());
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
}
// Process keyboard events
@@ -502,7 +502,7 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
{
m_pView->LeaveDrawCreate(); // Switch to selection mode
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
}
}
else
diff --git a/sw/source/uibase/ribbar/dselect.cxx b/sw/source/uibase/ribbar/dselect.cxx
index 205cb81fa5f5..abbebc0445e5 100644
--- a/sw/source/uibase/ribbar/dselect.cxx
+++ b/sw/source/uibase/ribbar/dselect.cxx
@@ -38,7 +38,7 @@ void DrawSelection::Activate(const sal_uInt16 nSlotId)
m_pWin->SetObjectSelect(true);
SwDrawBase::Activate(nSlotId);
- m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 255ae24335ab..0402e110fdad 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -278,7 +278,7 @@ void SwInputWindow::ShowWin()
// For input cut the UserInterface
m_pView->GetEditWin().LockKeyInput(true);
- m_pView->GetViewFrame()->GetDispatcher()->Lock(true);
+ m_pView->GetViewFrame().GetDispatcher()->Lock(true);
m_pWrtShell->Push();
}
@@ -337,11 +337,11 @@ void SwInputWindow::ApplyFormula()
// presumably there must be an active view now since the event arrived
SwView *const pActiveView = ::GetActiveView();
// this just makes the input window go away, so that the next time it works
- pActiveView->GetViewFrame()->GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
+ pActiveView->GetViewFrame().GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
return;
}
- m_pView->GetViewFrame()->GetDispatcher()->Lock(false);
+ m_pView->GetViewFrame().GetDispatcher()->Lock(false);
m_pView->GetEditWin().LockKeyInput(false);
CleanupUglyHackWithUndo();
m_pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -357,7 +357,7 @@ void SwInputWindow::ApplyFormula()
const SfxPoolItem* aArgs[2];
aArgs[0] = &aParam;
aArgs[1] = nullptr;
- m_pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, SfxCallMode::ASYNCHRON );
+ m_pView->GetViewFrame().GetBindings().Execute( FN_EDIT_FORMULA, aArgs, SfxCallMode::ASYNCHRON );
}
void SwInputWindow::CancelFormula()
@@ -370,11 +370,11 @@ void SwInputWindow::CancelFormula()
// presumably there must be an active view now since the event arrived
SwView *const pActiveView = ::GetActiveView();
// this just makes the input window go away, so that the next time it works
- pActiveView->GetViewFrame()->GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
+ pActiveView->GetViewFrame().GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
return;
}
- m_pView->GetViewFrame()->GetDispatcher()->Lock( false );
+ m_pView->GetViewFrame().GetDispatcher()->Lock( false );
m_pView->GetEditWin().LockKeyInput(false);
CleanupUglyHackWithUndo();
m_pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
@@ -386,7 +386,7 @@ void SwInputWindow::CancelFormula()
m_pView->GetEditWin().GrabFocus();
- m_pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
+ m_pView->GetViewFrame().GetDispatcher()->Execute( FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON);
}
const sal_Unicode CH_LRE = 0x202a;
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 5317da59443e..fb38977c3ea4 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -720,10 +720,10 @@ void SAL_CALL NavElementToolBoxControl::statusChanged( const frame::FeatureState
m_pBox->set_sensitive(true);
SwView* pView = GetActiveView();
- if (pView && pView->GetViewFrame())
+ if (pView)
{
- pView->GetViewFrame()->GetBindings().Invalidate(FN_SCROLL_NEXT);
- pView->GetViewFrame()->GetBindings().Invalidate(FN_SCROLL_PREV);
+ pView->GetViewFrame().GetBindings().Invalidate(FN_SCROLL_NEXT);
+ pView->GetViewFrame().GetBindings().Invalidate(FN_SCROLL_PREV);
}
}
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 6318c7bf7852..9e9fd0f2c07a 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -587,11 +587,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
else if (nEEWhich == EE_CHAR_COLOR)
{
- m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
+ m_rView.GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
}
else if (nEEWhich == EE_CHAR_KERNING)
{
- m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+ m_rView.GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
}
@@ -599,7 +599,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
if (tools::Rectangle() != aOutRect && aNewAttr.Count())
pOLV->SetAttribs(aNewAttr);
- m_rView.GetViewFrame()->GetBindings().InvalidateAll(false);
+ m_rView.GetViewFrame().GetBindings().InvalidateAll(false);
if ( pOLV->GetOutliner()->IsModified() )
m_rView.GetWrtShell().SetModified();
@@ -844,7 +844,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
{
SvtCTLOptions aCTLOptions;
bool bEnabled = aCTLOptions.IsCTLFontEnabled();
- m_rView.GetViewFrame()->GetBindings().SetVisibleState( nWhich, bEnabled );
+ m_rView.GetViewFrame().GetBindings().SetVisibleState( nWhich, bEnabled );
if(!bEnabled)
rSet.DisableItem(nWhich);
}
@@ -1429,11 +1429,11 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
if (!SvtCJKOptions::IsAnyEnabled())
{
- m_rView.GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
+ m_rView.GetViewFrame().GetBindings().SetVisibleState( nWhich, false );
rSet.DisableItem(nWhich);
}
else
- m_rView.GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
+ m_rView.GetViewFrame().GetBindings().SetVisibleState( nWhich, true );
}
break;
}
@@ -1522,7 +1522,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
// tdf#147928 get these before "undo" which may delete this SwAnnotationShell
SwPostItMgr* pPostItMgr = m_rView.GetPostItMgr();
- SfxBindings& rBindings = m_rView.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = m_rView.GetViewFrame().GetBindings();
tools::Long aOldHeight = pPostItMgr->HasActiveSidebarWin()
? pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight()
@@ -1614,7 +1614,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
SwUndoId nUndoId(SwUndoId::EMPTY);
sal_uInt16 nWhich = aIter.FirstWhich();
SfxUndoManager* pUndoManager = GetUndoManager();
- SfxViewFrame *pSfxViewFrame = m_rView.GetViewFrame();
+ SfxViewFrame& rSfxViewFrame = m_rView.GetViewFrame();
SwWrtShell &rSh = m_rView.GetWrtShell();
while( nWhich )
@@ -1625,7 +1625,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetUndoActionCount() : 0;
if ( nCount )
- pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
+ rSfxViewFrame.GetSlotState( nWhich, rSfxViewFrame.GetInterface(), &rSet );
else if (rSh.GetLastUndoInfo(nullptr, &nUndoId))
{
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
@@ -1642,7 +1642,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetRedoActionCount() : 0;
if ( nCount )
- pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
+ rSfxViewFrame.GetSlotState( nWhich, rSfxViewFrame.GetInterface(), &rSet );
else if (rSh.GetFirstRedoInfo(nullptr, &nUndoId))
{
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
@@ -1704,7 +1704,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
default:
{
- pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
+ rSfxViewFrame.GetSlotState( nWhich, rSfxViewFrame.GetInterface(), &rSet );
break;
}
@@ -1791,7 +1791,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont->GetFamilyName() ) );
// If character is selected then it can be shown.
- auto xFrame = m_rView.GetViewFrame()->GetFrame().GetFrameInterface();
+ auto xFrame = m_rView.GetViewFrame().GetFrame().GetFrameInterface();
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_rView.GetFrameWeld(), aAllSet, xFrame));
pDlg->Execute();
return;
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 3fb250b658eb..922e1c4c31ae 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -141,13 +141,13 @@ namespace
{
SvxContourDlg* GetContourDlg(SwView const &rView)
{
- SfxChildWindow *pWnd = rView.GetViewFrame()->GetChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
+ SfxChildWindow *pWnd = rView.GetViewFrame().GetChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
return pWnd ? static_cast<SvxContourDlg*>(pWnd->GetController().get()) : nullptr;
}
SvxIMapDlg* GetIMapDlg(SwView const &rView)
{
- SfxChildWindow* pWnd = rView.GetViewFrame()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
+ SfxChildWindow* pWnd = rView.GetViewFrame().GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetController().get()) : nullptr;
}
}
@@ -422,11 +422,11 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
bIgnore = true;
if(SwTransferable::PasteUnformatted( rSh, aDataHelper ))
{
- SfxViewFrame* pViewFrame = pView->GetViewFrame();
+ SfxViewFrame& rViewFrame = pView->GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
+ SfxRequest aReq( &rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(SotClipboardFormatId::STRING) ) );
aReq.Done();
}
@@ -478,11 +478,11 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
if (bRet)
{
- SfxViewFrame* pViewFrame = pView->GetViewFrame();
+ SfxViewFrame& rViewFrame = pView->GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
+ SfxRequest aReq( &rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) );
aReq.Done();
}
@@ -614,7 +614,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
bRepair = pRepairItem->GetValue();
// #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
- SfxViewFrame *const pViewFrame( GetView().GetViewFrame() );
+ SfxViewFrame& rViewFrame( GetView().GetViewFrame() );
IDocumentUndoRedo& rUndoRedo = rWrtShell.GetIDocumentUndoRedo();
bool bWasRepair = rUndoRedo.DoesRepair();
@@ -689,7 +689,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
rWrtShell.GetDoc()->GetDocShell()->GetStyleSheetPool()->Broadcast(SfxHint(SfxHintId::StyleSheetModified));
}
- if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(false); }
+ rViewFrame.GetBindings().InvalidateAll(false);
}
// State of undo
@@ -1055,7 +1055,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.GetLinkManager().UpdateAllLinks( false, true, nullptr );
rSh.EndAllAction();
}
- SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
+ SfxDispatcher &rDis = *rTempView.GetViewFrame().GetDispatcher();
rDis.Execute( FN_UPDATE_FIELDS );
rDis.Execute( FN_UPDATE_TOX );
rDis.Execute( FN_UPDATE_CHARTS );
@@ -1161,7 +1161,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
nGalleryItemType == css::gallery::GalleryItemType::MEDIA )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
- GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetView().GetViewFrame().GetDispatcher()->ExecuteList(
SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
{ &aMediaURLItem });
}
@@ -1195,7 +1195,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ChgPageDesc(nCurIdx, aPageDesc);
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG);
+ GetView().GetViewFrame().GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG);
}
break;
case FN_CONVERT_TABLE_TO_TEXT:
@@ -1271,10 +1271,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwView& rSaveView = m_rView;
bool bInserted = false;
//recording:
- SfxViewFrame* pViewFrame = GetView().GetViewFrame();
- if( SfxRequest::HasMacroRecorder(pViewFrame) )
+ SfxViewFrame& rViewFrame = GetView().GetViewFrame();
+ if( SfxRequest::HasMacroRecorder(&rViewFrame) )
{
- SfxRequest aReq( pViewFrame, nSlot);
+ SfxRequest aReq( &rViewFrame, nSlot);
aReq.AppendItem( SfxStringItem( FN_PARAM_1, OUString(cDelim) ));
if(bToTable)
{
@@ -1357,11 +1357,11 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().Invalidate( SID_IMAP );
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.ToggleChildWindow( nId );
+ rVFrame.GetBindings().Invalidate( SID_IMAP );
- if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrameSelected() )
+ if ( rVFrame.HasChildWindow( nId ) && rSh.IsFrameSelected() )
lcl_UpdateIMapDlg( rSh );
}
break;
@@ -1404,12 +1404,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().Invalidate( SID_CONTOUR_DLG );
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.ToggleChildWindow( nId );
+ rVFrame.GetBindings().Invalidate( SID_CONTOUR_DLG );
SelectionType nSel = rSh.GetSelectionType();
- if ( pVFrame->HasChildWindow( nId ) &&
+ if ( rVFrame.HasChildWindow( nId ) &&
(nSel & (SelectionType::Graphic|SelectionType::Ole)) )
{
lcl_UpdateContourDlg( rSh, nSel );
@@ -1546,7 +1546,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
rSh.EndUndo();
- GetView().GetViewFrame()->GetBindings().Invalidate( SID_ANCHOR_MENU );
+ GetView().GetViewFrame().GetBindings().Invalidate( SID_ANCHOR_MENU );
}
break;
@@ -1584,7 +1584,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
// set from design mode
OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" );
- SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
+ SfxRequest aReq( &GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
GetView().GetFormShell()->Execute( aReq );
aReq.Done();
@@ -1687,7 +1687,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
return;
bool bProtect = FlyProtectFlags::NONE != rSh.IsSelObjProtected(FlyProtectFlags::Content|FlyProtectFlags::Parent);
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
for( const auto nSlot : m_aGrfUpdateSlots )
{
bool bSetState = false;
@@ -1698,8 +1698,8 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
case SID_IMAP_EXEC:
{
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
- SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : nullptr;
+ SfxChildWindow *pChildWindow = rVFrame.HasChildWindow(nId) ?
+ rVFrame.GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
static_cast<SvxIMapDlg*>(pChildWindow->GetController().get()) : nullptr;
@@ -1720,8 +1720,8 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
if( !bProtect )
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
- SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : nullptr;
+ SfxChildWindow *pChildWindow = rVFrame.HasChildWindow(nId) ?
+ rVFrame.GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
static_cast<SvxIMapDlg*>(pChildWindow->GetController().get()) : nullptr;
if( pDlg && pDlg->GetEditingObject() !=
@@ -1766,7 +1766,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
if( m_pGetStateSet )
m_pGetStateSet->Put( aBool );
else
- pVFrame->GetBindings().SetState( aBool );
+ rVFrame.GetBindings().SetState( aBool );
}
}
m_aGrfUpdateSlots.clear();
@@ -1775,7 +1775,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
void SwBaseShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
m_pGetStateSet = &rSet;
@@ -1876,7 +1876,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
{
const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
- const bool bHas = pVFrame->HasChildWindow( nId );
+ const bool bHas = rVFrame.HasChildWindow( nId );
const bool bFrameSel = rSh.IsFrameSelected();
const bool bIsGraphicSelection =
rSh.GetSelectionType() == SelectionType::Graphic;
@@ -1918,7 +1918,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if( !rSh.IsFrameSelected())
bDisable = true;
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
- if(!bDisable && pVFrame->HasChildWindow( nId ))
+ if(!bDisable && rVFrame.HasChildWindow( nId ))
{
if(rSh.GetSelectionType() == SelectionType::Graphic
&& rSh.IsLinkedGrfSwapOut())
@@ -1956,7 +1956,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
- bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
+ bool bHas = GetView().GetViewFrame().HasChildWindow( nId );
SelectionType nSel = rSh.GetSelectionType();
bool bOk(nSel & (SelectionType::Graphic|SelectionType::Ole));
@@ -2003,7 +2003,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if( !(nSel & (SelectionType::Graphic|SelectionType::Ole)) )
bDisable = true;
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
- if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
+ if( !bDisable && GetView().GetViewFrame().HasChildWindow( nId ))
{
SvxContourDlg *pDlg = GetContourDlg(GetView());
if (pDlg && pDlg->GetEditingObject() != rSh.GetIMapInventor())
@@ -2383,7 +2383,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
void SwBaseShell::SetFrameMode(FlyMode eMode, SwWrtShell *pSh )
{
s_eFrameMode = eMode;
- SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = pSh->GetView().GetViewFrame().GetBindings();
if( eMode == FLY_DRAG || pSh->IsFrameSelected() || pSh->IsObjSelected() )
{
@@ -2548,11 +2548,11 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq )
else
{
if (nSlot == SID_ATTR_CHAR_KERNING)
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
else if (nSlot == SID_ATTR_CHAR_COLOR)
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
else
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG);
}
rReq.Done();
}
@@ -2754,7 +2754,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
const SvxColorItem& rNewColorItem = static_cast<const SvxColorItem&>(pArgs->Get(nSlotId));
const Color& rNewColor = rNewColorItem.GetValue();
aBrushItem->SetColor(rNewColor);
- GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
+ GetView().GetViewFrame().GetBindings().SetState(rNewColorItem);
}
else
{
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 6d4f620f94f7..2c4510fd7aa0 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -78,7 +78,7 @@ void SwBezierShell::Execute(SfxRequest const &rReq)
if (pSh->IsObjSelected())
{
if (pSdrView->HasMarkedPoints())
- pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE);
+ pSh->GetView().GetViewFrame().GetDispatcher()->Execute(SID_BEZIER_DELETE);
else
{
pSh->DelSelectedObj();
@@ -121,7 +121,7 @@ void SwBezierShell::Execute(SfxRequest const &rReq)
SID_BEZIER_MOVE,
0
};
- GetView().GetViewFrame()->GetBindings().Invalidate(aInva);
+ GetView().GetViewFrame().GetBindings().Invalidate(aInva);
}
break;
@@ -182,7 +182,7 @@ void SwBezierShell::Execute(SfxRequest const &rReq)
SID_BEZIER_SYMMTR,
0
};
- GetView().GetViewFrame()->GetBindings().Invalidate(aInva);
+ GetView().GetViewFrame().GetBindings().Invalidate(aInva);
}
break;
}
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 1e3e905b1fd7..8f7dfd9c73ea 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -135,7 +135,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SID_ATTR_FILL_FLOATTRANSPARENCE,
0
};
- SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetView().GetViewFrame().GetBindings();
rBnd.Invalidate(aInval);
rBnd.Update(SID_ATTR_FILL_STYLE);
rBnd.Update(SID_ATTR_FILL_COLOR);
@@ -196,7 +196,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
0
};
- GetView().GetViewFrame()->GetBindings().Invalidate(aInval);
+ GetView().GetViewFrame().GetBindings().Invalidate(aInval);
}
if (rModel.IsChanged())
@@ -265,7 +265,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
}
else
{
- SfxDispatcher* pDis = pSh->GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDis = pSh->GetView().GetViewFrame().GetDispatcher();
switch (rReq.GetSlot())
{
case SID_ATTR_FILL_STYLE:
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 5d1bca036087..23c4dd61872d 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -173,7 +173,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
SdrView *pSdrView = rSh.GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetView().GetViewFrame().GetBindings();
sal_uInt16 nSlotId = rReq.GetSlot();
bool bChanged = pSdrView->GetModel().IsChanged();
@@ -291,15 +291,15 @@ void SwDrawShell::Execute(SfxRequest &rReq)
{
FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
if (pArgs)
{
- pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
+ rVFrame.SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
}
else
- pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
- pVFrame->GetBindings().Invalidate(SID_FONTWORK);
+ rVFrame.ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
+ rVFrame.GetBindings().Invalidate(SID_FONTWORK);
}
break;
case FN_FORMAT_FOOTNOTE_DLG:
@@ -479,7 +479,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
else
{
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
- rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
+ rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame().HasChildWindow(nId)));
}
}
break;
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index 7c16bde0a7b8..fcf2eab803d1 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -87,10 +87,10 @@ void SwDrawFormShell::Execute(SfxRequest const &rReq)
{
//remove object -> results in destruction of this!
SwView& rTempView = GetView();
- rTempView.GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON );
+ rTempView.GetViewFrame().GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON );
rTempView.StopShellTimer();
//issue a new command to insert the link
- rTempView.GetViewFrame()->GetDispatcher()->ExecuteList(
+ rTempView.GetViewFrame().GetDispatcher()->ExecuteList(
SID_HYPERLINK_SETLINK, SfxCallMode::ASYNCHRON,
{ &rHLinkItem });
}
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 1bca500eac02..daff1a19ae94 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -111,7 +111,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
bool bTopParam = true, bBottomParam = true;
bool bDone = false;
- SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetView().GetViewFrame().GetBindings();
switch (nSlotId)
{
@@ -328,7 +328,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
if(aFrameAttrSet.Count())
pSh->SetDrawingAttr(aFrameAttrSet);
- GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetView().GetViewFrame().GetBindings().InvalidateAll(false);
// #i30451#
pSh->EndUndo( SwUndoId::INSFMTATTR );
@@ -647,7 +647,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
case SID_EDIT_HYPERLINK:
case SID_HYPERLINK_DIALOG:
{
- GetView().GetViewFrame()->SetChildWindow(SID_HYPERLINK_DIALOG, true);
+ GetView().GetViewFrame().SetChildWindow(SID_HYPERLINK_DIALOG, true);
break;
}
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 59cec89aac8c..7de388835094 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -482,7 +482,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
// Ensure the field is selected first
pOLV->SelectFieldAtCursor();
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HYPERLINK_DIALOG);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_HYPERLINK_DIALOG);
}
break;
@@ -501,7 +501,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxStringItem aTarget(SID_TARGETNAME, pURLField->GetTargetFrame());
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, false);
SfxBoolItem aBrowsing(SID_BROWSE, true);
- GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetView().GetViewFrame().GetDispatcher()->ExecuteList(
SID_OPENDOC, SfxCallMode::SYNCHRON, { &aUrl, &aTarget, &aNewView, &aBrowsing });
}
}
@@ -606,17 +606,17 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
}
else if (nEEWhich == EE_CHAR_COLOR)
{
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
}
else if (nEEWhich == EE_CHAR_KERNING)
{
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
}
SetAttrToMarked(aNewAttr);
- GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetView().GetViewFrame().GetBindings().InvalidateAll(false);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -839,11 +839,11 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
{
if (!SvtCJKOptions::IsAnyEnabled())
{
- GetView().GetViewFrame()->GetBindings().SetVisibleState(nWhich, false);
+ GetView().GetViewFrame().GetBindings().SetVisibleState(nWhich, false);
rSet.DisableItem(nWhich);
}
else
- GetView().GetViewFrame()->GetBindings().SetVisibleState(nWhich, true);
+ GetView().GetViewFrame().GetBindings().SetVisibleState(nWhich, true);
}
break;
@@ -917,10 +917,10 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
if (!SvtCJKOptions::IsChangeCaseMapEnabled())
{
rSet.DisableItem(nWhich);
- GetView().GetViewFrame()->GetBindings().SetVisibleState(nWhich, false);
+ GetView().GetViewFrame().GetBindings().SetVisibleState(nWhich, false);
}
else
- GetView().GetViewFrame()->GetBindings().SetVisibleState(nWhich, true);
+ GetView().GetViewFrame().GetBindings().SetVisibleState(nWhich, true);
}
break;
case SID_INSERT_RLM:
@@ -928,7 +928,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
{
SvtCTLOptions aCTLOptions;
bool bEnabled = aCTLOptions.IsCTLFontEnabled();
- GetView().GetViewFrame()->GetBindings().SetVisibleState(nWhich, bEnabled);
+ GetView().GetViewFrame().GetBindings().SetVisibleState(nWhich, bEnabled);
if (!bEnabled)
rSet.DisableItem(nWhich);
}
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 4d5ace48ab46..e767c8b86c11 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -175,23 +175,23 @@ void SwDrawTextShell::ExecFontWork(SfxRequest const & rReq)
SwWrtShell &rSh = GetShell();
FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
if ( rReq.GetArgs() )
{
- pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
+ rVFrame.SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(SID_FONTWORK))).GetValue());
}
else
- pVFrame->ToggleChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
+ rVFrame.ToggleChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
- pVFrame->GetBindings().Invalidate(SID_FONTWORK);
+ rVFrame.GetBindings().Invalidate(SID_FONTWORK);
}
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
- rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
+ rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame().HasChildWindow(nId)));
}
// Edit SfxRequests for FontWork
@@ -481,7 +481,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetView().GetViewFrame().GetBindings().InvalidateAll(false);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -519,15 +519,15 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
pUndoManager->Redo();
}
bCallBase = false;
- GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetView().GetViewFrame().GetBindings().InvalidateAll(false);
}
break;
}
}
if( bCallBase )
{
- SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
- pSfxViewFrame->ExecuteSlot(rReq, pSfxViewFrame->GetInterface());
+ SfxViewFrame& rSfxViewFrame = GetView().GetViewFrame();
+ rSfxViewFrame.ExecuteSlot(rReq, rSfxViewFrame.GetInterface());
}
}
@@ -538,7 +538,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
if ( !IsTextEdit() )
return;
- SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
+ SfxViewFrame& rSfxViewFrame = GetView().GetViewFrame();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
@@ -585,7 +585,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
auto* pUndoManager = dynamic_cast<IDocumentUndoRedo*>(GetUndoManager());
if (pUndoManager)
pUndoManager->SetView(&GetView());
- pSfxViewFrame->GetSlotState(nWhich, pSfxViewFrame->GetInterface(), &rSet);
+ rSfxViewFrame.GetSlotState(nWhich, rSfxViewFrame.GetInterface(), &rSet);
if (pUndoManager)
pUndoManager->SetView(nullptr);
}
@@ -725,7 +725,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// If character is selected, it can be shown
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- auto xFrame = m_rView.GetViewFrame()->GetFrame().GetFrameInterface();
+ auto xFrame = m_rView.GetViewFrame().GetFrame().GetFrameInterface();
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_rView.GetFrameWeld(), aAllSet, xFrame));
pDlg->Execute();
return;
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 0f11a3b7026a..5e01470aecdb 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -167,7 +167,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
// Frame already exists, open frame dialog for editing.
SfxStringItem aDefPage(FN_FORMAT_FRAME_DLG, "columns");
- rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ rSh.GetView().GetViewFrame().GetDispatcher()->ExecuteList(
FN_FORMAT_FRAME_DLG,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aDefPage });
@@ -246,7 +246,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FRAME_UNCHAIN:
rSh.Unchain( *rSh.GetFlyFrameFormat() );
- GetView().GetViewFrame()->GetBindings().Invalidate(FN_FRAME_CHAIN);
+ GetView().GetViewFrame().GetBindings().Invalidate(FN_FRAME_CHAIN);
break;
case FN_FORMAT_FOOTNOTE_DLG:
{
@@ -440,7 +440,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const SelectionType nSel = rSh.GetSelectionType();
if (nSel & SelectionType::Graphic)
{
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
bUpdateMgr = false;
}
else
@@ -514,7 +514,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs && (pDlgItem = pArgs->GetItemIfSet(FN_FORMAT_FRAME_DLG, false)))
sDefPage = OUStringToOString(pDlgItem->GetValue(), RTL_TEXTENCODING_UTF8);
- aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame()));
+ aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame().GetFrame()));
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &GetView()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -522,7 +522,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
nSel & SelectionType::Graphic ? OUString("PictureDialog") :
nSel & SelectionType::Ole ? OUString("ObjectDialog"):
OUString("FrameDialog"),
- GetView().GetViewFrame(),
+ &GetView().GetViewFrame(),
GetView().GetFrameWeld(),
aSet,
false,
@@ -1345,7 +1345,7 @@ void SwFrameShell::ExecDrawAttrArgsTextFrame(SfxRequest const & rReq)
}
else
{
- SfxDispatcher* pDis = rSh.GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDis = rSh.GetView().GetViewFrame().GetDispatcher();
switch(rReq.GetSlot())
{
@@ -1403,7 +1403,7 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest const & rReq)
0
};
- SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetView().GetViewFrame().GetBindings();
rBnd.Invalidate(aInval);
rBnd.Update(SID_ATTR_FILL_STYLE);
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index d102877bad6b..456cb336d236 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -205,7 +205,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
Graphic aGraphic = *pGraphic;
- CompressGraphicsDialog aDialog(GetView().GetFrameWeld(), std::move(aGraphic), aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings());
+ CompressGraphicsDialog aDialog(GetView().GetFrameWeld(), std::move(aGraphic), aSize, aCropRectangle, GetView().GetViewFrame().GetBindings());
if (aDialog.run() == RET_OK)
{
rSh.StartAllAction();
@@ -382,7 +382,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio()));
aSet.Put(SfxBoolItem( SID_ATTR_GRAF_KEEP_ZOOM, aUsrPref.IsGrfKeepZoom()));
- aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame()));
+ aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame().GetFrame()));
SfxObjectShell * sh = rSh.GetDoc()->GetPersist();
if (sh != nullptr && sh->HasName())
@@ -406,7 +406,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("PictureDialog",
- GetView().GetViewFrame(),
+ &GetView().GetViewFrame(),
GetView().GetFrameWeld(),
aSet, false));
if (nSlot == FN_DRAW_WRAP_DLG)
@@ -705,7 +705,7 @@ void SwGrfShell::ExecAttr( SfxRequest const &rReq )
if( aGrfSet.Count() )
GetShell().SetAttrSet( aGrfSet );
}
- GetView().GetViewFrame()->GetBindings().Invalidate(rReq.GetSlot());
+ GetView().GetViewFrame().GetBindings().Invalidate(rReq.GetSlot());
}
void SwGrfShell::GetAttrState(SfxItemSet &rSet)
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 24f80f29fcc3..45d40764525b 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -48,7 +48,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
#else
OUString aURL;
const SfxItemSet* pReqArgs = rReq.GetArgs();
- vcl::Window& rWindow = GetView().GetViewFrame()->GetWindow();
+ vcl::Window& rWindow = GetView().GetViewFrame().GetWindow();
bool bAPI = false;
const SvxSizeItem* pSizeItem = rReq.GetArg<SvxSizeItem>(FN_PARAM_1);
@@ -77,7 +77,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
{
rWindow.EnterWait();
- css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(GetView().GetViewFrame()->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
+ css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(GetView().GetViewFrame().GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
rtl::Reference<avmedia::PlayerListener> xPlayerListener(new avmedia::PlayerListener(
[xDispatchProvider, aURL, bLink](const css::uno::Reference<css::media::XPlayer>& rPlayer){
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 097a8b0d8408..7be3cce99304 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -108,7 +108,7 @@ namespace SwLangHelper
//!! Remember the view frame right now...
//!! (call to GetView().GetViewFrame() will break if the
//!! SwTextShell got destroyed meanwhile.)
- SfxViewFrame *pViewFrame = rView.GetViewFrame();
+ SfxViewFrame& rViewFrame = rView.GetViewFrame();
if (aNewLangText == "*" )
{
@@ -205,7 +205,7 @@ namespace SwLangHelper
}
// invalidate slot to get the new language displayed
- pViewFrame->GetBindings().Invalidate( rReq.GetSlot() );
+ rViewFrame.GetBindings().Invalidate( rReq.GetSlot() );
rReq.Done();
return bRestoreSelection;
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx
index cbf3008c5c66..f6100cc0a48a 100644
--- a/sw/source/uibase/shells/listsh.cxx
+++ b/sw/source/uibase/shells/listsh.cxx
@@ -140,11 +140,11 @@ void SwListShell::Execute(SfxRequest &rReq)
case FN_NUM_BULLET_DOWN:
case FN_NUM_BULLET_UP:
{
- SfxViewFrame * pFrame = GetView().GetViewFrame();
+ SfxViewFrame& rFrame = GetView().GetViewFrame();
rReq.Done();
rSh.NumUpDown( nSlot == FN_NUM_BULLET_DOWN );
- pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // Update status line!
+ rFrame.GetBindings().Invalidate( SID_TABLE_CELL ); // Update status line!
}
break;
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 94724a3018cc..3fc8dcd56bc1 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -181,7 +181,7 @@ static std::shared_ptr<SwTableRep> lcl_TableParamToItemSet( SfxItemSet& rSet, Sw
{
rSh.StartAllAction();
rSh.Push();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL );
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute( FN_TABLE_SELECT_ALL );
}
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -329,7 +329,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.Push();
if(!bTableSel)
{
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL );
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute( FN_TABLE_SELECT_ALL );
}
if(bBorder)
rSh.SetTabBorders( rSet );
@@ -607,7 +607,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
//#127012# get the bindings before the dialog is called
// it might happen that this shell is removed after closing the dialog
- SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetView().GetViewFrame().GetBindings();
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
@@ -1004,11 +1004,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
? FN_TABLE_INSERT_COL_AFTER : FN_TABLE_INSERT_ROW_AFTER;
SfxUInt16Item aCountItem( nDispatchSlot, pDlg->getInsertCount() );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if( pVFrame )
- pVFrame->GetDispatcher()->ExecuteList(nDispatchSlot,
- SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
- { &aCountItem, &aAfter });
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.GetDispatcher()->ExecuteList(nDispatchSlot,
+ SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
+ { &aCountItem, &aAfter });
}
}
break;
@@ -1132,7 +1131,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
? TableChgMode::FixedWidthChangeProp
: TableChgMode::VarWidthChangeAbs );
- SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetView().GetViewFrame().GetBindings();
static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
@@ -1145,10 +1144,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
case FN_TABLE_AUTOSUM:
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::SYNCHRON);
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.GetDispatcher()->Execute(FN_EDIT_FORMULA, SfxCallMode::SYNCHRON);
const sal_uInt16 nId = SwInputChild::GetChildWindowId();
- SwInputChild* pChildWin = static_cast<SwInputChild*>(pVFrame->
+ SwInputChild* pChildWin = static_cast<SwInputChild*>(rVFrame.
GetChildWindow( nId ));
OUString sSum;
GetShell().GetAutoSum(sSum);
@@ -1170,7 +1169,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
rSh.StartAction();
rSh.StartUndo();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
rSh.DeleteTable();
rSh.EndUndo();
rSh.EndAction();
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 02f6b8d29a63..785b2d95d6c9 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -319,11 +319,11 @@ void SwTextShell::ExecField(SfxRequest &rReq)
else
{
//#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
- if(!GetView().GetViewFrame()->IsInModalMode())
+ if(!GetView().GetViewFrame().IsInModalMode())
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- pVFrame->ToggleChildWindow(FN_INSERT_FIELD);
- bRes = pVFrame->GetChildWindow( nSlot ) != nullptr;
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ rVFrame.ToggleChildWindow(FN_INSERT_FIELD);
+ bRes = rVFrame.GetChildWindow( nSlot ) != nullptr;
Invalidate(rReq.GetSlot());
Invalidate(FN_INSERT_FIELD_CTRL);
rReq.Ignore();
@@ -335,13 +335,13 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_REF_FIELD:
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if (!pVFrame->HasChildWindow(FN_INSERT_FIELD))
- pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Show dialog
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ if (!rVFrame.HasChildWindow(FN_INSERT_FIELD))
+ rVFrame.ToggleChildWindow(FN_INSERT_FIELD); // Show dialog
// Switch Fielddlg at a new TabPage
sal_uInt16 nId = SwFieldDlgWrapper::GetChildWindowId();
- SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame->GetChildWindow(nId));
+ SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(rVFrame.GetChildWindow(nId));
if (pWrp)
pWrp->ShowReferencePage();
rReq.Ignore();
@@ -828,7 +828,7 @@ FIELD_INSERT:
}
rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT_FORM_FIELD, nullptr);
- rSh.GetView().GetViewFrame()->GetBindings().Invalidate( SID_UNDO );
+ rSh.GetView().GetViewFrame().GetBindings().Invalidate( SID_UNDO );
}
break;
case FN_INSERT_CHECKBOX_FORMFIELD:
@@ -843,7 +843,7 @@ FIELD_INSERT:
}
rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT_FORM_FIELD, nullptr);
- rSh.GetView().GetViewFrame()->GetBindings().Invalidate( SID_UNDO );
+ rSh.GetView().GetViewFrame().GetBindings().Invalidate( SID_UNDO );
}
break;
case FN_INSERT_DROPDOWN_FORMFIELD:
@@ -858,7 +858,7 @@ FIELD_INSERT:
}
rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT_FORM_FIELD, nullptr);
- rSh.GetView().GetViewFrame()->GetBindings().Invalidate( SID_UNDO );
+ rSh.GetView().GetViewFrame().GetBindings().Invalidate( SID_UNDO );
}
break;
case FN_INSERT_DATE_FORMFIELD:
@@ -891,7 +891,7 @@ FIELD_INSERT:
}
rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT_FORM_FIELD, nullptr);
- rSh.GetView().GetViewFrame()->GetBindings().Invalidate( SID_UNDO );
+ rSh.GetView().GetViewFrame().GetBindings().Invalidate( SID_UNDO );
}
break;
case FN_UPDATE_TEXT_FORMFIELDS:
@@ -1254,11 +1254,11 @@ void SwTextShell::StateField( SfxItemSet &rSet )
}
else
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
//#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
- if(!pVFrame->IsInModalMode() &&
- pVFrame->KnowsChildWindow(FN_INSERT_FIELD) && !pVFrame->HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
- rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
+ if(!rVFrame.IsInModalMode() &&
+ rVFrame.KnowsChildWindow(FN_INSERT_FIELD) && !rVFrame.HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
+ rSet.Put(SfxBoolItem( FN_INSERT_FIELD, rVFrame.HasChildWindow(nWhich)));
else
rSet.DisableItem(FN_INSERT_FIELD);
}
@@ -1267,8 +1267,8 @@ void SwTextShell::StateField( SfxItemSet &rSet )
case FN_INSERT_REF_FIELD:
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD)
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ if ( !rVFrame.KnowsChildWindow(FN_INSERT_FIELD)
|| rSh.CursorInsideInputField() )
{
rSet.DisableItem(FN_INSERT_REF_FIELD);
@@ -1283,7 +1283,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD)));
+ rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame().HasChildWindow(FN_INSERT_FIELD)));
}
break;
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 29904eef54f7..45d9df2c70b6 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -47,7 +47,7 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
if (pArgs)
pArgs->GetItemState(nSlot, false, &pItem);
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
switch (nSlot)
{
@@ -137,13 +137,13 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
case FN_INSERT_AUTH_ENTRY_DLG:
{
// no BASIC support
- pVFrame->ToggleChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
+ rVFrame.ToggleChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
Invalidate(rReq.GetSlot());
}
break;
case FN_INSERT_IDX_ENTRY_DLG:
{
- pVFrame->ToggleChildWindow(FN_INSERT_IDX_ENTRY_DLG);
+ rVFrame.ToggleChildWindow(FN_INSERT_IDX_ENTRY_DLG);
Invalidate(rReq.GetSlot());
}
break;
@@ -230,11 +230,11 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
void SwTextShell::GetIdxState(SfxItemSet &rSet)
{
SwWrtShell& rSh = GetShell();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
SwInsertIdxMarkWrapper *pIdxMrk = static_cast<SwInsertIdxMarkWrapper*>(
- pVFrame->GetChildWindow(FN_INSERT_IDX_ENTRY_DLG));
+ rVFrame.GetChildWindow(FN_INSERT_IDX_ENTRY_DLG));
- SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
+ SfxChildWindow* pAuthMark = rVFrame.GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
const bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = nullptr;
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 06f338f290dc..14bd1c78194e 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -525,7 +525,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("FrameDialog",
- GetView().GetViewFrame(),
+ &GetView().GetViewFrame(),
GetView().GetFrameWeld(),
aSet));
if(pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet())
@@ -546,7 +546,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aMgr.InsertFlyFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- GetView().GetViewFrame()->GetBindings().GetRecorder();
+ GetView().GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
//FN_INSERT_FRAME
@@ -973,7 +973,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont->GetFamilyName() ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- auto xFrame = GetView().GetViewFrame()->GetFrame().GetFrameInterface();
+ auto xFrame = GetView().GetViewFrame().GetFrame().GetFrameInterface();
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetView().GetFrameWeld(), aAllSet, xFrame));
pDlg->Execute();
return;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 9bf9a6ba2900..5b871c532cf3 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -233,10 +233,10 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std:
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
rWrtSh.ExtendSelection(false, sInsert.getLength());
- SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
+ SfxRequest aReq( &rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
- SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
+ SfxRequest aReq1( &rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, true) );
aReq1.Done();
@@ -255,7 +255,7 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std:
pReq->Done(aTmpSet);
if(bInsert)
{
- SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
+ SfxRequest aReq1( &rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, false) );
aReq1.Done();
@@ -816,7 +816,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//!! Remember the view frame right now...
//!! (call to GetView().GetViewFrame() will break if the
//!! SwTextShell got destroyed meanwhile.)
- SfxViewFrame *pViewFrame = GetView().GetViewFrame();
+ SfxViewFrame& rViewFrame = GetView().GetViewFrame();
if (aNewLangText == "*")
{
@@ -905,7 +905,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
// invalidate slot to get the new language displayed
- pViewFrame->GetBindings().Invalidate( nSlot );
+ rViewFrame.GetBindings().Invalidate( nSlot );
rReq.Done();
break;
@@ -967,7 +967,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( pDlg->Execute() == RET_OK )
{
const sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
- SfxRequest aReq( GetView().GetViewFrame(), nId );
+ SfxRequest aReq( &GetView().GetViewFrame(), nId );
if ( !pDlg->GetStr().isEmpty() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
if ( !pDlg->GetFontName().isEmpty() )
@@ -1212,9 +1212,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.AutoFormat( &aFlags );
aFlags.bWithRedlining = false;
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
- pVFrame->ToggleChildWindow(FN_REDLINE_ACCEPT);
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
+ if (rVFrame.HasChildWindow(FN_REDLINE_ACCEPT))
+ rVFrame.ToggleChildWindow(FN_REDLINE_ACCEPT);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<AbstractSwModalRedlineAcceptDlg> xDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld()));
@@ -1241,7 +1241,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
rACfg.SetAutoFormatByInput( bSet );
rACfg.Commit();
- GetView().GetViewFrame()->GetBindings().Invalidate( nSlot );
+ GetView().GetViewFrame().GetBindings().Invalidate( nSlot );
if ( !pItem )
rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), bSet ) );
rReq.Done();
@@ -1294,14 +1294,14 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_EDIT_FORMULA:
{
const sal_uInt16 nId = SwInputChild::GetChildWindowId();
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ SfxViewFrame& rVFrame = GetView().GetViewFrame();
if(pItem)
{
//if the ChildWindow is active it has to be removed
- if( pVFrame->HasChildWindow( nId ) )
+ if( rVFrame.HasChildWindow( nId ) )
{
- pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().InvalidateAll( true );
+ rVFrame.ToggleChildWindow( nId );
+ rVFrame.GetBindings().InvalidateAll( true );
}
OUString sFormula(static_cast<const SfxStringItem*>(pItem)->GetValue());
@@ -1346,9 +1346,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
rWrtSh.EndAllTableBoxEdit();
- pVFrame->ToggleChildWindow( nId );
- if( !pVFrame->HasChildWindow( nId ) )
- pVFrame->GetBindings().InvalidateAll( true );
+ rVFrame.ToggleChildWindow( nId );
+ if( !rVFrame.HasChildWindow( nId ) )
+ rVFrame.GetBindings().InvalidateAll( true );
rReq.Ignore();
}
}
@@ -1360,7 +1360,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
break;
case SID_EDIT_HYPERLINK:
- GetView().GetViewFrame()->SetChildWindow(SID_HYPERLINK_DIALOG, true);
+ GetView().GetViewFrame().SetChildWindow(SID_HYPERLINK_DIALOG, true);
break;
case SID_REMOVE_HYPERLINK:
{
@@ -1754,7 +1754,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case SID_HYPERLINK_DIALOG:
{
SfxRequest aReq(nSlot, SfxCallMode::SLOT, SfxGetpApp()->GetPool());
- GetView().GetViewFrame()->ExecuteSlot( aReq);
+ GetView().GetViewFrame().ExecuteSlot( aReq);
rReq.Ignore();
}
break;
@@ -1790,7 +1790,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EnterBlockMode();
else
rWrtSh.EnterStdMode();
- SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetView().GetViewFrame().GetBindings();
rBnd.Invalidate(FN_STAT_SELMODE);
rBnd.Update(FN_STAT_SELMODE);
}
@@ -1878,9 +1878,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
: DocumentSettingId::PROTECT_BOOKMARKS;
rIDSA.set(aSettingId, !rIDSA.get(aSettingId));
// Invalidate so that toggle state gets updated
- SfxViewFrame* pViewFrame = GetView().GetViewFrame();
- pViewFrame->GetBindings().Invalidate(nSlot);
- pViewFrame->GetBindings().Update(nSlot);
+ SfxViewFrame& rViewFrame = GetView().GetViewFrame();
+ rViewFrame.GetBindings().Invalidate(nSlot);
+ rViewFrame.GetBindings().Update(nSlot);
}
break;
case SID_FM_CTL_PROPERTIES:
@@ -1919,7 +1919,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else
{
- SfxRequest aReq( GetView().GetViewFrame(), SID_FM_CTL_PROPERTIES );
+ SfxRequest aReq( &GetView().GetViewFrame(), SID_FM_CTL_PROPERTIES );
aReq.AppendItem( SfxBoolItem( SID_FM_CTL_PROPERTIES, true ) );
rWrtSh.GetView().GetFormShell()->Execute( aReq );
}
@@ -2448,11 +2448,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
if( !SvtCJKOptions::IsRubyEnabled()
|| rSh.CursorInsideInputField() )
{
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
+ GetView().GetViewFrame().GetBindings().SetVisibleState( nWhich, false );
rSet.DisableItem(nWhich);
}
else
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
+ GetView().GetViewFrame().GetBindings().SetVisibleState( nWhich, true );
}
break;
@@ -2476,7 +2476,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case SID_HYPERLINK_DIALOG:
if( GetView().GetDocShell()->IsReadOnly()
- || ( !GetView().GetViewFrame()->HasChildWindow(nWhich)
+ || ( !GetView().GetViewFrame().HasChildWindow(nWhich)
&& rSh.HasReadonlySel() )
|| rSh.CursorInsideInputField() )
{
@@ -2484,7 +2484,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem( nWhich, nullptr != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+ rSet.Put(SfxBoolItem( nWhich, nullptr != GetView().GetViewFrame().GetChildWindow( nWhich ) ));
}
break;
@@ -2520,11 +2520,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
if(!SvtCJKOptions::IsChangeCaseMapEnabled())
{
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
+ GetView().GetViewFrame().GetBindings().SetVisibleState( nWhich, false );
rSet.DisableItem(nWhich);
}
else
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
+ GetView().GetViewFrame().GetBindings().SetVisibleState( nWhich, true );
}
break;
case FN_READONLY_SELECTION_MODE :
@@ -2698,7 +2698,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SvtCTLOptions aCTLOptions;
bool bEnabled = aCTLOptions.IsCTLFontEnabled();
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, bEnabled );
+ GetView().GetViewFrame().GetBindings().SetVisibleState( nWhich, bEnabled );
if(!bEnabled)
rSet.DisableItem(nWhich);
}
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 582a7d9a5efa..9d7e2bd81e48 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -181,12 +181,12 @@ void SwTextShell::ExecDB(SfxRequest const &rReq)
if(pColumnItem)
aData.m_aDBColumn = pColumnItem->GetValue();
aFieldMgr.InsertField(aData);
- SfxViewFrame* pViewFrame = GetView().GetViewFrame();
+ SfxViewFrame& rViewFrame = GetView().GetViewFrame();
uno::Reference< XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aReq( pViewFrame, FN_INSERT_DBFIELD );
+ SfxRequest aReq( &rViewFrame, FN_INSERT_DBFIELD );
aReq.AppendItem( SfxUInt16Item(FN_PARAM_FIELD_TYPE, static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
aReq.AppendItem( SfxStringItem( FN_INSERT_DBFIELD, sDBName ));
aReq.AppendItem( SfxStringItem( FN_PARAM_1, sCommandArg ));
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 1dc70a6dc073..8f5c87a8ffc4 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -95,7 +95,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
(nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) )
eEscape = SvxEscapement::Off;
- SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetView().GetViewFrame().GetBindings();
if( nWhich == FN_SET_SUB_SCRIPT )
rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT,
false ) );
@@ -409,7 +409,7 @@ SET_LINESPACE:
SvxAdjustItem aAdjust( eAdjust, RES_PARATR_ADJUST );
aSet.Put( aAdjust );
aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
- GetView().GetViewFrame()->GetBindings().SetState( aAdjust );
+ GetView().GetViewFrame().GetBindings().SetState( aAdjust );
// Toggle numbering alignment
const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCursorPos();
if( pCurRule )
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index f31b71278e2b..6dc161cb1e58 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -78,7 +78,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
- GetView().GetViewFrame()->GetBindings().GetRecorder();
+ GetView().GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
rReq.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nCount) );
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 34a95d13ee8e..5d04bab53cda 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -66,7 +66,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
bool bNewResult = GetShell().SelectionHasNumber();
if (bNewResult!=bMode) {
- SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetView().GetViewFrame().GetBindings();
SfxBoolItem aItem(FN_NUM_NUMBERING_ON,!bNewResult);
rBindings.SetState(aItem);
SfxBoolItem aNewItem(FN_NUM_NUMBERING_ON,bNewResult);
@@ -95,7 +95,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
bool bNewResult = GetShell().SelectionHasBullet();
if (bNewResult!=bMode) {
- SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetView().GetViewFrame().GetBindings();
SfxBoolItem aItem(FN_NUM_BULLET_ON,!bNewResult);
rBindings.SetState(aItem);
SfxBoolItem aNewItem(FN_NUM_BULLET_ON,bNewResult);
@@ -108,7 +108,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_OFF:
{
GetShell().StartAllAction();
- SfxRequest aReq(GetView().GetViewFrame(), FN_NUM_BULLET_ON);
+ SfxRequest aReq(&GetView().GetViewFrame(), FN_NUM_BULLET_ON);
aReq.AppendItem(SfxBoolItem(FN_PARAM_1, false));
aReq.Done();
GetShell().NumOrBulletOff();
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index a1b18fedac28..f08b03dfe210 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -137,7 +137,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v
if (!rWrtShell.IsTableMode())
{
// select whole table
- rWrtShell.GetView().GetViewFrame()->GetDispatcher()->
+ rWrtShell.GetView().GetViewFrame().GetDispatcher()->
Execute(FN_TABLE_SELECT_ALL, SfxCallMode::SYNCHRON);
}
if( ! rWrtShell.IsTableComplexForChart())
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index fd16c5b90725..67bac3042d69 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -255,7 +255,7 @@ void SwPagePreviewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
FN_SHOW_TWO_PAGES, FN_SHOW_MULTIPLE_PAGES,
0
};
- SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = mrView.GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
rBindings.Update( FN_SHOW_TWO_PAGES );
rBindings.Update( FN_SHOW_MULTIPLE_PAGES );
@@ -360,7 +360,7 @@ bool SwPagePreviewWin::MovePage( int eMoveMode )
FN_STAT_PAGE, 0
};
- SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = mrView.GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
return true;
@@ -425,7 +425,7 @@ void SwPagePreviewWin::KeyInput( const KeyEvent &rKEvt )
if(nSlot)
{
bHandled = true;
- mrView.GetViewFrame()->GetDispatcher()->Execute(
+ mrView.GetViewFrame().GetDispatcher()->Execute(
nSlot, SfxCallMode::ASYNCHRON );
}
}
@@ -488,8 +488,8 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
OUString::number( aDocPos.Y() ) + ";";
mrView.SetNewCursorPos( sNewCursorPos );
- SfxViewFrame *pTmpFrame = mrView.GetViewFrame();
- pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
+ SfxViewFrame& rTmpFrame = mrView.GetViewFrame();
+ rTmpFrame.GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@@ -507,7 +507,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
{
FN_STAT_PAGE, 0
};
- SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = mrView.GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
}
}
@@ -563,7 +563,7 @@ void SwPagePreviewWin::DataChanged( const DataChangedEvent& rDCEvt )
if( rDCEvt.GetFlags() & AllSettingsFlags::STYLE )
mrView.InvalidateBorder(); // Scrollbar widths
// zoom has to be disabled if Accessibility support is switched on
- lcl_InvalidateZoomSlots(mrView.GetViewFrame()->GetBindings());
+ lcl_InvalidateZoomSlots(mrView.GetViewFrame().GetBindings());
break;
case DataChangedEventType::PRINTER:
@@ -642,7 +642,7 @@ void SwPagePreview::ExecPgUpAndPgDown( const bool _bPgUp,
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
};
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
m_pViewWin->Invalidate();
}
@@ -704,7 +704,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
};
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
m_pViewWin->Invalidate();
}
@@ -739,7 +739,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
aCoreSet.Put( aZoom );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetFrameWeld(), aCoreSet));
+ pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame().GetFrameWeld(), aCoreSet));
pDlg->SetLimits( MINZOOM, MAXZOOM );
if( pDlg->Execute() != RET_CANCEL )
@@ -822,7 +822,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
{
FN_STAT_PAGE, 0
};
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
rReq.Done();
}
@@ -901,7 +901,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
// print preview is now always in the same frame as the tab view
// -> always switch this frame back to normal view
// (ScTabViewShell ctor reads stored view data)
- GetViewFrame()->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::ASYNCHRON );
+ GetViewFrame().GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::ASYNCHRON );
break;
case FN_INSERT_BREAK:
{
@@ -911,8 +911,8 @@ void SwPagePreview::Execute( SfxRequest &rReq )
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
nSelPage +=2;
m_nNewPage = nSelPage;
- SfxViewFrame *pTmpFrame = GetViewFrame();
- pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
+ SfxViewFrame& rTmpFrame = GetViewFrame();
+ rTmpFrame.GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
break;
@@ -1143,7 +1143,7 @@ void SwPagePreview::Init()
SwPagePreview::SwPagePreview(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh):
SfxViewShell(rViewFrame, SWVIEWFLAGS),
- m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&GetViewFrame()->GetWindow(), *this ) ),
+ m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&GetViewFrame().GetWindow(), *this ) ),
m_nNewPage(USHRT_MAX),
m_sPageStr(SwResId(STR_PAGE)),
m_pHScrollbar(nullptr),
@@ -1235,12 +1235,12 @@ void SwPagePreview::Activate(bool bMDI)
SwDocShell* SwPagePreview::GetDocShell()
{
- return dynamic_cast<SwDocShell*>( GetViewFrame()->GetObjectShell() );
+ return dynamic_cast<SwDocShell*>( GetViewFrame().GetObjectShell() );
}
void SwPagePreview::CreateScrollbar( bool bHori )
{
- vcl::Window *pMDI = &GetViewFrame()->GetWindow();
+ vcl::Window *pMDI = &GetViewFrame().GetWindow();
VclPtr<SwScrollbar>& ppScrollbar = bHori ? m_pHScrollbar : m_pVScrollbar;
assert(!ppScrollbar); //check beforehand!
@@ -1268,7 +1268,7 @@ bool SwPagePreview::ChgPage( int eMvMode, bool bUpdateScrollbar )
if( bChg )
{
// Update statusbar
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
if( bUpdateScrollbar )
{
@@ -1514,7 +1514,7 @@ void SwPagePreview::EndScrollHdl(weld::Scrollbar& rScrollbar, bool bHori)
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
};
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( aInval );
// control invalidation of window
if ( bInvalidateWin )
@@ -1696,7 +1696,7 @@ sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags n
}
#endif
- GetViewFrame()->GetBindings().Invalidate(aInval);
+ GetViewFrame().GetBindings().Invalidate(aInval);
}
return 0;
@@ -1886,7 +1886,7 @@ void SwPagePreview::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
aOpt.SetZoom(nFactor);
aOpt.SetZoomType(eType);
rSh.ApplyViewOptions( aOpt );
- lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
+ lcl_InvalidateZoomSlots(GetViewFrame().GetBindings());
// #i19975# also consider zoom type
m_pViewWin->AdjustPreviewToNewZoom( nFactor, eType );
ScrollViewSzChg();
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index bce3f54f3314..7cfce2b14438 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -244,7 +244,7 @@ void SwSrcView::Init()
SwDocShell* SwSrcView::GetDocShell()
{
- SfxObjectShell* pObjShell = GetViewFrame()->GetObjectShell();
+ SfxObjectShell* pObjShell = GetViewFrame().GetObjectShell();
return dynamic_cast<SwDocShell*>( pObjShell );
}
@@ -366,11 +366,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
break;
case SID_UNDO:
pTextView->Undo();
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
break;
case SID_REDO:
pTextView->Redo();
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
break;
case SID_REPEAT:
break;
@@ -676,7 +676,7 @@ sal_Int32 SwSrcView::PrintSource(
aFont.SetColor( COL_BLACK );
pOutDev->SetFont( aFont );
- OUString aTitle( GetViewFrame()->GetWindow().GetText() );
+ OUString aTitle( GetViewFrame().GetWindow().GetText() );
const tools::Long nLineHeight = pOutDev->GetTextHeight(); // slightly more
const tools::Long nParaSpace = 10;
@@ -787,7 +787,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
}
else
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame()->GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame().GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
SwResId(STR_ERR_SRCSTREAM)));
xBox->run();
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 86b545db8d68..06871734d844 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -179,7 +179,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
else
{
rReq.Done();
- SfxBindings& rBind = m_pView->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_pView->GetViewFrame().GetBindings();
rBind.Invalidate( SID_TWAIN_SELECT );
rBind.Invalidate( SID_TWAIN_TRANSFER );
}
@@ -306,7 +306,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const css::datatransfe
SwTransferable::IsPasteSpecial( rSh, aDataHelper );
}
- SfxBindings& rBind = m_pView->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_pView->GetViewFrame().GetBindings();
rBind.Invalidate( SID_PASTE );
rBind.Invalidate( SID_PASTE_SPECIAL );
rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 7d346e945e0d..3d4c9695a392 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -134,13 +134,13 @@ std::unique_ptr<SearchAttrItemList> SwView::s_xReplaceList;
SfxDispatcher &SwView::GetDispatcher()
{
- return *GetViewFrame()->GetDispatcher();
+ return *GetViewFrame().GetDispatcher();
}
void SwView::ImpSetVerb( SelectionType nSelType )
{
bool bResetVerbs = m_bVerbsActive;
- if ( !GetViewFrame()->GetFrame().IsInPlace() &&
+ if ( !GetViewFrame().GetFrame().IsInPlace() &&
(SelectionType::Ole|SelectionType::Graphic) & nSelType )
{
FlyProtectFlags eProtectFlags = m_pWrtShell->IsSelObjProtected(FlyProtectFlags::Content);
@@ -239,7 +239,7 @@ uno::Reference<frame::XLayoutManager> getLayoutManager(const SfxViewFrame& rView
void SwView::ShowUIElement(const OUString& sElementURL) const
{
- if (auto xLayoutManager = getLayoutManager(*GetViewFrame()))
+ if (auto xLayoutManager = getLayoutManager(GetViewFrame()))
{
if (!xLayoutManager->getElement(sElementURL).is())
{
@@ -287,7 +287,7 @@ void SwView::SelectShell()
if ( nNewSelectionType == m_nSelectionType )
{
- GetViewFrame()->GetBindings().InvalidateAll( false );
+ GetViewFrame().GetBindings().InvalidateAll( false );
if ( m_nSelectionType & SelectionType::Ole ||
m_nSelectionType & SelectionType::Graphic )
// For graphs and OLE the verb can be modified of course!
@@ -295,15 +295,12 @@ void SwView::SelectShell()
if (bUpdateFly)
{
- SfxViewFrame* pViewFrame = GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = GetViewFrame();
+ uno::Reference<frame::XFrame> xFrame = rViewFrame.GetFrame().GetFrameInterface();
+ if (xFrame.is())
{
- uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
- if (xFrame.is())
- {
- // Invalidate cached dispatch objects.
- xFrame->contextChanged();
- }
+ // Invalidate cached dispatch objects.
+ xFrame->contextChanged();
}
}
}
@@ -545,7 +542,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify, LinkParamNone*, void)
{
if (m_pWrtShell->ActionPend() || g_bNoInterrupt ||
GetDispatcher().IsLocked() || //do not confuse the SFX
- GetViewFrame()->GetBindings().IsInUpdate() )//do not confuse the SFX
+ GetViewFrame().GetBindings().IsInUpdate() )//do not confuse the SFX
{
m_bAttrChgNotified = true;
m_aTimer.Start();
@@ -555,7 +552,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify, LinkParamNone*, void)
GetItemIfSet( SID_HIDDEN, false );
if ( !pItem || !pItem->GetValue() )
{
- GetViewFrame()->GetBindings().ENTERREGISTRATIONS();
+ GetViewFrame().GetBindings().ENTERREGISTRATIONS();
m_bAttrChgNotifiedWithRegistrations = true;
}
@@ -584,7 +581,7 @@ IMPL_LINK_NOARG(SwView, TimeoutHdl, Timer *, void)
if ( m_bAttrChgNotifiedWithRegistrations )
{
- GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
+ GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
m_bAttrChgNotifiedWithRegistrations = false;
}
@@ -688,7 +685,7 @@ void SwView::CheckReadonlyState()
rDis.SetSlotFilter();
}
if ( bChgd )
- GetViewFrame()->GetBindings().InvalidateAll(true);
+ GetViewFrame().GetBindings().InvalidateAll(true);
}
void SwView::CheckReadonlySelection()
@@ -742,7 +739,7 @@ void SwView::CheckReadonlySelection()
if( nDisableFlags != rDis.GetDisableFlags() )
{
rDis.SetDisableFlags( nDisableFlags );
- GetViewFrame()->GetBindings().InvalidateAll( true );
+ GetViewFrame().GetBindings().InvalidateAll( true );
}
}
@@ -757,10 +754,10 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
m_pFormShell(nullptr),
m_pHScrollbar(nullptr),
m_pVScrollbar(nullptr),
- m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin,
+ m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame().GetWindow(), m_pEditWin,
SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL|
SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC,
- GetViewFrame()->GetBindings(),
+ GetViewFrame().GetBindings(),
WB_VSCROLL | WB_EXTRAFIELD | WB_BORDER )),
m_pLastTableFormat(nullptr),
m_pLastFlyFormat(nullptr),
@@ -917,13 +914,13 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
}
}
SAL_INFO( "sw.ui", "after create WrtShell" );
- m_pHRuler = VclPtr<SwCommentRuler>::Create(m_pWrtShell.get(), &GetViewFrame()->GetWindow(), m_pEditWin,
+ m_pHRuler = VclPtr<SwCommentRuler>::Create(m_pWrtShell.get(), &GetViewFrame().GetWindow(), m_pEditWin,
SvxRulerSupportFlags::TABS |
SvxRulerSupportFlags::PARAGRAPH_MARGINS |
SvxRulerSupportFlags::BORDERS |
SvxRulerSupportFlags::NEGATIVE_MARGINS|
SvxRulerSupportFlags::REDUCED_METRIC,
- GetViewFrame()->GetBindings(),
+ GetViewFrame().GetBindings(),
WB_STDRULER | WB_EXTRAFIELD | WB_BORDER);
// assure that modified state of document
@@ -948,9 +945,9 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
m_pHRuler->SetActive();
m_pVRuler->SetActive();
- SfxViewFrame* pViewFrame = GetViewFrame();
+ SfxViewFrame& rViewFrame = GetViewFrame();
- StartListening(*pViewFrame, DuplicateHandling::Prevent);
+ StartListening(rViewFrame, DuplicateHandling::Prevent);
StartListening(rDocSh, DuplicateHandling::Prevent);
// Set Zoom-factor from HRuler
@@ -1033,7 +1030,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
}
// No ResetModified, if there is already a view to this doc.
- SfxViewFrame* pVFrame = GetViewFrame();
+ SfxViewFrame& rVFrame = GetViewFrame();
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(&rDocSh);
// Currently(360) the view is registered firstly after the CTOR,
// the following expression is also working if this changes.
@@ -1042,7 +1039,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
// no reset of modified state, if document
// was already modified.
if (!m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
- ( !pFirst || pFirst == pVFrame ) &&
+ ( !pFirst || pFirst == &rVFrame ) &&
!bIsDocModified )
{
m_pWrtShell->ResetModified();
@@ -1052,13 +1049,13 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
// If a new GlobalDoc will be created, the navigator will also be generated.
if( dynamic_cast<const SwGlobalDocShell*>(&rDocSh) != nullptr &&
- !pVFrame->GetChildWindow( SID_NAVIGATOR ))
+ !rVFrame.GetChildWindow( SID_NAVIGATOR ))
{
SfxBoolItem aNavi(SID_NAVIGATOR, true);
GetDispatcher().ExecuteList(SID_NAVIGATOR, SfxCallMode::ASYNCHRON, { &aNavi });
}
- uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = rVFrame.GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
"_beamer", frame::FrameSearchFlag::CHILDREN);
@@ -1071,7 +1068,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
// has anybody calls the attrchanged handler in the constructor?
if( m_bAttrChgNotifiedWithRegistrations )
{
- GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
+ GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
if( m_aTimer.IsActive() )
m_aTimer.Stop();
}
@@ -1090,7 +1087,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh)
if (m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
m_pWrtShell->InvalidateOutlineContentVisibility();
- GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
+ GetViewFrame().GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
}
SwViewGlueDocShell::SwViewGlueDocShell(SwView& rView, SwDocShell& rDocSh)
@@ -1120,7 +1117,7 @@ SwView::~SwView()
// Need to remove activated field's button before disposing EditWin.
GetWrtShell().getIDocumentMarkAccess()->ClearFieldActivation();
- GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
+ GetViewFrame().GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
m_pPostItMgr.reset();
m_bInDtor = true;
@@ -1130,7 +1127,7 @@ SwView::~SwView()
m_xGlueDocShell.reset();
if( m_aTimer.IsActive() && m_bAttrChgNotifiedWithRegistrations )
- GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
+ GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
SdrView *pSdrView = m_pWrtShell->GetDrawView();
@@ -1144,7 +1141,7 @@ SwView::~SwView()
SetWindow( nullptr );
m_pViewImpl->Invalidate();
- EndListening(*GetViewFrame());
+ EndListening(GetViewFrame());
EndListening(*GetDocShell());
m_pWrtShell.reset(); // reset here so that it is not accessible by the following dtors.
m_pHScrollbar.disposeAndClear();
@@ -1165,7 +1162,7 @@ SwView::~SwView()
SwDocShell* SwView::GetDocShell()
{
- SfxObjectShell* pDocShell = GetViewFrame()->GetObjectShell();
+ SfxObjectShell* pDocShell = GetViewFrame().GetObjectShell();
return dynamic_cast<SwDocShell*>( pDocShell );
}
@@ -1579,7 +1576,7 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
std::vector<beans::PropertyValue> aVector;
- sal_uInt16 nViewID( GetViewFrame()->GetCurViewId());
+ sal_uInt16 nViewID( GetViewFrame().GetCurViewId());
aVector.push_back(comphelper::makePropertyValue("ViewId", "view" + OUString::number(nViewID)));
aVector.push_back(comphelper::makePropertyValue("ViewLeft", convertTwipToMm100 ( rRect.Left() )));
@@ -1642,7 +1639,7 @@ void SwView::ShowCursor( bool bOn )
ErrCode SwView::DoVerb(sal_Int32 nVerb)
{
- if ( !GetViewFrame()->GetFrame().IsInPlace() )
+ if ( !GetViewFrame().GetFrame().IsInPlace() )
{
SwWrtShell &rSh = GetWrtShell();
const SelectionType nSel = rSh.GetSelectionType();
@@ -1680,7 +1677,7 @@ OUString SwView::GetSelectionTextParam( bool bCompleteWrds, bool bEraseTrail )
SwGlossaryHdl* SwView::GetGlosHdl()
{
if(!m_pGlosHdl)
- m_pGlosHdl.reset(new SwGlossaryHdl(GetViewFrame(), m_pWrtShell.get()));
+ m_pGlosHdl.reset(new SwGlossaryHdl(&GetViewFrame(), m_pWrtShell.get()));
return m_pGlosHdl.get();
}
@@ -1708,7 +1705,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// dispatcher, if the view frame is dying. Thus, reset member <pShell>.
case SfxHintId::Dying:
{
- if ( &rBC == GetViewFrame() )
+ if ( &rBC == &GetViewFrame() )
{
ResetSubShell();
}
@@ -1779,7 +1776,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
FN_REDLINE_REJECT_ALL,
0
};
- GetViewFrame()->GetBindings().Invalidate(aSlotRedLine);
+ GetViewFrame().GetBindings().Invalidate(aSlotRedLine);
}
break;
default: break;
@@ -1816,7 +1813,7 @@ void SwView::ScannerEventHdl()
}
}
}
- SfxBindings& rBind = GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetViewFrame().GetBindings();
rBind.Invalidate( SID_TWAIN_SELECT );
rBind.Invalidate( SID_TWAIN_TRANSFER );
}
@@ -1829,7 +1826,7 @@ void SwView::StopShellTimer()
m_aTimer.Stop();
if ( m_bAttrChgNotifiedWithRegistrations )
{
- GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
+ GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
m_bAttrChgNotifiedWithRegistrations = false;
}
SelectShell();
@@ -1839,10 +1836,10 @@ void SwView::StopShellTimer()
bool SwView::PrepareClose( bool bUI )
{
- SfxViewFrame* pVFrame = GetViewFrame();
- pVFrame->SetChildWindow( SwInputChild::GetChildWindowId(), false );
- if( pVFrame->GetDispatcher()->IsLocked() )
- pVFrame->GetDispatcher()->Lock(false);
+ SfxViewFrame& rVFrame = GetViewFrame();
+ rVFrame.SetChildWindow( SwInputChild::GetChildWindowId(), false );
+ if( rVFrame.GetDispatcher()->IsLocked() )
+ rVFrame.GetDispatcher()->Lock(false);
if ( m_pFormShell && !m_pFormShell->PrepareClose( bUI ) )
{
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 75a0f7713f56..a9044776e029 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -203,7 +203,7 @@ void SwView::RecheckBrowseMode()
0
};
// the view must not exist!
- GetViewFrame()->GetBindings().Invalidate(aInva);
+ GetViewFrame().GetBindings().Invalidate(aInva);
CheckVisArea();
SvxZoomType eType;
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index 979f5e0f5751..ca51ceba98c7 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -103,26 +103,26 @@ void SwView::Activate(bool bMDIActivate)
// Initialize Fielddlg newly if necessary (e.g. for TYP_SETVAR)
sal_uInt16 nId = SwFieldDlgWrapper::GetChildWindowId();
- SfxViewFrame* pVFrame = GetViewFrame();
- SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(pVFrame->GetChildWindow(nId));
+ SfxViewFrame& rVFrame = GetViewFrame();
+ SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(rVFrame.GetChildWindow(nId));
if (pWrp)
pWrp->ReInitDlg(GetDocShell());
// Initialize RedlineDlg newly if necessary
nId = SwRedlineAcceptChild::GetChildWindowId();
- SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(pVFrame->GetChildWindow(nId));
+ SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(rVFrame.GetChildWindow(nId));
if (pRed)
pRed->ReInitDlg(GetDocShell());
// reinit IdxMarkDlg
nId = SwInsertIdxMarkWrapper::GetChildWindowId();
- SwInsertIdxMarkWrapper *pIdxMrk = static_cast<SwInsertIdxMarkWrapper*>(pVFrame->GetChildWindow(nId));
+ SwInsertIdxMarkWrapper *pIdxMrk = static_cast<SwInsertIdxMarkWrapper*>(rVFrame.GetChildWindow(nId));
if (pIdxMrk)
pIdxMrk->ReInitDlg(*m_pWrtShell);
// reinit AuthMarkDlg
nId = SwInsertAuthMarkWrapper::GetChildWindowId();
- SwInsertAuthMarkWrapper *pAuthMrk = static_cast<SwInsertAuthMarkWrapper*>(pVFrame->
+ SwInsertAuthMarkWrapper *pAuthMrk = static_cast<SwInsertAuthMarkWrapper*>(rVFrame.
GetChildWindow(nId));
if (pAuthMrk)
pAuthMrk->ReInitDlg(*m_pWrtShell);
@@ -180,7 +180,7 @@ void SwView::ExecFormatPaintbrush(SfxRequest const & rReq)
aTemplate.m_pFormatClipboard = m_pFormatClipboard.get();
GetEditWin().SetApplyTemplate(aTemplate);
}
- GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
+ GetViewFrame().GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
}
void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
@@ -201,16 +201,13 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
void SwView::UpdateWordCount(SfxShell* pShell, sal_uInt16 nSlot)
{
- SfxViewFrame* pVFrame = GetViewFrame();
- if (pVFrame != nullptr)
- {
- pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
- pShell->Invalidate(nSlot);
+ SfxViewFrame& rVFrame = GetViewFrame();
+ rVFrame.ToggleChildWindow(FN_WORDCOUNT_DIALOG);
+ pShell->Invalidate(nSlot);
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(pVFrame->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
- if (pWrdCnt)
- pWrdCnt->UpdateCounts();
- }
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(rVFrame.GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ if (pWrdCnt)
+ pWrdCnt->UpdateCounts();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index baff544cb7f8..41928abe971b 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -864,7 +864,7 @@ void SwView::Execute(SfxRequest &rReq)
break;
case FN_MAILMERGE_SENDMAIL_CHILDWINDOW:
case FN_REDLINE_ACCEPT:
- GetViewFrame()->ToggleChildWindow(nSlot);
+ GetViewFrame().ToggleChildWindow(nSlot);
break;
case FN_REDLINE_ACCEPT_DIRECT:
case FN_REDLINE_REJECT_DIRECT:
@@ -985,7 +985,7 @@ void SwView::Execute(SfxRequest &rReq)
if (FN_REDLINE_ACCEPT_TONEXT == nSlot || FN_REDLINE_REJECT_TONEXT == nSlot)
{
// Go to next change after accepting or rejecting one (tdf#101977)
- GetViewFrame()->GetDispatcher()->Execute(FN_REDLINE_NEXT_CHANGE, SfxCallMode::ASYNCHRON);
+ GetViewFrame().GetDispatcher()->Execute(FN_REDLINE_NEXT_CHANGE, SfxCallMode::ASYNCHRON);
}
}
break;
@@ -1086,13 +1086,13 @@ void SwView::Execute(SfxRequest &rReq)
if (nFound > 0 && !bNoAcceptDialog) // show Redline browser
{
- SfxViewFrame* pVFrame = GetViewFrame();
- pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
+ SfxViewFrame& rVFrame = GetViewFrame();
+ rVFrame.ShowChildWindow(FN_REDLINE_ACCEPT);
// re-initialize the Redline dialog
const sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(
- pVFrame->GetChildWindow(nId));
+ rVFrame.GetChildWindow(nId));
if (pRed)
pRed->ReInitDlg(GetDocShell());
}
@@ -1102,7 +1102,7 @@ void SwView::Execute(SfxRequest &rReq)
}
break;
case FN_SYNC_LABELS:
- GetViewFrame()->ShowChildWindow(nSlot);
+ GetViewFrame().ShowChildWindow(nSlot);
break;
case FN_ESCAPE:
{
@@ -1132,7 +1132,7 @@ void SwView::Execute(SfxRequest &rReq)
Point aPt(LONG_MIN, LONG_MIN);
//go out of the frame
m_pWrtShell->SelectObj(aPt, SW_LEAVE_FRAME);
- SfxBindings& rBind = GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetViewFrame().GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
}
m_pWrtShell->EnterStdMode();
@@ -1163,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq)
else
{
SfxBoolItem aItem( SID_WIN_FULLSCREEN, false );
- GetViewFrame()->GetDispatcher()->ExecuteList(SID_WIN_FULLSCREEN,
+ GetViewFrame().GetDispatcher()->ExecuteList(SID_WIN_FULLSCREEN,
SfxCallMode::RECORD, { &aItem });
bIgnore = true;
}
@@ -1195,14 +1195,14 @@ void SwView::Execute(SfxRequest &rReq)
break;
case FN_GOTO_PAGE:
{
- SwGotoPageDlg aDlg(GetViewFrame()->GetFrameWeld(), &GetViewFrame()->GetBindings());
+ SwGotoPageDlg aDlg(GetViewFrame().GetFrameWeld(), &GetViewFrame().GetBindings());
if (aDlg.run() == RET_OK)
GetWrtShell().GotoPage(aDlg.GetPageSelection(), true);
}
break;
case FN_EDIT_CURRENT_TOX:
{
- GetViewFrame()->GetDispatcher()->Execute(
+ GetViewFrame().GetDispatcher()->Execute(
FN_INSERT_MULTI_TOX, SfxCallMode::ASYNCHRON);
}
break;
@@ -1341,7 +1341,7 @@ void SwView::Execute(SfxRequest &rReq)
auto nOutlinePos = rSh.GetOutlinePos();
if (nOutlinePos != SwOutlineNodes::npos)
nOutlineLevel = rSh.getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos);
- SwNumberInputDlg aDlg(GetViewFrame()->GetFrameWeld(),
+ SwNumberInputDlg aDlg(GetViewFrame().GetFrameWeld(),
SwResId(STR_OUTLINE_LEVELS_SHOWN_TITLE),
SwResId(STR_OUTLINE_LEVELS_SHOWN_SPIN_LABEL),
nOutlineLevel + 1, 1, 10,
@@ -1383,20 +1383,20 @@ void SwView::Execute(SfxRequest &rReq)
break;
case SID_GALLERY :
// First make sure that the sidebar is visible
- GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+ GetViewFrame().ShowChildWindow(SID_SIDEBAR);
::sfx2::sidebar::Sidebar::ShowPanel(
u"GalleryPanel",
- GetViewFrame()->GetFrame().GetFrameInterface());
+ GetViewFrame().GetFrame().GetFrameInterface());
break;
case SID_AVMEDIA_PLAYER :
- GetViewFrame()->ChildWindowExecute(rReq);
+ GetViewFrame().ChildWindowExecute(rReq);
break;
case SID_VIEW_DATA_SOURCE_BROWSER:
{
- SfxViewFrame* pVFrame = GetViewFrame();
- pVFrame->ChildWindowExecute(rReq);
- if(pVFrame->HasChildWindow(SID_BROWSER))
+ SfxViewFrame& rVFrame = GetViewFrame();
+ rVFrame.ChildWindowExecute(rReq);
+ if(rVFrame.HasChildWindow(SID_BROWSER))
{
const SwDBData& rData = GetWrtShell().GetDBData();
SwModule::ShowDBObj(*this, rData);
@@ -1409,8 +1409,8 @@ void SwView::Execute(SfxRequest &rReq)
if( pArgs &&
SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem ))
bShow = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- if((bShow && m_bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
- GetViewFrame()->ToggleChildWindow(nSlot);
+ if((bShow && m_bInMailMerge) != GetViewFrame().HasChildWindow(nSlot))
+ GetViewFrame().ToggleChildWindow(nSlot);
//if fields have been successfully inserted call the "real"
//mail merge dialog
#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
@@ -1435,7 +1435,7 @@ void SwView::Execute(SfxRequest &rReq)
}
#endif
m_bInMailMerge &= bShow;
- GetViewFrame()->GetBindings().Invalidate(FN_INSERT_FIELD);
+ GetViewFrame().GetBindings().Invalidate(FN_INSERT_FIELD);
}
break;
case FN_QRY_MERGE:
@@ -1444,9 +1444,9 @@ void SwView::Execute(SfxRequest &rReq)
bool bQuery = !pArgs || SfxItemState::SET != pArgs->GetItemState(nSlot);
if(bQuery)
{
- SfxViewFrame* pTmpFrame = GetViewFrame();
+ SfxViewFrame& rTmpFrame = GetViewFrame();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractMailMergeCreateFromDlg> pDlg(pFact->CreateMailMergeCreateFromDlg(pTmpFrame->GetFrameWeld()));
+ ScopedVclPtr<AbstractMailMergeCreateFromDlg> pDlg(pFact->CreateMailMergeCreateFromDlg(rTmpFrame.GetFrameWeld()));
if (RET_OK == pDlg->Execute())
bUseCurrentDocument = pDlg->IsThisDocument();
else
@@ -1476,15 +1476,15 @@ void SwView::Execute(SfxRequest &rReq)
}
case FN_SPELL_GRAMMAR_DIALOG:
{
- SfxViewFrame* pViewFrame = GetViewFrame();
+ SfxViewFrame& rViewFrame = GetViewFrame();
if (rReq.GetArgs() != nullptr)
- pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
+ rViewFrame.SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
else
- pViewFrame->ToggleChildWindow(FN_SPELL_GRAMMAR_DIALOG);
+ rViewFrame.ToggleChildWindow(FN_SPELL_GRAMMAR_DIALOG);
- pViewFrame->GetBindings().Invalidate(FN_SPELL_GRAMMAR_DIALOG);
+ rViewFrame.GetBindings().Invalidate(FN_SPELL_GRAMMAR_DIALOG);
rReq.Ignore ();
}
break;
@@ -1526,7 +1526,7 @@ void SwView::Execute(SfxRequest &rReq)
}
//these slots are either re-mapped to text or object alignment
if (nAlias)
- GetViewFrame()->GetDispatcher()->Execute(
+ GetViewFrame().GetDispatcher()->Execute(
nAlias, SfxCallMode::ASYNCHRON);
}
break;
@@ -1606,13 +1606,13 @@ bool SwView::IsConditionalFastCall( const SfxRequest &rReq )
/// invalidate page numbering field
void SwView::UpdatePageNums()
{
- SfxBindings &rBnd = GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate(FN_STAT_PAGE);
}
void SwView::UpdateDocStats()
{
- SfxBindings &rBnd = GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate( FN_STAT_WORDCOUNT );
rBnd.Update( FN_STAT_WORDCOUNT );
}
@@ -1782,7 +1782,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (m_nPageCnt != nCnt) // notify Basic
{
m_nPageCnt = nCnt;
- SfxGetpApp()->NotifyEvent(SfxEventHint(SfxEventHintId::SwEventPageCount, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), false);
+ SfxGetpApp()->NotifyEvent(SfxEventHint(SfxEventHintId::SwEventPageCount, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame().GetObjectShell()), false);
}
}
break;
@@ -1809,7 +1809,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rSet.Put( SfxStringItem( FN_STAT_WORDCOUNT, aWordCount ) );
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->SetCounts(selectionStats, documentStats);
}
@@ -2107,14 +2107,14 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
case FN_STAT_PAGE:
{
- GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PAGE,
+ GetViewFrame().GetDispatcher()->Execute( FN_GOTO_PAGE,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
}
break;
case FN_STAT_WORDCOUNT:
{
- GetViewFrame()->GetDispatcher()->Execute(FN_WORDCOUNT_DIALOG,
+ GetViewFrame().GetDispatcher()->Execute(FN_WORDCOUNT_DIALOG,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
}
break;
@@ -2141,13 +2141,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case FN_STAT_TEMPLATE:
{
- weld::Window* pDialogParent = GetViewFrame()->GetFrameWeld();
+ weld::Window* pDialogParent = GetViewFrame().GetFrameWeld();
css::uno::Any aAny(pDialogParent->GetXWindow());
SfxUnoAnyItem aDialogParent(SID_DIALOG_PARENT, aAny);
const SfxPoolItem* pInternalItems[ 2 ];
pInternalItems[ 0 ] = &aDialogParent;
pInternalItems[ 1 ] = nullptr;
- GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_DLG,
+ GetViewFrame().GetDispatcher()->Execute(FN_FORMAT_PAGE_DLG,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
nullptr, 0, pInternalItems);
}
@@ -2185,7 +2185,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetFrameWeld(), aCoreSet));
+ pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame().GetFrameWeld(), aCoreSet));
pDlg->SetLimits( MINZOOM, MAXZOOM );
if( pDlg->Execute() != RET_CANCEL )
pSet = pDlg->GetOutputItemSet();
@@ -2278,7 +2278,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
nId = SID_ATTR_TRANSFORM;
}
if( nId )
- GetViewFrame()->GetDispatcher()->Execute(nId,
+ GetViewFrame().GetDispatcher()->Execute(nId,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
}
break;
@@ -2330,7 +2330,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
if ( bUp )
{
- SfxBindings &rBnd = GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate(nWhich);
rBnd.Update(nWhich);
}
@@ -2365,7 +2365,7 @@ void SwView::EditLinkDlg()
{
bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog(GetViewFrame()->GetFrameWeld(), &GetWrtShell().GetLinkManager(), bWeb));
+ ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog(GetViewFrame().GetFrameWeld(), &GetWrtShell().GetLinkManager(), bWeb));
pDlg->Execute();
}
@@ -2716,10 +2716,10 @@ tools::Long SwView::InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium>
if( bInsert )
{
uno::Reference< frame::XDispatchRecorder > xRecorder =
- GetViewFrame()->GetBindings().GetRecorder();
+ GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aRequest(GetViewFrame(), SID_INSERTDOC);
+ SfxRequest aRequest(&GetViewFrame(), SID_INSERTDOC);
aRequest.AppendItem(SfxStringItem(SID_INSERTDOC, pMedium->GetOrigURL()));
if(pMedium->GetFilter())
aRequest.AppendItem(SfxStringItem(FN_PARAM_1, pMedium->GetFilter()->GetName()));
@@ -2838,7 +2838,7 @@ tools::Long SwView::InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium>
void SwView::EnableMailMerge()
{
m_bInMailMerge = true;
- SfxBindings& rBind = GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetViewFrame().GetBindings();
rBind.Invalidate(FN_INSERT_FIELD_DATA_ONLY);
rBind.Update(FN_INSERT_FIELD_DATA_ONLY);
}
@@ -2897,7 +2897,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
}
if(bCallAddressPilot)
{
- GetViewFrame()->GetDispatcher()->Execute(
+ GetViewFrame().GetDispatcher()->Execute(
SID_ADDRESS_DATA_SOURCE, SfxCallMode::SYNCHRON);
if ( lcl_NeedAdditionalDataSource( xDBContext ) )
// no additional data source has been created
@@ -2906,15 +2906,15 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
}
//call insert fields with database field page available, only
- SfxViewFrame* pVFrame = GetViewFrame();
+ SfxViewFrame& rVFrame = GetViewFrame();
//at first hide the default field dialog if currently visible
- pVFrame->SetChildWindow(FN_INSERT_FIELD, false);
+ rVFrame.SetChildWindow(FN_INSERT_FIELD, false);
//enable the status of the db field dialog - it is disabled in the status method
//to prevent creation of the dialog without mail merge active
EnableMailMerge();
//then show the "Data base only" field dialog
SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, true);
- pVFrame->GetDispatcher()->ExecuteList(FN_INSERT_FIELD_DATA_ONLY,
+ rVFrame.GetDispatcher()->ExecuteList(FN_INSERT_FIELD_DATA_ONLY,
SfxCallMode::SYNCHRON, { &aOn });
return;
}
@@ -3032,12 +3032,12 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void )
if ( nFound > 0 ) // show Redline browser
{
- SfxViewFrame* pVFrame = GetViewFrame();
- pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
+ SfxViewFrame& rVFrame = GetViewFrame();
+ rVFrame.ShowChildWindow(FN_REDLINE_ACCEPT);
// re-initialize Redline dialog
sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
- SwRedlineAcceptChild* pRed = static_cast<SwRedlineAcceptChild*>(pVFrame->GetChildWindow( nId ));
+ SwRedlineAcceptChild* pRed = static_cast<SwRedlineAcceptChild*>(rVFrame.GetChildWindow( nId ));
if ( pRed )
pRed->ReInitDlg( GetDocShell() );
}
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 7c64df058176..35c3c3174f4e 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -99,7 +99,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
if (eNewFormObjKind == m_eFormObjKind || eNewFormObjKind == SdrObjKind::NONE)
{
bDeselect = true;
- GetViewFrame()->GetDispatcher()->Execute(SID_FM_LEAVE_CREATE); // Button should popping out
+ GetViewFrame().GetDispatcher()->Execute(SID_FM_LEAVE_CREATE); // Button should popping out
}
}
else if (nSlotId == SID_FM_CREATE_FIELDCONTROL)
@@ -141,7 +141,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
}
else if ( nSlotId == SID_FONTWORK_GALLERY_FLOATER )
{
- vcl::Window& rWin = m_pWrtShell->GetView().GetViewFrame()->GetWindow();
+ vcl::Window& rWin = m_pWrtShell->GetView().GetViewFrame().GetWindow();
rWin.EnterWait();
@@ -154,7 +154,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
std::shared_ptr<svx::FontWorkGalleryDialog> pDlg = std::make_shared<svx::FontWorkGalleryDialog>(rWin.GetFrameWeld(), *pSdrView);
pDlg->SetSdrObjectRef(&pSdrView->GetModel());
weld::DialogController::runAsync(pDlg, [this, pDlg](int) {
- vcl::Window& rWin2 = m_pWrtShell->GetView().GetViewFrame()->GetWindow();
+ vcl::Window& rWin2 = m_pWrtShell->GetView().GetViewFrame().GetWindow();
SdrObject* pObj = pDlg->GetSdrObjectRef();
if ( pObj )
@@ -186,7 +186,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
rWin.LeaveWait();
}
else if ( m_nFormSfxId != USHRT_MAX )
- GetViewFrame()->GetDispatcher()->Execute( SID_FM_LEAVE_CREATE );
+ GetViewFrame().GetDispatcher()->Execute( SID_FM_LEAVE_CREATE );
if( nSlotId == SID_DRAW_CS_ID )
{
@@ -312,7 +312,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
if ( pStringItem )
{
m_sDrawCustom = pStringItem->GetValue();
- SfxBindings& rBind = GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetViewFrame().GetBindings();
rBind.Invalidate( nSlotId );
rBind.Update( nSlotId );
}
@@ -324,7 +324,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
break;
}
- GetViewFrame()->GetBindings().Invalidate(SID_ATTRIBUTES_AREA);
+ GetViewFrame().GetBindings().Invalidate(SID_ATTRIBUTES_AREA);
bool bEndTextEdit = true;
if (pFuncPtr)
@@ -343,7 +343,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
if(rReq.GetModifier() == KEY_MOD1 || bCreateDirectly)
{
if (bCreateDirectly)
- GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
+ GetViewFrame().GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
if(SID_OBJECT_SELECT == m_nDrawSfxId )
{
m_pWrtShell->GotoObj(true);
@@ -394,7 +394,7 @@ void SwView::ExitDraw()
return;
// the shell may be invalid at close/reload/SwitchToViewShell
- SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatch = GetViewFrame().GetDispatcher();
sal_uInt16 nIdx = 0;
SfxShell* pTest = nullptr;
do
@@ -417,7 +417,7 @@ void SwView::ExitDraw()
{
pSdrView->LeaveOneGroup();
pSdrView->UnmarkAll();
- GetViewFrame()->GetBindings().Invalidate(SID_ENTER_GROUP);
+ GetViewFrame().GetBindings().Invalidate(SID_ENTER_GROUP);
}
if (GetDrawFuncPtr())
@@ -429,7 +429,7 @@ void SwView::ExitDraw()
SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
- GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
+ GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
}
GetEditWin().SetPointer(PointerStyle::Text);
}
@@ -444,7 +444,7 @@ void SwView::NoRotate()
FlipDrawRotate();
const SfxBoolItem aTmp( SID_OBJECT_ROTATE, false );
- GetViewFrame()->GetBindings().SetState( aTmp );
+ GetViewFrame().GetBindings().SetState( aTmp );
}
}
@@ -709,9 +709,9 @@ bool SwView::HasOnlyObj(SdrObject const *pSdrObj, SdrInventor eObjInventor) cons
IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void)
{
if (rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG)
- GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
+ GetViewFrame().GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
else if (rInfo.nCommand == SpellCallbackCommand::AUTOCORRECT_OPTIONS)
- GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
+ GetViewFrame().GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
}
bool SwView::ExecDrwTextSpellPopup(const Point& rPt)
@@ -751,7 +751,7 @@ void SwView::HyphenateDrawText()
SfxItemSetFixed<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> aSet( GetPool() );
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, !bHyphenate ) );
pSdrView->SetAttributes( aSet );
- GetViewFrame()->GetBindings().Invalidate(FN_HYPHENATE_OPT_DLG);
+ GetViewFrame().GetBindings().Invalidate(FN_HYPHENATE_OPT_DLG);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index e6e337b6ccd2..70abd21a16ef 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -740,15 +740,13 @@ bool SwView::ExecSpellPopup(const Point& rPt)
OUString aCommand = xMenu->getCommand(nId);
if (aCommand.isEmpty() )
{
- if (!ExecuteMenuCommand(xMenu, *GetViewFrame(), nId))
+ if (!ExecuteMenuCommand(xMenu, GetViewFrame(), nId))
xPopup->Execute(nId);
}
else
{
- SfxViewFrame *pSfxViewFrame = GetViewFrame();
- uno::Reference< frame::XFrame > xFrame;
- if ( pSfxViewFrame )
- xFrame = pSfxViewFrame->GetFrame().GetFrameInterface();
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ uno::Reference<frame::XFrame> xFrame = rSfxViewFrame.GetFrame().GetFrameInterface();
css::util::URL aURL;
uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY );
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index cb070b655efc..2a9529c6db9f 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -159,7 +159,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
const sal_uInt16 nZoomFac = o3tl::narrowing<sal_uInt16>(nFac);
SwViewOption aOpt( *pOpt );
- if ( !GetViewFrame()->GetFrame().IsInPlace() )
+ if ( !GetViewFrame().GetFrame().IsInPlace() )
{
//Update MasterUsrPrefs and after that update the ViewOptions of the current View.
if ( !bViewOnly &&
@@ -231,7 +231,7 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
SwActContext aActContext(m_pWrtShell.get());
- if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
+ if ( !GetViewFrame().GetFrame().IsInPlace() && !bViewOnly )
{
const bool bWeb = dynamic_cast< const SwWebView *>( this ) != nullptr;
SwMasterUsrPref *pUsrPref = const_cast<SwMasterUsrPref*>(SW_MOD()->GetUsrPref(bWeb));
@@ -267,7 +267,7 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
if( bUnLockView )
m_pWrtShell->LockView( false );
- SfxBindings& rBnd = GetViewFrame()->GetBindings();
+ SfxBindings& rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate( SID_ATTR_VIEWLAYOUT );
rBnd.Invalidate( SID_ATTR_ZOOMSLIDER);
}
@@ -299,7 +299,7 @@ IMPL_LINK( SwView, WindowChildEventListener, VclWindowEvent&, rEvent, void )
void SwView::CreateScrollbar( bool bHori )
{
- vcl::Window *pMDI = &GetViewFrame()->GetWindow();
+ vcl::Window *pMDI = &GetViewFrame().GetWindow();
VclPtr<SwScrollbar>& ppScrollbar = bHori ? m_pHScrollbar : m_pVScrollbar;
assert(!ppScrollbar); //check beforehand!
@@ -423,7 +423,7 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
break;
case NID_BKM :
rSh.EnterStdMode();
- GetViewFrame()->GetDispatcher()->Execute(bNext ?
+ GetViewFrame().GetDispatcher()->Execute(bNext ?
FN_NEXT_BOOKMARK :
FN_PREV_BOOKMARK);
break;
@@ -596,7 +596,7 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
rSh.EndAction();
if (bFound)
{
- GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+ GetViewFrame().GetDispatcher()->Execute(FN_POSTIT);
if (bWrapped)
SvxSearchDialogWrapper::SetSearchLabel(bNext ? SearchLabel::EndWrapped :
SearchLabel::StartWrapped);
@@ -725,7 +725,7 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler, void )
}
SfxStringItem aDefPage(nDefDlg, sDefPage);
- GetViewFrame()->GetDispatcher()->ExecuteList(nDefDlg,
+ GetViewFrame().GetDispatcher()->ExecuteList(nDefDlg,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aDefPage });
}
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 2c66c52a0c96..8c7dbb70c9b2 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -117,7 +117,7 @@ void SwView::InvalidateRulerPos()
0
};
- GetViewFrame()->GetBindings().Invalidate(aInval);
+ GetViewFrame().GetBindings().Invalidate(aInval);
assert(m_pHRuler && "Why is the ruler not there?");
m_pHRuler->ForceUpdate();
@@ -188,9 +188,9 @@ void SwView::DocSzChgd(const Size &rSz)
SetVisArea( aNewVisArea, false );
if ( UpdateScrollbars() && !m_bInOuterResizePixel && !m_bInInnerResizePixel &&
- !GetViewFrame()->GetFrame().IsInPlace())
+ !GetViewFrame().GetFrame().IsInPlace())
OuterResizePixel( Point(),
- GetViewFrame()->GetWindow().GetOutputSizePixel() );
+ GetViewFrame().GetWindow().GetOutputSizePixel() );
}
// Set VisArea newly
@@ -279,7 +279,7 @@ void SwView::SetVisArea( const tools::Rectangle &rRect, bool bUpdateScrollbar )
if ( bOuterResize && !m_bInOuterResizePixel && !m_bInInnerResizePixel)
OuterResizePixel( Point(),
- GetViewFrame()->GetWindow().GetOutputSizePixel() );
+ GetViewFrame().GetWindow().GetOutputSizePixel() );
}
// Set Pos VisArea
@@ -316,7 +316,7 @@ void SwView::SetVisArea( const Point &rPt, bool bUpdateScrollbar )
void SwView::CheckVisArea()
{
m_pHScrollbar->SetAuto( m_pWrtShell->GetViewOptions()->getBrowseMode() &&
- !GetViewFrame()->GetFrame().IsInPlace() );
+ !GetViewFrame().GetFrame().IsInPlace() );
if ( IsDocumentBorder() )
{
if ( m_aVisArea.Left() != DOCUMENTBORDER ||
@@ -697,7 +697,7 @@ IMPL_LINK(SwView, VertScrollHdl, weld::Scrollbar&, rScrollbar, void)
{
// The end scrollhandler invalidate the FN_STAT_PAGE,
// so we don't must do it again.
- // if(!GetViewFrame()->GetFrame().IsInPlace())
+ // if(!GetViewFrame().GetFrame().IsInPlace())
// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
@@ -758,7 +758,7 @@ void SwView::EndScrollHdl(weld::Scrollbar& rScrollbar, bool bHorizontal)
else
SetVisArea( aPos, false );
- GetViewFrame()->GetBindings().Update(FN_STAT_PAGE);
+ GetViewFrame().GetBindings().Update(FN_STAT_PAGE);
}
IMPL_LINK(SwView, HoriScrollHdl, weld::Scrollbar&, rScrollBar, void)
@@ -799,8 +799,8 @@ void SwView::CalcVisArea( const Size &rOutPixel )
}
}
SetVisArea( aRect );
- GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
- GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); // for snapping points
+ GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOM );
+ GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); // for snapping points
}
// Rearrange control elements
@@ -961,7 +961,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool )
Size aSz( rSize );
SvBorder aBorder;
CalcAndSetBorderPixel( aBorder );
- if ( GetViewFrame()->GetFrame().IsInPlace() )
+ if ( GetViewFrame().GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
Point aViewPos( rOfst );
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 162d0469b868..be23c4861a63 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -180,7 +180,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
{
SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName);
SfxBoolItem aSilent( SID_SILENT, true );
- GetViewFrame()->GetDispatcher()->ExecuteList(SID_PRINTDOC,
+ GetViewFrame().GetDispatcher()->ExecuteList(SID_PRINTDOC,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aPrinterName, &aSilent });
}
@@ -193,7 +193,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
xInfoBox->set_primary_text(xInfoBox->get_primary_text().replaceFirst("%1", SwResId(pResId)));
xInfoBox->run();
SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE);
- GetViewFrame()->GetDispatcher()->ExecuteList(SID_SW_EDITOPTIONS,
+ GetViewFrame().GetDispatcher()->ExecuteList(SID_SW_EDITOPTIONS,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aDefPage });
}
@@ -221,7 +221,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
if(RET_YES == nRet)
{
SfxBoolItem aBool(FN_QRY_MERGE, true);
- GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewFrame().GetDispatcher()->ExecuteList(
FN_QRY_MERGE, SfxCallMode::ASYNCHRON,
{ &aBool });
rReq.Ignore();
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 4125f1b17343..f64b92f3171e 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -162,7 +162,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
case FID_SEARCH_ON:
s_bJustOpened = true;
- GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
+ GetViewFrame().GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
case FID_SEARCH_OFF:
@@ -393,7 +393,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
- GetViewFrame()->GetBindings().GetRecorder();
+ GetViewFrame().GetBindings().GetRecorder();
//prevent additional dialogs in recorded macros
if ( xRecorder.is() )
rReq.AppendItem(SfxBoolItem(SID_SEARCH_QUIET, true));
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 8f69f23d4aea..90c30345d649 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -361,9 +361,9 @@ void SwView::GetState(SfxItemSet &rSet)
case SID_AVMEDIA_PLAYER :
case FN_REDLINE_ACCEPT :
{
- SfxViewFrame* pVFrame = GetViewFrame();
- if (pVFrame->KnowsChildWindow(nWhich))
- rSet.Put(SfxBoolItem( nWhich, pVFrame->HasChildWindow(nWhich)));
+ SfxViewFrame& rVFrame = GetViewFrame();
+ if (rVFrame.KnowsChildWindow(nWhich))
+ rSet.Put(SfxBoolItem( nWhich, rVFrame.HasChildWindow(nWhich)));
else
rSet.DisableItem(nWhich);
}
@@ -483,11 +483,11 @@ void SwView::GetState(SfxItemSet &rSet)
{
if (!SvtCJKOptions::IsAnyEnabled())
{
- GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
+ GetViewFrame().GetBindings().SetVisibleState( nWhich, false );
rSet.DisableItem(nWhich);
}
else
- GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
+ GetViewFrame().GetBindings().SetVisibleState( nWhich, true );
}
break;
case SID_MAIL_SCROLLBODY_PAGEDOWN:
@@ -508,7 +508,7 @@ void SwView::GetState(SfxItemSet &rSet)
if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::EModule::DATABASE ) )
rSet.Put( SfxVisibilityItem( nWhich, false ) );
else
- rSet.Put( SfxBoolItem( nWhich, GetViewFrame()->HasChildWindow( SID_BROWSER ) ) );
+ rSet.Put( SfxBoolItem( nWhich, GetViewFrame().HasChildWindow( SID_BROWSER ) ) );
break;
case SID_READONLY_MODE:
rSet.Put(SfxBoolItem(nWhich,
@@ -525,7 +525,7 @@ void SwView::GetState(SfxItemSet &rSet)
}
break;
case FN_INSERT_FIELD_DATA_ONLY :
- if(!m_bInMailMerge && !GetViewFrame()->HasChildWindow(nWhich))
+ if(!m_bInMailMerge && !GetViewFrame().HasChildWindow(nWhich))
rSet.DisableItem(nWhich);
break;
case FN_MAILMERGE_SENDMAIL_CHILDWINDOW:
@@ -571,7 +571,7 @@ void SwView::GetState(SfxItemSet &rSet)
//these slots are either re-mapped to text or object alignment
const SfxPoolItem* pState = nullptr;
if(nAlias)
- GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
+ GetViewFrame().GetDispatcher()->QueryState( nAlias, pState );
if(pState)
{
if (!(m_nSelectionType & SelectionType::DrawObject))
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 54456e9714da..c8b83129dd25 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -767,7 +767,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
rSh.SetIndent( static_cast< short >(aParaMargin.GetTextLeft() - rLR.GetTextLeft()), aPos);
// #i42921# invalidate state of indent in order to get a ruler update.
aParaMargin.SetWhich( nSlot );
- GetViewFrame()->GetBindings().SetState( aParaMargin );
+ GetViewFrame().GetBindings().SetState( aParaMargin );
}
else if( pColl && pColl->IsAutoUpdateOnDirectFormat() )
{
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index 8e65ff58bc9f..64fb33f8d67f 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -45,7 +45,7 @@ const char cInternalDBChangeNotification[] = ".uno::Writer/DataSourceChanged";
SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) :
m_pView(&rVw)
{
- uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
+ uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame().GetFrame().GetFrameInterface();
m_xIntercepted.set(xUnoFrame, uno::UNO_QUERY);
if(m_xIntercepted.is())
{
@@ -209,7 +209,7 @@ void SwXDispatch::dispatch(const util::URL& aURL,
else if(aURL.Complete == cURLFormLetter)
{
SfxUnoAnyItem aDBProperties(FN_PARAM_DATABASE_PROPERTIES, uno::Any(aArgs));
- m_pView->GetViewFrame()->GetDispatcher()->ExecuteList(
+ m_pView->GetViewFrame().GetDispatcher()->ExecuteList(
FN_MAILMERGE_WIZARD,
SfxCallMode::ASYNCHRON,
{ &aDBProperties });
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index e752a659b2ee..4aace999dc5a 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3451,7 +3451,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments)
// The current placeholder is selected, so this will replace, not insert.
SfxStringItem aItem(SID_INSERT_GRAPHIC, it->second);
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_CHANGE_PICTURE,
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(SID_CHANGE_PICTURE,
SfxCallMode::SYNCHRON, { &aItem });
}
else if (it->second == "date")
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 8628f0f42588..254ee4fcec9f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2356,7 +2356,7 @@ IMPL_LINK_NOARG(SwContentTree, ContentDoubleClickHdl, weld::TreeView&, bool)
{
if (State::CONSTANT == m_eState)
{
- m_pActiveShell->GetView().GetViewFrame()->GetWindow().ToTop();
+ m_pActiveShell->GetView().GetViewFrame().GetWindow().ToTop();
}
//Jump to content type:
GotoContent(pCnt);
@@ -4336,7 +4336,7 @@ IMPL_LINK(SwContentTree, KeyInputHdl, const KeyEvent&, rEvent, bool)
{
if (State::CONSTANT == m_eState)
{
- m_pActiveShell->GetView().GetViewFrame()->GetWindow().ToTop();
+ m_pActiveShell->GetView().GetViewFrame().GetWindow().ToTop();
}
SwContent* pCnt = dynamic_cast<SwContent*>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(*xEntry)));
@@ -4744,7 +4744,7 @@ void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry)
}
case 700:
{
- m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_OUTLINE_TO_CLIPBOARD);
+ m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_OUTLINE_TO_CLIPBOARD);
break;
}
case 800:
@@ -4788,7 +4788,7 @@ void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry)
else if (eTypeId == ContentTypeId::TABLE)
{
m_pActiveShell->GotoTable(pCnt->GetName());
- m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
+ m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
}
else if (eTypeId == ContentTypeId::REGION)
{
@@ -5033,7 +5033,7 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode)
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, sTable);
m_pActiveShell->StartUndo(SwUndoId::DELETE, &aRewriter);
- m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
+ m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
m_pActiveShell->DeleteRow();
m_pActiveShell->EndUndo();
m_pActiveShell->EndAction();
@@ -5113,7 +5113,7 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode)
// allowed despite PROTECT_BOOKMARKS: the dialog itself enforces it
SfxStringItem const name(FN_EDIT_BOOKMARK, pCnt->GetName());
SfxPoolItem const* args[2] = { &name, nullptr };
- m_pActiveShell->GetView().GetViewFrame()->
+ m_pActiveShell->GetView().GetViewFrame().
GetDispatcher()->Execute(FN_EDIT_BOOKMARK, SfxCallMode::SYNCHRON, args);
}
break;
@@ -5194,7 +5194,7 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode)
if(pBase)
{
SwPtrItem aPtrItem( FN_INSERT_MULTI_TOX, const_cast<SwTOXBase *>(pBase));
- m_pActiveShell->GetView().GetViewFrame()->
+ m_pActiveShell->GetView().GetViewFrame().
GetDispatcher()->ExecuteList(FN_INSERT_MULTI_TOX,
SfxCallMode::ASYNCHRON, { &aPtrItem });
@@ -5249,7 +5249,7 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode)
default: break;
}
if(nSlot)
- m_pActiveShell->GetView().GetViewFrame()->
+ m_pActiveShell->GetView().GetViewFrame().
GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON);
else if(xNameAccess.is())
{
@@ -5330,7 +5330,7 @@ void SwContentTree::CopyOutlineSelections()
return false;
});
m_pActiveShell->LeaveAddMode();
- m_pActiveShell->GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);
+ m_pActiveShell->GetView().GetViewFrame().GetBindings().Execute(SID_COPY);
}
m_pActiveShell->LockView(false);
}
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index f688387046ad..fac264f2bbf1 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -559,7 +559,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
GotoContent(pCont);
if(nSlot)
{
- m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
+ m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->Execute(nSlot);
if(Update( false ))
Display();
}
@@ -577,7 +577,7 @@ void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry
std::unique_ptr<SwGlblDocContent> pContCopy;
if(pCont)
pContCopy.reset(new SwGlblDocContent(pCont->GetDocPos()));
- SfxDispatcher& rDispatch = *m_pActiveShell->GetView().GetViewFrame()->GetDispatcher();
+ SfxDispatcher& rDispatch = *m_pActiveShell->GetView().GetViewFrame().GetDispatcher();
sal_uInt16 nSlot = 0;
if (rSelectedPopupEntry == "updatesel")
{
@@ -693,8 +693,8 @@ void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry
}
else if (rSelectedPopupEntry == "insertnewfile")
{
- SfxViewFrame* pGlobFrame = m_pActiveShell->GetView().GetViewFrame();
- SwGlobalFrameListener_Impl aFrameListener(*pGlobFrame);
+ SfxViewFrame& rGlobFrame = m_pActiveShell->GetView().GetViewFrame();
+ SwGlobalFrameListener_Impl aFrameListener(rGlobFrame);
// Creating a new doc
SfxStringItem aFactory(SID_NEWDOCDIRECT,
@@ -719,7 +719,7 @@ void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry
// Bring the own Doc in the foreground
if(aFrameListener.IsValid() && !sNewFile.isEmpty())
{
- pGlobFrame->ToTop();
+ rGlobFrame.ToTop();
// Due to the update the entries are invalid
if (nEntry != -1)
{
@@ -971,7 +971,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
SfxBoolItem aReadOnly(SID_DOC_READONLY, false);
SfxStringItem aTargetFrameName( SID_TARGETNAME, "_blank" );
SfxStringItem aReferer(SID_REFERER, m_pActiveShell->GetView().GetDocShell()->GetTitle());
- m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
+ m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->
ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON,
{ &aURL, &aReadOnly, &aReferer, &aTargetFrameName });
}
diff --git a/sw/source/uibase/utlui/gotodlg.cxx b/sw/source/uibase/utlui/gotodlg.cxx
index 9ab0d366db35..666164495f63 100644
--- a/sw/source/uibase/utlui/gotodlg.cxx
+++ b/sw/source/uibase/utlui/gotodlg.cxx
@@ -71,7 +71,7 @@ SwView* SwGotoPageDlg::GetCreateView() const
SwView* pView = SwModule::GetFirstView();
while (pView)
{
- if (&pView->GetViewFrame()->GetBindings() == m_rBindings)
+ if (&pView->GetViewFrame().GetBindings() == m_rBindings)
{
const_cast<SwGotoPageDlg*>(this)->m_pCreateView = pView;
break;
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 773e40baa0c1..d3ee5c3c42c4 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -280,7 +280,7 @@ IMPL_LINK(SwNavigationPI, ToolBoxSelectHdl, const OString&, rCommand, void)
}
else if (rCommand == "reminder")
{
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_SET_REMINDER, SfxCallMode::ASYNCHRON);
+ rSh.GetView().GetViewFrame().GetDispatcher()->Execute(FN_SET_REMINDER, SfxCallMode::ASYNCHRON);
}
else if (rCommand == "chapterdown" ||
rCommand == "movedown" ||
@@ -406,7 +406,7 @@ bool SwNavigationPI::EditAction()
sal_uInt16 nNewPage = m_xEdit->get_value();
rSh.GotoPage(nNewPage, true);
- m_pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
+ m_pCreateView->GetViewFrame().GetBindings().Invalidate(FN_STAT_PAGE);
return true;
}
@@ -1013,7 +1013,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
SfxStringItem aOptionsItem( SID_OPTIONS, "HRC" );
SfxLinkItem aLink( SID_DONELINK,
LINK( this, SwNavigationPI, DoneLink ) );
- GetActiveView()->GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetActiveView()->GetViewFrame().GetDispatcher()->ExecuteList(
SID_OPENDOC, SfxCallMode::ASYNCHRON,
{ &aFileItem, &aOptionsItem, &aLink });
}
@@ -1138,7 +1138,7 @@ SwView* SwNavigationPI::GetCreateView() const
SwView* pView = SwModule::GetFirstView();
while (pView)
{
- if(&pView->GetViewFrame()->GetBindings() == &m_rBindings)
+ if(&pView->GetViewFrame().GetBindings() == &m_rBindings)
{
const_cast<SwNavigationPI*>(this)->m_pCreateView = pView;
const_cast<SwNavigationPI*>(this)->StartListening(*m_pCreateView);
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index bccb4cb58ab2..b1d5d373f65f 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -108,7 +108,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
// looks a bit awkward, but another way is not possible
pStyle = xIter->operator[]( nCurrId - 1 );
SfxStringItem aStyle( FN_SET_PAGE_STYLE, pStyle->GetName() );
- pWrtShell->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+ pWrtShell->GetView().GetViewFrame().GetDispatcher()->ExecuteList(
FN_SET_PAGE_STYLE,
SfxCallMode::SLOT|SfxCallMode::RECORD,
{ &aStyle });
diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx
index 98be7a6508ea..766c1a5ccb00 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -108,7 +108,7 @@ void SwWebView::SelectShell()
SelectionType _nSelectionType = GetSelectionType();
if ( nNewSelectionType == _nSelectionType )
{
- GetViewFrame()->GetBindings().InvalidateAll( false );
+ GetViewFrame().GetBindings().InvalidateAll( false );
if ( _nSelectionType & SelectionType::Ole ||
_nSelectionType & SelectionType::Graphic )
//The verb may of course change for graphics and OLE!
@@ -116,7 +116,7 @@ void SwWebView::SelectShell()
}
else
{
- SfxDispatcher &rDispatcher = *GetViewFrame()->GetDispatcher();
+ SfxDispatcher &rDispatcher = *GetViewFrame().GetDispatcher();
SwToolbarConfigItem *pBarCfg = SW_MOD()->GetWebToolbarConfig();
if( GetCurShell() )
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index f068e0ecc26a..b167003b1722 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -55,7 +55,7 @@ public:
bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrameType(nullptr,false) & FrameTypeFlags::FLY_ANY);
pSh = pWrtSh;
pSh->MoveCursor( bSel );
- pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
+ pWrtSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
~ShellMoveCursor() COVERITY_NOEXCEPT_FALSE
{
diff --git a/sw/source/uibase/wrtsh/navmgr.cxx b/sw/source/uibase/wrtsh/navmgr.cxx
index 7e7d2df1210f..eea6cda7dce0 100644
--- a/sw/source/uibase/wrtsh/navmgr.cxx
+++ b/sw/source/uibase/wrtsh/navmgr.cxx
@@ -134,9 +134,9 @@ void SwNavigationMgr::goBack() {
GotoSwPosition(*m_entries[m_nCurrent]->GetPoint());
// Refresh the buttons
if (bForwardWasDisabled)
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
if (!backEnabled())
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_BACK);
}
// The goForward() method positions the cursor to the next entry in the navigation history
@@ -157,9 +157,9 @@ void SwNavigationMgr::goForward() {
GotoSwPosition(*m_entries[m_nCurrent]->GetPoint());
// Refresh the buttons
if (bBackWasDisabled)
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_BACK);
if (!forwardEnabled())
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
}
// This method adds the SwPosition rPos to the navigation history
@@ -211,9 +211,9 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) {
// Refresh buttons
if (bBackWasDisabled)
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_BACK);
if (bForwardWasEnabled)
- m_rMyShell.GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ m_rMyShell.GetView().GetViewFrame().GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
return bRet;
}
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index fe2915a90234..5b7358c230ce 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -54,9 +54,9 @@ void SwWrtShell::Invalidate()
{
// to avoid making the slot volatile, invalidate it every time if something could have been changed
// this is still much cheaper than asking for the state every 200 ms (and avoid background processing)
- GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
- GetView().GetViewFrame()->GetBindings().Update(FN_STAT_SELMODE); // make selection mode control icon update immediately
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ GetView().GetViewFrame().GetBindings().Invalidate( FN_STAT_SELMODE );
+ GetView().GetViewFrame().GetBindings().Update(FN_STAT_SELMODE); // make selection mode control icon update immediately
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
}
@@ -439,7 +439,7 @@ void SwWrtShell::EndSelect()
m_fnKillSel = &SwWrtShell::ResetSelect;
}
}
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
@@ -673,7 +673,7 @@ void SwWrtShell::SetInsMode( bool bOn )
m_bIns = bOn;
SwCursorShell::SetOverwriteCursor( !m_bIns );
const SfxBoolItem aTmp( SID_ATTR_INSERT, m_bIns );
- GetView().GetViewFrame()->GetBindings().SetState( aTmp );
+ GetView().GetViewFrame().GetBindings().SetState( aTmp );
StartAction();
EndAction();
Invalidate();
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 5f7ac28519b4..1284db4fbb88 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -653,7 +653,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
void SwWrtShell::LaunchOLEObj(sal_Int32 nVerb)
{
if ( GetCntType() != CNT_OLE ||
- GetView().GetViewFrame()->GetFrame().IsInPlace() )
+ GetView().GetViewFrame().GetFrame().IsInPlace() )
return;
svt::EmbeddedObjectRef& xRef = GetOLEObject();
@@ -2117,7 +2117,7 @@ void SwWrtShell::ApplyViewOptions( const SwViewOption &rOpt )
{
SwFEShell::ApplyViewOptions( rOpt );
//#i115062# invalidate meta character slot
- GetView().GetViewFrame()->GetBindings().Invalidate( FN_VIEW_META_CHARS );
+ GetView().GetViewFrame().GetBindings().Invalidate( FN_VIEW_META_CHARS );
}
void SwWrtShell::SetReadonlyOption(bool bSet)
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 1995e7133c4a..b9995c0922b4 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -307,7 +307,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool b
GetWin()->PaintImmediately();
if(RET_YES == nRet)
{
- GetView().GetViewFrame()->GetDispatcher()->Execute(FN_EDIT_FIELD, SfxCallMode::SYNCHRON);
+ GetView().GetViewFrame().GetDispatcher()->Execute(FN_EDIT_FIELD, SfxCallMode::SYNCHRON);
}
return bRet;
}
@@ -377,7 +377,7 @@ void SwWrtShell::ClickToField(const SwField& rField, bool bExecHyperlinks)
StartUndo( SwUndoId::START );
//#97295# immediately select the right shell
GetView().StopShellTimer();
- GetView().GetViewFrame()->GetDispatcher()->Execute( nSlotId,
+ GetView().GetViewFrame().GetDispatcher()->Execute( nSlotId,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
EndUndo( SwUndoId::END );
}
@@ -539,8 +539,8 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
OUString sReferer;
if( pDShell && pDShell->GetMedium() )
sReferer = pDShell->GetMedium()->GetName();
- SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame();
- SfxFrameItem aView( SID_DOCFRAME, pViewFrame );
+ SfxViewFrame& rViewFrame = rSh.GetView().GetViewFrame();
+ SfxFrameItem aView( SID_DOCFRAME, &rViewFrame );
SfxStringItem aName( SID_FILE_NAME, rURL );
SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
SfxStringItem aReferer( SID_REFERER, sReferer );
@@ -561,7 +561,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
nullptr
};
- pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
+ rViewFrame.GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
SfxCallMode::ASYNCHRON|SfxCallMode::RECORD );
}
diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx
index 4e80bfc1e3d1..7167b0639bd9 100644
--- a/sw/source/uibase/wrtsh/wrtsh3.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh3.cxx
@@ -114,7 +114,7 @@ bool SwWrtShell::GotoContentControl(const SwFormatContentControl& rContentContro
}
else
{
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHANGE_PICTURE,
+ GetView().GetViewFrame().GetDispatcher()->Execute(SID_CHANGE_PICTURE,
SfxCallMode::SYNCHRON);
}
pContentControl->SetShowingPlaceHolder(false);
@@ -253,7 +253,7 @@ void SwWrtShell::DrawSelChanged( )
0
};
- GetView().GetViewFrame()->GetBindings().Invalidate(aInval);
+ GetView().GetViewFrame().GetBindings().Invalidate(aInval);
bool bOldVal = g_bNoInterrupt;
g_bNoInterrupt = true; // Trick to run AttrChangedNotify by timer.