sc/source/filter/xml/xmlcelli.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
New commits: commit 14609e342936225ddd1fcbd9874672ca36440bfe Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 13 10:22:08 2014 +0000 valgrind: check return of convertDateTime before using fDate lots of spew in VALGRIND=memcheck make CppunitTest_writerperfect_calc Change-Id: I8b95e95218beefe19e881c9d055323d0abec49c7 (cherry picked from commit 3150ae30415c1253258829dd3d39c015e75c6171) Reviewed-on: https://gerrit.libreoffice.org/12403 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index d8d409a..182f751 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 ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits