summaryrefslogtreecommitdiff
path: root/linguistic/source/misc.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-13 10:43:34 +0200
committerNoel Grandin <noel@peralex.com>2013-05-14 08:08:25 +0200
commitef0af5032ad283ffb3b4521eb097a118d58f332a (patch)
tree823553af06bf42a914d38e19beb3e3fc25f3bc52 /linguistic/source/misc.cxx
parentbd27671c0ccc3505efb9fc493e0cfc63df449856 (diff)
fdo#46808, Convert linguistic2::LingProperties to new style
API-CHANGE: Removed the following interfaces from the IDL because no-one was using them: interface com::sun::star::beans::XFastPropertySet; interface com::sun::star::lang::XComponent; But the service still implements them, so old code should keep on working. Change-Id: Iab058fb42bd1a54e0b9632e99e564fdc0869fe6e
Diffstat (limited to 'linguistic/source/misc.cxx')
-rw-r--r--linguistic/source/misc.cxx33
1 files changed, 7 insertions, 26 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 10e343f756e6..91c59b5bae7b 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -24,19 +24,19 @@
#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18nlangtag/languagetag.hxx>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-
-#include <com/sun/star/beans/PropertyValues.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/DictionaryType.hpp>
#include <com/sun/star/linguistic2/DictionaryList.hpp>
+#include <com/sun/star/linguistic2/LinguProperties.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.h>
#include <comphelper/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx>
@@ -741,28 +741,9 @@ sal_Bool IsNumeric( const String &rText )
-uno::Reference< XInterface > GetOneInstanceService( const char *pServiceName )
-{
- uno::Reference< XInterface > xRef;
-
- uno::Reference< XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
- try
- {
- xRef = xMgr->createInstance( OUString::createFromAscii( pServiceName ) );
- }
- catch (const uno::Exception &)
- {
- DBG_ASSERT( 0, "createInstance failed" );
- }
-
- return xRef;
-}
-
-uno::Reference< XPropertySet > GetLinguProperties()
+uno::Reference< XLinguProperties > GetLinguProperties()
{
- return uno::Reference< XPropertySet > (
- GetOneInstanceService( SN_LINGU_PROPERTIES ), UNO_QUERY );
+ return LinguProperties::create( comphelper::getProcessComponentContext() );
}
uno::Reference< XSearchableDictionaryList > GetDictionaryList()