diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-03-12 20:57:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-12 22:28:38 +0000 |
commit | c3cd1005568469dc2514627c76378c2f84da2b0d (patch) | |
tree | 5457b8cda8b2afeea297e551ce45b3bb80985e98 /cui | |
parent | 6d15c85759d25807cf88561ac3d05cae5f15a169 (diff) |
CppCheck cleanlyness : reduce variable's scope
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f
Reviewed-on: https://gerrit.libreoffice.org/14843
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/treeopt.cxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 3 |
3 files changed, 2 insertions, 6 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 88c2cdb9a006..31c4ee59aad8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1236,7 +1236,6 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) if ( pViewFrame ) { const SfxPoolItem* pItem = NULL; - SfxPoolItem* pClone = NULL; SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_LANGUAGE, static_cast<const SvxLanguageItem*>(pItem)->GetLanguage())); @@ -1248,7 +1247,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) pRet->Put(aHyphen); if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem)) { - pClone = pItem->Clone(); + SfxPoolItem* pClone = pItem->Clone(); pRet->Put(*pClone); delete pClone; } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 578ce8cb5c51..fa7e31f7ebf2 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -3253,8 +3253,6 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); - bChanged = true; - // Pair-Kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 57d586122507..97157ba57c8a 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -1276,7 +1276,6 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) { - bool bAdded = false; bool bDeleted = false; sal_uLong nReturn = 0; const sal_uLong nReturnChanged = 0x1; // THE boolean return value @@ -1294,7 +1293,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) sal_Int32 nErrPos=0; pNumFmtShell->SetCurCurrencyEntry(NULL); - bAdded = pNumFmtShell->AddFormat( aFormat, nErrPos, + bool bAdded = pNumFmtShell->AddFormat( aFormat, nErrPos, nCatLbSelPos, nFmtLbSelPos, aEntryList); if ( bAdded ) |