summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-13 10:22:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-13 10:47:49 +0000
commit3150ae30415c1253258829dd3d39c015e75c6171 (patch)
tree29db75bb6ae72e896f85a2f4a92c0f545bc2ede5 /sc/source/filter
parent78bc1be4a7f8b507eaddc6defe1cc3505edf2238 (diff)
valgrind: check return of convertDateTime before using fDate
lots of spew in VALGRIND=memcheck make CppunitTest_writerperfect_calc Change-Id: I8b95e95218beefe19e881c9d055323d0abec49c7
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 7c2c1903e877..68fb1fe9e71d 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -935,14 +935,16 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
if( pNote )
{
double fDate;
- rXMLImport.GetMM100UnitConverter().convertDateTime( fDate, mxAnnotationData->maCreateDate );
- SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
- sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
- OUString aDate;
- Color* pColor = 0;
- Color** ppColor = &pColor;
- pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
- pNote->SetDate( aDate );
+ if (rXMLImport.GetMM100UnitConverter().convertDateTime(fDate, mxAnnotationData->maCreateDate))
+ {
+ SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
+ sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
+ OUString aDate;
+ Color* pColor = 0;
+ Color** ppColor = &pColor;
+ pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
+ pNote->SetDate( aDate );
+ }
pNote->SetAuthor( mxAnnotationData->maAuthor );
}