diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-13 10:22:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-13 10:47:49 +0000 |
commit | 3150ae30415c1253258829dd3d39c015e75c6171 (patch) | |
tree | 29db75bb6ae72e896f85a2f4a92c0f545bc2ede5 /sc/source/filter | |
parent | 78bc1be4a7f8b507eaddc6defe1cc3505edf2238 (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.cxx | 18 |
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 ); } |