Kaydet (Commit) 6df22f0e authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:checkunusedparams various

Change-Id: I5d1cc807134230d86e0226a12fada204004312d3
Reviewed-on: https://gerrit.libreoffice.org/37675Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst a6f29aae
......@@ -99,7 +99,7 @@ SbError builtin_kernel32(const OUString &aFuncName, SbxArray *pArgs,
SbError SbiDllMgr::Call(
const OUString &aFuncName, const OUString &aDllName,
SbxArray *pArgs, SbxVariable &rRetVal,
bool /* bCDecl */)
SAL_UNUSED_PARAMETER bool /* bCDecl */)
{
if (aDllName == "kernel32")
return builtin_kernel32(aFuncName, pArgs, rRetVal);
......@@ -107,7 +107,7 @@ SbError SbiDllMgr::Call(
return ERRCODE_BASIC_NOT_IMPLEMENTED;
}
void SbiDllMgr::FreeDll(OUString const &) {}
void SbiDllMgr::FreeDll(SAL_UNUSED_PARAMETER OUString const &) {}
SbiDllMgr::SbiDllMgr(): impl_(new Impl) {}
......
......@@ -271,7 +271,7 @@ namespace oglcanvas
};
}
bool SpriteDeviceHelper::showBuffer( bool bIsVisible, bool /*bUpdateAll*/ )
bool SpriteDeviceHelper::showBuffer( bool bIsVisible, SAL_UNUSED_PARAMETER bool /*bUpdateAll*/ )
{
// hidden or disposed?
if( !bIsVisible || !mxContext->isInitialized() || !mpSpriteCanvas )
......
......@@ -1533,7 +1533,7 @@ namespace svx
if( xDict.is() && m_pSuggestions )
{
//delete old entry
bool bRemovedSomething = DeleteEntryFromDictionary( m_aOriginal, xDict );
bool bRemovedSomething = DeleteEntryFromDictionary( xDict );
OUString aLeft( m_aOriginal );
const OUString* pRight = m_pSuggestions->First();
......@@ -1565,7 +1565,7 @@ namespace svx
}
}
bool HangulHanjaEditDictDialog::DeleteEntryFromDictionary( const OUString&, const Reference< XConversionDictionary >& xDict )
bool HangulHanjaEditDictDialog::DeleteEntryFromDictionary( const Reference< XConversionDictionary >& xDict )
{
bool bRemovedSomething = false;
if( xDict.is() )
......@@ -1596,7 +1596,7 @@ namespace svx
IMPL_LINK_NOARG( HangulHanjaEditDictDialog, DeletePBPushHdl, Button*, void )
{
if( DeleteEntryFromDictionary( m_aOriginal, m_rDictList[ m_nCurrentDict ] ) )
if( DeleteEntryFromDictionary( m_rDictList[ m_nCurrentDict ] ) )
{
m_aOriginal.clear();
m_bModifiedOriginal = true;
......
......@@ -310,7 +310,7 @@ namespace svx
void SetEditText( Edit& _rEdit, sal_uInt16 _nEntryNum );
void EditModify( Edit* _pEdit, sal_uInt8 _nEntryOffset );
bool DeleteEntryFromDictionary( const OUString& rEntry, const css::uno::Reference< css::linguistic2::XConversionDictionary >& xDict );
bool DeleteEntryFromDictionary( const css::uno::Reference< css::linguistic2::XConversionDictionary >& xDict );
public:
HangulHanjaEditDictDialog( vcl::Window* _pParent, HHDictList& _rDictList, sal_uInt32 _nSelDict );
......
......@@ -314,7 +314,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
0 - Number;
1 - Bullet;
2 - Bitmap; */
void SwitchNumberType( sal_uInt8 nType, bool bBmp = false );
void SwitchNumberType( sal_uInt8 nType );
void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
DECL_LINK( NumberTypeSelectHdl_Impl, ListBox&, void );
......
......@@ -338,7 +338,7 @@ namespace offapp
return VclPtr<ConnectionPoolOptionsPage>::Create(_pParent, *_rAttrSet);
}
void ConnectionPoolOptionsPage::implInitControls(const SfxItemSet& _rSet, bool /*_bFromReset*/)
void ConnectionPoolOptionsPage::implInitControls(const SfxItemSet& _rSet)
{
// the enabled flag
const SfxBoolItem* pEnabled = _rSet.GetItem<SfxBoolItem>(SID_SB_POOLING_ENABLED);
......@@ -399,13 +399,13 @@ namespace offapp
void ConnectionPoolOptionsPage::ActivatePage( const SfxItemSet& _rSet)
{
SfxTabPage::ActivatePage(_rSet);
implInitControls(_rSet, false);
implInitControls(_rSet);
}
void ConnectionPoolOptionsPage::Reset(const SfxItemSet* _rSet)
{
implInitControls(*_rSet, true);
implInitControls(*_rSet);
}
......
......@@ -64,7 +64,7 @@ namespace offapp
DECL_LINK( OnEnabledDisabled, Button*, void );
DECL_LINK( OnDriverRowChanged, const DriverPooling*, void );
void implInitControls(const SfxItemSet& _rSet, bool _bFromReset);
void implInitControls(const SfxItemSet& _rSet);
void commitTimeoutField();
};
......
......@@ -1649,7 +1649,7 @@ void SvxNumOptionsTabPage::InitControls()
}
// 0 - Number; 1 - Bullet; 2 - Bitmap
void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, bool )
void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType )
{
if(nBullet == nType)
return;
......@@ -1797,7 +1797,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox&, rBox, void
if(!bBmp)
aNumFmt.SetGraphic("");
pActNum->SetLevel(i, aNumFmt);
SwitchNumberType(SHOW_BITMAP, bBmp );
SwitchNumberType(SHOW_BITMAP);
bShowOrient = true;
}
else if( SVX_NUM_CHAR_SPECIAL == nNumberingType )
......
......@@ -299,7 +299,7 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
Application::PostUserEvent( LINK( nullptr, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
}
oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(SAL_UNUSED_PARAMETER void* /*pData*/, oslSignalInfo* pInfo)
{
if( pInfo->Signal == osl_Signal_Terminate )
RequestHandler::SetDowning();
......
......@@ -932,7 +932,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx, Button*, void)
IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn, Button*, void)
{
#if ENABLE_EXTENSION_UPDATE
m_pManager->checkUpdates( false, true );
m_pManager->checkUpdates();
#else
(void) this;
#endif
......@@ -1433,7 +1433,7 @@ void ShowLicenseDialog::dispose()
// UpdateRequiredDialogService
UpdateRequiredDialogService::UpdateRequiredDialogService( uno::Sequence< uno::Any > const&,
UpdateRequiredDialogService::UpdateRequiredDialogService( SAL_UNUSED_PARAMETER uno::Sequence< uno::Any > const&,
uno::Reference< uno::XComponentContext > const& xComponentContext )
: m_xComponentContext( xComponentContext )
{
......
......@@ -258,7 +258,7 @@ void ServiceImpl::startExecuteModal(
}
if ( m_bShowUpdateOnly )
{
myExtMgr->checkUpdates( true, !bCloseDialog );
myExtMgr->checkUpdates();
if ( bCloseDialog )
myExtMgr->Close();
else
......
......@@ -193,7 +193,7 @@ bool TheExtensionManager::isVisible()
}
void TheExtensionManager::checkUpdates( bool /* bShowUpdateOnly */, bool /*bParentVisible*/ )
void TheExtensionManager::checkUpdates()
{
std::vector< uno::Reference< deployment::XPackage > > vEntries;
uno::Sequence< uno::Sequence< uno::Reference< deployment::XPackage > > > xAllPackages;
......
......@@ -94,7 +94,7 @@ public:
bool isVisible();
void checkUpdates( bool showUpdateOnly, bool parentVisible );
void checkUpdates();
bool installPackage( const OUString &rPackageURL, bool bWarnUser = false );
void createPackageList();
......
......@@ -1944,7 +1944,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(false);
}
static int doc_getTileMode(LibreOfficeKitDocument* /*pThis*/)
static int doc_getTileMode(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
{
return LOK_TILEMODE_BGRA;
}
......@@ -2815,49 +2815,49 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
pDoc->setClientVisibleArea(aRectangle);
}
static int doc_createView(LibreOfficeKitDocument* /*pThis*/)
static int doc_createView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;
return SfxLokHelper::createView();
}
static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, int nId)
static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId)
{
SolarMutexGuard aGuard;
SfxLokHelper::destroyView(nId);
}
static void doc_setView(LibreOfficeKitDocument* /*pThis*/, int nId)
static void doc_setView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId)
{
SolarMutexGuard aGuard;
SfxLokHelper::setView(nId);
}
static int doc_getView(LibreOfficeKitDocument* /*pThis*/)
static int doc_getView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;
return SfxLokHelper::getView();
}
static int doc_getViewsCount(LibreOfficeKitDocument* /*pThis*/)
static int doc_getViewsCount(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;
return SfxLokHelper::getViewsCount();
}
static bool doc_getViewIds(LibreOfficeKitDocument* /*pThis*/, int* pArray, size_t nSize)
static bool doc_getViewIds(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int* pArray, size_t nSize)
{
SolarMutexGuard aGuard;
return SfxLokHelper::getViewIds(pArray, nSize);
}
unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/,
const char* pFontName,
const char* pChar,
int* pFontWidth,
......@@ -2999,7 +2999,7 @@ static void lo_setDocumentPassword(LibreOfficeKit* pThis,
pLib->mInteractionMap.find(OString(pURL))->second->SetPassword(pPassword);
}
static char* lo_getVersionInfo(LibreOfficeKit* /*pThis*/)
static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER LibreOfficeKit* /*pThis*/)
{
const OUString sVersionStrTemplate(
"{ "
......
......@@ -69,7 +69,7 @@ private:
// everywhere we want to log something to the crash report system.
#if HAVE_FEATURE_BREAKPAD
#else
inline void CrashReporter::AddKeyValue(const OUString& /*rKey*/, const OUString& /*rValue*/)
inline void CrashReporter::AddKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/)
{
}
#endif
......
......@@ -32,12 +32,11 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL hyphen_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = Hyphenator_getFactory(
pImplName,
static_cast< XMultiServiceFactory * >( pServiceManager ),
pRegistryKey );
static_cast< XMultiServiceFactory * >( pServiceManager ) );
return pRet;
}
......
......@@ -872,7 +872,7 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
}
void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
XMultiServiceFactory * pServiceManager )
{
void * pRet = nullptr;
if ( Hyphenator::getImplementationName_Static().equalsAscii( pImplName ) )
......
......@@ -131,8 +131,7 @@ inline OUString Hyphenator::getImplementationName_Static() throw()
}
void * SAL_CALL Hyphenator_getFactory(
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager,
void *);
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
#endif
......
......@@ -32,13 +32,12 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL spell_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = nullptr;
pRet = SpellChecker_getFactory(
pImplName,
static_cast< XMultiServiceFactory * >( pServiceManager ),
pRegistryKey );
static_cast< XMultiServiceFactory * >( pServiceManager ) );
return pRet;
}
......
......@@ -673,7 +673,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
}
void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
XMultiServiceFactory * pServiceManager )
{
void * pRet = nullptr;
if ( SpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
......
......@@ -119,8 +119,7 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
}
void * SAL_CALL SpellChecker_getFactory(
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager,
void *);
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
#endif
......
......@@ -634,7 +634,7 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
}
void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
XMultiServiceFactory * pServiceManager )
{
void * pRet = nullptr;
if ( Thesaurus::getImplementationName_Static().equalsAscii( pImplName ) )
......
......@@ -134,8 +134,7 @@ inline OUString Thesaurus::getImplementationName_Static() throw()
}
void * SAL_CALL Thesaurus_getFactory(
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager,
void *);
char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
#endif
......
......@@ -32,12 +32,11 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL lnth_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = Thesaurus_getFactory(
pImplName,
static_cast< XMultiServiceFactory * >( pServiceManager ),
pRegistryKey );
static_cast< XMultiServiceFactory * >( pServiceManager ) );
return pRet;
}
......
......@@ -740,7 +740,7 @@ EventListener::getPropertySetInfo( )
//decide if the control should execute the event
bool ApproveAll(const ScriptEvent&, void const * )
bool ApproveAll(SAL_UNUSED_PARAMETER const ScriptEvent&, SAL_UNUSED_PARAMETER void const * )
{
return true;
}
......@@ -783,7 +783,7 @@ bool DenyType(const ScriptEvent& evt, void const * pPara)
//when mouse is moving, either the mouse button is pressed or some key is pressed can trigger the OO mouseDragged event,
//the former should be denied, and the latter allowed, only by doing so can the VBA MouseMove event when the "Shift" key is
//pressed can be correctly triggered
bool DenyMouseDrag(const ScriptEvent& evt, void const * )
bool DenyMouseDrag(const ScriptEvent& evt, SAL_UNUSED_PARAMETER void const * )
{
awt::MouseEvent aEvent;
evt.Arguments[ 0 ] >>= aEvent;
......
......@@ -468,7 +468,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
if( nFormat == SotClipboardFormatId::RTF && lcl_HasOnlyOneTable( mpSdDrawDocument ) )
{
bOK = SetTableRTF( mpSdDrawDocument, rFlavor );
bOK = SetTableRTF( mpSdDrawDocument );
}
else if( mpOLEDataHelper && mpOLEDataHelper->HasFormat( rFlavor ) )
{
......@@ -832,7 +832,7 @@ void SdTransferable::SetView(const ::sd::View* pView)
StartListening(*const_cast<sd::View*>(mpSdView));
}
bool SdTransferable::SetTableRTF( SdDrawDocument* pModel, const DataFlavor& /*rFlavor*/)
bool SdTransferable::SetTableRTF( SdDrawDocument* pModel )
{
if ( pModel )
{
......
......@@ -35,7 +35,7 @@ SpellDialogChildWindow::SpellDialogChildWindow (
vcl::Window* _pParent,
sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* /*pInfo*/)
SAL_UNUSED_PARAMETER SfxChildWinInfo* /*pInfo*/)
: svx::SpellDialogChildWindow (_pParent, nId, pBindings),
mpSdOutliner (nullptr),
mbOwnOutliner (false)
......
......@@ -69,7 +69,7 @@ public:
const std::vector<OUString>& GetPageBookmarks() const { return maPageBookmarks; }
::sd::DrawDocShell* GetPageDocShell() const { return mpPageDocShell; }
bool SetTableRTF( SdDrawDocument*, const css::datatransfer::DataFlavor& );
bool SetTableRTF( SdDrawDocument* );
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
static SdTransferable* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw();
......
......@@ -1156,25 +1156,21 @@ UUIInteractionHelper::handleMacroConfirmRequest(
bool bApprove = false;
std::unique_ptr< ResMgr > pResMgr( ResMgr::CreateResMgr( "uui" ) );
if ( pResMgr.get() )
{
bool bShowSignatures = aSignInfo.getLength() > 0;
ScopedVclPtrInstance<MacroWarning> aWarning(
getParentProperty(), bShowSignatures, *pResMgr.get() );
aWarning->SetDocumentURL( aDocumentURL );
if ( aSignInfo.getLength() > 1 )
{
aWarning->SetStorage( xZipStorage, aDocumentVersion, aSignInfo );
}
else if ( aSignInfo.getLength() == 1 )
{
aWarning->SetCertificate( aSignInfo[ 0 ].Signer );
}
bool bShowSignatures = aSignInfo.getLength() > 0;
ScopedVclPtrInstance<MacroWarning> aWarning(
getParentProperty(), bShowSignatures );
bApprove = aWarning->Execute() == RET_OK;
aWarning->SetDocumentURL( aDocumentURL );
if ( aSignInfo.getLength() > 1 )
{
aWarning->SetStorage( xZipStorage, aDocumentVersion, aSignInfo );
}
else if ( aSignInfo.getLength() == 1 )
{
aWarning->SetCertificate( aSignInfo[ 0 ].Signer );
}
bApprove = aWarning->Execute() == RET_OK;
if ( bApprove && xApprove.is() )
xApprove->select();
......
......@@ -64,7 +64,7 @@ namespace
}
MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures, ResMgr& )
MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures )
:ModalDialog ( _pParent, "MacroWarnMedium", "uui/ui/macrowarnmedium.ui" )
,mpInfos ( nullptr )
,mbSignedMode ( true )
......
......@@ -64,7 +64,7 @@ private:
void InitControls();
public:
MacroWarning( vcl::Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
MacroWarning( vcl::Window* pParent, bool _bShowSignatures );
virtual ~MacroWarning() override;
virtual void dispose() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment