diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-21 14:23:26 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-21 14:23:26 +0000 |
commit | b99c70aff8466ad851b955ffa71d16d76e880410 (patch) | |
tree | 2c301192dbd37d5a1ad6d707665bfdba57fa6db3 /svx/source/form | |
parent | 1f2b4b1209628a07f5cbfbb41615649751c4ef89 (diff) |
INTEGRATION: CWS dba24c (1.85.46); FILE MERGED
2007/10/25 08:47:00 fs 1.85.46.2: during #i81658#: FILTER_CRITERIA -> FILTER
2007/09/13 19:51:37 fs 1.85.46.1: #i81073# catch exceptions when loading the forms
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index b74d00e142fe..3fd9a940b834 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: fmshimp.cxx,v $ * - * $Revision: 1.85 $ + * $Revision: 1.86 $ * - * last change: $Author: hr $ $Date: 2007-07-31 13:57:49 $ + * last change: $Author: ihi $ $Date: 2007-11-21 15:23:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -2922,14 +2922,12 @@ void saveFilter(const Reference< XFormController>& _rxController) try { - xFormAsSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, xControllerAsSet->getPropertyValue(FM_PROP_FILTER_CRITERIA)); - - sal_Bool bB(sal_True); - xFormAsSet->setPropertyValue(FM_PROP_APPLYFILTER, Any(&bB,getBooleanCppuType())); + xFormAsSet->setPropertyValue(FM_PROP_FILTER, xControllerAsSet->getPropertyValue(FM_PROP_FILTER)); + xFormAsSet->setPropertyValue(FM_PROP_APPLYFILTER, makeAny( (sal_Bool)sal_True ) ); } - catch(Exception&) + catch (const Exception& ) { - DBG_ERROR("saveFilter: Exception occured!"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -2969,7 +2967,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) try { Reference< XPropertySet > xFormAsSet((*j)->getModel(), UNO_QUERY); - aOriginalFilters.push_back(::comphelper::getString(xFormAsSet->getPropertyValue(FM_PROP_FILTER_CRITERIA))); + aOriginalFilters.push_back(::comphelper::getString(xFormAsSet->getPropertyValue(FM_PROP_FILTER))); aOriginalApplyFlags.push_back(::comphelper::getBOOL(xFormAsSet->getPropertyValue(FM_PROP_APPLYFILTER))); } catch(Exception&) @@ -3020,13 +3018,13 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) sal_Bool bOriginalApplyFlag = aOriginalApplyFlags[ j - rControllers.begin() ]; try { - xFormSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, makeAny(sOriginalFilter)); + xFormSet->setPropertyValue(FM_PROP_FILTER, makeAny(sOriginalFilter)); xFormSet->setPropertyValue(FM_PROP_APPLYFILTER, makeAny(bOriginalApplyFlag)); xReload->reload(); } - catch(Exception&) + catch(const Exception&) { - DBG_ERROR("FmXFormShell::stopFiltering: Exception occured!"); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -4052,18 +4050,25 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour / xForms->getByIndex( j ) >>= xForm; bFormWasLoaded = sal_False; // a database form must be loaded for - if ( 0 == ( _nBehaviour & FORMS_UNLOAD ) ) - { - if ( ::isLoadable( xForm ) && !xForm->isLoaded() ) - xForm->load(); - } - else + try { - if ( xForm->isLoaded() ) + if ( 0 == ( _nBehaviour & FORMS_UNLOAD ) ) { - bFormWasLoaded = sal_True; - xForm->unload(); + if ( ::isLoadable( xForm ) && !xForm->isLoaded() ) + xForm->load(); } + else + { + if ( xForm->isLoaded() ) + { + bFormWasLoaded = sal_True; + xForm->unload(); + } + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); } // reset the form if it was loaded |