summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-17 11:21:56 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-17 11:02:18 +0000
commitdb93b92d78714ed193b3cbe52b18e3cfd9da99b8 (patch)
tree1442edf9552192ce29b3e271396291e2bbd269a0 /sw/source/uibase
parent336d816176650726f6d14539464d9fd28ddd032d (diff)
loplugin:constantparam in sfx2
Change-Id: I53e690ab8d50fb3ce43ba633fc018e7b66e591cd Reviewed-on: https://gerrit.libreoffice.org/23321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/srcview.hxx2
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx6
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/view.cxx9
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx2
10 files changed, 18 insertions, 17 deletions
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index b9823a8289e5..58f5b4409547 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -1316,7 +1316,7 @@ void SwSidebarWin::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, 0, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, SfxCallMode::ASYNCHRON );
break;
case FN_DELETE_NOTE_AUTHOR:
case FN_HIDE_NOTE_AUTHOR:
@@ -1326,7 +1326,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
const SfxPoolItem* aItems[2];
aItems[0] = &aItem;
aItems[1] = nullptr;
- mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, SfxCallMode::ASYNCHRON );
}
break;
default:
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index ad1263421635..10130879ad3b 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3318,7 +3318,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!comphelper::LibreOfficeKit::isActive())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_GRAFIC_DLG, nullptr, 0,
+ FN_FORMAT_GRAFIC_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@@ -3337,7 +3337,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!comphelper::LibreOfficeKit::isActive())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_FRAME_DLG, nullptr, 0,
+ FN_FORMAT_FRAME_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 9a92d4bb01a7..3efb56ca6001 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -199,7 +199,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true );
SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
- SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
+ SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const override;
SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(vcl::Window *pParent, const SfxItemSet &rOptions ) override;
diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx
index 1c3e88410142..7db2669a745c 100644
--- a/sw/source/uibase/inc/srcview.hxx
+++ b/sw/source/uibase/inc/srcview.hxx
@@ -76,7 +76,7 @@ public:
void Load(SwDocShell* pDocShell);
- virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL ) override;
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index b648c7a0d08a..c58953e52d13 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -392,7 +392,7 @@ void SwInputWindow::ApplyFormula()
const SfxPoolItem* aArgs[2];
aArgs[0] = &aParam;
aArgs[1] = nullptr;
- pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SfxCallMode::ASYNCHRON );
+ pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, SfxCallMode::ASYNCHRON );
}
void SwInputWindow::CancelFormula()
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 782b1274dca8..bb1b5c83aa55 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -509,7 +509,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetNewCursorPos( sNewCursorPos );
SfxViewFrame *pTmpFrame = mrView.GetViewFrame();
- pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
+ pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@@ -957,7 +957,7 @@ MOVEPAGE:
nSelPage +=2;
SetNewPage( nSelPage );
SfxViewFrame *pTmpFrame = GetViewFrame();
- pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
+ pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
break;
@@ -1668,7 +1668,7 @@ SfxPrinter* SwPagePreview::GetPrinter( bool bCreate )
return pViewWin->GetViewShell()->getIDocumentDeviceAccess().getPrinter( bCreate );
}
-sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags nDiffFlags, bool )
+sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess().getPrinter( false );
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index abc06dd5547c..0def762c6410 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -660,7 +660,7 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
}
-sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool )
+sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SfxPrinterChangeFlags::JOBSETUP | SfxPrinterChangeFlags::PRINTER) & nDiffFlags )
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index f739b86ec335..36f8f12db6e1 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1236,13 +1236,13 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )
}
}
-void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence, bool bBrowse )
+void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence )
{
if(GetDocShell()->IsPreview()||m_bIsPreviewDoubleClick)
return;
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
sal_Int32 nLength = rSequence.getLength();
- if (nLength && (!m_pWrtShell->IsNewLayout() || m_pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
+ if (nLength)
{
SET_CURR_SHELL(m_pWrtShell);
const beans::PropertyValue *pValue = rSequence.getConstArray();
@@ -1251,7 +1251,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
const SwViewOption* pVOpt = m_pWrtShell->GetViewOptions();
sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.Left(), nTop = rVis.Top();
- sal_Int64 nRight = bBrowse ? LONG_MIN : rVis.Right(), nBottom = bBrowse ? LONG_MIN : rVis.Bottom();
+ sal_Int64 nRight = LONG_MIN;
+ sal_Int64 nBottom = LONG_MIN;
sal_Int16 nZoomType = static_cast< sal_Int16 >(pVOpt->GetZoomType());
sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->GetZoom());
bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode();
@@ -1422,7 +1423,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
// go to the last editing position when opening own files
if(m_bOldShellWasPagePreview||bIsOwnDocument)
{
- if ( bBrowse && bGotVisibleLeft && bGotVisibleTop )
+ if ( bGotVisibleLeft && bGotVisibleTop )
{
Point aTopLeft(aVis.TopLeft());
// make sure the document is still centered
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 6a915277d92f..7614724f9bc0 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -104,7 +104,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb )
}
}
-sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool )
+sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess().getPrinter( false );
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 7948ddc61558..0c50310dae6a 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -519,7 +519,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
nullptr
};
- pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0,
+ pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
SfxCallMode::ASYNCHRON|SfxCallMode::RECORD );
}