summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-29 17:20:22 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-29 18:18:28 +0200
commitc2ca6fabd1afc3fc07001721c2069d3c8db7000a (patch)
tree350741d6d19564bcaf00506bd7d22b4c644e0fdc /linguistic
parentf05d7abf93bbcf443cb0b5759ca19992e2fa85a3 (diff)
Use comphelper::getComponentContext
...and some further clean up. Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 0a5de43332f2..acb037817002 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1088,10 +1088,8 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
{
try
{
- uno::Reference < uno::XComponentContext > xContext;
- uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
-
- xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
+ uno::Reference < uno::XComponentContext > xContext(
+ comphelper::getComponentContext( xFac ) );
xSvc = uno::Reference< linguistic2::XSpellChecker >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
catch (const uno::Exception &)
@@ -1152,10 +1150,8 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
{
try
{
- uno::Reference < uno::XComponentContext > xContext;
- uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
-
- xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
+ uno::Reference < uno::XComponentContext > xContext(
+ comphelper::getComponentContext( xFac ) );
xSvc = uno::Reference< linguistic2::XProofreader >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
catch (const uno::Exception &)
@@ -1215,10 +1211,8 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
{
try
{
- uno::Reference < uno::XComponentContext > xContext;
- uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
-
- xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
+ uno::Reference < uno::XComponentContext > xContext(
+ comphelper::getComponentContext( xFac ) );
xSvc = uno::Reference< linguistic2::XHyphenator >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
@@ -1281,10 +1275,8 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
{
try
{
- uno::Reference < uno::XComponentContext > xContext;
- uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
-
- xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
+ uno::Reference < uno::XComponentContext > xContext(
+ comphelper::getComponentContext( xFac ) );
xSvc = uno::Reference< linguistic2::XThesaurus >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
catch (const uno::Exception &)