diff options
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/treeopt.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/svx/source/dialog/treeopt.cxx b/svx/source/dialog/treeopt.cxx index 60d23158069c..ba36428e2cd5 100644 --- a/svx/source/dialog/treeopt.cxx +++ b/svx/source/dialog/treeopt.cxx @@ -36,6 +36,7 @@ #endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/loader/CannotActivateFactoryException.hpp> #include <com/sun/star/linguistic2/XDictionaryList.hpp> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XFrame.hpp> @@ -1899,16 +1900,25 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Disable Online Update page if service not installed if( RID_SVXPAGE_ONLINEUPDATE == nPageId || RID_SVXPAGE_IMPROVEMENT == nPageId ) { - bImprovePage = ( RID_SVXPAGE_IMPROVEMENT == nPageId ); + bImprovePage = ( RID_SVXPAGE_IMPROVEMENT == nPageId ); ::rtl::OUString sService = bImprovePage ? C2U("com.sun.star.oooimprovement.CoreController") : C2U("com.sun.star.setup.UpdateCheck"); - Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - Reference < XInterface > xService( xFactory->createInstance( sService ) ); - if( ! xService.is() ) + try + { + Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + Reference < XInterface > xService( xFactory->createInstance( sService ) ); + + if( ! xService.is() ) + continue; + } + catch ( ::com::sun::star::loader::CannotActivateFactoryException& ) + { continue; - else if ( bImprovePage ) + } + + if ( bImprovePage ) { SvxEmptyPage* pTempPage = new SvxEmptyPage( this ); sPageTitle = pTempPage->GetText(); |