Kaydet (Commit) 3150ae30 authored tarafından Caolán McNamara's avatar Caolán McNamara

valgrind: check return of convertDateTime before using fDate

lots of spew in VALGRIND=memcheck make CppunitTest_writerperfect_calc

Change-Id: I8b95e95218beefe19e881c9d055323d0abec49c7
üst 78bc1be4
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment