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) ...@@ -935,14 +935,16 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
if( pNote ) if( pNote )
{ {
double fDate; double fDate;
rXMLImport.GetMM100UnitConverter().convertDateTime( fDate, mxAnnotationData->maCreateDate ); if (rXMLImport.GetMM100UnitConverter().convertDateTime(fDate, mxAnnotationData->maCreateDate))
SvNumberFormatter* pNumForm = pDoc->GetFormatTable(); {
sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM ); SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
OUString aDate; sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
Color* pColor = 0; OUString aDate;
Color** ppColor = &pColor; Color* pColor = 0;
pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor ); Color** ppColor = &pColor;
pNote->SetDate( aDate ); pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
pNote->SetDate( aDate );
}
pNote->SetAuthor( mxAnnotationData->maAuthor ); 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