summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-30 11:40:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-10-30 11:40:18 +0100
commitddcf2363bad1d84874dfe4e31e4783ffd761d5bb (patch)
treed4d70251223a43eaa91fd80760f7d95b35d43c29 /sfx2
parent43d9f35c2665e55cfb5ee911a554ef71933ad4d1 (diff)
fdo#46808: Improve previous commit
* Removing m_xLngMgr.is() check from SfxThesSubMenuHelper::GetThesImplName was unsound with SfxThesSubMenuHelper ctor swallowing Exception; best fix appears to be to remove the swallowing. * Prefer forward declarations over #includes. Change-Id: Ie4e7dcd6cdb14046516d119605bbf78e81359768
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/menu/thessubmenu.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx
index 1a645885adb1..f4c5f474efce 100644
--- a/sfx2/source/menu/thessubmenu.cxx
+++ b/sfx2/source/menu/thessubmenu.cxx
@@ -64,18 +64,12 @@ void SfxThesSubMenuHelper::GetLocale(
}
-SfxThesSubMenuHelper::SfxThesSubMenuHelper()
+SfxThesSubMenuHelper::SfxThesSubMenuHelper():
+ m_xLngMgr(
+ linguistic2::LinguServiceManager::create(
+ comphelper::getProcessComponentContext())),
+ m_xThesarus(m_xLngMgr->getThesaurus())
{
- try
- {
- uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- m_xLngMgr = linguistic2::LinguServiceManager::create(xContext);
- m_xThesarus = m_xLngMgr->getThesaurus();
- }
- catch (const uno::Exception &)
- {
- DBG_ASSERT( 0, "failed to get thesaurus" );
- }
}