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,7 +935,8 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) ...@@ -935,7 +935,8 @@ 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(); SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM ); sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
OUString aDate; OUString aDate;
...@@ -943,6 +944,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) ...@@ -943,6 +944,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
Color** ppColor = &pColor; Color** ppColor = &pColor;
pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor ); pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
pNote->SetDate( aDate ); 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