summaryrefslogtreecommitdiff
path: root/sw/source/uibase/fldui/fldmgr.cxx
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 /sw/source/uibase/fldui/fldmgr.cxx
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 'sw/source/uibase/fldui/fldmgr.cxx')
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx16
1 files changed, 0 insertions, 16 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 38b413ad1770..5d0571f4b054 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1222,7 +1222,6 @@ bool SwFieldMgr::InsertField(
SwSetExpField* pExpField = new SwSetExpField(pTyp, rData.m_sPar2, nFormatId);
bExp = true;
pField = pExpField;
- nSubType = nsSwGetSetExpType::GSE_SEQ;
break;
}
@@ -1649,7 +1648,6 @@ void SwFieldMgr::SetMacroPath(const OUString& rPath)
sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter)
{
- double fValue;
short nDefFormat;
switch (nTypeId)
@@ -1657,18 +1655,6 @@ sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumbe
case TYP_TIMEFLD:
case TYP_DATEFLD:
{
- Date aDate( Date::SYSTEM );
- Date* pNullDate = pFormatter->GetNullDate();
-
- fValue = aDate - *pNullDate;
-
- tools::Time aTime( tools::Time::SYSTEM );
-
- sal_uLong nNumFormatTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L +
- (sal_uLong)aTime.GetHour() * 3600L;
-
- fValue += (double)nNumFormatTime / 86400.0;
-
nDefFormat = (nTypeId == TYP_DATEFLD) ? css::util::NumberFormat::DATE : css::util::NumberFormat::TIME;
}
break;
@@ -1676,12 +1662,10 @@ sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumbe
default:
if (bIsText)
{
- fValue = 0.0;
nDefFormat = css::util::NumberFormat::TEXT;
}
else
{
- fValue = 0.0;
nDefFormat = css::util::NumberFormat::ALL;
}
break;