summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-16 15:45:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-17 08:49:11 +0000
commit7183d259d0d8bf8020da1aa06c963581d2bf779f (patch)
treeeb585467413710892a505cb37fc0aecc50e4f8ab /sw/source
parenteefa8e8110c432be36e1cd5d166b5f5676a7e5ca (diff)
SfxViewFrame* arg of SfxRequest ctor always dereferenced
change it to take a reference Change-Id: Ib9349f4c2660d297d93ee81256e7fa9873728ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx4
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx8
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx8
-rw-r--r--sw/source/uibase/shells/textsh1.cxx10
-rw-r--r--sw/source/uibase/shells/textsh2.cxx2
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
14 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index bf3831f29e0b..b2cd48f5c346 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1428,7 +1428,7 @@ short SwInsertSectionTabDialog::Ok()
rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aRequest( &rViewFrame, 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/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index d3cee669e971..a059d88c0b23 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -137,8 +137,8 @@ void SwFieldPage::InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, con
SwFieldTypesEnum::DatabaseNextSet == nTypeId ||
SwFieldTypesEnum::DatabaseName == nTypeId ;
- SfxRequest aReq( &pView->GetViewFrame(),
- bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD );
+ SfxRequest aReq(pView->GetViewFrame(),
+ bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD);
if(bRecordDB)
{
sal_Int32 nIdx{ 0 };
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 593753f263f4..959ceacad2d5 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 aa7b83caf1c5..33aefaa2ce39 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -415,7 +415,7 @@ IMPL_LINK(SwGlossaryDlg, GrpSelect, weld::TreeView&, rBox, void)
NameModify(*m_xShortNameEdit);
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();
}
@@ -438,7 +438,7 @@ void SwGlossaryDlg::Apply()
}
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();
@@ -595,7 +595,7 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OString&, rItemIdent, void)
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));
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index cc11be02b7d6..e0ceb396fc81 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/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index f127a5a64c24..afdf7fc5a756 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -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();
}
@@ -2787,7 +2787,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
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;
@@ -5244,7 +5244,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
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();
@@ -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();
}
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index c56a199ad022..2c402cf44bb3 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -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
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 48ce19524065..4166a754bf77 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/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index e117c7295861..146f2ffde9ef 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -281,7 +281,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
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()));
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 88cfb135ef84..0006596a87fb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -426,7 +426,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
uno::Reference< frame::XDispatchRecorder > xRecorder =
rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( &rViewFrame, 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();
}
@@ -482,7 +482,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
uno::Reference< frame::XDispatchRecorder > xRecorder =
rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( &rViewFrame, 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();
}
@@ -1274,7 +1274,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SfxViewFrame& rViewFrame = GetView().GetViewFrame();
if (SfxRequest::HasMacroRecorder(rViewFrame))
{
- SfxRequest aReq( &rViewFrame, nSlot);
+ SfxRequest aReq(rViewFrame, nSlot);
aReq.AppendItem( SfxStringItem( FN_PARAM_1, OUString(cDelim) ));
if(bToTable)
{
@@ -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();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 5b871c532cf3..60a608a04a70 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();
@@ -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() )
@@ -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 );
}
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 9d7e2bd81e48..8f05aef76788 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -186,7 +186,7 @@ void SwTextShell::ExecDB(SfxRequest const &rReq)
rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aReq( &rViewFrame, 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/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 5d04bab53cda..bfa252217087 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -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/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 41928abe971b..a4458aaf5b21 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2719,7 +2719,7 @@ tools::Long SwView::InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium>
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()));