diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-05-23 09:13:05 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-05-23 09:13:05 +0000 |
commit | ad381bf8e627f2f51ce7d9eba99f95b5c6d6c989 (patch) | |
tree | 6a299407f0746851ee8beea376b8039ebf5381ef /forms/source | |
parent | da5d5dc03ab87de7fcc18f263032cd577c115dcb (diff) |
#86172# clear the format keys in the tables when releasing the number formats supplier
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/misc/limitedformats.cxx | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx index 0a2f081fd91d..6cdf6d02abe2 100644 --- a/forms/source/misc/limitedformats.cxx +++ b/forms/source/misc/limitedformats.cxx @@ -2,9 +2,9 @@ * * $RCSfile: limitedformats.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2001-05-23 08:32:20 $ + * last change: $Author: fs $ $Date: 2001-05-23 10:13:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -236,6 +236,16 @@ namespace frm ::rtl::OUString::createFromAscii(pLoopFormats->pDescription), getLocale(pLoopFormats->eLocale) ); +#ifdef DBG_UTIL + try + { + xStandardFormats->getByKey(pLoopFormats->nKey); + } + catch(const Exception&) + { + OSL_ENSURE(sal_False, "OLimitedFormats::ensureTableInitialized: adding the key to the formats collection failed!"); + } +#endif } // next @@ -247,6 +257,19 @@ namespace frm } //--------------------------------------------------------------------- + void OLimitedFormats::clearTable(const sal_Int16 _nTableId) + { + ::osl::MutexGuard aGuard(s_aMutex); + const FormatEntry* pFormats = lcl_getFormatTable(_nTableId); + FormatEntry* pResetLoop = const_cast<FormatEntry*>(pFormats); + while (pResetLoop->pDescription) + { + pResetLoop->nKey = -1; + ++pResetLoop; + } + } + + //--------------------------------------------------------------------- void OLimitedFormats::setAggregateSet(const Reference< XFastPropertySet >& _rxAggregate, sal_Int32 _nOriginalPropertyHandle) { // changes (NULL -> not NULL) and (not NULL -> NULL) are allowed @@ -409,6 +432,9 @@ namespace frm { ::comphelper::disposeComponent(s_xStandardFormats); s_xStandardFormats = NULL; + + clearTable(FormComponentType::TIMEFIELD); + clearTable(FormComponentType::DATEFIELD); } } @@ -419,6 +445,9 @@ namespace frm /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/05/23 08:32:20 rt + * #65293# GCC does not like 'Locale ident(String(), String(), String())' + * * Revision 1.1 2001/05/18 14:48:05 fs * initial checkin - helper for control models with limited formatting capabilities * |