summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-18 11:03:43 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-20 11:02:45 +0000
commitb0c0a074a2318a231f3f635784da494f1b713c53 (patch)
tree148eff548408d274d4208109d948e763c66e1b5d /sd
parent29a9f433c268414747d8ec7343fc2b5987971738 (diff)
clang-tidy clang-analyzer-deadcode.DeadStores
suspect that some of these may reveal latent bugs.... Change-Id: I9de9aabbda9c8952715631577c29c1830df1eb71 Reviewed-on: https://gerrit.libreoffice.org/24200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/stlpool.cxx30
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx1
-rw-r--r--sd/source/filter/html/htmlex.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx6
-rw-r--r--sd/source/ui/view/drtxtob.cxx2
6 files changed, 4 insertions, 39 deletions
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 148cd729ac8d..202a10faf212 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1169,36 +1169,6 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
setDefaultOutlineNumberFormatBulletAndIndent(i, aNumberFormat);
-
- sal_uLong nFontSize = 20;
- switch(i)
- {
- case 0:
- {
- nFontSize = 32;
- }
- break;
-
- case 1:
- {
- nFontSize = 32;
- }
- break;
-
- case 2:
- {
- nFontSize = 28;
- }
- break;
-
- case 3:
- {
- nFontSize = 24;
- }
- break;
- }
-
- nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
rBulletFont.SetFontSize(Size(0,846)); // 24 pt
aNumberFormat.SetBulletFont(&rBulletFont);
aNumRule.SetLevel( i, aNumberFormat );
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 757231d6fd87..45dff69dc894 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1607,7 +1607,6 @@ void AnimationExporter::exportAnimate( SvStream& rStrm, const Reference< XAnimat
sal_uInt32 nBits = 0x38;
sal_Int16 nTmp = xAnimate->getCalcMode();
sal_uInt32 nCalcMode = /* (nTmp == AnimationCalcMode::FORMULA) ? 2 : */ (nTmp == AnimationCalcMode::LINEAR) ? 1 : 0;
- nTmp = xAnimate->getValueType();
sal_uInt32 nValueType = GetValueTypeForAttributeName( xAnimate->getAttributeName() );
if ( aBy.hasValue() )
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 956a6416dc6f..3f5369218e0b 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1843,7 +1843,7 @@ bool HtmlExport::CreateHtmlForPresPages()
case presentation::ClickAction_NEXTPAGE:
{
- sal_uLong nPage = nSdPage;
+ sal_uLong nPage;
if (nSdPage == mnSdPageCount - 1)
nPage = mnSdPageCount - 1;
else
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index b5f667e16bcb..4aca67629b21 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -757,7 +757,7 @@ bool Outliner::SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections)
}
if (meMode == SEARCH)
- nMatchCount = pOutlinerView->StartSearchAndReplace(*mpSearchItem);
+ pOutlinerView->StartSearchAndReplace(*mpSearchItem);
}
}
}
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index ecac10c50861..ed686ee13472 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -92,8 +92,6 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
{
SdDrawDocument* pDocument = mrViewShell.GetDoc();
SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin();
- sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
- sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
SetOfByte aVisibleLayers;
bool bHandoutMode = false;
SdPage* pHandoutMPage = nullptr;
@@ -197,8 +195,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
pCurrentPage->SetAutoLayout(aNewAutoLayout, true);
- aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
- aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
aVisibleLayers.Set(aBckgrnd, bBVisible);
aVisibleLayers.Set(aBckgrndObj, bBObjsVisible);
pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 52c7ffcbb09f..187cbf0879d7 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -412,8 +412,6 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
rSet.DisableItem( SID_THES );
}
- //! avoid putting the same item as SfxBoolItem at the end of this function
- nSlotId = 0;
}
break;