diff options
author | nccuong <cao.cuong.ngo@gmail.com> | 2013-03-04 15:25:02 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-06 12:59:26 +0000 |
commit | a6b91730053fc61416716ae176081b91de52532b (patch) | |
tree | 192e578875f9abe82ca535e3cb794944bac9d9aa /sfx2 | |
parent | 6374ae0721a5e5da9ed1a477f9642feba01199a6 (diff) |
fdo#60148 Clean up warnings from the Clang compiler plugin
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/appl/linksrc.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/control/bindings.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/shell.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 |
10 files changed, 33 insertions, 33 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index ff36e493f19d..df9676926de0 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -209,7 +209,7 @@ static char const sDocumentService[] = "DocumentService"; static bool isMediaDescriptor( sal_uInt16 nSlotId ) { - return ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || + return ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ); @@ -233,7 +233,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque return; const ::com::sun::star::beans::PropertyValue* pPropsVal = rArgs.getConstArray(); - if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) { // slot is a property const SfxType* pType = pSlot->GetType(); @@ -352,11 +352,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque sal_Int32 nFoundArgs = 0; #endif // slot is a method - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ ) { - const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs ); + const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs ); SfxPoolItem* pItem = rArg.CreateItem(); if ( !pItem ) { @@ -1010,8 +1010,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // slot is a method - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->GetFormalArgumentCount(); + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->GetFormalArgumentCount(); for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg ) { // check every formal argument of the method @@ -1169,12 +1169,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) continue; - bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); - sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; + bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); + sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; sal_uInt16 nArg; for ( nArg=0; nArg<nFormalArgs; ++nArg ) { - const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg ); + const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg ); sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); if ( nId == nWhich ) break; @@ -2049,7 +2049,7 @@ throw (::com::sun::star::uno::RuntimeException) // Gruppe anw"ahlen ( Gruppe 0 ist intern ) for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ ) { - String aName = pAppSlotPool->SeekGroup( i ); + pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); while ( pSfxSlot ) { @@ -2085,7 +2085,7 @@ throw (::com::sun::star::uno::RuntimeException) // Gruppe anw"ahlen ( Gruppe 0 ist intern ) for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ ) { - String aName = pAppSlotPool->SeekGroup( i ); + pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); if ( pSfxSlot ) { diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 6e5ac6b59752..1a0d8cb6f36e 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -301,11 +301,11 @@ void SvLinkSource::NotifyDataChanged() } } - if( pImpl->pTimer ) - { - delete pImpl->pTimer; - pImpl->pTimer = NULL; - } + if( pImpl->pTimer ) + { + delete pImpl->pTimer; + pImpl->pTimer = NULL; + } } } diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 70edb4fdb9f2..457f70e70214 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1714,7 +1714,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer ) sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine) { SAL_INFO( - "sfx2", + "sfx2.control", std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::EnterRegistrations " << (pFile @@ -1814,7 +1814,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int } SAL_INFO( - "sfx2", + "sfx2.control", std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::LeaveRegistrations " << (pFile diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 8c8cf7a33837..95ee15d4a524 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -452,7 +452,7 @@ void SfxDispatcher::Pop SfxApplication *pSfxApp = SFX_APP(); SAL_INFO( - "sfx2", + "sfx2.control", "-SfxDispatcher(" << this << (bPush ? ")::Push(" : ")::Pop(") << (rShell.GetInterface() ? rShell.GetInterface()->GetClassName() : SAL_STREAM(&rShell)) @@ -1676,7 +1676,7 @@ void SfxDispatcher::FlushImpl() for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) pImp->aFixedObjBars[n].nResId = 0; - SAL_INFO("sfx2", "SfxDispatcher(" << this << ")::Flush() done"); + SAL_INFO("sfx2.control", "SfxDispatcher(" << this << ")::Flush() done"); } //-------------------------------------------------------------------- diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 8c1de06a6592..0fffa4a4aacb 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -551,7 +551,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) return; #endif SAL_INFO( - "sfx2.vb", + "sfx2.control", "SfxShell::DoActivate() " << this << " " << GetInterface()->GetName() << " bMDI " << (bMDI ? "MDI" : "")); @@ -587,7 +587,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) return; #endif SAL_INFO( - "sfx2.vb", + "sfx2.control", "SfxShell::DoDeactivate()" << this << " " << GetInterface()->GetName() << " bMDI " << (bMDI ? "MDI" : "")); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 93dc978cb7c9..48f8abf0b00e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1342,7 +1342,7 @@ sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet ) nDelay = static_cast<sal_uIntPtr>(m_pNFReload->GetValue()); break; case S_Forward: - SAL_WARN_IF(m_pEDForwardURL->GetText().isEmpty(), "sfx2", + SAL_WARN_IF(m_pEDForwardURL->GetText().isEmpty(), "sfx2.dialog", "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!"); bEnableReload = sal_True; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index f774b4eb3520..8245d08b31ec 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1649,7 +1649,7 @@ void FileDialogHelper_Impl::verifyPath() return; } if (maFileName.indexOf('/') != -1) { - SAL_WARN("sfx2", maFileName << " contains /"); + SAL_WARN("sfx2.dialog", maFileName << " contains /"); return; } url.insertName( @@ -1660,7 +1660,7 @@ void FileDialogHelper_Impl::verifyPath() url.GetMainURL(INetURLObject::NO_DECODE), sysPathU); if (e != osl::FileBase::E_None) { SAL_WARN( - "sfx2", + "sfx2.dialog", "getSystemPathFromFileURL(" << url.GetMainURL(INetURLObject::NO_DECODE) << ") failed with " << +e); @@ -1673,7 +1673,7 @@ void FileDialogHelper_Impl::verifyPath() | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) { SAL_WARN( - "sfx2", + "sfx2.dialog", "convertToString(" << sysPathU << ") failed for encoding " << +osl_getThreadTextEncoding()); return; @@ -1681,7 +1681,7 @@ void FileDialogHelper_Impl::verifyPath() struct stat aFileStat; if (stat(sysPathC.getStr(), &aFileStat) == -1) { SAL_WARN( - "sfx2", + "sfx2.dialog", "stat(" << sysPathC.getStr() << ") failed with errno " << errno); return; } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 525da28f73be..06f496294f65 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3158,7 +3158,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) ); if ( pIC ) { - SAL_INFO("sfx2", "SfxDocumentEvent: " + aName); + SAL_INFO("sfx2.doc", "SfxDocumentEvent: " + aName); document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() ); @@ -3171,7 +3171,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) ); if ( pIC ) { - SAL_INFO("sfx2", "SfxEvent: " + aName); + SAL_INFO("sfx2.doc", "SfxEvent: " + aName); document::EventObject aEvent( (frame::XModel*)this, aName ); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index e3ec63e95d3d..1a48896a350b 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -172,7 +172,7 @@ void SfxMenuControl::StateChanged pOwnMenu->EnableItem( GetId(), sal_True ); else #endif - pOwnMenu->EnableItem( GetId(), bIsObjMenu + pOwnMenu->EnableItem( GetId(), bIsObjMenu ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() ) : eState != SFX_ITEM_DISABLED ); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index c97d014aaa2d..260f6b39ca8a 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1160,7 +1160,7 @@ throw (::com::sun::star::uno::RuntimeException) // Select Group ( Group 0 is internal ) for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ ) { - String aName = pSlotPool->SeekGroup( i ); + pSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pSlotPool->FirstSlot(); while ( pSfxSlot ) { @@ -1196,7 +1196,7 @@ throw (::com::sun::star::uno::RuntimeException) SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ ) { - String aName = pSlotPool->SeekGroup( i ); + pSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pSlotPool->FirstSlot(); if ( pSfxSlot ) { |