summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-08 12:28:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-08 13:37:24 +0100
commita6bcb8c35e926a5d8965636f3561fec91880c7f7 (patch)
tree59feb1e228c45b8b5c857cc29420cb868f391ffc /sfx2/source
parentae510e67cdc644c541ffa26b2f91bba71a9856d2 (diff)
loplugin:constantparam in linguistic..sfx2
Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/config/evntconf.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx9
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx3
-rw-r--r--sfx2/source/dialog/mgetempl.cxx9
-rw-r--r--sfx2/source/inc/eventsupplier.hxx3
-rw-r--r--sfx2/source/notify/eventsupplier.cxx7
7 files changed, 14 insertions, 21 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index ef14716ebe2e..e1cf3a6944a3 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -651,7 +651,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
ErrCode nErr = sfx2::FileOpenDialog_Impl(GetTopWindow(),
nDialogType,
- eDialogFlags, OUString(), aURLList,
+ eDialogFlags, aURLList,
aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList);
if ( nErr == ERRCODE_ABORT )
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 9de6fb043487..0712e7cda534 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -244,7 +244,7 @@ void SfxEventConfiguration::ConfigureEvent( const OUString& aName, const SvxMacr
SvxMacro* SfxEventConfiguration::ConvertToMacro( const css::uno::Any& rElement, SfxObjectShell* pDoc )
{
- return SfxEvents_Impl::ConvertToMacro( rElement, pDoc, true/*bBlowUp*/ );
+ return SfxEvents_Impl::ConvertToMacro( rElement, pDoc );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d2e4bc8bf71a..69847ed42692 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2124,12 +2124,12 @@ IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl, void*, void)
m_pVertScroll->DoScrollAction ( ScrollType::LineUp );
}
-void CustomPropertiesControl::AddLine( const OUString& sName, Any const & rAny, bool bInteractive )
+void CustomPropertiesControl::AddLine( Any const & rAny )
{
- m_pPropertiesWin->AddLine( sName, rAny );
+ m_pPropertiesWin->AddLine( OUString(), rAny );
long nLineCount = m_pPropertiesWin->GetTotalLineCount();
m_pVertScroll->SetRangeMax(nLineCount + 1);
- if ( bInteractive && m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() )
+ if ( m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() )
m_pVertScroll->DoScroll(nLineCount + 1);
}
@@ -2162,8 +2162,7 @@ void SfxCustomPropertiesPage::dispose()
IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl, Button*, void)
{
- Any aAny;
- m_pPropertiesCtrl->AddLine( OUString(), aAny, true );
+ m_pPropertiesCtrl->AddLine( Any() );
}
bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 33404ae1ca2d..ea9cb326f8ee 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2633,7 +2633,6 @@ void FileDialogHelper::DialogClosed( const DialogClosedEvent& _rEvent )
ErrCode FileOpenDialog_Impl( const vcl::Window* pParent,
sal_Int16 nDialogType,
FileDialogFlags nFlags,
- const OUString& rFact,
std::vector<OUString>& rpURLList,
OUString& rFilter,
SfxItemSet *& rpSet,
@@ -2650,7 +2649,7 @@ ErrCode FileOpenDialog_Impl( const vcl::Window* pParent,
if (nFlags & FileDialogFlags::SignPDF)
pDialog.reset(new FileDialogHelper(nDialogType, nFlags, SfxResId(STR_SFX_FILTERNAME_PDF), "pdf", rStandardDir, rBlackList, pParent));
else
- pDialog.reset(new FileDialogHelper(nDialogType, nFlags, rFact, nDialog, SfxFilterFlags::NONE, SfxFilterFlags::NONE, rStandardDir, rBlackList, pParent));
+ pDialog.reset(new FileDialogHelper(nDialogType, nFlags, OUString(), nDialog, SfxFilterFlags::NONE, SfxFilterFlags::NONE, rStandardDir, rBlackList, pParent));
OUString aPath;
if ( pPath )
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 6268c5d61ace..bc40c3e83893 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -348,7 +348,7 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl, ListBox&, voi
IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl, Button*, void )
{
OUString aTemplName(m_pFollowLb->GetSelectedEntry());
- Execute_Impl(SID_STYLE_EDIT, aTemplName, OUString(), static_cast<sal_uInt16>(pStyle->GetFamily()));
+ Execute_Impl(SID_STYLE_EDIT, aTemplName, static_cast<sal_uInt16>(pStyle->GetFamily()));
}
IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl, ListBox&, void )
@@ -364,25 +364,22 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl, Button*, void )
{
OUString aTemplName(m_pBaseLb->GetSelectedEntry());
if (aTemplName != SfxResId(STR_NONE))
- Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),static_cast<sal_uInt16>(pStyle->GetFamily()) );
+ Execute_Impl( SID_STYLE_EDIT, aTemplName, static_cast<sal_uInt16>(pStyle->GetFamily()) );
}
// Internal: Perform functions through the Dispatcher
bool SfxManageStyleSheetPage::Execute_Impl(
- sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily)
+ sal_uInt16 nId, const OUString &rStr, sal_uInt16 nFamily)
{
SfxDispatcher &rDispatcher = *SfxGetpApp()->GetDispatcher_Impl();
SfxStringItem aItem(nId, rStr);
SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily);
- SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
const SfxPoolItem* pItems[ 6 ];
sal_uInt16 nCount = 0;
if( !rStr.isEmpty() )
pItems[ nCount++ ] = &aItem;
pItems[ nCount++ ] = &aFamily;
- if ( !rRefStr.isEmpty() )
- pItems[ nCount++ ] = &aRefName;
pItems[ nCount++ ] = nullptr;
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 7a5706de907b..3fdd009bcabd 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -79,7 +79,8 @@ public:
// --- ::lang::XEventListener ---
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
- static SvxMacro* ConvertToMacro( const css::uno::Any& rElement, SfxObjectShell* pDoc, bool bNormalizeMacro );
+ // convert and normalize
+ static SvxMacro* ConvertToMacro( const css::uno::Any& rElement, SfxObjectShell* pDoc );
static void NormalizeMacro( const css::uno::Any& rIn, css::uno::Any& rOut, SfxObjectShell* pDoc );
static void NormalizeMacro(
const ::comphelper::NamedValueCollection& i_eventDescriptor,
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 893a2d284455..612f57b02c1b 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -330,15 +330,12 @@ SfxEvents_Impl::~SfxEvents_Impl()
}
-SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShell* pObjShell, bool bNormalizeMacro )
+SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShell* pObjShell )
{
SvxMacro* pMacro = nullptr;
uno::Sequence < beans::PropertyValue > aProperties;
uno::Any aAny;
- if ( bNormalizeMacro )
- NormalizeMacro( rElement, aAny, pObjShell );
- else
- aAny = rElement;
+ NormalizeMacro( rElement, aAny, pObjShell );
if ( aAny >>= aProperties )
{