summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx6
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx33
-rw-r--r--basctl/source/basicide/basides2.cxx13
-rw-r--r--basctl/source/basicide/basides3.cxx2
-rw-r--r--basctl/source/basicide/basidesh.cxx17
-rw-r--r--basctl/source/basicide/basobj3.cxx14
-rw-r--r--basctl/source/basicide/bastypes.cxx4
-rw-r--r--basctl/source/basicide/localizationmgr.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx8
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx22
-rw-r--r--desktop/source/lib/init.cxx6
-rw-r--r--include/sfx2/lokhelper.hxx2
-rw-r--r--include/sfx2/viewsh.hxx39
-rw-r--r--sc/qa/unit/scshapetest.cxx6
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx58
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx17
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/dbgui/validate.cxx12
-rw-r--r--sc/source/ui/docshell/datastream.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx6
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx14
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx8
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx4
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext.cxx10
-rw-r--r--sc/source/ui/inc/ChildWindowWrapper.hxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx12
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx9
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx20
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbawindow.cxx8
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx118
-rw-r--r--sc/source/ui/view/cellsh2.cxx109
-rw-r--r--sc/source/ui/view/cellsh3.cxx32
-rw-r--r--sc/source/ui/view/drawvie3.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx49
-rw-r--r--sc/source/ui/view/editsh.cxx8
-rw-r--r--sc/source/ui/view/formatsh.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx33
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx32
-rw-r--r--sc/source/ui/view/reffact.cxx6
-rw-r--r--sc/source/ui/view/spelleng.cxx6
-rw-r--r--sc/source/ui/view/tabcont.cxx6
-rw-r--r--sc/source/ui/view/tabview.cxx27
-rw-r--r--sc/source/ui/view/tabview3.cxx37
-rw-r--r--sc/source/ui/view/tabview5.cxx15
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx10
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx28
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx64
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx20
-rw-r--r--sc/source/ui/view/tabvwsha.cxx18
-rw-r--r--sc/source/ui/view/tabvwshb.cxx16
-rw-r--r--sc/source/ui/view/tabvwshc.cxx8
-rw-r--r--sc/source/ui/view/tabvwshd.cxx6
-rw-r--r--sc/source/ui/view/tabvwshf.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx6
-rw-r--r--sc/source/ui/view/viewutil.cxx4
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx28
-rw-r--r--sd/source/ui/docshell/docshell.cxx8
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx4
-rw-r--r--sd/source/ui/framework/factories/ChildWindowPane.cxx37
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx13
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx6
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx4
-rw-r--r--sd/source/ui/table/tablefunction.cxx2
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx4
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx21
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx2
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx4
-rw-r--r--sd/source/ui/view/drviews1.cxx4
-rw-r--r--sd/source/ui/view/viewshe2.cxx12
-rw-r--r--sd/source/ui/view/viewshel.cxx4
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx22
-rw-r--r--sfx2/source/control/shell.cxx10
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx2
-rw-r--r--sfx2/source/view/ipclient.cxx22
-rw-r--r--sfx2/source/view/lokhelper.cxx21
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx53
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx6
-rw-r--r--sfx2/source/view/viewsh.cxx118
-rw-r--r--starmath/inc/view.hxx2
-rw-r--r--starmath/source/SmElementsPanel.cxx2
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/edit.cxx4
-rw-r--r--starmath/source/view.cxx42
-rw-r--r--svx/qa/unit/customshapes.cxx2
-rw-r--r--svx/source/form/fmshell.cxx37
-rw-r--r--svx/source/form/fmshimp.cxx80
-rw-r--r--svx/source/form/fmview.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx8
-rw-r--r--sw/qa/core/doc/doc.cxx2
-rw-r--r--sw/qa/core/layout/layout.cxx2
-rw-r--r--sw/qa/core/undo/undo.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx32
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter4.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter5.cxx54
-rw-r--r--sw/qa/extras/uiwriter/uiwriter6.cxx2
-rw-r--r--sw/qa/uibase/shells/shells.cxx14
-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
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx6
218 files changed, 1491 insertions, 1617 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 60f0ccaa4332..ad1dd3682b22 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -282,7 +282,7 @@ void ModulWindow::CheckCompileBasic()
bool bDone = false;
- GetShell()->GetViewFrame()->GetWindow().EnterWait();
+ GetShell()->GetViewFrame().GetWindow().EnterWait();
AssertValidEditEngine();
GetEditorWindow().SetSourceInBasic();
@@ -302,7 +302,7 @@ void ModulWindow::CheckCompileBasic()
GetBreakPoints().SetBreakPointsInBasic( m_xModule.get() );
}
- GetShell()->GetViewFrame()->GetWindow().LeaveWait();
+ GetShell()->GetViewFrame().GetWindow().LeaveWait();
m_aStatus.bError = !bDone;
m_aStatus.bIsRunning = false;
@@ -612,7 +612,7 @@ void ModulWindow::ManageBreakPoints()
void ModulWindow::BasicErrorHdl( StarBASIC const * pBasic )
{
- GetShell()->GetViewFrame()->ToTop();
+ GetShell()->GetViewFrame().ToTop();
// Return value: BOOL
// FALSE: cancel
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 2601b5f987c1..d941a653dc8b 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1045,7 +1045,7 @@ void EditorWindow::CreateEditEngine()
// nLines*4: SetText+Formatting+DoHighlight+Formatting
// it could be cut down on one formatting but you would wait even longer
// for the text then if the source code is long...
- pProgress.reset(new ProgressInfo(GetShell()->GetViewFrame()->GetObjectShell(),
+ pProgress.reset(new ProgressInfo(GetShell()->GetViewFrame().GetObjectShell(),
IDEResId(RID_STR_GENERATESOURCE),
nLines * 4));
setTextEngineText(*pEditEngine, aOUSource);
@@ -1393,7 +1393,7 @@ void EditorWindow::CreateProgress( const OUString& rText, sal_uInt32 nRange )
{
DBG_ASSERT( !pProgress, "ProgressInfo exists already" );
pProgress.reset(new ProgressInfo(
- GetShell()->GetViewFrame()->GetObjectShell(),
+ GetShell()->GetViewFrame().GetObjectShell(),
rText,
nRange
));
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 33528679b2fd..309caa0357c9 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -313,7 +313,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
case SID_SHOW_PROPERTYBROWSER:
{
Shell* pShell = GetShell();
- SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : nullptr;
+ SfxViewFrame* pViewFrame = pShell ? &pShell->GetViewFrame() : nullptr;
if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !m_pEditor->GetView().AreObjectsMarked() )
rSet.DisableItem( nWh );
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index b870a14a92a5..c690dccddc54 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -92,7 +92,7 @@ void Shell::ExecuteSearch( SfxRequest& rReq )
break;
case FID_SEARCH_ON:
mbJustOpened = true;
- GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
+ GetViewFrame().GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
case SID_BASICIDE_REPEAT_SEARCH:
case FID_SEARCH_NOW:
@@ -175,8 +175,8 @@ void Shell::ExecuteSearch( SfxRequest& rReq )
{
if ( !pWin )
{
- SfxViewFrame* pViewFrame = GetViewFrame();
- SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : nullptr;
+ SfxViewFrame& rViewFrame = GetViewFrame();
+ SfxChildWindow* pChildWin = rViewFrame.GetChildWindow(SID_SEARCH_DLG);
auto xParent = pChildWin ? pChildWin->GetController() : nullptr;
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(xParent ? xParent->getDialog() : nullptr,
@@ -260,7 +260,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
case SID_UNDO:
case SID_REDO:
if ( GetUndoManager() && pCurWin->AllowUndo() )
- GetViewFrame()->ExecuteSlot( rReq );
+ GetViewFrame().ExecuteSlot( rReq );
break;
default:
pCurWin->ExecuteCommand( rReq );
@@ -399,9 +399,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
if ( pModule && !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxClassType::Method ) )
CreateMacro( pModule, rInfo.GetMethod() );
}
- SfxViewFrame* pViewFrame = GetViewFrame();
- if ( pViewFrame )
- pViewFrame->ToTop();
+ SfxViewFrame& rViewFrame = GetViewFrame();
+ rViewFrame.ToTop();
VclPtr<ModulWindow> pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), true );
DBG_ASSERT( pWin, "Edit/Create Macro: Window was not created/found!" );
SetCurWindow( pWin, true );
@@ -1047,7 +1046,7 @@ void Shell::GetState(SfxItemSet &rSet)
case SID_REDO:
{
if( GetUndoManager() ) // recursive GetState else
- GetViewFrame()->GetSlotState( nWh, nullptr, &rSet );
+ GetViewFrame().GetSlotState( nWh, nullptr, &rSet );
}
break;
case SID_BASICIDE_CURRENT_LANG:
@@ -1189,17 +1188,17 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
pLayout = pModulLayout.get();
else
pLayout = pDialogLayout.get();
- AdjustPosSizePixel(Point(0, 0), GetViewFrame()->GetWindow().GetOutputSizePixel());
+ AdjustPosSizePixel(Point(0, 0), GetViewFrame().GetWindow().GetOutputSizePixel());
pLayout->Activating(*pCurWin);
- GetViewFrame()->GetWindow().SetHelpId(pCurWin->GetHid());
+ GetViewFrame().GetWindow().SetHelpId(pCurWin->GetHid());
if (bRememberAsCurrent)
pCurWin->InsertLibInfo();
- if (GetViewFrame()->GetWindow().IsVisible()) // SFX will do it later otherwise
+ if (GetViewFrame().GetWindow().IsVisible()) // SFX will do it later otherwise
pCurWin->Show();
pCurWin->Init();
if (!GetExtraData()->ShellInCriticalSection())
{
- vcl::Window* pFrameWindow = &GetViewFrame()->GetWindow();
+ vcl::Window* pFrameWindow = &GetViewFrame().GetWindow();
vcl::Window* pFocusWindow = Application::GetFocusWindow();
while ( pFocusWindow && ( pFocusWindow != pFrameWindow ) )
pFocusWindow = pFocusWindow->GetParent();
@@ -1230,7 +1229,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
else if (pLayout)
{
SetWindow(pLayout);
- GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW );
+ GetViewFrame().GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW );
SfxObjectShell::SetCurrentComponent(nullptr);
}
aObjectCatalog->SetCurrentEntry(pCurWin);
@@ -1260,7 +1259,7 @@ void Shell::ManageToolbars()
return;
Reference< beans::XPropertySet > xFrameProps
- ( GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
+ ( GetViewFrame().GetFrame().GetFrameInterface(), uno::UNO_QUERY );
if ( !xFrameProps.is() )
return;
@@ -1341,7 +1340,7 @@ BasicDebugFlags Shell::CallBasicBreakHdl( StarBASIC const * pBasic )
{
Shell* pShell = GetShell();
for ( sal_uInt16 n = 0; n < nWaitCount; n++ )
- pShell->GetViewFrame()->GetWindow().EnterWait();
+ pShell->GetViewFrame().GetWindow().EnterWait();
}
}
}
@@ -1385,11 +1384,11 @@ VclPtr<ModulWindow> Shell::ShowActiveModuleWindow( StarBASIC const * pBasic )
void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
{
// not if iconified because the whole text would be displaced then at restore
- if ( GetViewFrame()->GetWindow().GetOutputSizePixel().Height() == 0 )
+ if ( GetViewFrame().GetWindow().GetOutputSizePixel().Height() == 0 )
return;
Size aTabBarSize;
- aTabBarSize.setHeight( GetViewFrame()->GetWindow().GetFont().GetFontHeight() + TAB_HEIGHT_MARGIN );
+ aTabBarSize.setHeight( GetViewFrame().GetWindow().GetFont().GetFontHeight() + TAB_HEIGHT_MARGIN );
aTabBarSize.setWidth( rSize.Width() );
Size aSz( rSize );
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index ca219f4c9059..5bd69b76f380 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -82,7 +82,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate )
{
if ( pCurWin )
{
- DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell());
+ DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame().GetObjectShell());
assert(pDocShell && "DocShell ?!");
return pDocShell->GetPrinter( bCreate );
}
@@ -91,7 +91,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate )
sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags )
{
- DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell());
+ DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame().GetObjectShell());
assert(pDocShell && "DocShell ?!");
pDocShell->SetPrinter( pNewPrinter );
return 0;
@@ -114,11 +114,8 @@ void Shell::SetMDITitle()
aTitle += " " + IDEResId(RID_STR_SIGNED) + " ";
}
- SfxViewFrame* pViewFrame = GetViewFrame();
- if ( !pViewFrame )
- return;
-
- SfxObjectShell* pShell = pViewFrame->GetObjectShell();
+ SfxViewFrame& rViewFrame = GetViewFrame();
+ SfxObjectShell* pShell = rViewFrame.GetObjectShell();
if ( pShell && pShell->GetTitle( SFX_TITLE_CAPTION ) != aTitle )
{
pShell->SetTitle( aTitle );
@@ -168,7 +165,7 @@ VclPtr<ModulWindow> Shell::CreateBasWin( const ScriptDocument& rDocument, const
{
// new module window
if (!pModulLayout)
- pModulLayout.reset(VclPtr<ModulWindowLayout>::Create(&GetViewFrame()->GetWindow(), *aObjectCatalog));
+ pModulLayout.reset(VclPtr<ModulWindowLayout>::Create(&GetViewFrame().GetWindow(), *aObjectCatalog));
pWin = VclPtr<ModulWindow>::Create(pModulLayout.get(), rDocument, aLibName, aModName, aModule);
nKey = InsertWindowInTable( pWin );
}
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index d47b6ae3a26c..44bc54ba624f 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -81,7 +81,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
// new dialog window
if (!pDialogLayout)
- pDialogLayout.reset(VclPtr<DialogWindowLayout>::Create(&GetViewFrame()->GetWindow(), *aObjectCatalog));
+ pDialogLayout.reset(VclPtr<DialogWindowLayout>::Create(&GetViewFrame().GetWindow(), *aObjectCatalog));
pWin = VclPtr<DialogWindow>::Create(pDialogLayout.get(), rDocument, aLibName, aDlgName, xDialogModel);
nKey = InsertWindowInTable( pWin );
}
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 0c3c5bb16de7..73d27e2eea34 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -164,10 +164,10 @@ unsigned Shell::nShellCount = 0;
Shell::Shell( SfxViewFrame& rFrame_, SfxViewShell* /* pOldShell */ ) :
SfxViewShell( rFrame_, SfxViewShellFlags::NO_NEWWINDOW ),
m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
- aHScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame()->GetWindow(), true) ),
- aVScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame()->GetWindow(), false) ),
+ aHScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame().GetWindow(), true) ),
+ aVScrollBar( VclPtr<ScrollAdaptor>::Create(&GetViewFrame().GetWindow(), false) ),
pLayout(nullptr),
- aObjectCatalog(VclPtr<ObjectCatalog>::Create(&GetViewFrame()->GetWindow())),
+ aObjectCatalog(VclPtr<ObjectCatalog>::Create(&GetViewFrame().GetWindow())),
m_bAppBasicModified( false ),
m_aNotifier( *this )
{
@@ -192,15 +192,15 @@ void Shell::Init()
LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG );
SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER );
- GetViewFrame()->GetWindow().SetBackground(
- GetViewFrame()->GetWindow().GetSettings().GetStyleSettings().GetWindowColor()
+ GetViewFrame().GetWindow().SetBackground(
+ GetViewFrame().GetWindow().GetSettings().GetStyleSettings().GetWindowColor()
);
pCurWin = nullptr;
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
bCreatingWindow = false;
- pTabBar.reset(VclPtr<TabBar>::Create(&GetViewFrame()->GetWindow()));
+ pTabBar.reset(VclPtr<TabBar>::Create(&GetViewFrame().GetWindow()));
nCurKey = 100;
InitScrollBars();
@@ -427,17 +427,16 @@ void Shell::StoreAllWindowData( bool bPersistent )
}
}
-
bool Shell::PrepareClose( bool bUI )
{
// reset here because it's modified after printing etc. (DocInfo)
- GetViewFrame()->GetObjectShell()->SetModified(false);
+ GetViewFrame().GetObjectShell()->SetModified(false);
if ( StarBASIC::IsRunning() )
{
if( bUI )
{
- std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetViewFrame()->GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetViewFrame().GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
IDEResId(RID_STR_CANNOTCLOSE)));
xInfoBox->run();
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index a470461be6a7..4672cdd52c2b 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -321,9 +321,9 @@ void BasicStopped(
if (Shell* pShell = GetShell())
{
sal_uInt16 nWait = 0;
- while ( pShell->GetViewFrame()->GetWindow().IsWait() )
+ while ( pShell->GetViewFrame().GetWindow().IsWait() )
{
- pShell->GetViewFrame()->GetWindow().LeaveWait();
+ pShell->GetViewFrame().GetWindow().LeaveWait();
nWait++;
}
if ( pnWaitCount )
@@ -430,7 +430,7 @@ SfxBindings* GetBindingsPtr()
SfxViewFrame* pFrame = nullptr;
if (Shell* pShell = GetShell())
{
- pFrame = pShell->GetViewFrame();
+ pFrame = &pShell->GetViewFrame();
}
else
{
@@ -454,9 +454,11 @@ SfxBindings* GetBindingsPtr()
SfxDispatcher* GetDispatcher ()
{
if (Shell* pShell = GetShell())
- if (SfxViewFrame* pViewFrame = pShell->GetViewFrame())
- if (SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher())
- return pDispatcher;
+ {
+ SfxViewFrame& rViewFrame = pShell->GetViewFrame();
+ if (SfxDispatcher* pDispatcher = rViewFrame.GetDispatcher())
+ return pDispatcher;
+ }
return nullptr;
}
} // namespace basctl
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 0bf829b2bb5d..5fd607108dc1 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -94,7 +94,7 @@ void BaseWindow::Init()
pShellHScrollBar->SetScrollHdl( LINK( this, BaseWindow, HorzScrollHdl ) );
// Show the read-only infobar if the module/dialog is read-only
- GetShell()->GetViewFrame()->RemoveInfoBar(BASIC_IDE_READONLY_INFOBAR);
+ GetShell()->GetViewFrame().RemoveInfoBar(BASIC_IDE_READONLY_INFOBAR);
if (IsReadOnly())
ShowReadOnlyInfoBar();
@@ -240,7 +240,7 @@ void BaseWindow::ShowReadOnlyInfoBar()
else
aMsg = IDEResId(RID_STR_DIALOG_READONLY);
- GetShell()->GetViewFrame()->AppendInfoBar(BASIC_IDE_READONLY_INFOBAR, OUString(),
+ GetShell()->GetViewFrame().AppendInfoBar(BASIC_IDE_READONLY_INFOBAR, OUString(),
aMsg, InfobarType::INFO, true);
}
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 18a19d6e7b17..17371bed2968 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -82,7 +82,7 @@ void LocalizationMgr::handleTranslationbar ()
static constexpr OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
Reference< beans::XPropertySet > xFrameProps
- ( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
+ ( m_pShell->GetViewFrame().GetFrame().GetFrameInterface(), uno::UNO_QUERY );
if ( !xFrameProps.is() )
return;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 82443228dbe8..12650fc8f66a 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -461,10 +461,10 @@ IMPL_LINK( LibPage, ButtonHdl, weld::Button&, rButton, void )
{
Shell* pShell = GetShell();
if (pShell)
- pShell->GetViewFrame()->GetWindow().EnterWait();
+ pShell->GetViewFrame().GetWindow().EnterWait();
xModLibContainer->loadLibrary( aLibName );
if (pShell)
- pShell->GetViewFrame()->GetWindow().LeaveWait();
+ pShell->GetViewFrame().GetWindow().LeaveWait();
}
// load dialog library (if not loaded)
@@ -473,10 +473,10 @@ IMPL_LINK( LibPage, ButtonHdl, weld::Button&, rButton, void )
{
Shell* pShell = GetShell();
if (pShell)
- pShell->GetViewFrame()->GetWindow().EnterWait();
+ pShell->GetViewFrame().GetWindow().EnterWait();
xDlgLibContainer->loadLibrary( aLibName );
if (pShell)
- pShell->GetViewFrame()->GetWindow().LeaveWait();
+ pShell->GetViewFrame().GetWindow().LeaveWait();
}
// check, if library is password protected
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index a5560dd6be8d..6be2de622b1d 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1216,7 +1216,7 @@ void DesktopLOKTest::testSheetDragDrop()
Scheduler::ProcessEventsToIdle();
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
OUString sValue;
css::uno::Any aValue;
@@ -1228,7 +1228,7 @@ void DesktopLOKTest::testSheetDragDrop()
aURL.Path = "Address";
aURL.Main = ".uno:Address";
- pViewFrame->GetBindings().QueryState(pViewFrame->GetBindings().QuerySlotId(aURL), pState);
+ rViewFrame.GetBindings().QueryState(rViewFrame.GetBindings().QuerySlotId(aURL), pState);
pState->QueryValue(aValue);
aValue >>= sValue;
CPPUNIT_ASSERT_EQUAL(OUString("Sheet5.A1:E1"), sValue);
@@ -1272,7 +1272,7 @@ void DesktopLOKTest::testSheetDragDrop()
Scheduler::ProcessEventsToIdle();
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
OUString sValue;
css::uno::Any aValue;
@@ -1284,7 +1284,7 @@ void DesktopLOKTest::testSheetDragDrop()
aURL.Path = "Address";
aURL.Main = ".uno:Address";
- pViewFrame->GetBindings().QueryState(pViewFrame->GetBindings().QuerySlotId(aURL), pState);
+ rViewFrame.GetBindings().QueryState(rViewFrame.GetBindings().QuerySlotId(aURL), pState);
pState->QueryValue(aValue);
aValue >>= sValue;
CPPUNIT_ASSERT_EQUAL(OUString("Sheet5.D1:H1"), sValue);
@@ -2040,7 +2040,7 @@ void DesktopLOKTest::testDialogInput()
Scheduler::ProcessEventsToIdle();
SfxViewShell* pViewShell = SfxViewShell::Current();
- pViewShell->GetViewFrame()->GetBindings().Update();
+ pViewShell->GetViewFrame().GetBindings().Update();
VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow());
CPPUNIT_ASSERT(pWindow);
@@ -2970,7 +2970,7 @@ void DesktopLOKTest::testDialogPaste()
Scheduler::ProcessEventsToIdle();
SfxViewShell* pViewShell = SfxViewShell::Current();
- pViewShell->GetViewFrame()->GetBindings().Update();
+ pViewShell->GetViewFrame().GetBindings().Update();
VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow());
CPPUNIT_ASSERT(pWindow);
@@ -3249,10 +3249,8 @@ namespace
SfxViewShell* pViewShell = SfxViewShell::Current();
CPPUNIT_ASSERT(pViewShell);
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- CPPUNIT_ASSERT(pViewFrame);
-
- SfxChildWindow* pSideBar = pViewFrame->GetChildWindow(SID_SIDEBAR);
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ SfxChildWindow* pSideBar = rViewFrame.GetChildWindow(SID_SIDEBAR);
CPPUNIT_ASSERT(pSideBar);
auto pDockingWin = dynamic_cast<sfx2::sidebar::SidebarDockingWindow *>(pSideBar->GetWindow());
@@ -3273,8 +3271,8 @@ void DesktopLOKTest::testControlState()
boost::property_tree::ptree aState;
SfxViewShell* pViewShell = SfxViewShell::Current();
- pViewShell->GetViewFrame()->GetBindings().Update();
- pViewShell->GetViewFrame()->GetBindings().QueryControlState(SID_ATTR_TRANSFORM_WIDTH, aState);
+ pViewShell->GetViewFrame().GetBindings().Update();
+ pViewShell->GetViewFrame().GetBindings().QueryControlState(SID_ATTR_TRANSFORM_WIDTH, aState);
CPPUNIT_ASSERT(!aState.empty());
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d0c67bda098f..ed601003d042 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -906,7 +906,7 @@ void ExecuteOrientationChange()
void setupSidebar(std::u16string_view sidebarDeckId = u"")
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : nullptr;
+ SfxViewFrame* pViewFrame = pViewShell ? &pViewShell->GetViewFrame() : nullptr;
if (pViewFrame)
{
if (!pViewFrame->GetChildWindow(SID_SIDEBAR))
@@ -949,7 +949,7 @@ void setupSidebar(std::u16string_view sidebarDeckId = u"")
void hideSidebar()
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+ SfxViewFrame* pViewFrame = pViewShell ? &pViewShell->GetViewFrame() : nullptr;
if (pViewFrame)
pViewFrame->SetChildWindow(SID_SIDEBAR, false , false );
else
@@ -3422,7 +3422,7 @@ static void doc_iniUnoCommands ()
util::URL aCommandURL;
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+ SfxViewFrame* pViewFrame = pViewShell ? &pViewShell->GetViewFrame() : nullptr;
// check if Frame-Controller were created.
if (!pViewFrame)
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 90ddd52d01a4..f7de18112c04 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -188,7 +188,7 @@ public:
static VclPtr<vcl::Window> getInPlaceDocWindow(SfxViewShell* pViewShell);
private:
- static int createView(SfxViewFrame* pViewFrame, ViewShellDocId docId);
+ static int createView(SfxViewFrame& rViewFrame, ViewShellDocId docId);
};
template<typename ViewShellType, typename FunctionType>
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 1e70f8301bda..0465fd036d4b 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -163,7 +163,7 @@ friend class SfxBaseController;
friend class SfxPrinterController;
std::unique_ptr<struct SfxViewShell_Impl> pImpl;
- SfxViewFrame* pFrame;
+ SfxViewFrame& rFrame;
VclPtr<vcl::Window> pWindow;
bool bNoNewWindow;
bool mbPrinterSettingsModified;
@@ -262,7 +262,22 @@ public:
const SvBorder& GetBorderPixel() const;
void SetBorderPixel( const SvBorder &rBorder );
void InvalidateBorder();
- inline SfxViewFrame* GetViewFrame() const;
+
+ /* [Description]
+
+ This method returns a reference to the <SfxViewFrame> Instance in which
+ this SfxViewShell is displayed. This is the instance that was passed
+ on in the constructor. It is guaranteed that the returned reference
+ is a valid SfxViewFrame instance.
+
+ [Cross-reference]
+
+ <SfxShell::GetFrame()const>
+ */
+ SfxViewFrame& GetViewFrame() const
+ {
+ return rFrame;
+ }
// Printing Interface
virtual SfxPrinter* GetPrinter( bool bCreate = false );
@@ -442,26 +457,6 @@ public:
void SetStoringHelper(std::shared_ptr<SfxStoringHelper> xHelper) { m_xHelper = xHelper; }
};
-
-inline SfxViewFrame* SfxViewShell::GetViewFrame() const
-
-/* [Description]
-
- This method returns a pointer to the <SfxViewFrame> Instance in which
- this SfxViewShell is displayed. This is the instance that was passed
- on in the constructor. It is guaranteed that the returned pointer
- points on the valid SfxViewFrame instance.
-
- [Cross-reference]
-
- <SfxShell::GetFrame()const>
-*/
-
-{
- return pFrame;
-}
-
#endif // INCLUDED_SFX2_VIEWSH_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index dc60439a536f..df6fb030d691 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -135,7 +135,7 @@ void ScShapeTest::testTdf144242_OpenBezier_noSwapWH()
// Insert default open Bezier curve
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_BEZIER_NOFILL);
+ SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_BEZIER_NOFILL);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
pTabViewShell->SetDrawShell(false);
@@ -168,7 +168,7 @@ void ScShapeTest::testTdf144242_Line_noSwapWH()
// Insert default line
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_LINE);
+ SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_LINE);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
pTabViewShell->SetDrawShell(false);
@@ -611,7 +611,7 @@ void ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
// Create default measureline by SfxRequest that corresponds to Ctrl+Click
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
+ SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 84b9a941ba50..1434cfe80e95 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1590,8 +1590,8 @@ void ScTiledRenderingTest::testDocumentRepair()
{
std::unique_ptr<SfxBoolItem> pItem1;
std::unique_ptr<SfxBoolItem> pItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(false, pItem1->GetValue());
@@ -1609,8 +1609,8 @@ void ScTiledRenderingTest::testDocumentRepair()
{
std::unique_ptr<SfxBoolItem> pItem1;
std::unique_ptr<SfxBoolItem> pItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(true, pItem1->GetValue());
@@ -1640,8 +1640,8 @@ void ScTiledRenderingTest::testLanguageStatus()
{
std::unique_ptr<SfxPoolItem> xItem1;
std::unique_ptr<SfxPoolItem> xItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
const SfxStringItem* pItem1 = dynamic_cast<const SfxStringItem*>(xItem1.get());
const SfxStringItem* pItem2 = dynamic_cast<const SfxStringItem*>(xItem2.get());
CPPUNIT_ASSERT(pItem1);
@@ -1652,15 +1652,15 @@ void ScTiledRenderingTest::testLanguageStatus()
{
SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Default_Spanish (Bolivia)");
- pView1->GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS,
+ pView1->GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS,
SfxCallMode::SYNCHRON, { &aLangString });
}
{
std::unique_ptr<SfxPoolItem> xItem1;
std::unique_ptr<SfxPoolItem> xItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
const SfxStringItem* pItem1 = dynamic_cast<const SfxStringItem*>(xItem1.get());
const SfxStringItem* pItem2 = dynamic_cast<const SfxStringItem*>(xItem2.get());
CPPUNIT_ASSERT(pItem1);
@@ -1702,19 +1702,19 @@ void ScTiledRenderingTest::testMultiViewCopyPaste()
// copy text view 1
pView1->SetCursor(0, 0);
- pView1->GetViewFrame()->GetBindings().Execute(SID_COPY);
+ pView1->GetViewFrame().GetBindings().Execute(SID_COPY);
// copy text view 2
pView2->SetCursor(1, 0);
- pView2->GetViewFrame()->GetBindings().Execute(SID_COPY);
+ pView2->GetViewFrame().GetBindings().Execute(SID_COPY);
// paste text view 1
pView1->SetCursor(0, 1);
- pView1->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+ pView1->GetViewFrame().GetBindings().Execute(SID_PASTE);
// paste text view 2
pView2->SetCursor(1, 1);
- pView2->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+ pView2->GetViewFrame().GetBindings().Execute(SID_PASTE);
CPPUNIT_ASSERT_EQUAL(OUString("TestCopy1"), pDoc->GetString(ScAddress(0, 1, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("TestCopy2"), pDoc->GetString(ScAddress(1, 1, 0)));
@@ -1768,23 +1768,23 @@ void ScTiledRenderingTest::testFilterDlg()
SfxViewShell* pView2 = SfxViewShell::Current();
CPPUNIT_ASSERT(pView1 != pView2);
{
- pView2->GetViewFrame()->GetDispatcher()->Execute(SID_FILTER,
+ pView2->GetViewFrame().GetDispatcher()->Execute(SID_FILTER,
SfxCallMode::SLOT|SfxCallMode::RECORD);
}
Scheduler::ProcessEventsToIdle();
- SfxChildWindow* pRefWindow = pView2->GetViewFrame()->GetChildWindow(SID_FILTER);
+ SfxChildWindow* pRefWindow = pView2->GetViewFrame().GetChildWindow(SID_FILTER);
CPPUNIT_ASSERT(pRefWindow);
// switch to view 1
SfxLokHelper::setView(nView1);
- CPPUNIT_ASSERT_EQUAL(true, pView2->GetViewFrame()->GetDispatcher()->IsLocked());
- CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame()->GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(true, pView2->GetViewFrame().GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame().GetDispatcher()->IsLocked());
pRefWindow->GetController()->response(RET_CANCEL);
- CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame()->GetDispatcher()->IsLocked());
- CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame()->GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame().GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame().GetDispatcher()->IsLocked());
SfxViewShell::Current()->setLibreOfficeKitViewCallback(nullptr);
SfxLokHelper::setView(nView1);
@@ -1799,11 +1799,11 @@ void ScTiledRenderingTest::testFunctionDlg()
SfxViewShell* pView1 = SfxViewShell::Current();
int nView1 = SfxLokHelper::getView();
{
- pView1->GetViewFrame()->GetDispatcher()->Execute(SID_OPENDLG_FUNCTION,
+ pView1->GetViewFrame().GetDispatcher()->Execute(SID_OPENDLG_FUNCTION,
SfxCallMode::SLOT|SfxCallMode::RECORD);
}
Scheduler::ProcessEventsToIdle();
- SfxChildWindow* pRefWindow = pView1->GetViewFrame()->GetChildWindow(SID_OPENDLG_FUNCTION);
+ SfxChildWindow* pRefWindow = pView1->GetViewFrame().GetChildWindow(SID_OPENDLG_FUNCTION);
CPPUNIT_ASSERT(pRefWindow);
// view #2
@@ -1812,14 +1812,14 @@ void ScTiledRenderingTest::testFunctionDlg()
CPPUNIT_ASSERT(pView1 != pView2);
// check locking
- CPPUNIT_ASSERT_EQUAL(true, pView1->GetViewFrame()->GetDispatcher()->IsLocked());
- CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame()->GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(true, pView1->GetViewFrame().GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame().GetDispatcher()->IsLocked());
SfxLokHelper::setView(nView1);
pRefWindow->GetController()->response(RET_CANCEL);
- CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame()->GetDispatcher()->IsLocked());
- CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame()->GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView1->GetViewFrame().GetDispatcher()->IsLocked());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->GetViewFrame().GetDispatcher()->IsLocked());
SfxViewShell::Current()->setLibreOfficeKitViewCallback(nullptr);
SfxLokHelper::setView(nView2);
@@ -2512,7 +2512,7 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
// copy A1
pView->SetCursor(0, 0);
Scheduler::ProcessEventsToIdle();
- pView->GetViewFrame()->GetBindings().Execute(SID_COPY);
+ pView->GetViewFrame().GetBindings().Execute(SID_COPY);
Scheduler::ProcessEventsToIdle();
// verify clipboard
@@ -2530,7 +2530,7 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
pView->SetCursor(0, 1);
Scheduler::ProcessEventsToIdle();
aView.m_sInvalidateSheetGeometry = "";
- pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+ pView->GetViewFrame().GetBindings().Execute(SID_PASTE);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sCopyContent, pDoc->GetString(0, 1, 0));
@@ -2542,7 +2542,7 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
Scheduler::ProcessEventsToIdle();
// cut from A2
- pView->GetViewFrame()->GetBindings().Execute(SID_CUT);
+ pView->GetViewFrame().GetBindings().Execute(SID_CUT);
Scheduler::ProcessEventsToIdle();
// verify clipboard
@@ -2559,7 +2559,7 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
pView->SetCursor(0, 2);
Scheduler::ProcessEventsToIdle();
aView.m_sInvalidateSheetGeometry = "";
- pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+ pView->GetViewFrame().GetBindings().Execute(SID_PASTE);
Scheduler::ProcessEventsToIdle();
// SG invalidations for all
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index b0a91cb397d8..61c873737dc1 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -824,7 +824,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno
OUString aReferName;
if ( pScActiveViewShell )
{
- pFrame = pScActiveViewShell->GetViewFrame();
+ pFrame = &pScActiveViewShell->GetViewFrame();
pObjShell = pFrame->GetObjectShell();
const SfxMedium* pMed = pObjShell->GetMedium();
if (pMed)
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 475dd9597673..304c8932b1b7 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -288,17 +288,14 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
{
if (mpViewShell)
{
- SfxViewFrame* pViewFrame = mpViewShell->GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = mpViewShell->GetViewFrame();
+ xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(rViewFrame.GetFrame().GetController(), uno::UNO_QUERY);
+ if (xSelectionSupplier.is())
{
- xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(pViewFrame->GetFrame().GetController(), uno::UNO_QUERY);
- if (xSelectionSupplier.is())
- {
- xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
- uno::Reference<drawing::XShapes> xShapes(mpViewShell->getSelectedXShapes());
- if (xShapes.is())
- mnShapesSelected = xShapes->getCount();
- }
+ xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
+ uno::Reference<drawing::XShapes> xShapes(mpViewShell->getSelectedXShapes());
+ if (xShapes.is())
+ mnShapesSelected = xShapes->getCount();
}
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index f80b6c1b49a8..8d310e1c94d5 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -878,7 +878,7 @@ void ScInputHandler::UpdateRefDevice()
return;
bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
- bool bInPlace = pActiveViewSh && pActiveViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ bool bInPlace = pActiveViewSh && pActiveViewSh->GetViewFrame().GetFrame().IsInPlace();
EEControlBits nCtrl = mpEditEngine->GetControlWord();
if ( bTextWysiwyg || bInPlace )
nCtrl |= EEControlBits::FORMAT100; // EditEngine default: always format for 100%
@@ -2860,11 +2860,11 @@ void ScInputHandler::ShowRefFrame()
return;
bool bFound = false;
- SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame();
+ SfxViewFrame& rRefFrame = pRefViewSh->GetViewFrame();
SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst();
while ( pOneFrame && !bFound )
{
- if ( pOneFrame == pRefFrame )
+ if ( pOneFrame == &rRefFrame )
bFound = true;
pOneFrame = SfxViewFrame::GetNext( *pOneFrame );
}
@@ -3371,7 +3371,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL
if ( pExecuteSh )
{
- SfxBindings& rBindings = pExecuteSh->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pExecuteSh->GetViewFrame().GetBindings();
sal_uInt16 nId = FID_INPUTLINE_ENTER;
if ( nBlockMode == ScEnterMode::BLOCK )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index ed82c9d7a0a3..f833e743b991 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2607,8 +2607,8 @@ void ScPosWnd::DoEnter()
else if (eType == SC_MANAGE_NAMES)
{
sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pViewSh->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pViewSh->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index d194fdc1070e..9f88e92ceb45 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -841,8 +841,8 @@ bool ScValidationDlg::EnterRefStatus()
if( !pTabViewShell ) return false;
sal_uInt16 nId = SLOTID;
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
if (pWnd && pWnd->GetController().get() != this) pWnd = nullptr;
@@ -858,8 +858,8 @@ bool ScValidationDlg::LeaveRefStatus()
if( !pTabViewShell ) return false;
sal_uInt16 nId = SLOTID;
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- if ( pViewFrm->GetChildWindow( nId ) )
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ if (rViewFrm.GetChildWindow(nId))
{
DoClose( nId );
}
@@ -888,7 +888,7 @@ bool ScValidationDlg::RemoveRefDlg( bool bRestoreModal /* = true */ )
if( !pTabVwSh ) return false;
- if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
+ if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame().GetChildWindow( SID_VALIDITY_REFERENCE ) )
{
bVisLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( true );
bFreeWindowLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( true );
@@ -905,7 +905,7 @@ bool ScValidationDlg::RemoveRefDlg( bool bRestoreModal /* = true */ )
}
}
- if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
+ if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame().GetChildWindow( SID_VALIDITY_REFERENCE ) )
{
static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( bVisLock );
static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( bFreeWindowLock );
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 2124753bf529..55b2f93381f5 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -240,7 +240,7 @@ void DataStream::MakeToolbarVisible()
return;
css::uno::Reference< css::frame::XFrame > xFrame =
- pViewData->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
+ pViewData->GetViewShell()->GetViewFrame().GetFrame().GetFrameInterface();
if (!xFrame.is())
return;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 9d7b77b888e5..f37b969bd344 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -767,7 +767,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference< task::XJob > xJob( xFactory->createInstanceWithContext( xContext ), uno::UNO_QUERY_THROW );
ScViewData* pViewData = GetViewData();
SfxViewShell* pViewShell = ( pViewData ? pViewData->GetViewShell() : nullptr );
- SfxViewFrame* pViewFrame = ( pViewShell ? pViewShell->GetViewFrame() : nullptr );
+ SfxViewFrame* pViewFrame = ( pViewShell ? &pViewShell->GetViewFrame() : nullptr );
SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : nullptr );
uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : nullptr );
uno::Reference< sheet::XSpreadsheetView > xSpreadsheetView( xController, uno::UNO_QUERY_THROW );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 5903d575590e..72ca520453b8 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1863,7 +1863,7 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller,
// memorizing for GetState():
GetPageOnFromPageStyleSet( &rStyleSet, nCurTab, m_bHeaderOn, m_bFooterOn );
- rCaller.GetViewFrame()->GetBindings().Invalidate( SID_HFEDIT );
+ rCaller.GetViewFrame().GetBindings().Invalidate( SID_HFEDIT );
ScStyleSaveData aNewData;
aNewData.InitFromStyle( pStyleSheet );
@@ -2631,7 +2631,7 @@ SfxBindings* ScDocShell::GetViewBindings()
SfxViewShell* pViewSh = GetBestViewShell();
if (pViewSh)
- return &pViewSh->GetViewFrame()->GetBindings();
+ return &pViewSh->GetViewFrame().GetBindings();
else
return nullptr;
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 568218da662b..d5f50377a8a8 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -127,7 +127,7 @@ void ScDrawShell::setModified()
static void lcl_invalidateTransformAttr(const ScTabViewShell* pViewShell)
{
- SfxBindings& rBindings=pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings=pViewShell->GetViewFrame().GetBindings();
rBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
rBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
@@ -432,7 +432,7 @@ void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin)
css::uno::Reference < css::frame::XFrame > xFrame;
if (GetViewShell())
- xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
+ xFrame = GetViewShell()->GetViewFrame().GetFrame().GetFrameInterface();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame ));
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index db3fd0541b83..1b83e930c8c1 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -94,8 +94,8 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Conditions / Toggles
rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) );
sal_uInt16 nFWId = ScGetFontWorkId();
- SfxViewFrame* pViewFrm = rViewData.GetViewShell()->GetViewFrame();
- rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId)));
+ SfxViewFrame& rViewFrm = rViewData.GetViewShell()->GetViewFrame();
+ rSet.Put(SfxBoolItem(SID_FONTWORK, rViewFrm.HasChildWindow(nFWId)));
// Notes always default to Page anchor.
bool bDisableAnchor = false;
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index b95f77f9339c..4e95a7d65b07 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -462,15 +462,15 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_FONTWORK:
{
sal_uInt16 nId = ScGetFontWorkId();
- SfxViewFrame* pViewFrm = rViewData.GetViewShell()->GetViewFrame();
+ SfxViewFrame& rViewFrm = rViewData.GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
- pViewFrm->SetChildWindow( nId,
+ rViewFrm.SetChildWindow( nId,
static_cast<const SfxBoolItem&>(
(rReq.GetArgs()->Get(SID_FONTWORK))).
GetValue() );
else
- pViewFrm->ToggleChildWindow( nId );
+ rViewFrm.ToggleChildWindow( nId );
rBindings.Invalidate( SID_FONTWORK );
rReq.Done();
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index f6e8982bd74d..f428465936b3 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -304,7 +304,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
{
// Ensure the field is selected first
pOutView->SelectFieldAtCursor();
- mrViewData.GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_HYPERLINK_DIALOG);
+ mrViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(SID_HYPERLINK_DIALOG);
}
break;
@@ -357,8 +357,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
{
- SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
- bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK);
+ SfxViewFrame& rViewFrm = mrViewData.GetViewShell()->GetViewFrame();
+ bool bHasFontWork = rViewFrm.HasChildWindow(SID_FONTWORK);
bool bDisableFontWork = false;
if (IsNoteEdit())
@@ -417,13 +417,13 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
}
if( rSet.GetItemState( SID_TRANSLITERATE_HALFWIDTH ) != SfxItemState::UNKNOWN )
- ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_HALFWIDTH );
+ ScViewUtil::HideDisabledSlot( rSet, rViewFrm.GetBindings(), SID_TRANSLITERATE_HALFWIDTH );
if( rSet.GetItemState( SID_TRANSLITERATE_FULLWIDTH ) != SfxItemState::UNKNOWN )
- ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_FULLWIDTH );
+ ScViewUtil::HideDisabledSlot( rSet, rViewFrm.GetBindings(), SID_TRANSLITERATE_FULLWIDTH );
if( rSet.GetItemState( SID_TRANSLITERATE_HIRAGANA ) != SfxItemState::UNKNOWN )
- ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_HIRAGANA );
+ ScViewUtil::HideDisabledSlot( rSet, rViewFrm.GetBindings(), SID_TRANSLITERATE_HIRAGANA );
if( rSet.GetItemState( SID_TRANSLITERATE_KATAKANA ) != SfxItemState::UNKNOWN )
- ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_KATAKANA );
+ ScViewUtil::HideDisabledSlot( rSet, rViewFrm.GetBindings(), SID_TRANSLITERATE_KATAKANA );
if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
{
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index 2f615104b62c..37629721cff4 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -135,17 +135,17 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
case SID_FONTWORK:
{
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
- SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
+ SfxViewFrame& rViewFrm = mrViewData.GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
- pViewFrm->SetChildWindow( nId,
+ rViewFrm.SetChildWindow( nId,
static_cast<const SfxBoolItem&>(
(rReq.GetArgs()->Get(SID_FONTWORK))).
GetValue() );
else
- pViewFrm->ToggleChildWindow( nId );
+ rViewFrm.ToggleChildWindow( nId );
- pViewFrm->GetBindings().Invalidate( SID_FONTWORK );
+ rViewFrm.GetBindings().Invalidate( SID_FONTWORK );
rReq.Done();
}
break;
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index ea5f14a820d4..9076a75ada00 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -239,7 +239,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
- bool bOle = rViewShell.GetViewFrame()->GetFrame().IsInPlace();
+ bool bOle = rViewShell.GetViewFrame().GetFrame().IsInPlace();
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
auto pOleObj = dynamic_cast<SdrOle2Obj*>(pObj);
if( pOleObj && !bOle )
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index cf7bd58375fc..72886789b448 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -413,7 +413,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell& rViewSh,
if( pWin )
pWin->EnterWait();
- css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(rViewShell.GetViewFrame()->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY);
+ css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(rViewShell.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/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index e753e63214a6..f0d60b45ca19 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -235,13 +235,13 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView*
if ( nSlot == SID_INSERT_OBJECT && pNameItem )
{
const SvGlobalName& aClassName = pNameItem->GetValue();
- xObj = rViewShell.GetViewFrame()->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( aClassName.GetByteSequence(), aName );
+ xObj = rViewShell.GetViewFrame().GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( aClassName.GetByteSequence(), aName );
}
else if ( nSlot == SID_INSERT_SMATH )
{
if ( SvtModuleOptions().IsMath() )
{
- xObj = rViewShell.GetViewFrame()->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_SM_CLASSID_60 ).GetByteSequence(), aName );
+ xObj = rViewShell.GetViewFrame().GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_SM_CLASSID_60 ).GetByteSequence(), aName );
rReq.AppendItem( SfxGlobalNameItem( SID_INSERT_OBJECT, SvGlobalName( SO3_SM_CLASSID_60 ) ) );
}
}
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 9695702c55e3..03fb8c4c86f5 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -340,7 +340,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
SetMouseButtonCode(rMEvt.GetButtons());
bool bReturn = FuDraw::MouseButtonUp(rMEvt);
- bool bOle = rViewShell.GetViewFrame()->GetFrame().IsInPlace();
+ bool bOle = rViewShell.GetViewFrame().GetFrame().IsInPlace();
SdrObject* pObj = nullptr;
if (aDragTimer.IsActive() )
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 9bd670d3fa9d..7f3089fc076d 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -250,7 +250,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
pView->SetDragMode(SdrDragMode::Move);
- SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = rViewShell.GetViewFrame().GetBindings();
rBindings.Invalidate( SID_OBJECT_ROTATE );
rBindings.Invalidate( SID_OBJECT_MIRROR );
}
@@ -314,7 +314,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
pWindow->CaptureMouse();
// ForcePointer(&rMEvt);
- lcl_InvalidateAttribs( rViewShell.GetViewFrame()->GetBindings() );
+ lcl_InvalidateAttribs( rViewShell.GetViewFrame().GetBindings() );
}
rViewShell.SetActivePointer(pView->GetPreferredPointer(
@@ -368,7 +368,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
aDragTimer.Stop();
}
- lcl_InvalidateAttribs( rViewShell.GetViewFrame()->GetBindings() );
+ lcl_InvalidateAttribs( rViewShell.GetViewFrame().GetBindings() );
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -485,7 +485,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
if ( pView->KeyInput(rKEvt, pWindow) )
{
bReturn = true;
- lcl_InvalidateAttribs( rViewShell.GetViewFrame()->GetBindings() );
+ lcl_InvalidateAttribs( rViewShell.GetViewFrame().GetBindings() );
}
else
{
@@ -498,7 +498,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
void FuText::Activate()
{
pView->SetDragMode(SdrDragMode::Move);
- SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = rViewShell.GetViewFrame().GetBindings();
rBindings.Invalidate( SID_OBJECT_ROTATE );
rBindings.Invalidate( SID_OBJECT_MIRROR );
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index afc4a2df54c7..5fb038df27dd 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -34,7 +34,7 @@ public:
SetController(pViewShell->CreateRefDialogController(pBindings, this, pInfo, pParentP->GetFrameWeld(), WindowID));
if (pViewShell && !GetController())
- pViewShell->GetViewFrame()->SetChildWindow( nId, false );
+ pViewShell->GetViewFrame().SetChildWindow( nId, false );
}
static std::unique_ptr<SfxChildWindow> CreateImpl(
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 87292fe06c1e..3ff295276ab3 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -807,13 +807,13 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, RefHandle, SvxTPFilter*, void)
SC_MOD()->SetRefDialog( nId, true );
- SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
- ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId ));
+ SfxViewFrame& rViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(rViewFrm.GetChildWindow( nId ));
if(pWnd!=nullptr)
{
sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->ShowChildWindow(nAcceptId,false);
+ rViewFrm.ShowChildWindow(nAcceptId,false);
pWnd->SetCloseHdl(LINK( this, ScAcceptChgDlg,RefInfoHandle));
pWnd->SetRefString(pTPFilter->GetRange());
ScSimpleRefDlgWrapper::SetAutoReOpen(false);
@@ -830,17 +830,17 @@ IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, const OUString*, pResult, void)
ScSimpleRefDlgWrapper::SetAutoReOpen(true);
- SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ SfxViewFrame& rViewFrm = pViewData->GetViewShell()->GetViewFrame();
if (pResult)
{
pTPFilter->SetRange(*pResult);
FilterHandle(pTPFilter);
- pViewFrm->ShowChildWindow(nId);
+ rViewFrm.ShowChildWindow(nId);
}
else
{
- pViewFrm->SetChildWindow(nId, false);
+ rViewFrm.SetChildWindow(nId, false);
}
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index d3f709b2a94c..35ae45751c81 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -108,7 +108,7 @@ ScDocShell* ScContentTree::GetManualOrCurrent()
SfxViewShell* pViewSh = SfxViewShell::Current();
if ( pViewSh )
{
- SfxObjectShell* pObjSh = pViewSh->GetViewFrame()->GetObjectShell();
+ SfxObjectShell* pObjSh = pViewSh->GetViewFrame().GetObjectShell();
pSh = dynamic_cast<ScDocShell*>( pObjSh );
}
}
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 93ea182a05b3..7f743c5e6777 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -40,11 +40,8 @@ static uno::Reference<view::XSelectionSupplier> lcl_GetSelectionSupplier( const
{
if ( pViewShell )
{
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- if (pViewFrame)
- {
- return uno::Reference<view::XSelectionSupplier>( pViewFrame->GetFrame().GetController(), uno::UNO_QUERY );
- }
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ return uno::Reference<view::XSelectionSupplier>( rViewFrame.GetFrame().GetController(), uno::UNO_QUERY );
}
return uno::Reference<view::XSelectionSupplier>();
}
@@ -55,7 +52,7 @@ ScDispatchProviderInterceptor::ScDispatchProviderInterceptor(ScTabViewShell* pVi
if ( !pViewShell )
return;
- m_xIntercepted.set(uno::Reference<frame::XDispatchProviderInterception>(pViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY));
+ m_xIntercepted.set(uno::Reference<frame::XDispatchProviderInterception>(pViewShell->GetViewFrame().GetFrame().GetFrameInterface(), uno::UNO_QUERY));
if (m_xIntercepted.is())
{
osl_atomic_increment( &m_refCount );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ba951e95da84..8f236138b345 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -881,16 +881,16 @@ uno::Reference<datatransfer::XTransferable> ScModelObj::getSelection()
if (ScViewData* pViewData = ScDocShell::GetViewData())
{
- if ( ScEditShell * pShell = dynamic_cast<ScEditShell*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ) )
+ if ( ScEditShell * pShell = dynamic_cast<ScEditShell*>( pViewData->GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) ) )
xTransferable = pShell->GetEditView()->GetTransferable();
- else if ( nullptr != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
+ else if ( nullptr != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) ))
{
ScDrawView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if (pOutView)
xTransferable = pOutView->GetEditView().GetTransferable();
}
- else if ( ScDrawShell * pDrawShell = dynamic_cast<ScDrawShell*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ) )
+ else if ( ScDrawShell * pDrawShell = dynamic_cast<ScDrawShell*>( pViewData->GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) ) )
xTransferable = pDrawShell->GetDrawView()->CopyToTransferable();
else
xTransferable = pViewData->GetViewShell()->CopyToTransferable();
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 984ef70566da..ba292fb15814 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1394,10 +1394,10 @@ void ScTabViewObj::SetZoom(sal_Int16 nZoom)
pViewSh->PaintGrid();
pViewSh->PaintTop();
pViewSh->PaintLeft();
- pViewSh->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
- pViewSh->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
- pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_ZOOM_IN);
- pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_ZOOM_OUT);
+ pViewSh->GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOM );
+ pViewSh->GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ pViewSh->GetViewFrame().GetBindings().Invalidate(SID_ZOOM_IN);
+ pViewSh->GetViewFrame().GetBindings().Invalidate(SID_ZOOM_OUT);
}
sal_Int16 ScTabViewObj::GetZoomType() const
@@ -1836,7 +1836,7 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
pViewSh->PaintExtras();
pViewSh->InvalidateBorder();
- SfxBindings& rBindings = pViewSh->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewSh->GetViewFrame().GetBindings();
rBindings.Invalidate( FID_TOGGLEHEADERS ); // -> check in menu
rBindings.Invalidate( FID_TOGGLESYNTAX );
}
@@ -2074,11 +2074,11 @@ uno::Sequence<OUString> SAL_CALL ScTabViewObj::getSupportedServiceNames()
css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL ScTabViewObj::getTransferable()
{
SolarMutexGuard aGuard;
- ScEditShell* pShell = dynamic_cast<ScEditShell*>( GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
+ ScEditShell* pShell = dynamic_cast<ScEditShell*>( GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) );
if (pShell)
return pShell->GetEditView()->GetTransferable();
- ScDrawTextObjectBar* pTextShell = dynamic_cast<ScDrawTextObjectBar*>( GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
+ ScDrawTextObjectBar* pTextShell = dynamic_cast<ScDrawTextObjectBar*>( GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) );
if (pTextShell)
{
ScViewData& rViewData = GetViewShell()->GetViewData();
@@ -2088,7 +2088,7 @@ css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL ScTabViewObj::g
return pOutView->GetEditView().GetTransferable();
}
- ScDrawShell* pDrawShell = dynamic_cast<ScDrawShell*>( GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
+ ScDrawShell* pDrawShell = dynamic_cast<ScDrawShell*>( GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) );
if (pDrawShell)
return pDrawShell->GetDrawView()->CopyToTransferable();
@@ -2098,12 +2098,12 @@ css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL ScTabViewObj::g
void SAL_CALL ScTabViewObj::insertTransferable( const css::uno::Reference< css::datatransfer::XTransferable >& xTrans )
{
SolarMutexGuard aGuard;
- ScEditShell* pShell = dynamic_cast<ScEditShell*>( GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
+ ScEditShell* pShell = dynamic_cast<ScEditShell*>( GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) );
if (pShell)
pShell->GetEditView()->InsertText( xTrans, OUString(), false );
else
{
- ScDrawTextObjectBar* pTextShell = dynamic_cast<ScDrawTextObjectBar*>( GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
+ ScDrawTextObjectBar* pTextShell = dynamic_cast<ScDrawTextObjectBar*>( GetViewShell()->GetViewFrame().GetDispatcher()->GetShell(0) );
if (pTextShell)
{
ScViewData& rViewData = GetViewShell()->GetViewData();
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 47621647b096..3224171677e9 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -276,7 +276,7 @@ getViewFrame( const uno::Reference< frame::XModel >& xModel )
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
- return pViewShell->GetViewFrame();
+ return &pViewShell->GetViewFrame();
return nullptr;
}
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 6885f9b18ca1..9bc913dcc2b2 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -381,8 +381,8 @@ ScVbaWindow::getWindowState()
sal_Int32 nwindowState = xlNormal;
// !! TODO !! get view shell from controller
ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
- SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
- WorkWindow* pWork = static_cast<WorkWindow*>( pViewFrame->GetFrame().GetSystemWindow() );
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ WorkWindow* pWork = static_cast<WorkWindow*>( rViewFrame.GetFrame().GetSystemWindow() );
if ( pWork )
{
if ( pWork -> IsMaximized())
@@ -400,8 +400,8 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate )
_windowstate >>= nwindowState;
// !! TODO !! get view shell from controller
ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
- SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
- WorkWindow* pWork = static_cast<WorkWindow*>( pViewFrame->GetFrame().GetSystemWindow() );
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ WorkWindow* pWork = static_cast<WorkWindow*>( rViewFrame.GetFrame().GetSystemWindow() );
if ( pWork )
{
if ( nwindowState == xlMaximized)
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 48795cb9594c..bd552fbb03bc 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -491,7 +491,7 @@ void ScVbaWorksheets::PrintPreview( const css::uno::Any& /*EnableChanges*/ )
ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
- pViewFrame = pViewShell->GetViewFrame();
+ pViewFrame = &pViewShell->GetViewFrame();
if ( !pViewFrame )
return;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 7694061e6093..3b2e69e7364f 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1284,7 +1284,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if (rDoc.IsTabProtected(rData.GetTabNo()))
{
bool bVisible = false;
- SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : nullptr );
+ SfxViewFrame* pViewFrame = ( pTabViewShell ? &pTabViewShell->GetViewFrame() : nullptr );
if ( pViewFrame && pViewFrame->HasChildWindow( nWhich ) )
{
SfxChildWindow* pChild = pViewFrame->GetChildWindow( nWhich );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 88c1470bc8db..eb8cb4a18382 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -229,7 +229,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
ScModule* pScMod = SC_MOD();
ScTabViewShell* pTabViewShell = GetViewData().GetViewShell();
- SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pTabViewShell->GetViewFrame().GetBindings();
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
@@ -345,7 +345,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest aRequest(pTabViewShell->GetViewFrame(), FID_INS_CELL);
+ SfxRequest aRequest(&pTabViewShell->GetViewFrame(), FID_INS_CELL);
InsertCells(pTabViewShell, aRequest, pDlg->GetInsCellCmd());
}
pDlg->disposeOnce();
@@ -399,7 +399,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest aRequest(pTabViewShell->GetViewFrame(), FID_INS_CELL);
+ SfxRequest aRequest(&pTabViewShell->GetViewFrame(), FID_INS_CELL);
DeleteCells(pTabViewShell, aRequest, pDlg->GetDelCellCmd());
}
pDlg->disposeOnce();
@@ -930,8 +930,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
{
sal_uInt16 nId = ScRandomNumberGeneratorDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -940,8 +940,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_SAMPLING_DIALOG:
{
sal_uInt16 nId = ScSamplingDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -949,8 +949,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_DESCRIPTIVE_STATISTICS_DIALOG:
{
sal_uInt16 nId = ScDescriptiveStatisticsDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -958,8 +958,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_ANALYSIS_OF_VARIANCE_DIALOG:
{
sal_uInt16 nId = ScAnalysisOfVarianceDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -967,8 +967,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CORRELATION_DIALOG:
{
sal_uInt16 nId = ScCorrelationDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -976,8 +976,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_COVARIANCE_DIALOG:
{
sal_uInt16 nId = ScCovarianceDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -985,8 +985,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_EXPONENTIAL_SMOOTHING_DIALOG:
{
sal_uInt16 nId = ScExponentialSmoothingDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -994,8 +994,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_MOVING_AVERAGE_DIALOG:
{
sal_uInt16 nId = ScMovingAverageDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -1003,8 +1003,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_REGRESSION_DIALOG:
{
sal_uInt16 nId = ScRegressionDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -1012,8 +1012,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_TTEST_DIALOG:
{
sal_uInt16 nId = ScTTestDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1022,8 +1022,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_FTEST_DIALOG:
{
sal_uInt16 nId = ScFTestDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1032,8 +1032,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_ZTEST_DIALOG:
{
sal_uInt16 nId = ScZTestDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1042,8 +1042,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CHI_SQUARE_TEST_DIALOG:
{
sal_uInt16 nId = ScChiSquareTestDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1052,8 +1052,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_FOURIER_ANALYSIS_DIALOG:
{
sal_uInt16 nId = ScFourierAnalysisDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1065,10 +1065,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if (pReqArgs && pReqArgs->HasItem(SID_SEARCH_RESULTS_DIALOG, &pItem))
{
bool bVisible = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
// The window ID should equal the slot ID, but not a biggie if it wasn't.
sal_uInt16 nId = sc::SearchResultsDlgWrapper::GetChildWindowId();
- pViewFrm->SetChildWindow(nId, bVisible, false);
+ rViewFrm.SetChildWindow(nId, bVisible, false);
}
rReq.Done();
}
@@ -1078,8 +1078,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_EDIT_SPARKLINE_GROUP:
{
sal_uInt16 nId = sc::SparklineDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWindow = pViewFrame->GetChildWindow(nId);
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWindow = rViewFrame.GetChildWindow(nId);
pScMod->SetRefDialog(nId, pWindow == nullptr);
rReq.Done();
}
@@ -1088,8 +1088,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_EDIT_SPARKLINE:
{
sal_uInt16 nId = sc::SparklineDataRangeDialogWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWindow = pViewFrame->GetChildWindow(nId);
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWindow = rViewFrame.GetChildWindow(nId);
pScMod->SetRefDialog(nId, pWindow == nullptr);
rReq.Done();
}
@@ -1759,8 +1759,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pDlg->Insert( nFormatId, aName );
}
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- auto xFrame = pViewFrame->GetFrame().GetFrameInterface();
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
+ auto xFrame = rViewFrame.GetFrame().GetFrameInterface();
const OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:PasteTextImportDialog", aModuleName);
OUString sLabel(vcl::CommandInfoProvider::GetTooltipLabelForCommand(aProperties));
@@ -1898,15 +1898,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_SPELL_DIALOG:
{
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
if( rReq.GetArgs() )
- pViewFrame->SetChildWindow( SID_SPELL_DIALOG,
+ rViewFrame.SetChildWindow( SID_SPELL_DIALOG,
static_cast< const SfxBoolItem& >( rReq.GetArgs()->
Get( SID_SPELL_DIALOG ) ).GetValue() );
else
- pViewFrame->ToggleChildWindow( SID_SPELL_DIALOG );
+ rViewFrame.ToggleChildWindow( SID_SPELL_DIALOG );
- pViewFrame->GetBindings().Invalidate( SID_SPELL_DIALOG );
+ rViewFrame.GetBindings().Invalidate( SID_SPELL_DIALOG );
rReq.Ignore();
}
break;
@@ -2091,8 +2091,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -2100,8 +2100,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_ADD_NAME:
{
sal_uInt16 nId = ScNameDefDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -2131,8 +2131,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( bManaged )
{
sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
break;
@@ -2286,8 +2286,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->GetPool().Put(aDlgItem);
sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -2298,8 +2298,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
sal_uInt16 nId = ScColRowNameRangesDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -2664,8 +2664,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxAllItemSet aSet( GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- auto xFrame = pViewFrame->GetFrame().GetFrameInterface();
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
+ auto xFrame = rViewFrame.GetFrame().GetFrameInterface();
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame));
pDlg->Execute();
}
@@ -3112,8 +3112,8 @@ void RunPivotLayoutDialog(ScModule* pScMod,
// start layout dialog
sal_uInt16 nId = ScPivotLayoutWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
}
@@ -3354,8 +3354,8 @@ void ScCellShell::ExecuteXMLSourceDialog()
ScModule* pScMod = SC_MOD();
sal_uInt16 nId = ScXMLSourceDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrame->GetChildWindow(nId);
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrame.GetChildWindow(nId);
pScMod->SetRefDialog(nId, pWnd == nullptr);
}
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index eb6ee98de193..c34f8ce14267 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -245,10 +245,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
// check if database beamer is open
- SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
bool bWasOpen = false;
{
- uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = rViewFrame.GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
"_beamer",
frame::FrameSearchFlag::CHILDREN);
@@ -260,13 +260,13 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
// close database beamer: just forward to SfxViewFrame
- pViewFrame->ExecuteSlot( rReq );
+ rViewFrame.ExecuteSlot( rReq );
}
else
{
// show database beamer: SfxViewFrame call must be synchronous
- pViewFrame->ExecuteSlot( rReq, false ); // false = synchronous
+ rViewFrame.ExecuteSlot( rReq, false ); // false = synchronous
// select current database in database beamer
@@ -275,7 +275,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (pDBData)
pDBData->GetImportParam( aImportParam );
- ScDBDocFunc::ShowInBeamer( aImportParam, pTabViewShell->GetViewFrame() );
+ ScDBDocFunc::ShowInBeamer( aImportParam, &pTabViewShell->GetViewFrame() );
}
rReq.Done(); // needed because it's a toggle slot
}
@@ -528,54 +528,51 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pTabViewShell->UISort( rOutParam );
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- if (pViewFrm)
- {
- SfxRequest aRequest(pViewFrm, SID_SORT);
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxRequest aRequest(&rViewFrm, SID_SORT);
- if ( rOutParam.bInplace )
+ if ( rOutParam.bInplace )
+ {
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_BYROW,
+ rOutParam.bByRow ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_HASHEADER,
+ rOutParam.bHasHeader ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
+ rOutParam.bCaseSens ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
+ rOutParam.bNaturalSort ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCCOMMENTS,
+ rOutParam.aDataAreaExtras.mbCellNotes ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCIMAGES,
+ rOutParam.aDataAreaExtras.mbCellDrawObjects ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
+ rOutParam.aDataAreaExtras.mbCellFormats ) );
+ sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
+ aRequest.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
+ if ( rOutParam.maKeyState[0].bDoSort )
{
- aRequest.AppendItem( SfxBoolItem( SID_SORT_BYROW,
- rOutParam.bByRow ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_HASHEADER,
- rOutParam.bHasHeader ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
- rOutParam.bCaseSens ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
- rOutParam.bNaturalSort ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_INCCOMMENTS,
- rOutParam.aDataAreaExtras.mbCellNotes ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_INCIMAGES,
- rOutParam.aDataAreaExtras.mbCellDrawObjects ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
- rOutParam.aDataAreaExtras.mbCellFormats ) );
- sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
- aRequest.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
- if ( rOutParam.maKeyState[0].bDoSort )
- {
- aRequest.AppendItem( SfxInt32Item( FN_PARAM_1,
- rOutParam.maKeyState[0].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_2,
- rOutParam.maKeyState[0].bAscending ) );
- }
- if ( rOutParam.maKeyState[1].bDoSort )
- {
- aRequest.AppendItem( SfxInt32Item( FN_PARAM_3,
- rOutParam.maKeyState[1].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_4,
- rOutParam.maKeyState[1].bAscending ) );
- }
- if ( rOutParam.maKeyState[2].bDoSort )
- {
- aRequest.AppendItem( SfxInt32Item( FN_PARAM_5,
- rOutParam.maKeyState[2].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_6,
- rOutParam.maKeyState[2].bAscending ) );
- }
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_1,
+ rOutParam.maKeyState[0].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_2,
+ rOutParam.maKeyState[0].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[1].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_3,
+ rOutParam.maKeyState[1].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_4,
+ rOutParam.maKeyState[1].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[2].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_5,
+ rOutParam.maKeyState[2].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_6,
+ rOutParam.maKeyState[2].bAscending ) );
}
-
- aRequest.Done();
}
+
+ aRequest.Done();
}
else
{
@@ -602,8 +599,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
else
{
sal_uInt16 nId = ScFilterDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -623,8 +620,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
else
{
sal_uInt16 nId = ScSpecialFilterDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -726,8 +723,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
sal_uInt16 nId = ScDbNameDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
@@ -1135,7 +1132,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
rSet.Put(SfxVisibilityItem(nWhich, false));
else
// get state (BoolItem) from SfxViewFrame
- pTabViewShell->GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
+ pTabViewShell->GetViewFrame().GetSlotState( nWhich, nullptr, &rSet );
}
break;
case SID_SBA_BRW_INSERT:
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 9ab0e09ac00e..9e3fcc37bf88 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -153,7 +153,7 @@ void lcl_lokGetWholeFunctionList()
void ScCellShell::Execute( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData().GetViewShell();
- SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pTabViewShell->GetViewFrame().GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
@@ -170,7 +170,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_FUNCTION:
// inplace leads to trouble with EditShell ...
//! cannot always be switched ????
- if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace())
+ if (!pTabViewShell->GetViewFrame().GetFrame().IsInPlace())
pTabViewShell->SetDontSwitch(true); // do not switch off EditShell
[[fallthrough]];
@@ -429,8 +429,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
else
{
sal_uInt16 nId = SID_OPENDLG_FUNCTION;
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
bool bVis = comphelper::LibreOfficeKit::isActive() || pWnd == nullptr;
pScMod->SetRefDialog( nId, bVis );
}
@@ -441,8 +441,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_CONSOLIDATE:
{
sal_uInt16 nId = ScConsolidateDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -496,8 +496,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_SOLVE:
{
sal_uInt16 nId = ScSolverDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -506,8 +506,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_OPTSOLVER:
{
sal_uInt16 nId = ScOptSolverDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -516,8 +516,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_TABOP:
{
sal_uInt16 nId = ScTabOpDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -695,7 +695,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_ROW_HEIGHT);
+ SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_ROW_HEIGHT);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, static_cast<sal_uInt16>(nVal) );
@@ -735,7 +735,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if ( nResult == RET_OK )
{
- SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_ROW_OPT_HEIGHT);
+ SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_ROW_OPT_HEIGHT);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL, static_cast<sal_uInt16>(nVal) );
ScGlobal::nLastRowHeightExtra = nVal;
@@ -800,7 +800,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if ( nResult == RET_OK )
{
- SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_COL_WIDTH);
+ SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_COL_WIDTH);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( true, SC_SIZE_DIRECT, static_cast<sal_uInt16>(nVal) );
@@ -838,7 +838,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 2, MAX_EXTRA_WIDTH));
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
- SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_COL_OPT_WIDTH);
+ SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_COL_OPT_WIDTH);
if ( nResult == RET_OK )
{
tools::Long nVal = pDlg->GetInputValue();
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index ce4d132b87e4..6561423ab2a5 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -229,7 +229,7 @@ void ScDrawView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void ScDrawView::UpdateIMap( SdrObject* pObj )
{
if ( !(pViewData &&
- pViewData->GetViewShell()->GetViewFrame()->HasChildWindow( ScIMapChildWindowId() ) &&
+ pViewData->GetViewShell()->GetViewFrame().HasChildWindow( ScIMapChildWindowId() ) &&
pObj && ( dynamic_cast<const SdrGrafObj*>( pObj) != nullptr || dynamic_cast<const SdrOle2Obj*>( pObj) != nullptr )) )
return;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index d52f0900f46d..c2190c1623e9 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -486,8 +486,8 @@ void ScDrawView::MarkListHasChanged()
// adjust verbs
- SfxViewFrame* pViewFrame = pViewSh->GetViewFrame();
- bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ SfxViewFrame& rViewFrame = pViewSh->GetViewFrame();
+ bool bOle = pViewSh->GetViewFrame().GetFrame().IsInPlace();
uno::Sequence< embed::VerbDescriptor > aVerbs;
if ( pOle2Obj && !bOle )
{
@@ -522,16 +522,13 @@ void ScDrawView::MarkListHasChanged()
// uno object for view returns drawing objects as selection,
// so it must notify its SelectionChangeListeners
- if (pViewFrame)
+ SfxFrame& rFrame = rViewFrame.GetFrame();
+ uno::Reference<frame::XController> xController = rFrame.GetController();
+ if (xController.is())
{
- SfxFrame& rFrame = pViewFrame->GetFrame();
- uno::Reference<frame::XController> xController = rFrame.GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->SelectionChanged();
}
// update selection transfer object
@@ -572,16 +569,13 @@ bool ScDrawView::SdrBeginTextEdit(
}
}
- if ( pViewSh->GetViewFrame() )
+ SfxFrame& rFrame = pViewSh->GetViewFrame().GetFrame();
+ uno::Reference< frame::XController > xController = rFrame.GetController();
+ if (xController.is())
{
- SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
- uno::Reference< frame::XController > xController = rFrame.GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->SelectionChanged();
}
return bRet;
@@ -596,16 +590,13 @@ SdrEndTextEditKind ScDrawView::SdrEndTextEdit( bool bDontDeleteReally )
if (comphelper::LibreOfficeKit::isActive())
SfxLokHelper::notifyOtherViews(pViewSh, LOK_CALLBACK_VIEW_LOCK, "rectangle", "EMPTY");
- if ( pViewSh->GetViewFrame() )
+ SfxFrame& rFrame = pViewSh->GetViewFrame().GetFrame();
+ uno::Reference< frame::XController > xController = rFrame.GetController();
+ if (xController.is())
{
- SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
- uno::Reference< frame::XController > xController = rFrame.GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->SelectionChanged();
}
return eRet;
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 52566f45d7b8..9583f7fb0ac9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -628,7 +628,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
// Ensure the field is selected first
pEditView->SelectFieldAtCursor();
- rViewData.GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(
+ rViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(
SID_HYPERLINK_DIALOG);
}
break;
@@ -1302,14 +1302,14 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
{
// Undo state is taken from normal ViewFrame state function
- SfxViewFrame* pViewFrm = rViewData.GetViewShell()->GetViewFrame();
- if ( pViewFrm && GetUndoManager() )
+ SfxViewFrame& rViewFrm = rViewData.GetViewShell()->GetViewFrame();
+ if ( GetUndoManager() )
{
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- pViewFrm->GetSlotState( nWhich, nullptr, &rSet );
+ rViewFrm.GetSlotState( nWhich, nullptr, &rSet );
nWhich = aIter.NextWhich();
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index cc3c7312942f..6bcd7119ecb7 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -215,7 +215,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_UPDATE_BY_EXAMPLE:
{
std::unique_ptr<SfxUInt16Item> pFamilyItem;
- pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
+ pTabViewShell->GetViewFrame().GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
bool bPage = pFamilyItem && SfxStyleFamily::Page == static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
@@ -230,7 +230,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_SHOW:
{
std::unique_ptr<SfxUInt16Item> pFamilyItem;
- pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
+ pTabViewShell->GetViewFrame().GetBindings().QueryState(SID_STYLE_FAMILY, pFamilyItem);
bool bPage = pFamilyItem && SfxStyleFamily::Page == static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
if ( bProtected && !bPage )
@@ -977,7 +977,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData().GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pTabViewShell->GetViewFrame().GetBindings();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 41db66bc82bd..3f5172ad6a50 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2164,7 +2164,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects
{
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
- SfxBindings& rFrmBindings=pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rFrmBindings=pViewShell->GetViewFrame().GetBindings();
rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
@@ -2803,24 +2803,21 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt )
vcl::Window* pWindow = rNEvt.GetWindow();
if (pWindow == this)
{
- SfxViewFrame* pViewFrame = mrViewData.GetViewShell()->GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = mrViewData.GetViewShell()->GetViewFrame();
+ css::uno::Reference<css::frame::XController> xController = rViewFrame.GetFrame().GetController();
+ if (xController.is())
{
- css::uno::Reference<css::frame::XController> xController = pViewFrame->GetFrame().GetController();
- if (xController.is())
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp && pImp->IsMouseListening())
{
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp && pImp->IsMouseListening())
- {
- css::awt::MouseEvent aEvent;
- lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() );
- if ( rNEvt.GetWindow() )
- aEvent.Source = rNEvt.GetWindow()->GetComponentInterface();
- if ( nType == NotifyEventType::MOUSEBUTTONDOWN)
- bDone = pImp->MousePressed( aEvent );
- else
- bDone = pImp->MouseReleased( aEvent );
- }
+ css::awt::MouseEvent aEvent;
+ lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() );
+ if ( rNEvt.GetWindow() )
+ aEvent.Source = rNEvt.GetWindow()->GetComponentInterface();
+ if ( nType == NotifyEventType::MOUSEBUTTONDOWN)
+ bDone = pImp->MousePressed( aEvent );
+ else
+ bDone = pImp->MouseReleased( aEvent );
}
}
}
@@ -3556,7 +3553,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
|| rLclKeyCode.GetCode() == KEY_RIGHT)
{
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
- SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewShell->GetViewFrame().GetBindings();
rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
}
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index a122544f1110..82e073230910 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -664,7 +664,7 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt )
if(nSlot)
{
bHandled = true;
- pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot, SfxCallMode::ASYNCHRON );
+ pViewShell->GetViewFrame().GetDispatcher()->Execute( nSlot, SfxCallMode::ASYNCHRON );
}
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index a35122cbfad5..d38c16b2d4ad 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -252,7 +252,7 @@ void ScPreviewShell::UpdateNeededScrollBars( bool bFromZoom )
Size aPageSize;
OutputDevice* pDevice = Application::GetDefaultDevice();
- tools::Long nBarW = GetViewFrame()->GetWindow().GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nBarW = GetViewFrame().GetWindow().GetSettings().GetStyleSettings().GetScrollBarSize();
tools::Long nBarH = nBarW;
tools::Long aHeightOffSet = pDevice ? pDevice->PixelToLogic( Size( nBarW, nBarH ), pPreview->GetMapMode() ).Height() : 0;
@@ -727,7 +727,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
aPrintFunc.UpdatePages();
rReq.Done();
}
- GetViewFrame()->GetBindings().Invalidate( nSlot );
+ GetViewFrame().GetBindings().Invalidate( nSlot );
}
break;
case SID_PRINTPREVIEW:
@@ -926,7 +926,7 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
rSeq.realloc(3);
beans::PropertyValue* pSeq = rSeq.getArray();
- sal_uInt16 nViewID(GetViewFrame()->GetCurViewId());
+ sal_uInt16 nViewID(GetViewFrame().GetCurViewId());
pSeq[0].Name = SC_VIEWID;
pSeq[0].Value <<= SC_VIEW + OUString::number(nViewID);
pSeq[1].Name = SC_ZOOMVALUE;
@@ -988,8 +988,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage>0 )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_PREVIOUS );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_PREVIOUS );
Execute( aSfxRequest );
}
}
@@ -1011,8 +1011,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage<nTotal-1 )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_NEXT );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_NEXT );
Execute( aSfxRequest );
}
}
@@ -1032,8 +1032,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage>0 )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_PREVIOUS );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_PREVIOUS );
Execute( aSfxRequest );
aCurPos.setY( nVRange );
}
@@ -1055,8 +1055,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
}
if( nPage<nTotal-1 )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_NEXT );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_NEXT );
Execute( aSfxRequest );
aCurPos.setY( 0 );
}
@@ -1071,8 +1071,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
tools::Long nTotal = pPreview->GetTotalPages();
if( nTotal && nPage != 0 )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_FIRST );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_FIRST );
Execute( aSfxRequest );
}
}
@@ -1091,8 +1091,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
tools::Long nTotal = pPreview->GetTotalPages();
if( nTotal && nPage+1 != nTotal )
{
- SfxViewFrame* pSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_LAST );
+ SfxViewFrame& rSfxViewFrame = GetViewFrame();
+ SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_LAST );
Execute( aSfxRequest );
}
}
@@ -1136,7 +1136,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
void ScPreviewShell::ExitPreview()
{
- GetViewFrame()->GetDispatcher()->Execute(SID_VIEWSHELL0, SfxCallMode::ASYNCHRON);
+ GetViewFrame().GetDispatcher()->Execute(SID_VIEWSHELL0, SfxCallMode::ASYNCHRON);
}
void ScPreviewShell::AddAccessibilityObject( SfxListener& rObject )
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 0133a9074a5f..487f8c8e1812 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -83,7 +83,7 @@ namespace
SetController( pViewShell ? \
pViewShell->CreateRefDialogController( p, this, pInfo, pParentP->GetFrameWeld(), sid ) : nullptr ); \
if (pViewShell && !GetController()) \
- pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
+ pViewShell->GetViewFrame().SetChildWindow( nId, false ); \
}
@@ -231,7 +231,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper(vcl::Window* pParentP,
else
SetController( nullptr );
if (pViewShell && !GetController())
- pViewShell->GetViewFrame()->SetChildWindow( nId, false );
+ pViewShell->GetViewFrame().SetChildWindow( nId, false );
}
void ScAcceptChgDlgWrapper::ReInitDlg()
@@ -284,7 +284,7 @@ ScValidityRefChildWin::ScValidityRefChildWin(vcl::Window* pParentP,
pViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
OSL_ENSURE( pViewShell, "missing view shell :-(" );
if (pViewShell && !xDlg)
- pViewShell->GetViewFrame()->SetChildWindow( nId, false );
+ pViewShell->GetViewFrame().SetChildWindow( nId, false );
}
ScValidityRefChildWin::~ScValidityRefChildWin()
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 752d565b2b1e..f325d7dd556c 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -355,10 +355,10 @@ void ScSpellingEngine::ShowFinishDialog()
weld::Widget* ScSpellingEngine::GetDialogParent()
{
sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
- SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
- if( pViewFrm->HasChildWindow( nWinId ) )
+ SfxViewFrame& rViewFrm = mrViewData.GetViewShell()->GetViewFrame();
+ if( rViewFrm.HasChildWindow( nWinId ) )
{
- if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) )
+ if( SfxChildWindow* pChild = rViewFrm.GetChildWindow( nWinId ) )
{
auto xController = pChild->GetController();
if (xController)
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 35e715c8283b..efecef8cd22f 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -205,7 +205,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() && nMouseClickPageId != 0 && nMouseClickPageId != TabBar::PAGE_NOT_FOUND )
{
- SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame().GetDispatcher();
pDispatcher->Execute( FID_TAB_MENU_RENAME, SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
return;
}
@@ -213,7 +213,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
if( nMouseClickPageId == 0 )
{
// Click in the area next to the existing tabs:
- SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame().GetDispatcher();
pDispatcher->Execute( FID_TAB_DESELECTALL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
// forget page ID, to be really sure that the dialog is not called twice
nMouseClickPageId = TabBar::PAGE_NOT_FOUND;
@@ -317,7 +317,7 @@ void ScTabControl::Select()
// for others this is only needed fidgeting
if ( bRefMode && pViewData->GetRefType() == SC_REFTYPE_REF )
- if ( pViewData->GetViewShell()->GetViewFrame()->HasChildWindow(SID_OPENDLG_CONSOLIDATE) )
+ if ( pViewData->GetViewShell()->GetViewFrame().HasChildWindow(SID_OPENDLG_CONSOLIDATE) )
{
ScRange aRange(
pViewData->GetRefStartX(), pViewData->GetRefStartY(), pViewData->GetRefStartZ(),
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 048178301f1d..66ddcda2d223 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -739,8 +739,8 @@ void ScTabView::UpdateVarZoom()
PaintGrid();
PaintTop();
PaintLeft();
- aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
- aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ aViewData.GetViewShell()->GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOM );
+ aViewData.GetViewShell()->GetViewFrame().GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
aViewData.GetBindings().Invalidate(SID_ZOOM_IN);
aViewData.GetBindings().Invalidate(SID_ZOOM_OUT);
}
@@ -961,7 +961,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
const CommandWheelData* pData = rCEvt.GetWheelData();
if (pData && pData->GetMode() == CommandWheelMode::ZOOM)
{
- if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace() )
+ if ( !aViewData.GetViewShell()->GetViewFrame().GetFrame().IsInPlace() )
{
// for ole inplace editing, the scale is defined by the visarea and client size
// and can't be changed directly
@@ -1001,7 +1001,7 @@ bool ScTabView::GestureZoomCommand(const CommandEvent& rCEvt)
if (!pData)
return false;
- if (aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace())
+ if (aViewData.GetViewShell()->GetViewFrame().GetFrame().IsInPlace())
return false;
if (pData->meEventType == GestureEventZoomType::Begin)
@@ -1409,7 +1409,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
ScDocument& rDoc = aViewData.GetDocument();
SCROW nEndPos = rDoc.MaxRow();
- if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace() )
+ if ( !aViewData.GetViewShell()->GetViewFrame().GetFrame().IsInPlace() )
{
// for OLE Inplace always MAXROW
@@ -2240,17 +2240,14 @@ void ScTabView::SetNewVisArea()
pGridWin[i]->SetMapMode(aOldMode[i]);
}
- SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = aViewData.GetViewShell()->GetViewFrame();
+ SfxFrame& rFrame = rViewFrame.GetFrame();
+ css::uno::Reference<css::frame::XController> xController = rFrame.GetController();
+ if (xController.is())
{
- SfxFrame& rFrame = pViewFrame->GetFrame();
- css::uno::Reference<css::frame::XController> xController = rFrame.GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->VisAreaChanged();
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->VisAreaChanged();
}
if (aViewData.GetViewShell()->HasAccessibilityObjects())
aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccVisAreaChanged));
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 0da3ae55b283..d52968c4fdef 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -449,17 +449,17 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
SfxLokHelper::notifyDocumentSizeChanged(aViewData.GetViewShell(), sSize, pModel, false);
}
-static bool lcl_IsRefDlgActive(SfxViewFrame* pViewFrm)
+static bool lcl_IsRefDlgActive(SfxViewFrame& rViewFrm)
{
ScModule* pScMod = SC_MOD();
if (!pScMod->IsRefDialogOpen())
return false;
auto nDlgId = pScMod->GetCurRefDlgId();
- if (!pViewFrm->HasChildWindow(nDlgId))
+ if (!rViewFrm.HasChildWindow(nDlgId))
return false;
- SfxChildWindow* pChild = pViewFrm->GetChildWindow(nDlgId);
+ SfxChildWindow* pChild = rViewFrm.GetChildWindow(nDlgId);
if (!pChild)
return false;
@@ -531,16 +531,13 @@ void ScTabView::SetTabProtectionSymbol( SCTAB nTab, const bool bProtect )
void ScTabView::SelectionChanged(bool bFromPaste)
{
- SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = aViewData.GetViewShell()->GetViewFrame();
+ uno::Reference<frame::XController> xController = rViewFrame.GetFrame().GetController();
+ if (xController.is())
{
- uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->SelectionChanged();
}
UpdateAutoFillMark(bFromPaste); // also calls CheckSelectionTransfer
@@ -884,14 +881,14 @@ void ScTabView::RemoveHintWindow()
}
// find window that should not be over the cursor
-static weld::Window* lcl_GetCareWin(SfxViewFrame* pViewFrm)
+static weld::Window* lcl_GetCareWin(SfxViewFrame& rViewFrm)
{
//! also spelling ??? (then set the member variables when calling)
// search & replace
- if (pViewFrm->HasChildWindow(SID_SEARCH_DLG))
+ if (rViewFrm.HasChildWindow(SID_SEARCH_DLG))
{
- SfxChildWindow* pChild = pViewFrm->GetChildWindow(SID_SEARCH_DLG);
+ SfxChildWindow* pChild = rViewFrm.GetChildWindow(SID_SEARCH_DLG);
if (pChild)
{
auto xDlgController = pChild->GetController();
@@ -901,9 +898,9 @@ static weld::Window* lcl_GetCareWin(SfxViewFrame* pViewFrm)
}
// apply changes
- if ( pViewFrm->HasChildWindow(FID_CHG_ACCEPT) )
+ if ( rViewFrm.HasChildWindow(FID_CHG_ACCEPT) )
{
- SfxChildWindow* pChild = pViewFrm->GetChildWindow(FID_CHG_ACCEPT);
+ SfxChildWindow* pChild = rViewFrm.GetChildWindow(FID_CHG_ACCEPT);
if (pChild)
{
auto xDlgController = pChild->GetController();
@@ -2044,8 +2041,8 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
if (pScMod->IsRefDialogOpen())
{
sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId();
- SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
- SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId );
+ SfxViewFrame& rViewFrm = aViewData.GetViewShell()->GetViewFrame();
+ SfxChildWindow* pChildWnd = rViewFrm.GetChildWindow( nCurRefDlgId );
if (pChildWnd)
{
if (pChildWnd->GetController())
@@ -2281,7 +2278,7 @@ void ScTabView::KillEditView( bool bNoPaint )
if (bGrabFocus)
{
// should be done like this, so that Sfx notice it, but it does not work:
-//! aViewData.GetViewShell()->GetViewFrame()->GetWindow().GrabFocus();
+//! aViewData.GetViewShell()->GetViewFrame().GetWindow().GrabFocus();
// therefore first like this:
GetActiveWin()->GrabFocus();
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index bb10ad93e5f7..77280b583cc7 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -306,16 +306,13 @@ void ScTabView::TabChanged( bool bSameTabButMoved )
}
// notification for XActivationBroadcaster
- SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
- if (pViewFrame)
+ SfxViewFrame& rViewFrame = aViewData.GetViewShell()->GetViewFrame();
+ uno::Reference<frame::XController> xController = rViewFrame.GetFrame().GetController();
+ if (xController.is())
{
- uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
- if (pImp)
- pImp->SheetChanged( bSameTabButMoved );
- }
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
+ if (pImp)
+ pImp->SheetChanged( bSameTabButMoved );
}
for (int i = 0; i < 4; i++)
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 031a32d59c4d..b2fef44d9656 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -76,7 +76,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
MakeDrawLayer();
ScTabView* pTabView = GetViewData().GetView();
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
vcl::Window* pWin = pTabView->GetActiveWin();
ScDrawView* pView = pTabView->GetScDrawView();
@@ -141,7 +141,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_FM_CREATE_CONTROL )
{
GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
//! what kind of slot does the weird controller really need to display this????
}
@@ -155,7 +155,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
{
// switching from control- to paint function -> deselect in control-controller
GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
//! what kind of slot does the weird controller really need to display this????
}
@@ -289,7 +289,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
const SfxStringItem* pEnumCommand = rReq.GetArg<SfxStringItem>(nNewId);
if ( pEnumCommand )
{
- SfxBindings& rBind = GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetViewFrame().GetBindings();
rBind.Invalidate( nNewId );
rBind.Update( nNewId );
@@ -397,7 +397,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
{
case SID_DRAW_CHART:
{
- bool bOle = GetViewFrame()->GetFrame().IsInPlace();
+ bool bOle = GetViewFrame().GetFrame().IsInPlace();
if ( bOle || !SvtModuleOptions().IsChart() )
rSet.DisableItem( nWhich );
}
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index ec19d4c1d4a6..5c41a4e49b75 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -166,8 +166,8 @@ namespace
void ScTabViewShell::Execute( SfxRequest& rReq )
{
- SfxViewFrame* pThisFrame = GetViewFrame();
- SfxBindings& rBindings = pThisFrame->GetBindings();
+ SfxViewFrame& rThisFrame = GetViewFrame();
+ SfxBindings& rBindings = rThisFrame.GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
@@ -209,7 +209,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_EDIT_PRINTAREA:
{
sal_uInt16 nId = ScPrintAreasDlgWrapper::GetChildWindowId();
- SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
+ SfxChildWindow* pWnd = rThisFrame.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -603,7 +603,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_PRINTPREVIEW:
{
- if ( !pThisFrame->GetFrame().IsInPlace() ) // not for OLE
+ if ( !rThisFrame.GetFrame().IsInPlace() ) // not for OLE
{
// print preview is now always in the same frame as the tab view
// -> always switch this frame back to normal view
@@ -612,7 +612,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// #102785#; finish input
pScMod->InputEnterHandler();
- pThisFrame->GetDispatcher()->Execute( SID_VIEWSHELL1, SfxCallMode::ASYNCHRON );
+ rThisFrame.GetDispatcher()->Execute( SID_VIEWSHELL1, SfxCallMode::ASYNCHRON );
}
// else error (e.g. Ole)
}
@@ -669,10 +669,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_FUNCTION_BOX:
{
// First make sure that the sidebar is visible
- pThisFrame->ShowChildWindow(SID_SIDEBAR);
+ rThisFrame.ShowChildWindow(SID_SIDEBAR);
::sfx2::sidebar::Sidebar::ShowPanel(u"ScFunctionsPanel",
- pThisFrame->GetFrame().GetFrameInterface());
+ rThisFrame.GetFrame().GetFrameInterface());
rReq.Done ();
}
break;
@@ -728,13 +728,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_TOGGLEINPUTLINE:
{
sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
- SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
+ SfxChildWindow* pWnd = rThisFrame.GetChildWindow( nId );
bool bSet = ( pWnd == nullptr );
const SfxPoolItem* pItem;
if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET )
bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- pThisFrame->SetChildWindow( nId, bSet );
+ rThisFrame.SetChildWindow( nId, bSet );
rBindings.Invalidate( FID_TOGGLEINPUTLINE );
rReq.AppendItem( SfxBoolItem( nSlot, bSet ) );
rReq.Done();
@@ -748,7 +748,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
HideNoteMarker();
- if (!GetViewData().GetViewShell()->GetViewFrame()->GetFrame().IsInPlace())
+ if (!GetViewData().GetViewShell()->GetViewFrame().GetFrame().IsInPlace())
{
// for ole inplace editing, the scale is defined by the visarea and client size
// and can't be changed directly
@@ -1132,7 +1132,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_CHG_SHOW:
{
sal_uInt16 nId = ScHighlightChgDlgWrapper::GetChildWindowId();
- SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
+ SfxChildWindow* pWnd = rThisFrame.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
@@ -1140,13 +1140,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_CHG_ACCEPT:
{
- pThisFrame->ToggleChildWindow(ScAcceptChgDlgWrapper::GetChildWindowId());
- GetViewFrame()->GetBindings().Invalidate(FID_CHG_ACCEPT);
+ rThisFrame.ToggleChildWindow(ScAcceptChgDlgWrapper::GetChildWindowId());
+ GetViewFrame().GetBindings().Invalidate(FID_CHG_ACCEPT);
rReq.Done ();
/*
sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId();
- SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
+ SfxChildWindow* pWnd = rThisFrame.GetChildWindow( nId );
pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True );
*/
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 43084c917971..d82c7e15c11c 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -121,13 +121,13 @@ void ScTabViewShell::Activate(bool bMDI)
// RegisterNewTargetNames does not exist anymore
- SfxViewFrame* pThisFrame = GetViewFrame();
- if ( mpInputHandler && pThisFrame->HasChildWindow(FID_INPUTLINE_STATUS) )
+ SfxViewFrame& rThisFrame = GetViewFrame();
+ if ( mpInputHandler && rThisFrame.HasChildWindow(FID_INPUTLINE_STATUS) )
{
// actually only required for Reload (last version):
// The InputWindow remains, but the View along with the InputHandler is newly created,
// that is why the InputHandler must be set at the InputWindow.
- SfxChildWindow* pChild = pThisFrame->GetChildWindow(FID_INPUTLINE_STATUS);
+ SfxChildWindow* pChild = rThisFrame.GetChildWindow(FID_INPUTLINE_STATUS);
if (pChild)
{
ScInputWindow* pWin = static_cast<ScInputWindow*>(pChild->GetWindow());
@@ -190,9 +190,9 @@ void ScTabViewShell::Activate(bool bMDI)
// update change dialog
- if ( pThisFrame->HasChildWindow(FID_CHG_ACCEPT) )
+ if ( rThisFrame.HasChildWindow(FID_CHG_ACCEPT) )
{
- SfxChildWindow* pChild = pThisFrame->GetChildWindow(FID_CHG_ACCEPT);
+ SfxChildWindow* pChild = rThisFrame.GetChildWindow(FID_CHG_ACCEPT);
if (pChild)
{
static_cast<ScAcceptChgDlgWrapper*>(pChild)->ReInitDlg();
@@ -202,7 +202,7 @@ void ScTabViewShell::Activate(bool bMDI)
if(pScMod->IsRefDialogOpen())
{
sal_uInt16 nModRefDlgId=pScMod->GetCurRefDlgId();
- SfxChildWindow* pChildWnd = pThisFrame->GetChildWindow( nModRefDlgId );
+ SfxChildWindow* pChildWnd = rThisFrame.GetChildWindow( nModRefDlgId );
if ( pChildWnd )
{
if (auto pController = pChildWnd->GetController())
@@ -253,7 +253,7 @@ void ScTabViewShell::Deactivate(bool bMDI)
ActivateView( false, false );
- if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
+ if ( GetViewFrame().GetFrame().IsInPlace() ) // inplace
GetViewData().GetDocShell()->UpdateOle(GetViewData(), true);
if ( pHdl )
@@ -341,7 +341,7 @@ void ScTabViewShell::UpdateOleZoom()
void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange )
{
Size aNewSize( rSize );
- if ( GetViewFrame()->GetFrame().IsInPlace() )
+ if ( GetViewFrame().GetFrame().IsInPlace() )
{
SvBorder aBorder;
GetBorderSize( aBorder, rSize );
@@ -457,7 +457,7 @@ void ScTabViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const
void ScTabViewShell::Move()
{
- Point aNewPos = GetViewFrame()->GetWindow().OutputToScreenPixel(Point());
+ Point aNewPos = GetViewFrame().GetWindow().OutputToScreenPixel(Point());
if (aNewPos != aWinPos)
{
@@ -1130,13 +1130,11 @@ IMPL_LINK_NOARG(ScTabViewShell, SimpleRefClose, const OUString*, void)
static ScTabViewObj* lcl_GetViewObj( const ScTabViewShell& rShell )
{
ScTabViewObj* pRet = nullptr;
- if (SfxViewFrame* pViewFrame = rShell.GetViewFrame())
- {
- SfxFrame& rFrame = pViewFrame->GetFrame();
- uno::Reference<frame::XController> xController = rFrame.GetController();
- if (xController.is())
- pRet = dynamic_cast<ScTabViewObj*>( xController.get() );
- }
+ SfxViewFrame& rViewFrame = rShell.GetViewFrame();
+ SfxFrame& rFrame = rViewFrame.GetFrame();
+ uno::Reference<frame::XController> xController = rFrame.GetController();
+ if (xController.is())
+ pRet = dynamic_cast<ScTabViewObj*>( xController.get() );
return pRet;
}
@@ -1165,7 +1163,7 @@ void ScTabViewShell::StartSimpleRefDialog(
const OUString& rTitle, const OUString& rInitVal,
bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection )
{
- SfxViewFrame* pViewFrm = GetViewFrame();
+ SfxViewFrame& rViewFrm = GetViewFrame();
if ( GetActiveViewShell() != this )
{
@@ -1173,14 +1171,14 @@ void ScTabViewShell::StartSimpleRefDialog(
// Then the view has to be activated first, the same way as in Execute for SID_CURRENTDOC.
// Can't use GrabFocus here, because it needs to take effect immediately.
- pViewFrm->GetFrame().Appear();
+ rViewFrm.GetFrame().Appear();
}
sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
- SC_MOD()->SetRefDialog( nId, true, pViewFrm );
+ SC_MOD()->SetRefDialog( nId, true, &rViewFrm );
- ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId ));
+ ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(rViewFrm.GetChildWindow( nId ));
if (!pWnd)
return;
@@ -1198,10 +1196,10 @@ void ScTabViewShell::StartSimpleRefDialog(
void ScTabViewShell::StopSimpleRefDialog()
{
- SfxViewFrame* pViewFrm = GetViewFrame();
+ SfxViewFrame& rViewFrm = GetViewFrame();
sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
- ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId ));
+ ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(rViewFrm.GetChildWindow( nId ));
if (pWnd)
{
if (auto pWin = pWnd->GetController())
@@ -1213,8 +1211,8 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
ScModule* pScMod = SC_MOD();
- SfxViewFrame* pThisFrame = GetViewFrame();
- if ( pThisFrame->GetChildWindow( SID_OPENDLG_FUNCTION ) )
+ SfxViewFrame& rThisFrame = GetViewFrame();
+ if ( rThisFrame.GetChildWindow( SID_OPENDLG_FUNCTION ) )
return false;
vcl::KeyCode aCode = rKEvt.GetKeyCode();
@@ -1314,7 +1312,7 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// container app and are executed during Window::KeyInput.
// -> don't pass keys to input handler that would be used there
// but should call slots instead.
- bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KeyFuncType::DONTKNOW );
+ bool bParent = ( GetViewFrame().GetFrame().IsInPlace() && eFunc != KeyFuncType::DONTKNOW );
if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent )
bUsed = pScMod->InputKeyEvent( rKEvt, true ); // input
@@ -1511,12 +1509,12 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
pCurFrameLine.reset( new ::editeng::SvxBorderLine(&aColBlack, 20, SvxBorderLineStyle::SOLID) );
StartListening(*GetViewData().GetDocShell(), DuplicateHandling::Prevent);
- StartListening(*GetViewFrame(), DuplicateHandling::Prevent);
+ StartListening(GetViewFrame(), DuplicateHandling::Prevent);
StartListening(*pSfxApp, DuplicateHandling::Prevent); // #i62045# #i62046# application is needed for Calc's own hints
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
bool bFirstView = !pFirst
- || (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh));
+ || (pFirst == &GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh));
if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
@@ -1534,7 +1532,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
// show the right cells
GetViewData().SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() );
- if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
+ if ( GetViewFrame().GetFrame().IsInPlace() ) // inplace
{
pDocSh->SetInplace( true ); // already initiated like this
if (rDoc.IsEmbedded())
@@ -1560,7 +1558,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
mpInputHandler.reset(new ScInputHandler);
// old version:
- // if ( !GetViewFrame()->ISA(SfxTopViewFrame) ) // OLE or Plug-In
+ // if ( !GetViewFrame().ISA(SfxTopViewFrame) ) // OLE or Plug-In
// pInputHandler = new ScInputHandler;
// create FormShell before MakeDrawView, so that DrawView can be registered at the
@@ -1632,7 +1630,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
if (bLink)
{
if ( !pFirst )
- pFirst = GetViewFrame();
+ pFirst = &GetViewFrame();
if(SC_MOD()->GetCurRefDlgId()==0)
{
@@ -1661,7 +1659,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
if (bReImport)
{
if ( !pFirst )
- pFirst = GetViewFrame();
+ pFirst = &GetViewFrame();
if(SC_MOD()->GetCurRefDlgId()==0)
{
pFirst->GetDispatcher()->Execute( SID_REIMPORT_AFTER_LOAD,
@@ -1681,7 +1679,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
// #105575#; update only in the first creation of the ViewShell
pDocSh->SetUpdateEnabled(false);
- if ( GetViewFrame()->GetFrame().IsInPlace() )
+ if ( GetViewFrame().GetFrame().IsInPlace() )
UpdateHeaderWidth(); // The inplace activation requires headers to be calculated
SvBorder aBorder;
@@ -1825,7 +1823,7 @@ ScTabViewShell::~ScTabViewShell()
ScDocShell* pDocSh = GetViewData().GetDocShell();
EndListening(*pDocSh);
- EndListening(*GetViewFrame());
+ EndListening(GetViewFrame());
EndListening(*SfxGetpApp()); // #i62045# #i62046# needed now - SfxViewShell no longer does it
SC_MOD()->ViewShellGone(this);
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index b701cc327e5e..fab96304f39f 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -296,7 +296,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SfxHintId::LanguageChanged:
{
- GetViewFrame()->GetBindings().Invalidate(SID_LANGUAGE_STATUS);
+ GetViewFrame().GetBindings().Invalidate(SID_LANGUAGE_STATUS);
if ( ScGridWindow* pWin = GetViewData().GetActiveWin() )
pWin->ResetAutoSpell();
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 03aa0615c052..9127bb598a1b 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -48,11 +48,11 @@ void ScTabViewShell::ExecChildWin(const SfxRequest& rReq)
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;
}
@@ -81,7 +81,7 @@ void ScTabViewShell::ExecGallery( const SfxRequest& rReq )
// for sounds (linked or not), insert a hyperlink button,
// like in Impress and Writer
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
- GetViewFrame()->GetDispatcher()->ExecuteList(SID_INSERT_AVMEDIA,
+ GetViewFrame().GetDispatcher()->ExecuteList(SID_INSERT_AVMEDIA,
SfxCallMode::SYNCHRON, { &aMediaURLItem });
}
}
@@ -93,12 +93,12 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
{
case SID_IMAP:
{
- SfxViewFrame* pThisFrame = GetViewFrame();
+ SfxViewFrame& rThisFrame = GetViewFrame();
sal_uInt16 nId = ScIMapChildWindowId();
- pThisFrame->ToggleChildWindow( nId );
- GetViewFrame()->GetBindings().Invalidate( SID_IMAP );
+ rThisFrame.ToggleChildWindow( nId );
+ GetViewFrame().GetBindings().Invalidate( SID_IMAP );
- if ( pThisFrame->HasChildWindow( nId ) )
+ if ( rThisFrame.HasChildWindow( nId ) )
{
SvxIMapDlg* pDlg = GetIMapDlg();
if ( pDlg )
@@ -158,10 +158,10 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
// We don't disable this anymore
bool bThere = false;
- SfxViewFrame* pThisFrame = GetViewFrame();
+ SfxViewFrame& rThisFrame = GetViewFrame();
sal_uInt16 nId = ScIMapChildWindowId();
- if ( pThisFrame->KnowsChildWindow(nId) )
- if ( pThisFrame->HasChildWindow(nId) )
+ if ( rThisFrame.KnowsChildWindow(nId) )
+ if ( rThisFrame.HasChildWindow(nId) )
bThere = true;
ObjectSelectionType eType=GetCurObjectSelectionType();
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 9e86e5319de9..d30733cf1ea9 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -177,8 +177,8 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SCROW nPosY = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo();
- SfxViewFrame* pThisFrame = GetViewFrame();
- bool bOle = GetViewFrame()->GetFrame().IsInPlace();
+ SfxViewFrame& rThisFrame = GetViewFrame();
+ bool bOle = GetViewFrame().GetFrame().IsInPlace();
SCTAB nTabSelCount = rMark.GetSelectCount();
@@ -267,9 +267,9 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
- if ( pThisFrame->KnowsChildWindow( nId ) )
+ if ( rThisFrame.KnowsChildWindow( nId ) )
{
- SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
+ SfxChildWindow* pWnd = rThisFrame.GetChildWindow( nId );
rSet.Put( SfxBoolItem( nWhich, pWnd != nullptr ) );
}
else
@@ -353,7 +353,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_FUNCTION_BOX:
{
const bool bBoxOpen = ::sfx2::sidebar::Sidebar::IsPanelVisible(u"ScFunctionsPanel",
- pThisFrame->GetFrame().GetFrameInterface());
+ rThisFrame.GetFrame().GetFrameInterface());
rSet.Put(SfxBoolItem(nWhich, bBoxOpen));
break;
}
@@ -472,7 +472,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_CHG_ACCEPT:
{
if(
- ( !rDoc.GetChangeTrack() && !pThisFrame->HasChildWindow(FID_CHG_ACCEPT) )
+ ( !rDoc.GetChangeTrack() && !rThisFrame.HasChildWindow(FID_CHG_ACCEPT) )
||
( pDocShell && pDocShell->IsDocShared() )
)
@@ -482,7 +482,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
else
{
rSet.Put(SfxBoolItem(FID_CHG_ACCEPT,
- pThisFrame->HasChildWindow(FID_CHG_ACCEPT)));
+ rThisFrame.HasChildWindow(FID_CHG_ACCEPT)));
}
}
break;
@@ -754,7 +754,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
pHdl->NotifyChange( &aState, bForce, pSourceSh, bStopEditing );
}
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( SID_STATUS_SUM ); // always together with the input row
rBindings.Invalidate( SID_ATTR_SIZE );
rBindings.Invalidate( SID_TABLE_CELL );
@@ -838,7 +838,7 @@ void ScTabViewShell::ExecDrawOpt( const SfxRequest& rReq )
ScViewOptions aViewOptions = GetViewData().GetOptions();
ScGridOptions aGridOptions = aViewOptions.GetGridOptions();
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
sal_uInt16 nSlotId = rReq.GetSlot();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index adfdba7228e1..11fba3153460 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -364,7 +364,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
MakeDrawLayer();
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
ScTabView* pTabView = GetViewData().GetView();
vcl::Window* pWin = pTabView->GetActiveWin();
ScDrawView* pView = pTabView->GetScDrawView();
@@ -548,7 +548,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
break;
case SID_FONTWORK_GALLERY_FLOATER:
- svx::FontworkBar::execute(*pView, rReq, GetViewFrame()->GetBindings());
+ svx::FontworkBar::execute(*pView, rReq, GetViewFrame().GetBindings());
rReq.Ignore();
break;
}
@@ -556,7 +556,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
{
- bool bOle = GetViewFrame()->GetFrame().IsInPlace();
+ bool bOle = GetViewFrame().GetFrame().IsInPlace();
bool bTabProt = GetViewData().GetDocument().IsTabProtected(GetViewData().GetTabNo());
ScDocShell* pDocShell = GetViewData().GetDocShell();
bool bShared = pDocShell && pDocShell->IsDocShared();
@@ -801,11 +801,11 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
if ( bLockPaint )
pDocSh->UnlockPaint();
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
}
break;
// default:
-// GetViewFrame()->ExecuteSlot( rReq );
+// GetViewFrame().ExecuteSlot( rReq );
}
}
@@ -863,7 +863,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
}
else
// get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
+ GetViewFrame().GetSlotState( nWhich, nullptr, &rSet );
break;
}
case SID_REDO:
@@ -888,12 +888,12 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
}
else
// get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
+ GetViewFrame().GetSlotState( nWhich, nullptr, &rSet );
break;
}
default:
// get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
+ GetViewFrame().GetSlotState( nWhich, nullptr, &rSet );
}
nWhich = aIter.NextWhich();
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 0a636c0b2f33..020cc048005c 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -92,8 +92,8 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialogController* pDialo
static_cast<ScNameDefDlg*>(pDialog)->GetNewData(maName, maScope);
static_cast<ScNameDefDlg*>(pDialog)->Close();
sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
@@ -103,8 +103,8 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialogController* pDialo
static_cast<ScNameDlg*>(pDialog)->GetRangeNames(m_RangeMap);
static_cast<ScNameDlg*>(pDialog)->Close();
sal_uInt16 nId = ScNameDefDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ SfxViewFrame& rViewFrm = GetViewFrame();
+ SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx
index 86a3c0e623ba..52d97d1a25a9 100644
--- a/sc/source/ui/view/tabvwshd.cxx
+++ b/sc/source/ui/view/tabvwshd.cxx
@@ -34,10 +34,10 @@ weld::Window* ScTabViewShell::GetDialogParent()
// (necessary when a slot is executed from the dialog's OK handler)
if (nCurRefDlgId && nCurRefDlgId == SC_MOD()->GetCurRefDlgId())
{
- SfxViewFrame* pViewFrm = GetViewFrame();
- if (pViewFrm->HasChildWindow(nCurRefDlgId))
+ SfxViewFrame& rViewFrm = GetViewFrame();
+ if (rViewFrm.HasChildWindow(nCurRefDlgId))
{
- SfxChildWindow* pChild = pViewFrm->GetChildWindow(nCurRefDlgId);
+ SfxChildWindow* pChild = rViewFrm.GetChildWindow(nCurRefDlgId);
if (pChild)
{
auto xController = pChild->GetController();
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index b3db07466984..7580ba7fe603 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -768,7 +768,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
bool bShowGrid = rViewData.GetShowGrid();
rViewData.SetShowGrid(!bShowGrid);
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = GetViewFrame().GetBindings();
rBindings.Invalidate( FID_TAB_TOGGLE_GRID );
ScDocShellModificator aModificator(*rViewData.GetDocShell());
aModificator.SetDocumentModified();
@@ -887,7 +887,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScDocShell* pDocSh = rViewData.GetDocShell();
uno::Reference<container::XNameReplace> xEvents( new ScSheetEventsObj( pDocSh, nCurrentTab ) );
- uno::Reference<frame::XFrame> xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = GetViewFrame().GetFrame().GetFrameInterface();
SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create();
ScopedVclPtr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
GetFrameWeld(), xFrame, false, xEvents, 0 ) );
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index ae68a5dfc725..61d62a8cccd8 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3129,13 +3129,13 @@ ScDocFunc& ScViewData::GetDocFunc() const
SfxBindings& ScViewData::GetBindings()
{
assert(pView && "GetBindings() without ViewShell");
- return pView->GetViewFrame()->GetBindings();
+ return pView->GetViewFrame().GetBindings();
}
SfxDispatcher& ScViewData::GetDispatcher()
{
assert(pView && "GetDispatcher() without ViewShell");
- return *pView->GetViewFrame()->GetDispatcher();
+ return *pView->GetViewFrame().GetDispatcher();
}
ScMarkData& ScViewData::GetMarkData()
@@ -3704,7 +3704,7 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
// + 1, because we have to put the view id in the sequence
beans::PropertyValue* pSettings = rSettings.getArray();
- sal_uInt16 nViewID(pView->GetViewFrame()->GetCurViewId());
+ sal_uInt16 nViewID(pView->GetViewFrame().GetCurViewId());
pSettings[SC_VIEW_ID].Name = SC_VIEWID;
pSettings[SC_VIEW_ID].Value <<= SC_VIEW + OUString::number(nViewID);
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 7607c8f71bfa..3de98a0aef31 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -319,7 +319,7 @@ void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont,
const ScTabViewShell& rShell)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxViewFrame& rFrame = *rShell.GetViewFrame();
+ SfxViewFrame& rFrame = rShell.GetViewFrame();
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
@@ -330,7 +330,7 @@ void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont,
bool ScViewUtil::IsFullScreen( const SfxViewShell& rViewShell )
{
- SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = rViewShell.GetViewFrame().GetBindings();
std::unique_ptr<SfxBoolItem> pItem;
bool bIsFullScreen = false;
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 36ead01c3fb4..6b74588b7ea9 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2107,8 +2107,8 @@ void SdTiledRenderingTest::testDisableUndoRepair()
{
std::unique_ptr<SfxPoolItem> pItem1;
std::unique_ptr<SfxPoolItem> pItem2;
- CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, pView1->GetViewFrame()->GetBindings().QueryState(SID_UNDO, pItem1));
- CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, pItem2));
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, pView1->GetViewFrame().GetBindings().QueryState(SID_UNDO, pItem1));
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, pView2->GetViewFrame().GetBindings().QueryState(SID_UNDO, pItem2));
}
// Insert a character in the first view.
@@ -2127,12 +2127,12 @@ void SdTiledRenderingTest::testDisableUndoRepair()
// Check
{
std::unique_ptr<SfxPoolItem> xItem1;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem1);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_UNDO, xItem1);
const auto* pUInt32Item1 = dynamic_cast<const SfxUInt32Item*>(xItem1.get());
CPPUNIT_ASSERT(!pUInt32Item1);
std::unique_ptr<SfxPoolItem> xItem2;
- pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem2);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_UNDO, xItem2);
const auto* pUInt32Item2 = dynamic_cast<const SfxUInt32Item*>(xItem2.get());
CPPUNIT_ASSERT(pUInt32Item2);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item2->GetValue());
@@ -2155,13 +2155,13 @@ void SdTiledRenderingTest::testDisableUndoRepair()
// Check
{
std::unique_ptr<SfxPoolItem> xItem1;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem1);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_UNDO, xItem1);
const SfxUInt32Item* pUInt32Item = dynamic_cast<const SfxUInt32Item*>(xItem1.get());
CPPUNIT_ASSERT(pUInt32Item);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item->GetValue());
std::unique_ptr<SfxPoolItem> xItem2;
- pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem2);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_UNDO, xItem2);
CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item* >(xItem2.get()));
}
}
@@ -2184,12 +2184,12 @@ void SdTiledRenderingTest::testDocumentRepair()
CPPUNIT_ASSERT(pView1 != pView2);
{
std::unique_ptr<SfxBoolItem> pItem1;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT_EQUAL(false, pItem1->GetValue());
std::unique_ptr<SfxBoolItem> pItem2;
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(false, pItem2->GetValue());
}
@@ -2210,12 +2210,12 @@ void SdTiledRenderingTest::testDocumentRepair()
{
std::unique_ptr<SfxBoolItem> pItem1;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT_EQUAL(true, pItem1->GetValue());
std::unique_ptr<SfxBoolItem> pItem2;
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(true, pItem2->GetValue());
}
@@ -2231,8 +2231,8 @@ void SdTiledRenderingTest::testLanguageStatus()
{
std::unique_ptr<SfxPoolItem> xItem1;
std::unique_ptr<SfxPoolItem> xItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, xItem2);
auto pStringItem = dynamic_cast<const SfxStringItem*>(xItem1.get());
CPPUNIT_ASSERT(pStringItem);
@@ -2455,7 +2455,7 @@ void SdTiledRenderingTest::testTdf115873()
SdXImpressDocument* pXImpressDocument = createDoc("tdf115873.fodp");
SfxViewShell* pViewShell = SfxViewShell::Current();
CPPUNIT_ASSERT(pViewShell);
- SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewShell->GetViewFrame().GetBindings();
auto xNavigator = std::make_unique<SdNavigatorWin>(nullptr, &rBindings, nullptr);
xNavigator->InitTreeLB(pXImpressDocument->GetDoc());
SdPageObjsTLV& rObjects = xNavigator->GetObjects();
@@ -2488,7 +2488,7 @@ void SdTiledRenderingTest::testTdf115873Group()
SdXImpressDocument* pXImpressDocument = createDoc("tdf115873-group.fodp");
SfxViewShell* pViewShell = SfxViewShell::Current();
CPPUNIT_ASSERT(pViewShell);
- SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewShell->GetViewFrame().GetBindings();
auto xNavigator = std::make_unique<SdNavigatorWin>(nullptr, &rBindings, nullptr);
xNavigator->InitTreeLB(pXImpressDocument->GetDoc());
SdPageObjsTLV& rObjects = xNavigator->GetObjects();
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 4237aa8af7af..a8ec35e21cb7 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -399,12 +399,10 @@ void DrawDocShell::ApplySlotFilter() const
while( pTestViewShell )
{
- if( pTestViewShell->GetObjectShell()
- == this
- && pTestViewShell->GetViewFrame()
- && pTestViewShell->GetViewFrame()->GetDispatcher() )
+ if( pTestViewShell->GetObjectShell() == this
+ && pTestViewShell->GetViewFrame().GetDispatcher() )
{
- SfxDispatcher* pDispatcher = pTestViewShell->GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = pTestViewShell->GetViewFrame().GetDispatcher();
if( !mpFilterSIDs.empty() )
pDispatcher->SetSlotFilter( mbFilterEnable ? SfxSlotFilterState::ENABLED : SfxSlotFilterState::DISABLED, mpFilterSIDs );
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 313edb6627ec..3ea7e37f1f93 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -174,7 +174,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource (
// Get the view frame.
SfxViewFrame* pFrame = nullptr;
if (mpBase != nullptr)
- pFrame = mpBase->GetViewFrame();
+ pFrame = &mpBase->GetViewFrame();
if (pFrame != nullptr && mpBase!=nullptr && pWindow!=nullptr)
{
@@ -483,7 +483,7 @@ void BasicViewFactory::ActivateCenterView (
// have to request a resize now.
rpDescriptor->mpViewShell->UIFeatureChanged();
if (mpBase->GetDocShell()->IsInPlaceActive())
- mpBase->GetViewFrame()->Resize(true);
+ mpBase->GetViewFrame().Resize(true);
mpBase->GetDrawController()->SetSubController(
rpDescriptor->mpViewShell->CreateSubController());
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index 8fc184c0578b..1eaf0f0aeeb2 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -50,19 +50,17 @@ ChildWindowPane::ChildWindowPane (
{
mrViewShellBase.GetViewShellManager()->ActivateShell(mpShell.get());
- SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame == nullptr)
- return;
+ SfxViewFrame& rViewFrame = mrViewShellBase.GetViewFrame();
if (mrViewShellBase.IsActive())
{
- if (pViewFrame->KnowsChildWindow(mnChildWindowId))
+ if (rViewFrame.KnowsChildWindow(mnChildWindowId))
{
- if (pViewFrame->HasChildWindow(mnChildWindowId))
+ if (rViewFrame.HasChildWindow(mnChildWindowId))
{
// The ViewShellBase has already been activated. Make
// the child window visible as soon as possible.
- pViewFrame->SetChildWindow(mnChildWindowId, true);
+ rViewFrame.SetChildWindow(mnChildWindowId, true);
}
else
{
@@ -82,7 +80,7 @@ ChildWindowPane::ChildWindowPane (
// The ViewShellBase has not yet been activated. Hide the
// window and wait a little before it is made visible. See
// comments in the GetWindow() method for an explanation.
- pViewFrame->SetChildWindow(mnChildWindowId, false);
+ rViewFrame.SetChildWindow(mnChildWindowId, false);
}
}
@@ -92,11 +90,10 @@ ChildWindowPane::~ChildWindowPane()
void ChildWindowPane::Hide()
{
- SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame != nullptr)
- if (pViewFrame->KnowsChildWindow(mnChildWindowId))
- if (pViewFrame->HasChildWindow(mnChildWindowId))
- pViewFrame->SetChildWindow(mnChildWindowId, false);
+ SfxViewFrame& rViewFrame = mrViewShellBase.GetViewFrame();
+ if (rViewFrame.KnowsChildWindow(mnChildWindowId))
+ if (rViewFrame.HasChildWindow(mnChildWindowId))
+ rViewFrame.SetChildWindow(mnChildWindowId, false);
// Release the window because when the child window is shown again it
// may use a different window.
@@ -137,25 +134,23 @@ vcl::Window* ChildWindowPane::GetWindow()
break;
mbHasBeenActivated = true;
- SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame == nullptr)
- break;
+ SfxViewFrame& rViewFrame = mrViewShellBase.GetViewFrame();
// The view frame has to know the child window. This can be the
// case, when for example the document is in read-only mode: the
// task pane is then not available.
- if ( ! pViewFrame->KnowsChildWindow(mnChildWindowId))
+ if ( ! rViewFrame.KnowsChildWindow(mnChildWindowId))
break;
- pViewFrame->SetChildWindow(mnChildWindowId, true);
- SfxChildWindow* pChildWindow = pViewFrame->GetChildWindow(mnChildWindowId);
+ rViewFrame.SetChildWindow(mnChildWindowId, true);
+ SfxChildWindow* pChildWindow = rViewFrame.GetChildWindow(mnChildWindowId);
if (pChildWindow == nullptr)
- if (pViewFrame->HasChildWindow(mnChildWindowId))
+ if (rViewFrame.HasChildWindow(mnChildWindowId))
{
// The child window is not yet visible. Ask the view frame
// to show it and try again to get access to the child
// window.
- pViewFrame->ShowChildWindow(mnChildWindowId);
- pChildWindow = pViewFrame->GetChildWindow(mnChildWindowId);
+ rViewFrame.ShowChildWindow(mnChildWindowId);
+ pChildWindow = rViewFrame.GetChildWindow(mnChildWindowId);
}
// When the child window is still not visible then we have to try later.
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index bb808be34ebb..563df318211c 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -321,11 +321,8 @@ void LayoutMenu::InsertPageWithLayout (AutoLayout aLayout)
if (pViewShell == nullptr)
return;
- SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
- if (pViewFrame == nullptr)
- return;
-
- SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
+ SfxViewFrame& rViewFrame = mrBase.GetViewFrame();
+ SfxDispatcher* pDispatcher = rViewFrame.GetDispatcher();
if (pDispatcher == nullptr)
return;
@@ -452,7 +449,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
continue;
// Call the SID_ASSIGN_LAYOUT slot with all the necessary parameters.
- SfxRequest aRequest (mrBase.GetViewFrame(), SID_ASSIGN_LAYOUT);
+ SfxRequest aRequest(&mrBase.GetViewFrame(), SID_ASSIGN_LAYOUT);
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATPAGE, (rpPage->GetPageNum()-1)/2));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
pMainViewShell->ExecuteSlot (aRequest, false);
@@ -465,7 +462,7 @@ SfxRequest LayoutMenu::CreateRequest (
sal_uInt16 nSlotId,
AutoLayout aLayout)
{
- SfxRequest aRequest (mrBase.GetViewFrame(), nSlotId);
+ SfxRequest aRequest(&mrBase.GetViewFrame(), nSlotId);
do
{
@@ -599,7 +596,7 @@ void LayoutMenu::ShowContextMenu(const Point* pPos)
// the document is read-only.
const SfxPoolItem* pItem = nullptr;
const SfxItemState aState (
- mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem));
+ mrBase.GetViewFrame().GetDispatcher()->QueryState(SID_INSERTPAGE, pItem));
if (aState == SfxItemState::DISABLED)
xMenu->set_sensitive("insert", false);
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 4dfc5f30bfc9..ac66cf362593 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -250,10 +250,10 @@ void MasterPagesSelector::ExecuteCommand(const OString &rIdent)
assert(pMasterPage); //rhbz#902884
if (pMasterPage)
xSelectedMaster.set(pMasterPage->getUnoPage(), uno::UNO_QUERY);
- SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
- if (pViewFrame != nullptr && xSelectedMaster.is())
+ SfxViewFrame& rViewFrame = mrBase.GetViewFrame();
+ if (xSelectedMaster.is())
{
- SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
+ SfxDispatcher* pDispatcher = rViewFrame.GetDispatcher();
if (pDispatcher != nullptr)
{
sal_uInt16 nIndex = mxPreviewValueSet->GetSelectedItemId();
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index b46d1b3d0b84..a9b53acf119d 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -46,7 +46,7 @@ SlideShowRestarter::SlideShowRestarter (
mpSlideShow(std::move(pSlideShow)),
mpViewShellBase(pViewShellBase),
mnDisplayCount(Application::GetScreenCount()),
- mpDispatcher(pViewShellBase->GetViewFrame()->GetDispatcher()),
+ mpDispatcher(pViewShellBase->GetViewFrame().GetDispatcher()),
mnCurrentSlideNumber(0)
{
}
@@ -136,7 +136,7 @@ void SlideShowRestarter::StartPresentation()
return;
if (mpDispatcher == nullptr && mpViewShellBase!=nullptr)
- mpDispatcher = mpViewShellBase->GetViewFrame()->GetDispatcher();
+ mpDispatcher = mpViewShellBase->GetViewFrame().GetDispatcher();
// Start the slide show on the saved current slide.
if (mpDispatcher != nullptr)
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index d3a26e41a872..14080fafbbc0 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -227,7 +227,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
rReq.Ignore();
SfxViewShell* pViewShell = GetViewShell();
OSL_ASSERT (pViewShell!=nullptr);
- SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewShell->GetViewFrame().GetBindings();
rBindings.Invalidate( SID_INSERT_TABLE, true );
break;
}
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 503b28fb2634..edd39c73110b 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -547,9 +547,7 @@ void ToolBarManager::Implementation::SetValid (bool bValid)
mbIsValid = bValid;
if (mbIsValid)
{
- Reference<frame::XFrame> xFrame;
- if (mrBase.GetViewFrame() != nullptr)
- xFrame = mrBase.GetViewFrame()->GetFrame().GetFrameInterface();
+ Reference<frame::XFrame> xFrame = mrBase.GetViewFrame().GetFrame().GetFrameInterface();
try
{
Reference<beans::XPropertySet> xFrameProperties (xFrame, UNO_QUERY_THROW);
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index a4af703afb38..64d0950c366c 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -233,7 +233,7 @@ ViewShellBase::ViewShellBase (
_rFrame.GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
// Set up the members in the correct order.
- if (auto pDrawDocShell = dynamic_cast< DrawDocShell *>( GetViewFrame()->GetObjectShell() ))
+ if (auto pDrawDocShell = dynamic_cast< DrawDocShell *>( GetViewFrame().GetObjectShell() ))
mpDocShell = pDrawDocShell;
if (mpDocShell != nullptr)
mpDocument = mpDocShell->GetDoc();
@@ -280,7 +280,7 @@ ViewShellBase::~ViewShellBase()
mpImpl->mpToolBarManager->Shutdown();
mpImpl->mpViewShellManager->Shutdown();
- EndListening(*GetViewFrame());
+ EndListening(GetViewFrame());
EndListening(*GetDocShell());
SetWindow(nullptr);
@@ -290,7 +290,7 @@ ViewShellBase::~ViewShellBase()
void ViewShellBase::LateInit (const OUString& rsDefaultView)
{
- StartListening(*GetViewFrame(), DuplicateHandling::Prevent);
+ StartListening(GetViewFrame(), DuplicateHandling::Prevent);
StartListening(*GetDocShell(), DuplicateHandling::Prevent);
mpImpl->LateInit();
InitializeFramework();
@@ -409,11 +409,8 @@ void ViewShellBase::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
case SfxEventHintId::OpenDoc:
if( GetDocument() && GetDocument()->IsStartWithPresentation() )
{
- if( GetViewFrame() )
- {
- GetViewFrame()->GetDispatcher()->Execute(
- SID_PRESENTATION, SfxCallMode::ASYNCHRON );
- }
+ GetViewFrame().GetDispatcher()->Execute(
+ SID_PRESENTATION, SfxCallMode::ASYNCHRON );
}
break;
@@ -428,7 +425,7 @@ void ViewShellBase::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
case SfxHintId::LanguageChanged:
{
- GetViewFrame()->GetBindings().Invalidate(SID_LANGUAGE_STATUS);
+ GetViewFrame().GetBindings().Invalidate(SID_LANGUAGE_STATUS);
}
break;
@@ -487,8 +484,6 @@ void ViewShellBase::OuterResizePixel (const Point& rOrigin, const Size &rSize)
void ViewShellBase::Rearrange()
{
- OSL_ASSERT(GetViewFrame()!=nullptr);
-
// There is a bug in the communication between embedded objects and the
// framework::LayoutManager that leads to missing resize updates. The
// following workaround enforces such an update by cycling the border to
@@ -503,7 +498,7 @@ void ViewShellBase::Rearrange()
SAL_WARN("sd.view", "Rearrange: window missing");
}
- GetViewFrame()->Resize(true);
+ GetViewFrame().Resize(true);
}
ErrCode ViewShellBase::DoVerb(sal_Int32 nVerb)
@@ -677,7 +672,7 @@ void ViewShellBase::GetState (SfxItemSet& rSet)
{
mpImpl->GetSlotState(rSet);
- FuBullet::GetSlotState( rSet, nullptr, GetViewFrame() );
+ FuBullet::GetSlotState( rSet, nullptr, &GetViewFrame() );
}
void ViewShellBase::WriteUserDataSequence (
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index fb4598e048c0..fc617fa2d6a2 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -262,7 +262,7 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest const & rRequest, Page
else
aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ SfxRequest aRequest(&mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout));
aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 81f71b12638e..d612d7560d32 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -147,8 +147,8 @@ vcl::Window* ViewTabBar::GetAnchorWindow(
&& rxViewTabBarId->isBoundToURL(
FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT))
{
- if (pBase != nullptr && pBase->GetViewFrame() != nullptr)
- pWindow = &pBase->GetViewFrame()->GetWindow();
+ if (pBase != nullptr)
+ pWindow = &pBase->GetViewFrame().GetWindow();
}
// The rest is (at the moment) just for the emergency case.
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index ed0e84516849..a889ecc6937d 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -531,7 +531,7 @@ VclPtr<SvxRuler> DrawViewShell::CreateHRuler (::sd::Window* pWin)
sal_uInt16 nMetric = static_cast<sal_uInt16>(GetDoc()->GetUIUnit());
if( nMetric == 0xffff )
- nMetric = static_cast<sal_uInt16>(GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit());
+ nMetric = static_cast<sal_uInt16>(GetViewShellBase().GetViewFrame().GetDispatcher()->GetModule()->GetFieldUnit());
pRuler->SetUnit( FieldUnit( nMetric ) );
@@ -562,7 +562,7 @@ VclPtr<SvxRuler> DrawViewShell::CreateVRuler(::sd::Window* pWin)
sal_uInt16 nMetric = static_cast<sal_uInt16>(GetDoc()->GetUIUnit());
if( nMetric == 0xffff )
- nMetric = static_cast<sal_uInt16>(GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit());
+ nMetric = static_cast<sal_uInt16>(GetViewShellBase().GetViewFrame().GetDispatcher()->GetModule()->GetFieldUnit());
pRuler->SetUnit( FieldUnit( nMetric ) );
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index abb9b5f1db7a..fd4d2649b4fd 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -493,7 +493,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
// handed over undo group to undo manager
if (pViewShell)
{
- pViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager()->AddUndoAction(std::move(pUndoGroup));
+ pViewShell->GetViewFrame().GetObjectShell()->GetUndoManager()->AddUndoAction(std::move(pUndoGroup));
}
// calculate View-Sizes
@@ -529,9 +529,9 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
if(nullptr != pViewShell)
{
- pViewShell->GetViewFrame()->GetBindings().Invalidate(SID_RULER_NULL_OFFSET);
+ pViewShell->GetViewFrame().GetBindings().Invalidate(SID_RULER_NULL_OFFSET);
// zoom onto (new) page size
- pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
+ pViewShell->GetViewFrame().GetDispatcher()->Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
}
Broadcast(ViewShellHint(ViewShellHint::HINT_PAGE_RESIZE_END));
@@ -668,7 +668,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, sal_Int32 nVerb)
// call dialog "insert OLE object"
GetDocSh()->SetWaitCursor( false );
- pViewShell->GetViewFrame()->GetDispatcher()->Execute(
+ pViewShell->GetViewFrame().GetDispatcher()->Execute(
SID_INSERT_OBJECT,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
xObj = pObj->GetObjRef();
@@ -771,7 +771,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, sal_Int32 nVerb)
}
pSdClient->DoVerb(nVerb); // if necessary, ErrCode is outputted by Sfx
- pViewShell->GetViewFrame()->GetBindings().Invalidate(
+ pViewShell->GetViewFrame().GetBindings().Invalidate(
SID_NAVIGATOR_STATE, true);
}
@@ -798,7 +798,7 @@ const ::tools::Rectangle& ViewShell::GetAllWindowRect()
void ViewShell::ReadUserData()
{
// zoom onto VisArea from FrameView
- GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_SIZE_VISAREA,
+ GetViewShell()->GetViewFrame().GetDispatcher()->Execute(SID_SIZE_VISAREA,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
}
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index a3cbfe8d896d..8a7d6f482c82 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -120,7 +120,7 @@ SfxViewFrame* ViewShell::GetViewFrame() const
const SfxViewShell* pViewShell = GetViewShell();
if (pViewShell != nullptr)
{
- return pViewShell->GetViewFrame();
+ return &pViewShell->GetViewFrame();
}
else
{
@@ -312,7 +312,7 @@ void ViewShell::Activate(bool bIsMDIActivate)
SfxViewShell* pViewShell = GetViewShell();
OSL_ASSERT (pViewShell!=nullptr);
- SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBindings = pViewShell->GetViewFrame().GetBindings();
rBindings.Invalidate( SID_3D_STATE, true );
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 4401fe396911..3dd2383c1074 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -1108,7 +1108,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
if ( pShell->GetController() == xController )
{
- pCntrFrame = &pShell->GetViewFrame()->GetFrame();
+ pCntrFrame = &pShell->GetViewFrame().GetFrame();
break;
}
}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7b1b387e0f65..83bc6daa210e 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -806,7 +806,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
// in LOK case we want to apply changes only to the current view
if (comphelper::LibreOfficeKit::isActive() &&
- pViewFrame != SfxViewShell::Current()->GetViewFrame())
+ pViewFrame != &SfxViewShell::Current()->GetViewFrame())
{
pViewFrame = SfxViewFrame::GetNext( *pViewFrame );
continue;
@@ -1051,9 +1051,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW:
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
auto nID = rReq.GetSlot();
- pViewFrame->ToggleChildWindow(nID);
+ rViewFrame.ToggleChildWindow(nID);
bDone = true;
break;
@@ -1061,11 +1061,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_INSPECT_SELECTED_OBJECT:
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
- pViewFrame->ShowChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW, true);
+ rViewFrame.ShowChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW, true);
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW);
+ SfxChildWindow* pChild = rViewFrame.GetChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW);
if (!pChild)
return;
@@ -1280,10 +1280,10 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
auto* pViewShell = SfxViewShell::Current();
if (pViewShell)
{
- auto* pViewFrame = pViewShell->GetViewFrame();
- if (pViewFrame && pViewFrame->KnowsChildWindow(nWhich))
+ auto& rViewFrame = pViewShell->GetViewFrame();
+ if (rViewFrame.KnowsChildWindow(nWhich))
{
- rSet.Put(SfxBoolItem(nWhich, pViewFrame->HasChildWindow(nWhich)));
+ rSet.Put(SfxBoolItem(nWhich, rViewFrame.HasChildWindow(nWhich)));
bSuccess = true;
}
}
@@ -1298,8 +1298,8 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
auto* pViewShell = SfxViewShell::Current();
if (pViewShell)
{
- auto* pViewFrame = pViewShell->GetViewFrame();
- if (pViewFrame && pViewFrame->KnowsChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW))
+ auto& rViewFrame = pViewShell->GetViewFrame();
+ if (rViewFrame.KnowsChildWindow(SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW))
{
bSuccess = true;
}
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index ab3f7e86933c..cf1e8092371b 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -136,7 +136,7 @@ SfxViewFrame* SfxShell::GetFrame() const
if ( pImpl->pFrame )
return pImpl->pFrame;
if ( pImpl->pViewSh )
- return pImpl->pViewSh->GetViewFrame();
+ return &pImpl->pViewSh->GetViewFrame();
return nullptr;
}
@@ -246,7 +246,7 @@ void SfxShell::Invalidate
return;
}
- Invalidate_Impl( GetViewShell()->GetViewFrame()->GetBindings(), nId );
+ Invalidate_Impl( GetViewShell()->GetViewFrame().GetBindings(), nId );
}
void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId )
@@ -548,7 +548,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
// the Slots
{
SfxBindings *pBindings =
- pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
+ pViewSh->GetViewFrame().GetDispatcher()->GetBindings();
sal_uInt16 nCount = pImpl->aSlotArr.size();
for (sal_uInt16 n1=0; n1<nCount ; n1++)
{
@@ -597,7 +597,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
// The status of SID_OBJECT is collected in the controller directly on
// the Shell, it is thus enough to encourage a new status update
- SfxBindings* pBindings = pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
+ SfxBindings* pBindings = pViewSh->GetViewFrame().GetDispatcher()->GetBindings();
pBindings->Invalidate(SID_OBJECT, true, true);
}
@@ -656,7 +656,7 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
SfxObjectShell* SfxShell::GetObjectShell()
{
if ( GetViewShell() )
- return GetViewShell()->GetViewFrame()->GetObjectShell();
+ return GetViewShell()->GetViewFrame().GetObjectShell();
else
return nullptr;
}
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 80e8c896fe21..3b33ef7dd781 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -578,7 +578,7 @@ void SfxNotebookBar::ReloadNotebookBar(std::u16string_view sUIPath)
if (SfxNotebookBar::IsActive())
{
SfxViewShell* pViewShell = SfxViewShell::Current();
- sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), sUIPath, true);
+ sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame().GetBindings(), sUIPath, true);
}
}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index fd52355f3ed5..e83d786e543f 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -218,7 +218,7 @@ uno::Reference < frame::XFrame > const & SfxInPlaceClient_Impl::GetFrame() const
{
if ( !m_pClient )
throw uno::RuntimeException();
- return m_pClient->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
+ return m_pClient->GetViewShell()->GetViewFrame().GetFrame().GetFrameInterface();
}
void SAL_CALL SfxInPlaceClient_Impl::saveObject()
@@ -725,7 +725,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
}
}
- if ( m_pViewSh->GetViewFrame()->GetFrame().IsClosing_Impl() )
+ if ( m_pViewSh->GetViewFrame().GetFrame().IsClosing_Impl() )
// sometimes applications reconnect clients on shutting down because it happens in their Paint methods
return;
@@ -963,7 +963,7 @@ ErrCode SfxInPlaceClient::DoVerb(sal_Int32 nVerb)
{
pEditWin->EnableMapMode();
}
- m_pViewSh->GetViewFrame()->GetFrame().LockResize_Impl(true);
+ m_pViewSh->GetViewFrame().GetFrame().LockResize_Impl(true);
try
{
m_xImp->m_xObject->setClientSite( m_xImp );
@@ -1017,9 +1017,9 @@ ErrCode SfxInPlaceClient::DoVerb(sal_Int32 nVerb)
{
pEditWin->EnableMapMode(false);
}
- SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- pFrame->GetFrame().LockResize_Impl(false);
- pFrame->GetFrame().Resize();
+ SfxViewFrame& rFrame = m_pViewSh->GetViewFrame();
+ rFrame.GetFrame().LockResize_Impl(false);
+ rFrame.GetFrame().Resize();
}
}
}
@@ -1079,7 +1079,7 @@ void SfxInPlaceClient::DeactivateObject()
}
}
- m_pViewSh->GetViewFrame()->GetFrame().LockResize_Impl(true);
+ m_pViewSh->GetViewFrame().GetFrame().LockResize_Impl(true);
if ( m_xImp->m_xObject->getStatus( m_xImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1097,10 +1097,10 @@ void SfxInPlaceClient::DeactivateObject()
m_xImp->m_xObject->changeState( embed::EmbedStates::RUNNING );
}
- SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- SfxViewFrame::SetViewFrame( pFrame );
- pFrame->GetFrame().LockResize_Impl(false);
- pFrame->GetFrame().Resize();
+ SfxViewFrame& rFrame = m_pViewSh->GetViewFrame();
+ SfxViewFrame::SetViewFrame( &rFrame );
+ rFrame.GetFrame().LockResize_Impl(false);
+ rFrame.GetFrame().Resize();
}
catch (css::uno::Exception& )
{}
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 29f64adbb74b..c0cd925741f7 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -80,16 +80,13 @@ bool g_isDefaultTimezoneSet = false;
OUString g_DefaultTimezone;
}
-int SfxLokHelper::createView(SfxViewFrame* pViewFrame, ViewShellDocId docId)
+int SfxLokHelper::createView(SfxViewFrame& rViewFrame, ViewShellDocId docId)
{
assert(docId >= ViewShellDocId(0) && "Cannot createView for invalid (negative) DocId.");
- if (pViewFrame == nullptr)
- return -1;
-
SfxViewShell::SetCurrentDocId(docId);
- SfxRequest aRequest(pViewFrame, SID_NEWWINDOW);
- pViewFrame->ExecView_Impl(aRequest);
+ SfxRequest aRequest(&rViewFrame, SID_NEWWINDOW);
+ rViewFrame.ExecView_Impl(aRequest);
SfxViewShell* pViewShell = SfxViewShell::Current();
if (pViewShell == nullptr)
return -1;
@@ -147,9 +144,9 @@ void SfxLokHelper::destroyView(int nId)
{
if (pViewShell->GetViewShellId() == nViewShellId)
{
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- SfxRequest aRequest(pViewFrame, SID_CLOSEWIN);
- pViewFrame->Exec_Impl(aRequest);
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ SfxRequest aRequest(&rViewFrame, SID_CLOSEWIN);
+ rViewFrame.Exec_Impl(aRequest);
break;
}
}
@@ -177,11 +174,11 @@ void SfxLokHelper::setView(int nId)
if (pViewShell == SfxViewShell::Current())
return;
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- pViewFrame->MakeActive_Impl(false);
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ rViewFrame.MakeActive_Impl(false);
// Make comphelper::dispatchCommand() find the correct frame.
- uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = rViewFrame.GetFrame().GetFrameInterface();
uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(comphelper::getProcessComponentContext());
xDesktop->setActiveFrame(xFrame);
return;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 03b4ab4e4faf..199a46d9b695 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -401,11 +401,11 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const frame::F
if ( aEvent.Action == frame::FrameAction_FRAME_UI_ACTIVATED )
{
if ( !m_pController->GetViewShell_Impl()->GetUIActiveIPClient_Impl() )
- m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( false );
+ m_pController->GetViewShell_Impl()->GetViewFrame().MakeActive_Impl( false );
}
else if ( aEvent.Action == frame::FrameAction_CONTEXT_CHANGED )
{
- m_pController->GetViewShell_Impl()->GetViewFrame()->GetBindings().ContextChanged_Impl();
+ m_pController->GetViewShell_Impl()->GetViewFrame().GetBindings().ContextChanged_Impl();
}
}
}
@@ -718,12 +718,12 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
if (!m_pData->m_bDisposing && m_pData->m_pViewShell)
{
- SfxViewFrame* pAct = m_pData->m_pViewShell->GetViewFrame() ;
+ SfxViewFrame& rAct = m_pData->m_pViewShell->GetViewFrame() ;
if ( sTargetFrameName == "_beamer" )
{
if ( eSearchFlags & frame::FrameSearchFlag::CREATE )
- pAct->SetChildWindow( SID_BROWSER, true );
- if (SfxChildWindow* pChildWin = pAct->GetChildWindow(SID_BROWSER))
+ rAct.SetChildWindow( SID_BROWSER, true );
+ if (SfxChildWindow* pChildWin = rAct.GetChildWindow(SID_BROWSER))
{
if (Reference<frame::XFrame> xFrame{ pChildWin->GetFrame() })
{
@@ -740,8 +740,8 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
bool bMasterCommand(!aActCommand.isEmpty());
if (!bMasterCommand)
aActCommand = aURL.Path;
- const SfxSlot* pSlot = SfxSlotPool::GetSlotPool(pAct).GetUnoSlot(aActCommand);
- return GetSlotDispatchWithFallback(pAct, aURL, aActCommand, bMasterCommand, pSlot);
+ const SfxSlot* pSlot = SfxSlotPool::GetSlotPool(&rAct).GetUnoSlot(aActCommand);
+ return GetSlotDispatchWithFallback(&rAct, aURL, aActCommand, bMasterCommand, pSlot);
}
else if ( aURL.Protocol == "slot:" )
{
@@ -751,11 +751,11 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
{
const SfxSlot* pSlot = m_pData->m_pViewShell->GetVerbSlot_Impl(nId);
if ( pSlot )
- return pAct->GetBindings().GetDispatch( pSlot, aURL, false );
+ return rAct.GetBindings().GetDispatch( pSlot, aURL, false );
}
- const SfxSlot* pSlot = SfxSlotPool::GetSlotPool(pAct).GetSlot(nId);
- return GetSlotDispatchWithFallback(pAct, aURL, aURL.Path, false, pSlot);
+ const SfxSlot* pSlot = SfxSlotPool::GetSlotPool(&rAct).GetSlot(nId);
+ return GetSlotDispatchWithFallback(&rAct, aURL, aURL.Path, false, pSlot);
}
else if( sTargetFrameName == "_self" || sTargetFrameName.isEmpty() )
{
@@ -763,10 +763,10 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
Reference< frame::XModel > xModel = getModel();
if( xModel.is() && !aURL.Mark.isEmpty() )
{
- SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct );
+ SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( &rAct );
const SfxSlot* pSlot = rSlotPool.GetSlot( SID_JUMPTOMARK );
if( !aURL.Main.isEmpty() && aURL.Main == xModel->getURL() && pSlot )
- return Reference< frame::XDispatch >( new SfxOfficeDispatch( pAct->GetBindings(), pAct->GetDispatcher(), pSlot, aURL) );
+ return Reference< frame::XDispatch >( new SfxOfficeDispatch( rAct.GetBindings(), rAct.GetDispatcher(), pSlot, aURL) );
}
}
}
@@ -882,23 +882,20 @@ void SAL_CALL SfxBaseController::dispose()
if ( !m_pData->m_pViewShell )
return;
- SfxViewFrame* pFrame = m_pData->m_pViewShell->GetViewFrame() ;
- if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell )
- pFrame->GetFrame().SetIsClosing_Impl();
+ SfxViewFrame& rFrame = m_pData->m_pViewShell->GetViewFrame() ;
+ if (rFrame.GetViewShell() == m_pData->m_pViewShell )
+ rFrame.GetFrame().SetIsClosing_Impl();
m_pData->m_pViewShell->DisconnectAllClients();
- if ( !pFrame )
- return;
-
lang::EventObject aObject;
aObject.Source = *this ;
- SfxObjectShell* pDoc = pFrame->GetObjectShell() ;
+ SfxObjectShell* pDoc = rFrame.GetObjectShell() ;
SfxViewFrame *pView = SfxViewFrame::GetFirst(pDoc);
while( pView )
{
// if there is another ViewFrame or currently the ViewShell in my ViewFrame is switched (PagePreview)
- if ( pView != pFrame || pView->GetViewShell() != m_pData->m_pViewShell )
+ if ( pView != &rFrame || pView->GetViewShell() != m_pData->m_pViewShell )
break;
pView = SfxViewFrame::GetNext( *pView, pDoc );
}
@@ -922,13 +919,13 @@ void SAL_CALL SfxBaseController::dispose()
m_pData->m_xListener->disposing( aObject );
SfxViewShell *pShell = m_pData->m_pViewShell;
m_pData->m_pViewShell = nullptr;
- if ( pFrame->GetViewShell() == pShell )
+ if (rFrame.GetViewShell() == pShell)
{
// Enter registrations only allowed if we are the owner!
- if ( pFrame->GetFrame().OwnsBindings_Impl() )
- pFrame->GetBindings().ENTERREGISTRATIONS();
- pFrame->GetFrame().SetFrameInterface_Impl( aXFrame );
- pFrame->GetFrame().DoClose_Impl();
+ if ( rFrame.GetFrame().OwnsBindings_Impl() )
+ rFrame.GetBindings().ENTERREGISTRATIONS();
+ rFrame.GetFrame().SetFrameInterface_Impl( aXFrame );
+ rFrame.GetFrame().DoClose_Impl();
}
}
@@ -992,7 +989,7 @@ Reference< task::XStatusIndicator > SAL_CALL SfxBaseController::getStatusIndicat
{
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell && !m_pData->m_xIndicator.is() )
- m_pData->m_xIndicator = new SfxStatusIndicator( this, m_pData->m_pViewShell->GetViewFrame()->GetFrame().GetWorkWindow_Impl() );
+ m_pData->m_xIndicator = new SfxStatusIndicator( this, m_pData->m_pViewShell->GetViewFrame().GetFrame().GetWorkWindow_Impl() );
return m_pData->m_xIndicator;
}
@@ -1144,8 +1141,8 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
&& ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
)
{
- SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame();
- if ( !pViewFrm->GetFrame().IsInPlace() )
+ SfxViewFrame& rViewFrm = m_pData->m_pViewShell->GetViewFrame();
+ if ( !rViewFrm.GetFrame().IsInPlace() )
{
// for outplace embedded objects, we want the layout manager to keep the content window
// size constant, if possible
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a3b3e551a9db..246c20707b8d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2255,7 +2255,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
}
if ( pSuccessView )
- return pSuccessView->GetViewFrame();
+ return &pSuccessView->GetViewFrame();
if ( bOwnFrame )
{
@@ -3049,8 +3049,8 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
{
if ( pViewShell->GetName() == "BasicIDE" )
{
- SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- SfxDispatcher* pDispat = pViewFrame ? pViewFrame->GetDispatcher() : nullptr;
+ SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
+ SfxDispatcher* pDispat = rViewFrame.GetDispatcher();
if ( pDispat )
{
SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLibName, aModuleName, OUString(), OUString() );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 9476dd22edec..9229d541b183 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -358,7 +358,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState )
case view::PrintableState_JOB_SPOOLED :
case view::PrintableState_JOB_COMPLETED :
{
- SfxBindings& rBind = mpViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = mpViewShell->GetViewFrame().GetBindings();
rBind.Invalidate( SID_PRINTDOC );
rBind.Invalidate( SID_PRINTDOCDIRECT );
rBind.Invalidate( SID_SETUPPRINTER );
@@ -655,7 +655,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// no help button in dialogs if called from the help window
// (pressing help button would exchange the current page inside the help
// document that is going to be printed!)
- SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium();
+ SfxMedium* pMedium = GetViewFrame().GetObjectShell()->GetMedium();
std::shared_ptr<const SfxFilter> pFilter = pMedium ? pMedium->GetFilter() : nullptr;
bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == "writer_web_HTML_help" );
@@ -874,7 +874,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if (pPrinter->GetName() != pDlgPrinter->GetName())
{
// user has changed the printer -> macro recording
- SfxRequest aReq(GetViewFrame(), SID_PRINTER_NAME);
+ SfxRequest aReq(&GetViewFrame(), SID_PRINTER_NAME);
aReq.AppendItem(SfxStringItem(SID_PRINTER_NAME, pDlgPrinter->GetName()));
aReq.Done();
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 535784ea6300..09e4b4a32284 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -161,7 +161,7 @@ void SfxClipboardChangeListener::ChangedContents()
if (!m_pViewShell)
return;
- SfxBindings& rBind = m_pViewShell->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = m_pViewShell->GetViewFrame().GetBindings();
rBind.Invalidate(SID_PASTE);
rBind.Invalidate(SID_PASTE_SPECIAL);
rBind.Invalidate(SID_CLIPBOARD_FORMAT_ITEMS);
@@ -387,7 +387,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
case SID_ACTIVATE_STYLE_APPLY:
{
uno::Reference< frame::XFrame > xFrame =
- GetViewFrame()->GetFrame().GetFrameInterface();
+ GetViewFrame().GetFrame().GetFrameInterface();
Reference< beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
Reference< frame::XLayoutManager > xLayoutManager;
@@ -448,7 +448,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
SfxObjectShell* pDoc = GetObjectShell();
if ( pDoc && pDoc->QueryHiddenInformation(
- HiddenWarningFact::WhenSaving, GetViewFrame()->GetFrameWeld() ) != RET_YES )
+ HiddenWarningFact::WhenSaving, GetViewFrame().GetFrameWeld() ) != RET_YES )
break;
@@ -469,7 +469,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ uno::Reference < frame::XFrame > xFrame( rFrame.GetFrame().GetFrameInterface() );
SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR;
if ( nId == SID_MAIL_SENDDOC )
@@ -508,9 +508,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxBluetoothModel aModel;
SfxObjectShell* pDoc = GetObjectShell();
if ( pDoc && pDoc->QueryHiddenInformation(
- HiddenWarningFact::WhenSaving, GetViewFrame()->GetFrameWeld() ) != RET_YES )
+ HiddenWarningFact::WhenSaving, GetViewFrame().GetFrameWeld() ) != RET_YES )
break;
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ uno::Reference < frame::XFrame > xFrame( rFrame.GetFrame().GetFrameInterface() );
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame );
if( eResult == SfxMailModel::SEND_MAIL_ERROR )
{
@@ -531,7 +531,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
css::uno::Reference< lang::XMultiServiceFactory > xSMGR(::comphelper::getProcessServiceFactory(), css::uno::UNO_SET_THROW);
css::uno::Reference< uno::XComponentContext > xContext(::comphelper::getProcessComponentContext(), css::uno::UNO_SET_THROW);
- css::uno::Reference< css::frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ css::uno::Reference< css::frame::XFrame > xFrame( rFrame.GetFrame().GetFrameInterface() );
css::uno::Reference< css::frame::XModel > xModel;
css::uno::Reference< css::frame::XModuleManager2 > xModuleManager( css::frame::ModuleManager::create(xContext) );
@@ -657,7 +657,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
{
SfxWhichIter aIter( rSet );
- SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
+ SfxObjectShell *pSh = GetViewFrame().GetObjectShell();
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
@@ -707,7 +707,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
aPrinterName = Printer::GetDefaultPrinterName();
if ( !aPrinterName.isEmpty() )
{
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ uno::Reference < frame::XFrame > xFrame( rFrame.GetFrame().GetFrameInterface() );
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:PrintDefault",
vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
@@ -759,26 +759,24 @@ void SfxViewShell::OutplaceActivated( bool bActive )
void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
{
- uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
+ uno::Reference < frame::XFrame > xOwnFrame( rFrame.GetFrame().GetFrameInterface() );
uno::Reference < frame::XFramesSupplier > xParentFrame = xOwnFrame->getCreator();
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
- pFrame->GetBindings().HidePopups();
- pFrame->GetDispatcher()->Update_Impl( true );
+ rFrame.GetBindings().HidePopups();
+ rFrame.GetDispatcher()->Update_Impl( true );
}
-
void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ )
{
- if ( !pFrame->GetFrame().IsClosing_Impl() || SfxViewFrame::Current() != pFrame )
- pFrame->GetDispatcher()->Update_Impl( true );
- pFrame->GetBindings().HidePopups(false);
+ if ( !rFrame.GetFrame().IsClosing_Impl() || SfxViewFrame::Current() != &rFrame )
+ rFrame.GetDispatcher()->Update_Impl( true );
+ rFrame.GetBindings().HidePopups(false);
- pFrame->GetBindings().InvalidateAll(true);
+ rFrame.GetBindings().InvalidateAll(true);
}
-
SfxInPlaceClient* SfxViewShell::FindIPClient
(
const uno::Reference < embed::XEmbeddedObject >& xObj,
@@ -845,7 +843,7 @@ void SfxViewShell::Activate( bool bMDI )
{
if ( bMDI )
{
- SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
+ SfxObjectShell *pSh = GetViewFrame().GetObjectShell();
if (const auto xModel = pSh->GetModel())
xModel->setCurrentController(GetController());
@@ -978,24 +976,18 @@ void SfxViewShell::InnerResizePixel
SetBorderPixel( SvBorder() );
}
-
void SfxViewShell::InvalidateBorder()
{
- DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
-
- GetViewFrame()->InvalidateBorderImpl( this );
+ GetViewFrame().InvalidateBorderImpl( this );
if (pImpl->m_pController.is())
{
pImpl->m_pController->BorderWidthsChanged_Impl();
}
}
-
void SfxViewShell::SetBorderPixel( const SvBorder &rBorder )
{
- DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
-
- GetViewFrame()->SetBorderPixelImpl( this, rBorder );
+ GetViewFrame().SetBorderPixelImpl( this, rBorder );
// notify related controller that border size is changed
if (pImpl->m_pController.is())
@@ -1004,15 +996,11 @@ void SfxViewShell::SetBorderPixel( const SvBorder &rBorder )
}
}
-
const SvBorder& SfxViewShell::GetBorderPixel() const
{
- DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
-
- return GetViewFrame()->GetBorderPixelImpl();
+ return GetViewFrame().GetBorderPixelImpl();
}
-
void SfxViewShell::SetWindow
(
vcl::Window* pViewPort // For example Null pointer in the Destructor.
@@ -1061,7 +1049,7 @@ SfxViewShell::SfxViewShell
: SfxShell(this)
, pImpl( new SfxViewShell_Impl(nFlags, SfxViewShell::mnCurrentDocId) )
-, pFrame(&rViewFrame)
+, rFrame(rViewFrame)
, pWindow(nullptr)
, bNoNewWindow( nFlags & SfxViewShellFlags::NO_NEWWINDOW )
, mbPrinterSettingsModified(false)
@@ -1095,7 +1083,6 @@ SfxViewShell::SfxViewShell
}
}
-
SfxViewShell::~SfxViewShell()
{
// Remove from list
@@ -1116,7 +1103,7 @@ SfxViewShell::~SfxViewShell()
pImpl->m_pController.clear();
}
- vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow();
+ vcl::Window* pFrameWin = GetViewFrame().GetWindow().GetFrameWindow();
if (pFrameWin && pFrameWin->GetLOKNotifier() == this)
pFrameWin->ReleaseLOKNotifier();
}
@@ -1126,15 +1113,15 @@ bool SfxViewShell::PrepareClose
bool bUI // TRUE: Allow Dialog and so on, FALSE: silent-mode
)
{
- if (GetViewFrame()->GetWindow().GetLOKNotifier() == this)
- GetViewFrame()->GetWindow().ReleaseLOKNotifier();
+ if (GetViewFrame().GetWindow().GetLOKNotifier() == this)
+ GetViewFrame().GetWindow().ReleaseLOKNotifier();
SfxPrinter *pPrinter = GetPrinter();
if ( pPrinter && pPrinter->IsPrinting() )
{
if ( bUI )
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame()->GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame().GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
SfxResId(STR_CANT_CLOSE)));
xBox->run();
@@ -1143,10 +1130,10 @@ bool SfxViewShell::PrepareClose
return false;
}
- if( GetViewFrame()->IsInModalMode() )
+ if( GetViewFrame().IsInModalMode() )
return false;
- if( bUI && GetViewFrame()->GetDispatcher()->IsLocked() )
+ if( bUI && GetViewFrame().GetDispatcher()->IsLocked() )
return false;
return true;
@@ -1238,7 +1225,7 @@ bool SfxViewShell::HasSelection( bool ) const
void SfxViewShell::AddSubShell( SfxShell& rShell )
{
pImpl->aArr.push_back(&rShell);
- SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ SfxDispatcher *pDisp = rFrame.GetDispatcher();
if ( pDisp->IsActive(*this) )
{
pDisp->Push(rShell);
@@ -1248,7 +1235,7 @@ void SfxViewShell::AddSubShell( SfxShell& rShell )
void SfxViewShell::RemoveSubShell( SfxShell* pShell )
{
- SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ SfxDispatcher *pDisp = rFrame.GetDispatcher();
if ( !pShell )
{
size_t nCount = pImpl->aArr.size();
@@ -1285,7 +1272,7 @@ SfxShell* SfxViewShell::GetSubShell( sal_uInt16 nNo )
void SfxViewShell::PushSubShells_Impl( bool bPush )
{
- SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ SfxDispatcher *pDisp = rFrame.GetDispatcher();
if ( bPush )
{
for (auto const& elem : pImpl->aArr)
@@ -1340,8 +1327,8 @@ SfxViewShell* SfxViewShell::GetFirst
// a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps
// That doesn't seem to be needed anymore, but keep an assert, just in case.
assert(std::find(SfxGetpApp()->GetViewFrames_Impl().begin(), SfxGetpApp()->GetViewFrames_Impl().end(),
- pShell->GetViewFrame()) != SfxGetpApp()->GetViewFrames_Impl().end());
- if ( ( !bOnlyVisible || pShell->GetViewFrame()->IsVisible() ) && (!isViewShell || isViewShell(pShell)))
+ &pShell->GetViewFrame()) != SfxGetpApp()->GetViewFrames_Impl().end());
+ if ( ( !bOnlyVisible || pShell->GetViewFrame().IsVisible() ) && (!isViewShell || isViewShell(pShell)))
return pShell;
}
}
@@ -1349,9 +1336,7 @@ SfxViewShell* SfxViewShell::GetFirst
return nullptr;
}
-
// returns the next shell of spec. type viewing the specified doc.
-
SfxViewShell* SfxViewShell::GetNext
(
const SfxViewShell& rPrev,
@@ -1371,8 +1356,8 @@ SfxViewShell* SfxViewShell::GetNext
if ( pShell )
{
assert(std::find(SfxGetpApp()->GetViewFrames_Impl().begin(), SfxGetpApp()->GetViewFrames_Impl().end(),
- pShell->GetViewFrame()) != SfxGetpApp()->GetViewFrames_Impl().end());
- if ( ( !bOnlyVisible || pShell->GetViewFrame()->IsVisible() ) && (!isViewShell || isViewShell(pShell)) )
+ &pShell->GetViewFrame()) != SfxGetpApp()->GetViewFrames_Impl().end());
+ if ( ( !bOnlyVisible || pShell->GetViewFrame().IsVisible() ) && (!isViewShell || isViewShell(pShell)) )
return pShell;
}
}
@@ -1395,7 +1380,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
auto &rFrames = SfxGetpApp()->GetViewFrames_Impl();
for (SfxViewFrame* frame : rFrames)
{
- if ( frame == GetViewFrame() && &rBC == GetObjectShell() )
+ if ( frame == &GetViewFrame() && &rBC == GetObjectShell() )
{
SfxItemSet* pSet = GetObjectShell()->GetMedium()->GetItemSet();
const SfxUnoAnyItem* pItem = SfxItemSet::GetItem<SfxUnoAnyItem>(pSet, SID_VIEW_DATA, false);
@@ -1415,7 +1400,7 @@ bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
{
pImpl->m_xAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper();
pImpl->m_xAccExec->init(::comphelper::getProcessComponentContext(),
- pFrame->GetFrame().GetFrameInterface());
+ rFrame.GetFrame().GetFrameInterface());
}
return pImpl->m_xAccExec->execute(aKey.GetKeyCode());
@@ -1787,13 +1772,11 @@ void SfxViewShell::CheckIPClient_Impl(
}
}
-
SfxObjectShell* SfxViewShell::GetObjectShell()
{
- return pFrame ? pFrame->GetObjectShell() : nullptr;
+ return rFrame.GetObjectShell();
}
-
Reference< XModel > SfxViewShell::GetCurrentDocument() const
{
Reference< XModel > xDocument;
@@ -1843,7 +1826,7 @@ void SfxViewShell::MarginChanged()
void SfxViewShell::JumpToMark( const OUString& rMark )
{
SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark );
- GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewFrame().GetDispatcher()->ExecuteList(
SID_JUMPTOMARK,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
{ &aMarkItem });
@@ -2039,7 +2022,7 @@ bool SfxViewShell::HasMouseClickListeners_Impl() const
bool SfxViewShell::Escape()
{
- return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
+ return GetViewFrame().GetBindings().Execute(SID_TERMINATE_INPLACEACTIVATION);
}
Reference< view::XRenderable > SfxViewShell::GetRenderable()
@@ -2063,9 +2046,7 @@ void SfxViewShell::notifyWindow(vcl::LOKWindowId nDialogId, const OUString& rAct
uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier() const
{
uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClipboardNotifier;
- if ( GetViewFrame() )
- xClipboardNotifier.set( GetViewFrame()->GetWindow().GetClipboard(), uno::UNO_QUERY );
-
+ xClipboardNotifier.set(GetViewFrame().GetWindow().GetClipboard(), uno::UNO_QUERY);
return xClipboardNotifier;
}
@@ -2073,19 +2054,16 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf
{
try
{
- if ( GetViewFrame() )
+ uno::Reference< datatransfer::clipboard::XClipboard > xClipboard(GetViewFrame().GetWindow().GetClipboard());
+ if( xClipboard.is() )
{
- uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() );
- if( xClipboard.is() )
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY );
+ if( xClpbrdNtfr.is() )
{
- uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY );
- if( xClpbrdNtfr.is() )
- {
- if( bAdd )
- xClpbrdNtfr->addClipboardListener( rClp );
- else
- xClpbrdNtfr->removeClipboardListener( rClp );
- }
+ if( bAdd )
+ xClpbrdNtfr->addClipboardListener( rClp );
+ else
+ xClpbrdNtfr->removeClipboardListener( rClp );
}
}
}
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 662923af0528..bef51e8560e0 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -296,7 +296,7 @@ public:
SmDocShell * GetDoc() const
{
- return static_cast<SmDocShell *>( GetViewFrame()->GetObjectShell() );
+ return static_cast<SmDocShell *>( GetViewFrame().GetObjectShell() );
}
SmEditWindow * GetEditWindow();
diff --git a/starmath/source/SmElementsPanel.cxx b/starmath/source/SmElementsPanel.cxx
index 08ff6af95ab9..be08091508c0 100644
--- a/starmath/source/SmElementsPanel.cxx
+++ b/starmath/source/SmElementsPanel.cxx
@@ -76,7 +76,7 @@ IMPL_LINK(SmElementsPanel, ElementClickHandler, OUString, ElementSource, void)
if (SmViewShell* pViewSh = GetView())
{
SfxStringItem aInsertCommand(SID_INSERTCOMMANDTEXT, ElementSource);
- pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pViewSh->GetViewFrame().GetDispatcher()->ExecuteList(
SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD, { &aInsertCommand });
}
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 2aedbae19d05..2ffe14a816bf 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1289,7 +1289,7 @@ IMPL_LINK_NOARG(SmSymbolDialog, GetClickHdl, weld::Button&, void)
{
OUString aText = "%" + pSym->GetName() + " ";
- rViewSh.GetViewFrame()->GetDispatcher()->ExecuteList(
+ rViewSh.GetViewFrame().GetDispatcher()->ExecuteList(
SID_INSERTSPECIAL, SfxCallMode::RECORD,
{ new SfxStringItem(SID_INSERTSPECIAL, aText) });
}
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 10143dae9afb..0e43fa1d6efb 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -152,7 +152,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
SmViewShell *pViewSh = SmGetActiveView();
if( pViewSh )
{
- pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
+ pViewSh->GetViewFrame().GetBindings().Invalidate(SID_TEXT);
if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
// have SwOleClient::FormatChanged() to align the modified formula properly
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 1c92b03fb2b1..ca84e648f859 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -160,7 +160,7 @@ void SmEditTextWindow::StartCursorMove()
void SmEditWindow::InvalidateSlots()
{
- SfxBindings& rBind = GetView()->GetViewFrame()->GetBindings();
+ SfxBindings& rBind = GetView()->GetViewFrame().GetBindings();
rBind.Invalidate(SID_COPY);
rBind.Invalidate(SID_CUT);
rBind.Invalidate(SID_DELETE);
@@ -834,7 +834,7 @@ void SmEditTextWindow::Flush()
if (SmViewShell *pViewSh = mrEditWindow.GetView())
{
std::unique_ptr<SfxStringItem> pTextToFlush = std::make_unique<SfxStringItem>(SID_TEXT, GetText());
- pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pViewSh->GetViewFrame().GetDispatcher()->ExecuteList(
SID_TEXT, SfxCallMode::RECORD,
{ pTextToFlush.get() });
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 055805c8cc20..d4f34185af57 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -106,7 +106,7 @@ using namespace css::accessibility;
using namespace css::uno;
SmGraphicWindow::SmGraphicWindow(SmViewShell& rShell)
- : InterimItemWindow(&rShell.GetViewFrame()->GetWindow(), "modules/smath/ui/mathwindow.ui", "MathWindow")
+ : InterimItemWindow(&rShell.GetViewFrame().GetWindow(), "modules/smath/ui/mathwindow.ui", "MathWindow")
, nLinePixH(GetSettings().GetStyleSettings().GetScrollBarSize())
, nColumnPixW(nLinePixH)
, nZoom(100)
@@ -771,7 +771,7 @@ bool SmGraphicWidget::KeyInput(const KeyEvent& rKEvt)
bool SmGraphicWidget::Command(const CommandEvent& rCEvt)
{
bool bCallBase = true;
- if (!GetView().GetViewFrame()->GetFrame().IsInPlace())
+ if (!GetView().GetViewFrame().GetFrame().IsInPlace())
{
switch ( rCEvt.GetCommand() )
{
@@ -861,8 +861,8 @@ void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
SetGraphicMapMode(MapMode(SmMapUnit(), Point(), aFraction, aFraction));
mxGraphic->SetTotalSize();
SmViewShell& rViewSh = mxGraphic->GetView();
- rViewSh.GetViewFrame()->GetBindings().Invalidate(SID_ATTR_ZOOM);
- rViewSh.GetViewFrame()->GetBindings().Invalidate(SID_ATTR_ZOOMSLIDER);
+ rViewSh.GetViewFrame().GetBindings().Invalidate(SID_ATTR_ZOOM);
+ rViewSh.GetViewFrame().GetBindings().Invalidate(SID_ATTR_ZOOMSLIDER);
}
void SmGraphicWindow::ZoomToFitInWindow()
@@ -965,7 +965,7 @@ void SmCmdBoxWindow::ShowContextMenu(const Point& rPos)
ToTop();
SmViewShell *pViewSh = GetView();
if (pViewSh)
- pViewSh->GetViewFrame()->GetDispatcher()->ExecutePopup("edit", this, &rPos);
+ pViewSh->GetViewFrame().GetDispatcher()->ExecutePopup("edit", this, &rPos);
}
void SmCmdBoxWindow::Command(const CommandEvent& rCEvt)
@@ -1065,7 +1065,7 @@ IMPL_LINK_NOARG( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, void )
SmViewShell* pView = GetView();
assert(pView);
- bool bInPlace = pView->GetViewFrame()->GetFrame().IsInPlace();
+ bool bInPlace = pView->GetViewFrame().GetFrame().IsInPlace();
uno::Reference< frame::XFrame > xFrame( GetBindings().GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface());
if ( bInPlace )
{
@@ -1545,7 +1545,7 @@ std::unique_ptr<SfxTabPage> SmViewShell::CreatePrintOptionsPage(weld::Container*
SmEditWindow *SmViewShell::GetEditWindow()
{
SmCmdBoxWrapper* pWrapper = static_cast<SmCmdBoxWrapper*>(
- GetViewFrame()->GetChildWindow(SmCmdBoxWrapper::GetChildWindowId()));
+ GetViewFrame().GetChildWindow(SmCmdBoxWrapper::GetChildWindowId()));
if (pWrapper != nullptr)
{
@@ -1559,7 +1559,7 @@ SmEditWindow *SmViewShell::GetEditWindow()
void SmViewShell::SetStatusText(const OUString& rText)
{
maStatusText = rText;
- GetViewFrame()->GetBindings().Invalidate(SID_TEXTSTATUS);
+ GetViewFrame().GetBindings().Invalidate(SID_TEXTSTATUS);
}
void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc)
@@ -1623,7 +1623,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
pDoc->Parse();
pDoc->SetModified();
- SfxBindings &rBnd = GetViewFrame()->GetBindings();
+ SfxBindings &rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate(SID_GRAPHIC_SM);
rBnd.Invalidate(SID_TEXT);
}
@@ -1658,7 +1658,7 @@ void SmViewShell::InsertFrom(SfxMedium &rMedium)
pDoc->Parse();
pDoc->SetModified();
- SfxBindings& rBnd = GetViewFrame()->GetBindings();
+ SfxBindings& rBnd = GetViewFrame().GetBindings();
rBnd.Invalidate(SID_GRAPHIC_SM);
rBnd.Invalidate(SID_TEXT);
}
@@ -1768,7 +1768,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
{
if (pWin->IsAllSelected())
{
- GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewFrame().GetDispatcher()->ExecuteList(
SID_COPYOBJECT, SfxCallMode::RECORD,
{ new SfxVoidItem(SID_COPYOBJECT) });
}
@@ -1795,7 +1795,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
if( bCallExec )
{
- GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewFrame().GetDispatcher()->ExecuteList(
SID_PASTEOBJECT, SfxCallMode::RECORD,
{ new SfxVoidItem(SID_PASTEOBJECT) });
}
@@ -1952,7 +1952,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_ATTR_ZOOM:
{
- if ( !GetViewFrame()->GetFrame().IsInPlace() )
+ if ( !GetViewFrame().GetFrame().IsInPlace() )
{
const SfxItemSet *pSet = rReq.GetArgs();
if ( pSet )
@@ -1964,7 +1964,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
SfxItemSetFixed<SID_ATTR_ZOOM, SID_ATTR_ZOOM> aSet( SmDocShell::GetPool() );
aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, mxGraphicWindow->GetZoom()));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxZoomDialog> xDlg(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aSet));
+ ScopedVclPtr<AbstractSvxZoomDialog> xDlg(pFact->CreateSvxZoomDialog(GetViewFrame().GetWindow().GetFrameWeld(), aSet));
xDlg->SetLimits( MINZOOM, MAXZOOM );
if (xDlg->Execute() != RET_CANCEL)
ZoomByItemSet(xDlg->GetOutputItemSet());
@@ -1989,11 +1989,11 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_ELEMENTSDOCKINGWINDOW:
{
// First make sure that the sidebar is visible
- GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+ GetViewFrame().ShowChildWindow(SID_SIDEBAR);
sfx2::sidebar::Sidebar::TogglePanel(u"MathElementsPanel",
- GetViewFrame()->GetFrame().GetFrameInterface());
- GetViewFrame()->GetBindings().Invalidate( SID_ELEMENTSDOCKINGWINDOW );
+ GetViewFrame().GetFrame().GetFrameInterface());
+ GetViewFrame().GetBindings().Invalidate( SID_ELEMENTSDOCKINGWINDOW );
rReq.Ignore ();
}
@@ -2103,7 +2103,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_ZOOMIN:
case SID_ZOOMOUT:
case SID_ZOOM_OPTIMAL:
- if ( GetViewFrame()->GetFrame().IsInPlace() )
+ if ( GetViewFrame().GetFrame().IsInPlace() )
rSet.DisableItem( nWh );
break;
@@ -2141,7 +2141,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_ELEMENTSDOCKINGWINDOW:
{
const bool bState = sfx2::sidebar::Sidebar::IsPanelVisible(
- u"MathElementsPanel", GetViewFrame()->GetFrame().GetFrameInterface());
+ u"MathElementsPanel", GetViewFrame().GetFrame().GetFrameInterface());
rSet.Put(SfxBoolItem(SID_ELEMENTSDOCKINGWINDOW, bState));
}
break;
@@ -2272,7 +2272,7 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, voi
pDoc->ArrangeFormula();
pDoc->Repaint();
// adjust window, repaint, increment ModifyCount,...
- GetViewFrame()->GetBindings().Invalidate(SID_GRAPHIC_SM);
+ GetViewFrame().GetBindings().Invalidate(SID_GRAPHIC_SM);
}
}
@@ -2286,7 +2286,7 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
case SfxHintId::ModeChanged:
case SfxHintId::DocChanged:
- GetViewFrame()->GetBindings().InvalidateAll(false);
+ GetViewFrame().GetBindings().InvalidateAll(false);
break;
default:
break;
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 52667c326f3c..82f7d9f561c5 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth)
pSdrView->MarkObj(&rSdrCustomShape, pSdrView->GetSdrPageView());
// Set direction
- SfxRequest aReq(pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
+ SfxRequest aReq(&pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
SfxInt32Item aItem(SID_EXTRUSION_DIRECTION, 90);
aReq.AppendItem(aItem);
svx::ExtrusionBar::execute(pSdrView, aReq, SfxViewFrame::Current()->GetBindings());
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index fa485e478c72..11ffc6bf57c7 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -163,7 +163,7 @@ void FmFormShell::InitInterface_Impl()
FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView )
:SfxShell(_pParent)
- ,m_pImpl(new FmXFormShell(*this, _pParent->GetViewFrame()))
+ ,m_pImpl(new FmXFormShell(*this, &_pParent->GetViewFrame()))
,m_pFormView( pView )
,m_pFormModel( nullptr )
,m_nLastSlot( 0 )
@@ -266,10 +266,9 @@ void FmFormShell::impl_setDesignMode(bool bDesign)
UIFeatureChanged();
}
- GetViewShell()->GetViewFrame()->GetBindings().Invalidate(ControllerSlotMap);
+ GetViewShell()->GetViewFrame().GetBindings().Invalidate(ControllerSlotMap);
}
-
bool FmFormShell::HasUIFeature(SfxShellFeature nFeature) const
{
assert((nFeature & ~SfxShellFeature::FormMask) == SfxShellFeature::NONE);
@@ -467,7 +466,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
nullptr
};
- GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_CREATE_CONTROL, SfxCallMode::ASYNCHRON,
+ GetViewShell()->GetViewFrame().GetDispatcher()->Execute( SID_FM_CREATE_CONTROL, SfxCallMode::ASYNCHRON,
pArgs, rReq.GetModifier(), pInternalArgs );
if ( rReq.GetModifier() & KEY_MOD1 )
@@ -477,7 +476,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
// reusing the SID_FM_TOGGLECONTROLFOCUS is somewhat hacky... which it wouldn't if it would have another
// name, so I do not really have a big problem with this...
SfxBoolItem aGrabFocusIndicatorItem( SID_FM_TOGGLECONTROLFOCUS, true );
- GetViewShell()->GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewShell()->GetViewFrame().GetDispatcher()->ExecuteList(
nSlot, SfxCallMode::ASYNCHRON,
{ &aGrabFocusIndicatorItem });
}
@@ -599,15 +598,15 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_FILTER_NAVIGATOR:
case SID_FM_SHOW_DATANAVIGATOR :
{
- GetViewShell()->GetViewFrame()->ToggleChildWindow(nSlot);
+ GetViewShell()->GetViewFrame().ToggleChildWindow(nSlot);
rReq.Done();
} break;
case SID_FM_SHOW_FMEXPLORER:
{
if (!m_pFormView) // force setting the view
- GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_CREATE_SW_DRAWVIEW);
+ GetViewShell()->GetViewFrame().GetDispatcher()->Execute(SID_CREATE_SW_DRAWVIEW);
- GetViewShell()->GetViewFrame()->ChildWindowExecute(rReq);
+ GetViewShell()->GetViewFrame().ChildWindowExecute(rReq);
rReq.Done();
}
break;
@@ -638,7 +637,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
DBG_ASSERT(pModel, "FmFormShell::Execute : invalid call !");
// should have been disabled in GetState if we don't have a FormModel
pModel->SetAutoControlFocus( !pModel->GetAutoControlFocus() );
- GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_AUTOCONTROLFOCUS);
+ GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_AUTOCONTROLFOCUS);
}
break;
case SID_FM_OPEN_READONLY:
@@ -647,13 +646,13 @@ void FmFormShell::Execute(SfxRequest &rReq)
DBG_ASSERT(pModel, "FmFormShell::Execute : invalid call !");
// should have been disabled in GetState if we don't have a FormModel
pModel->SetOpenInDesignMode( !pModel->GetOpenInDesignMode() );
- GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_OPEN_READONLY);
+ GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_OPEN_READONLY);
}
break;
case SID_FM_USE_WIZARDS:
{
GetImpl()->SetWizardUsing_Lock(!GetImpl()->GetWizardUsing_Lock());
- GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_USE_WIZARDS);
+ GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_USE_WIZARDS);
}
break;
case SID_FM_SEARCH:
@@ -729,16 +728,16 @@ void FmFormShell::Execute(SfxRequest &rReq)
{
// if the filter navigator is still open, we need to close it, so it can possibly
// commit it's most recent changes
- if ( GetViewShell() && GetViewShell()->GetViewFrame() )
- if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR ) )
+ if (GetViewShell())
+ if ( GetViewShell()->GetViewFrame().HasChildWindow( SID_FM_FILTER_NAVIGATOR ) )
{
- GetViewShell()->GetViewFrame()->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
+ GetViewShell()->GetViewFrame().ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
bReopenNavigator = true;
}
Reference<runtime::XFormController> const xController(GetImpl()->getActiveController_Lock());
- if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
+ if ( GetViewShell()->GetViewFrame().HasChildWindow( SID_FM_FILTER_NAVIGATOR )
// closing the window was denied, for instance because of an invalid criterion
|| ( xController.is()
@@ -758,7 +757,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
if ( bReopenNavigator )
// we closed the navigator only to implicitly commit it (as we do not have another
// direct wire to it), but to the user, it should look as it was always open
- GetViewShell()->GetViewFrame()->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
+ GetViewShell()->GetViewFrame().ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
}
break;
@@ -769,7 +768,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
// initially open the filter navigator, the whole form based filter is pretty useless without it
SfxBoolItem aIdentifierItem( SID_FM_FILTER_NAVIGATOR, true );
- GetViewShell()->GetViewFrame()->GetDispatcher()->ExecuteList(
+ GetViewShell()->GetViewFrame().GetDispatcher()->ExecuteList(
SID_FM_FILTER_NAVIGATOR, SfxCallMode::ASYNCHRON,
{ &aIdentifierItem });
} break;
@@ -896,8 +895,8 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_FILTER_NAVIGATOR:
case SID_FM_SHOW_DATANAVIGATOR:
{
- if ( GetViewShell()->GetViewFrame()->KnowsChildWindow(nWhich) )
- rSet.Put( SfxBoolItem( nWhich, GetViewShell()->GetViewFrame()->HasChildWindow(nWhich)) );
+ if ( GetViewShell()->GetViewFrame().KnowsChildWindow(nWhich) )
+ rSet.Put( SfxBoolItem( nWhich, GetViewShell()->GetViewFrame().HasChildWindow(nWhich)) );
else
rSet.DisableItem(nWhich);
} break;
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index ee604b6277f2..f2e9e4ec021b 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -737,7 +737,7 @@ void SAL_CALL FmXFormShell::disposing(const lang::EventObject& e)
m_aNavControllerFeatures.dispose();
if ( m_pShell )
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().InvalidateShell(*m_pShell);
}
if (e.Source != m_xExternalViewController)
@@ -779,8 +779,8 @@ void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt)
comphelper::SolarMutex& rSolarSafety = Application::GetSolarMutex();
if (rSolarSafety.tryToAcquire())
{
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_RECORD_TOTAL, true);
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Update(SID_FM_RECORD_TOTAL);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_RECORD_TOTAL, true);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Update(SID_FM_RECORD_TOTAL);
rSolarSafety.release();
}
else
@@ -808,7 +808,7 @@ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatu
OSL_ENSURE( !_rFeatures.empty(), "FmXFormShell::invalidateFeatures: invalid arguments!" );
- if ( !(m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame()) )
+ if (!m_pShell->GetViewShell())
return;
// unfortunately, SFX requires sal_uInt16
@@ -821,7 +821,7 @@ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatu
::std::sort( aSlotIds.begin(), aSlotIds.end() - 1 );
sal_uInt16 *pSlotIds = aSlotIds.data();
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( pSlotIds );
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate( pSlotIds );
}
@@ -933,12 +933,11 @@ void FmXFormShell::UpdateSlot_Lock(sal_Int16 _nId)
else
{
OSL_ENSURE( _nId, "FmXFormShell::UpdateSlot: can't update the complete shell!" );
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( _nId, true, true );
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Update( _nId );
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate( _nId, true, true );
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Update( _nId );
}
}
-
void FmXFormShell::InvalidateSlot_Lock(sal_Int16 nId, bool bWithId)
{
if (impl_checkDisposed_Lock())
@@ -951,12 +950,11 @@ void FmXFormShell::InvalidateSlot_Lock(sal_Int16 nId, bool bWithId)
}
else
if (nId)
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(nId, true, bWithId);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(nId, true, bWithId);
else
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().InvalidateShell(*m_pShell);
}
-
void FmXFormShell::LockSlotInvalidation_Lock(bool bLock)
{
if (impl_checkDisposed_Lock())
@@ -974,7 +972,6 @@ void FmXFormShell::LockSlotInvalidation_Lock(bool bLock)
}
}
-
IMPL_LINK_NOARG(FmXFormShell, OnInvalidateSlots_Lock, void*,void)
{
if (impl_checkDisposed_Lock())
@@ -985,14 +982,13 @@ IMPL_LINK_NOARG(FmXFormShell, OnInvalidateSlots_Lock, void*,void)
for (const auto& rInvalidSlot : m_arrInvalidSlots)
{
if (rInvalidSlot.id)
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(rInvalidSlot.id, true, (rInvalidSlot.flags & 0x01));
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(rInvalidSlot.id, true, (rInvalidSlot.flags & 0x01));
else
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().InvalidateShell(*m_pShell);
}
m_arrInvalidSlots.clear();
}
-
void FmXFormShell::ForceUpdateSelection_Lock()
{
if (impl_checkDisposed_Lock())
@@ -1385,8 +1381,8 @@ void FmXFormShell::ExecuteTabOrderDialog_Lock(const Reference<XTabControllerMode
try
{
Reference< XWindow > xParentWindow;
- if ( m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame() )
- xParentWindow = VCLUnoHelper::GetInterface ( &m_pShell->GetViewShell()->GetViewFrame()->GetWindow() );
+ if (m_pShell->GetViewShell())
+ xParentWindow = VCLUnoHelper::GetInterface ( &m_pShell->GetViewShell()->GetViewFrame().GetWindow() );
Reference< dialogs::XExecutableDialog > xDialog = form::TabOrderDialog::createWithModel(
comphelper::getProcessComponentContext(),
@@ -1539,7 +1535,7 @@ void FmXFormShell::ExecuteSearch_Lock()
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractFmSearchDialog> pDialog(
pFact->CreateFmSearchDialog(
- m_pShell->GetViewShell()->GetViewFrame()->GetFrameWeld(),
+ m_pShell->GetViewShell()->GetViewFrame().GetFrameWeld(),
strInitialText, aContextNames, nInitialContext,
LINK(this, FmXFormShell, OnSearchContextRequest_Lock) ));
pDialog->SetActiveField( strActiveField );
@@ -1778,7 +1774,6 @@ void FmXFormShell::ExecuteFormSlot_Lock( sal_Int32 _nSlot )
}
}
-
void FmXFormShell::impl_switchActiveControllerListening_Lock(const bool _bListen)
{
if ( !m_xActiveController.is() )
@@ -1790,7 +1785,6 @@ void FmXFormShell::impl_switchActiveControllerListening_Lock(const bool _bListen
m_xActiveController->removeEventListener( static_cast<XFormControllerListener*>(this) );
}
-
void FmXFormShell::setActiveController_Lock(const Reference<runtime::XFormController>& xController, bool _bNoSaveOldContent)
{
if (impl_checkDisposed_Lock())
@@ -1890,18 +1884,16 @@ void FmXFormShell::setActiveController_Lock(const Reference<runtime::XFormContro
m_bInActivate = false;
m_pShell->UIFeatureChanged();
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().InvalidateShell(*m_pShell);
InvalidateSlot_Lock(SID_FM_FILTER_NAVIGATOR_CONTROL, true);
}
-
void FmXFormShell::getCurrentSelection_Lock(InterfaceBag& /* [out] */ _rSelection) const
{
_rSelection = m_aCurrentSelection;
}
-
bool FmXFormShell::setCurrentSelectionFromMark_Lock(const SdrMarkList& _rMarkList)
{
m_aLastKnownMarkedControls.clear();
@@ -2136,26 +2128,24 @@ void FmXFormShell::stopListening_Lock()
m_xNavigationController = nullptr;
}
-
void FmXFormShell::ShowSelectionProperties_Lock(bool bShow)
{
if (impl_checkDisposed_Lock())
return;
// if the window is already visible, only update the state
- bool bHasChild = m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_SHOW_PROPERTIES );
+ bool bHasChild = m_pShell->GetViewShell()->GetViewFrame().HasChildWindow( SID_FM_SHOW_PROPERTIES );
if ( bHasChild && bShow )
UpdateSlot_Lock(SID_FM_PROPERTY_CONTROL);
// else toggle state
else
- m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
+ m_pShell->GetViewShell()->GetViewFrame().ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
InvalidateSlot_Lock(SID_FM_PROPERTIES, false);
InvalidateSlot_Lock(SID_FM_CTL_PROPERTIES, false);
}
-
IMPL_LINK(FmXFormShell, OnFoundData_Lock, FmFoundRecordInformation&, rfriWhere, void)
{
if (impl_checkDisposed_Lock())
@@ -2234,11 +2224,10 @@ IMPL_LINK(FmXFormShell, OnFoundData_Lock, FmFoundRecordInformation&, rfriWhere,
// generally the (modal) search dialog is of course at the top ... So, force ...
sal_uInt16 nPos = 0;
while (DatabaseSlotMap[nPos])
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Update(DatabaseSlotMap[nPos++]);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().Update(DatabaseSlotMap[nPos++]);
// unfortunately the update goes against the invalidate with only individual slots
}
-
IMPL_LINK(FmXFormShell, OnCanceledNotFound_Lock, FmFoundRecordInformation&, rfriWhere, void)
{
if (impl_checkDisposed_Lock())
@@ -2667,24 +2656,21 @@ void FmXFormShell::SetSelection_Lock(const SdrMarkList& rMarkList)
m_pShell->NotifyMarkListChanged(m_pShell->GetFormView());
}
-
void FmXFormShell::DetermineSelection_Lock(const SdrMarkList& rMarkList)
{
if (setCurrentSelectionFromMark_Lock(rMarkList) && IsPropBrwOpen_Lock())
ShowSelectionProperties_Lock(true);
}
-
bool FmXFormShell::IsPropBrwOpen_Lock() const
{
if (impl_checkDisposed_Lock())
return false;
- return m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame()
- && m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES);
+ return m_pShell->GetViewShell() &&
+ m_pShell->GetViewShell()->GetViewFrame().HasChildWindow(SID_FM_SHOW_PROPERTIES);
}
-
class FmXFormShell::SuspendPropertyTracking
{
private:
@@ -2710,7 +2696,6 @@ public:
}
};
-
void FmXFormShell::SetDesignMode_Lock(bool bDesign)
{
if (impl_checkDisposed_Lock())
@@ -2724,9 +2709,9 @@ void FmXFormShell::SetDesignMode_Lock(bool bDesign)
// so it can commit it's changes _before_ we load the forms
if (!bDesign)
{
- m_bHadPropertyBrowserInDesignMode = m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES);
+ m_bHadPropertyBrowserInDesignMode = m_pShell->GetViewShell()->GetViewFrame().HasChildWindow(SID_FM_SHOW_PROPERTIES);
if (m_bHadPropertyBrowserInDesignMode)
- m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
+ m_pShell->GetViewShell()->GetViewFrame().ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
}
FmFormView* pFormView = m_pShell->GetFormView();
@@ -2791,12 +2776,11 @@ void FmXFormShell::SetDesignMode_Lock(bool bDesign)
// So we can't call ShowSelectionProperties directly as the according feature isn't enabled yet.
// That's why we use an asynchron execution on the dispatcher.
// (And that's why this has to be done AFTER the UIFeatureChanged.)
- m_pShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON );
+ m_pShell->GetViewShell()->GetViewFrame().GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON );
}
m_bChangingDesignMode = false;
}
-
Reference< XControl> FmXFormShell::impl_getControl_Lock(const Reference<XControlModel>& i_rxModel, const FmFormObj& i_rKnownFormObj)
{
if (impl_checkDisposed_Lock())
@@ -2896,7 +2880,6 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow_Lock( const Reference<
}
}
-
void FmXFormShell::startFiltering_Lock()
{
if (impl_checkDisposed_Lock())
@@ -2930,18 +2913,17 @@ void FmXFormShell::startFiltering_Lock()
m_bFilterMode = true;
m_pShell->UIFeatureChanged();
- SfxViewFrame* pViewFrame = m_pShell->GetViewShell()->GetViewFrame();
- pViewFrame->GetBindings().InvalidateShell( *m_pShell );
+ SfxViewFrame& rViewFrame = m_pShell->GetViewShell()->GetViewFrame();
+ rViewFrame.GetBindings().InvalidateShell( *m_pShell );
- if ( pViewFrame->KnowsChildWindow( SID_FM_FILTER_NAVIGATOR )
- && !pViewFrame->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
+ if ( rViewFrame.KnowsChildWindow( SID_FM_FILTER_NAVIGATOR )
+ && !rViewFrame.HasChildWindow( SID_FM_FILTER_NAVIGATOR )
)
{
- pViewFrame->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
+ rViewFrame.ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
}
}
-
static void saveFilter(const Reference< runtime::XFormController >& _rxController)
{
Reference< XPropertySet> xFormAsSet(_rxController->getModel(), UNO_QUERY);
@@ -3066,7 +3048,7 @@ void FmXFormShell::stopFiltering_Lock(bool bSave)
}
m_pShell->UIFeatureChanged();
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ m_pShell->GetViewShell()->GetViewFrame().GetBindings().InvalidateShell(*m_pShell);
}
@@ -3566,8 +3548,8 @@ IMPL_LINK_NOARG( FmXFormShell, OnFirstTimeActivation_Lock, void*, void )
if (isEnhancedForm_Lock())
{
// show the data navigator
- if ( !m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_SHOW_DATANAVIGATOR ) )
- m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow( SID_FM_SHOW_DATANAVIGATOR );
+ if ( !m_pShell->GetViewShell()->GetViewFrame().HasChildWindow( SID_FM_SHOW_DATANAVIGATOR ) )
+ m_pShell->GetViewShell()->GetViewFrame().ToggleChildWindow( SID_FM_SHOW_DATANAVIGATOR );
}
}
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 64af0e9aa0fb..e693f8e122b1 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -309,7 +309,7 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
pFormShellImpl->UpdateForms_Lock(true);
// so that the form navigator can react to the pagechange
- pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_FMEXPLORER_CONTROL, true);
+ pFormShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_FMEXPLORER_CONTROL, true);
pFormShellImpl->SetSelection_Lock(GetMarkedObjectList());
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index de7dba8bca95..88245f7fc15c 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -510,12 +510,12 @@ namespace svxform
else if (sIdent == "designmode")
{
pFormModel->SetOpenInDesignMode( !pFormModel->GetOpenInDesignMode() );
- pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_OPEN_READONLY);
+ pFormShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_OPEN_READONLY);
}
else if (sIdent == "controlfocus")
{
pFormModel->SetAutoControlFocus( !pFormModel->GetAutoControlFocus() );
- pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_AUTOCONTROLFOCUS);
+ pFormShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_AUTOCONTROLFOCUS);
}
else if (FmXFormShell::isControlConversionSlot(sIdent))
{
@@ -1314,7 +1314,7 @@ namespace svxform
aSelection.insert( Reference<XInterface>( xNewForm, UNO_QUERY ) );
pFormShell->GetImpl()->setCurrentSelection_Lock(std::move(aSelection));
- pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_PROPERTIES, true, true);
+ pFormShell->GetViewShell()->GetViewFrame().GetBindings().Invalidate(SID_FM_PROPERTIES, true, true);
}
GetNavModel()->SetModified();
@@ -1545,7 +1545,7 @@ namespace svxform
if (pFormShell->GetImpl()->IsPropBrwOpen_Lock() || bForce)
{
// and now deliver all to the PropertyBrowser
- pFormShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON );
+ pFormShell->GetViewShell()->GetViewFrame().GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON );
}
}
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index cec9525eb9e8..39680d3a632b 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxMakeFlyFrame)
// When cutting the textbox and pasting it to a new document:
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
pView->StopShellTimer();
SwDocShell* pDocShell = pDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 829492c45cd9..2669b05fb2a2 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -960,7 +960,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testPageRemoveFlyTable)
// When updating the ToC and incrementally formatting the document:
SwView* pView = pDoc->GetDocShell()->GetView();
- SfxDispatcher& rDispatcher = *pView->GetViewFrame()->GetDispatcher();
+ SfxDispatcher& rDispatcher = *pView->GetViewFrame().GetDispatcher();
rDispatcher.Execute(FN_UPDATE_TOX);
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
pWrtShell->Reformat();
diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx
index 154226d2129f..d4156c850476 100644
--- a/sw/qa/core/undo/undo.cxx
+++ b/sw/qa/core/undo/undo.cxx
@@ -68,7 +68,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutUndo)
SwDoc* pDoc = pDocShell->GetDoc();
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
pView->StopShellTimer();
rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
pTransfer->Cut();
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 6e1b8e266b10..87766434689a 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1823,13 +1823,13 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testCommentInsert)
SwView* pView = pDoc->GetDocShell()->GetView();
// Select the image.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
// SwView ctor.
pView->StopShellTimer();
// Add a comment.
- uno::Reference<frame::XFrame> xFrame = pView->GetViewFrame()->GetFrame().GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = pView->GetViewFrame().GetFrame().GetFrameInterface();
uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
{
{"Text", uno::Any(OUString("some text"))},
@@ -2072,7 +2072,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAllTrackedChanges)
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
{
SfxVoidItem aItem(FN_REDLINE_REJECT_ALL);
- pView1->GetViewFrame()->GetDispatcher()->ExecuteList(FN_REDLINE_REJECT_ALL,
+ pView1->GetViewFrame().GetDispatcher()->ExecuteList(FN_REDLINE_REJECT_ALL,
SfxCallMode::SYNCHRON, { &aItem });
}
@@ -2095,7 +2095,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAllTrackedChanges)
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
{
SfxVoidItem aItem(FN_REDLINE_ACCEPT_ALL);
- pView1->GetViewFrame()->GetDispatcher()->ExecuteList(FN_REDLINE_ACCEPT_ALL,
+ pView1->GetViewFrame().GetDispatcher()->ExecuteList(FN_REDLINE_ACCEPT_ALL,
SfxCallMode::SYNCHRON, { &aItem });
}
@@ -2128,8 +2128,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDocumentRepair)
{
std::unique_ptr<SfxBoolItem> pItem1;
std::unique_ptr<SfxBoolItem> pItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(false, pItem1->GetValue());
@@ -2144,8 +2144,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDocumentRepair)
{
std::unique_ptr<SfxBoolItem> pItem1;
std::unique_ptr<SfxBoolItem> pItem2;
- pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
+ pView1->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
+ pView2->GetViewFrame().GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
CPPUNIT_ASSERT(pItem1);
CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(true, pItem1->GetValue());
@@ -2353,7 +2353,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph)
pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
std::unique_ptr<SvxWeightItem> pWeightItem;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem);
CPPUNIT_ASSERT(pWeightItem);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem->GetWeight());
@@ -2372,7 +2372,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph)
pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
std::unique_ptr<SvxWeightItem> pWeightItem2;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem2);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem2);
CPPUNIT_ASSERT(pWeightItem2);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem2->GetWeight());
@@ -2388,7 +2388,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph)
pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
std::unique_ptr<SvxWeightItem> pWeightItem3;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem3);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem3);
CPPUNIT_ASSERT(pWeightItem3);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem3->GetWeight());
@@ -2400,7 +2400,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph)
pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
std::unique_ptr<SvxWeightItem> pWeightItem4;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem4);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem4);
CPPUNIT_ASSERT(pWeightItem4);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem4->GetWeight());
@@ -2458,7 +2458,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAfterHeader)
Scheduler::ProcessEventsToIdle();
std::unique_ptr<SvxWeightItem> pWeightItem;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem);
CPPUNIT_ASSERT(pWeightItem);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem->GetWeight());
@@ -2479,7 +2479,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAfterHeader)
// c"
std::unique_ptr<SvxWeightItem> pWeightItem2;
- pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem2);
+ pView->GetViewFrame().GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pWeightItem2);
CPPUNIT_ASSERT(pWeightItem2);
CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem2->GetWeight());
@@ -2994,7 +2994,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAnchorTypes)
SwXTextDocument* pXTextDocument = createDoc("shape.fodt");
SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
SwView* pView = pXTextDocument->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<FN_TOOL_ANCHOR_PAGE, FN_TOOL_ANCHOR_PAGE>);
SfxBoolItem aItem(FN_TOOL_ANCHOR_PAGE);
aSet.Put(aItem);
@@ -3010,7 +3010,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testLanguageStatus)
SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
SwView* pView = pXTextDocument->GetDocShell()->GetView();
std::unique_ptr<SfxPoolItem> pItem;
- pView->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, pItem);
+ pView->GetViewFrame().GetBindings().QueryState(SID_LANGUAGE_STATUS, pItem);
auto pStringListItem = dynamic_cast<SfxStringListItem*>(pItem.get());
CPPUNIT_ASSERT(pStringListItem);
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 3fb7db44d2ea..5e047aedb789 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testWatermarkDOCX)
SwDoc* const pDoc = getSwDoc();
SwDocShell* pDocShell = pDoc->GetDocShell();
const SfxWatermarkItem* pWatermark;
- SfxItemState eState = pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->QueryState(SID_WATERMARK, pWatermark);
+ SfxItemState eState = pDocShell->GetViewShell()->GetViewFrame().GetDispatcher()->QueryState(SID_WATERMARK, pWatermark);
CPPUNIT_ASSERT(eState >= SfxItemState::DEFAULT);
CPPUNIT_ASSERT(pWatermark);
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx
index 64ce10b9d833..8240bc39cf2c 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -1438,7 +1438,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testCursorWindows)
SwWrtShell* pWrtShell1 = pDocShell->GetWrtShell();
// Create a second view and type something.
- pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(
+ pDocShell->GetViewShell()->GetViewFrame().GetDispatcher()->Execute(
SID_NEWWINDOW, SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
SwWrtShell* pWrtShell2 = pDocShell->GetWrtShell();
OUString aText("foo");
diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx
index 0e8974823c62..890cf3b52131 100644
--- a/sw/qa/extras/uiwriter/uiwriter5.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -1155,10 +1155,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageComment)
pWrtShell->Delete();
// Select the image.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Insert a comment while the image is selected.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
// Verify that the comment is around the image.
// Without the accompanying fix in place, this test would have failed, as FN_POSTIT was disabled
@@ -1177,9 +1177,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageComment)
// Insert content to the comment, and select the image again.
SfxStringItem aItem(FN_INSERT_STRING, "x");
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
- { &aItem });
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
+ { &aItem });
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
#if !defined(MACOSX)
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
@@ -1233,7 +1233,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageComment)
#endif
// Now delete the image.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
// Without the accompanying fix in place, this test would have failed with 'Expected: 0; Actual:
// 1', i.e. the comment of the image was not deleted when the image was deleted.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
@@ -1248,10 +1248,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageCommentAtChar)
SwView* pView = pDoc->GetDocShell()->GetView();
// Select the image.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Insert a comment while the image is selected.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
// Verify that the comment is around the image.
// Without the accompanying fix in place, this test would have failed, as the comment was
@@ -1270,18 +1270,18 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageCommentAtChar)
// Insert content to the comment, and select the image again.
SfxStringItem aItem(FN_INSERT_STRING, "x");
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
- { &aItem });
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
+ { &aItem });
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Now delete the image.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
// Without the accompanying fix in place, this test would have failed with 'Expected: 0; Actual:
// 1', i.e. the comment of the image was not deleted when the image was deleted.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
// Undo the deletion and move the image down, so the anchor changes.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
@@ -1318,7 +1318,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTrackImageDeletion)
SwView* pView = pDoc->GetDocShell()->GetView();
// select the image
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// turn on red-lining and show changes
IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
@@ -1331,7 +1331,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTrackImageDeletion)
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
// now delete the image with track changes
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
const SwRedlineTable& rTable = rIDRA.GetRedlineTable();
// this was 0 (missing recording of deletion of images)
@@ -1452,7 +1452,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testShapePageMove)
calcLayout();
// Select the shape.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
// SwView ctor.
pView->StopShellTimer();
@@ -1460,8 +1460,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testShapePageMove)
// Move the shape down to the 2nd page.
SfxInt32Item aXItem(SID_ATTR_TRANSFORM_POS_X, 4000);
SfxInt32Item aYItem(SID_ATTR_TRANSFORM_POS_Y, 12000);
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, SfxCallMode::SYNCHRON,
- { &aXItem, &aYItem });
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, SfxCallMode::SYNCHRON,
+ { &aXItem, &aYItem });
// Check if the shape anchor was moved to the 2nd page as well.
SwFrameFormats* pShapeFormats = pDoc->GetSpzFrameFormats();
@@ -1720,8 +1720,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf105330)
SwView* pView = pDoc->GetDocShell()->GetView();
SfxUInt16Item aRows(SID_ATTR_TABLE_ROW, 1);
SfxUInt16Item aColumns(SID_ATTR_TABLE_COLUMN, 1);
- pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_TABLE, SfxCallMode::SYNCHRON,
- { &aRows, &aColumns });
+ pView->GetViewFrame().GetDispatcher()->ExecuteList(FN_INSERT_TABLE, SfxCallMode::SYNCHRON,
+ { &aRows, &aColumns });
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
rUndoManager.Undo();
@@ -2402,7 +2402,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128335)
// Select the 3rd textbox.
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
// SwView ctor.
pView->StopShellTimer();
@@ -2414,10 +2414,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128335)
Scheduler::ProcessEventsToIdle();
// Cut it.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
// Paste it: this makes the 3rd textbox anchored in the 2nd one.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
// Select all shapes.
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
@@ -2428,7 +2428,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128335)
// Cut them.
// Without the accompanying fix in place, this test would have crashed as the textboxes were
// deleted in an incorrect order.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletionWithReject)
@@ -2798,7 +2798,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128603)
// Select the 3rd textbox.
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
// SwView ctor.
pView->StopShellTimer();
@@ -2810,10 +2810,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128603)
Scheduler::ProcessEventsToIdle();
// Cut it.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
// Paste it: this makes the 3rd textbox anchored in the 2nd one.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
// Undo all of this.
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx
index 5585723cb482..cdce0791cc2d 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -1483,7 +1483,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf65535)
{
static const OUStringLiteral sApplyRule(u"Spelling_Baaed");
SfxStringItem aApplyItem(FN_PARAM_1, sApplyRule);
- pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+ pViewShell->GetViewFrame().GetDispatcher()->ExecuteList(
SID_SPELLCHECK_APPLY_SUGGESTION, SfxCallMode::SYNCHRON, { &aApplyItem });
}
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index 8dd312ad69d9..dc1b0e2cee75 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -68,13 +68,13 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testTdf130179)
CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
// Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
// SwView ctor.
pView->StopShellTimer();
std::unique_ptr<SfxPoolItem> pItem;
- pView->GetViewFrame()->GetBindings().QueryState(FN_POSTIT, pItem);
+ pView->GetViewFrame().GetBindings().QueryState(FN_POSTIT, pItem);
// Without the accompanying fix in place, this test would have failed with:
// assertion failed
// - Expression: !pItem
@@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testShapeTextAlignment)
// Start shape text edit.
SwView* pView = pDoc->GetDocShell()->GetView();
// Select the shape.
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
pView->StopShellTimer();
// Start the actual text edit.
SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
@@ -109,8 +109,8 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testShapeTextAlignment)
pView->AttrChangedNotify(nullptr);
// Change paragraph adjustment to center.
- pView->GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_PARA_ADJUST_CENTER,
- SfxCallMode::SYNCHRON);
+ pView->GetViewFrame().GetDispatcher()->Execute(SID_ATTR_PARA_ADJUST_CENTER,
+ SfxCallMode::SYNCHRON);
// End shape text edit.
pWrtShell->EndTextEdit();
@@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testBibliographyUrlContextMenu)
SwDocShell* pDocShell = pDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
- SfxDispatcher* pDispatcher = pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = pDocShell->GetViewShell()->GetViewFrame().GetDispatcher();
css::uno::Any aState;
SfxItemState eState = pDispatcher->QueryState(SID_OPEN_HYPERLINK, aState);
@@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testBibliographyLocalCopyContextMenu)
SwDocShell* pDocShell = pDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
- SfxDispatcher* pDispatcher = pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher();
+ SfxDispatcher* pDispatcher = pDocShell->GetViewShell()->GetViewFrame().GetDispatcher();
css::uno::Any aState;
SfxItemState eState = pDispatcher->QueryState(FN_OPEN_LOCAL_URL, aState);
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.
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 2722f627e9ba..751cc8f24144 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -121,7 +121,7 @@ void dispatchExecute(SfxViewShell const * pViewShell, sal_uInt16 nSlot)
{
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
- pViewFrame = pViewShell->GetViewFrame();
+ pViewFrame = &pViewShell->GetViewFrame();
if ( pViewFrame )
{
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
@@ -365,7 +365,7 @@ void PrintOutHelper( SfxViewShell const * pViewShell, const uno::Any& From, cons
PrToFileName >>= sFileName;
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
- pViewFrame = pViewShell->GetViewFrame();
+ pViewFrame = &pViewShell->GetViewFrame();
if ( !pViewFrame )
return;
@@ -424,7 +424,7 @@ void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, SfxViewShell co
{
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
- pViewFrame = pViewShell->GetViewFrame();
+ pViewFrame = &pViewShell->GetViewFrame();
if ( pViewFrame )
{
if ( !pViewFrame->GetFrame().IsInPlace() )