summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-28 09:30:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 11:29:19 +0000
commit1a940e329aabb7929e7c12c34464098921b8a720 (patch)
treeb93cae807429c41cb50bb4fcbbdcf3947befbd52 /unotools
parent4d3b7c575a27aff055d738e540a52290621b6a3f (diff)
coverity#440774 Logically dead code
Change-Id: Id6f13ba0f51bef17de6b5e200c71dbde06e3ab63
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index a05ee218d664..da47e8b876a9 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -1380,17 +1380,8 @@ OUString LocaleDataWrapper::getTime( const Time& rTime, sal_Bool bSec, sal_Bool
sal_Unicode aBuf[128];
sal_Unicode* pBuf = aBuf;
sal_uInt16 nHour = rTime.GetHour();
- sal_Bool bHour12 = sal_False; //!TODO: AM/PM from default time format code
- if ( bHour12 )
- {
- nHour %= 12;
- // 0:00 -> 12:00
- if ( !nHour )
- nHour = 12;
- }
- else
- nHour %= 24;
+ nHour %= 24;
pBuf = ImplAdd2UNum( pBuf, nHour, sal_True /* IsTimeLeadingZero() */ );
pBuf = ImplAddString( pBuf, getTimeSep() );
@@ -1407,17 +1398,7 @@ OUString LocaleDataWrapper::getTime( const Time& rTime, sal_Bool bSec, sal_Bool
}
}
- OUString aStr(aBuf, pBuf - aBuf);
-
- if ( bHour12 )
- {
- if ( (rTime.GetHour() % 24) >= 12 )
- aStr += getTimePM();
- else
- aStr += getTimeAM();
- }
-
- return aStr;
+ return OUString(aBuf, pBuf - aBuf);
}