User: vg Date: 05/03/10 08:45:38 Modified: /dba/dbaccess/source/ui/browser/ genericcontroller.cxx
Log: INTEGRATION: CWS dba24 (1.59.4); FILE MERGED 2005/03/08 10:17:08 oj 1.59.4.5: RESYNC: (1.61-1.62); FILE MERGED 2005/02/21 13:10:49 oj 1.59.4.4: RESYNC: (1.59-1.61); FILE MERGED 2005/02/07 13:07:15 oj 1.59.4.3: clear SupportedFeatures before filling them 2005/02/03 13:52:12 oj 1.59.4.2: #i41913# release view if exception occured while loading 2005/02/03 08:10:29 fs 1.59.4.1: #i40468# +IsFeatureSupported File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: genericcontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.62&r2=1.63 Delta lines: +38 -15 --------------------- --- genericcontroller.cxx 1 Mar 2005 19:15:47 -0000 1.62 +++ genericcontroller.cxx 10 Mar 2005 16:45:35 -0000 1.63 @@ -219,6 +219,7 @@ #if OSL_DEBUG_LEVEL >= 2 m_bDescribingSupportedFeatures = true; #endif + m_aSupportedFeatures.clear(); describeSupportedFeatures(); #if OSL_DEBUG_LEVEL >= 2 m_bDescribingSupportedFeatures = false; @@ -262,6 +263,7 @@ { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::MutexGuard aGuard(m_aMutex); + Reference< XWindow > xParent; Reference< XFrame > xFrame; @@ -287,6 +289,8 @@ m_bReadOnly = sal_True; } } + try + { if ( xFrame.is() ) { xParent = xFrame->getContainerWindow(); @@ -307,6 +311,14 @@ if ( (m_bReadOnly || m_bPreview) && pView ) pView->EnableInput(FALSE); impl_initialize(aArguments); + } + catch(Exception& e) + { + // no one clears my view if I won't + ::std::auto_ptr<Window> aTemp(m_pView); + m_pView = NULL; + throw e; + } if ( xFrame.is() ) xFrame->setComponent(getComponentWindow(), this); } @@ -519,6 +531,18 @@ } +//------------------------------------------------------------------------------ +sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId ) +{ + SupportedFeatures::iterator aFeaturePos = ::std::find_if( + m_aSupportedFeatures.begin(), + m_aSupportedFeatures.end(), + ::std::bind2nd( SupportedFeaturesEqualId(), _nId ) + ); + + return ( m_aSupportedFeatures.end() != aFeaturePos && aFeaturePos->first.getLength()); +} + // ----------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature(const ::rtl::OUString& _rURLPath, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast) { @@ -862,7 +886,6 @@ return aReturn; } - //------------------------------------------------------------------------------ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
