summaryrefslogtreecommitdiff
path: root/linguistic/source/lngopt.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/lngopt.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/lngopt.cxx')
-rw-r--r--linguistic/source/lngopt.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index fc69367d75be..75babc93dfce 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -458,10 +458,34 @@ uno::Sequence< OUString > LinguProps::getSupportedServiceNames_Static()
MutexGuard aGuard( GetLinguMutex() );
uno::Sequence< OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = SN_LINGU_PROPERTIES;
+ aSNS.getArray()[0] = "com.sun.star.linguistic2.LinguProperties";
return aSNS;
}
+sal_Bool LinguProps::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ sal_Bool b = sal_False;
+ any >>= b;
+ return b;
+}
+
+sal_Int16 LinguProps::getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ sal_Int16 b = sal_False;
+ any >>= b;
+ return b;
+}
+
+Locale LinguProps::getPropertyLocale(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ css::lang::Locale b;
+ any >>= b;
+ return b;
+}
+
void * SAL_CALL LinguProps_getFactory( const sal_Char * pImplName,
XMultiServiceFactory *pServiceManager, void * )
{