To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=80796 Issue #|80796 Summary|DoubleNumericField crasher & oddness ... Component|utilities Version|680m225 Platform|All URL| OS/Version|Linux Status|NEW Status whiteboard| Keywords| Resolution| Issue type|PATCH Priority|P3 Subcomponent|code Assigned to|cd Reported by|mmeeks
------- Additional comments from [EMAIL PROTECTED] Fri Aug 17 16:15:49 +0000 2007 ------- When we instantiate an UNO control by name "NumericField" programaticly - and then click inside & type a single character we get a SEGV: #5 0xb430efdc in DoubleNumericField::CheckText (this=0x84d1ff8, [EMAIL PROTECTED]) at /data/opt/OpenOffice/src680-m224/svtools/source/control/fmtfield.cxx:1201 1201 return m_pNumberValidator->isValidNumericFragment( sText ); (gdb) p m_pNumberValidator $3 = (validation::NumberValidator *) 0x0 (gdb) l 1196 if (bFound && (nStart == 0) && (nEnd == sForceComplete.Len())) 1197 return TRUE; 1198 1199 return FALSE; 1200 #else 1201 return m_pNumberValidator->isValidNumericFragment( sText ); 1202 #endif 1203 } If we call some methods of course, ResetConformanceTester is prolly called which sets the validator, if we do not -> bang :-) suggested patch: --- inc/svtools/fmtfield.hxx 11 Apr 2007 19:19:05 -0000 1.2 +++ inc/svtools/fmtfield.hxx 17 Aug 2007 16:01:17 -0000 @@ -304,6 +304,7 @@ public: ,m_pNumberValidator( NULL ) #endif { + ResetConformanceTester(); } DoubleNumericField(Window* pParent, const ResId& rResId) @@ -314,6 +315,7 @@ public: ,m_pNumberValidator( NULL ) #endif { + ResetConformanceTester(); } virtual ~DoubleNumericField(); Or - failing that, perhaps a check for m_pNumberValidator != NULL before using it (but that will do ~no validation)- so take your pick: --- svtools/source/control/fmtfield.cxx 27 Jun 2007 21:24:43 -0000 1.38 +++ svtools/source/control/fmtfield.cxx 17 Aug 2007 16:12:15 -0000 @@ -1198,7 +1198,10 @@ BOOL DoubleNumericField::CheckText(const return FALSE; #else - return m_pNumberValidator->isValidNumericFragment( sText ); + if (m_pNumberValidator != NULL) + return m_pNumberValidator->isValidNumericFragment( sText ); + else + return TRUE; #endif } Then again (again) reading svtools/source/uno/unoiface.cxx: case BASEPROPERTY_ENFORCE_FORMAT: { sal_Bool bEnable( sal_True ); if ( Value >>= bEnable ) pField->EnableNotANumber( !bEnable ); } break; *Looks* (from the name) as if 'EnforceFormat' would allow non-legal characters to be entered (eg. strings) - which -looks- like what 'EnableNotANumber' sets on pField - but (actually) this seems to do something totally different wrt. 'NaN' values. Is that a bug ? or a feature ? or just a confusing property name ? --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]