xref: /AOO41X/main/i18npool/inc/textconversionImpl.hxx (revision f7bd9df41d712080226d57e4f6f528539c130a0c)
1*f7bd9df4SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f7bd9df4SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f7bd9df4SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f7bd9df4SAndrew Rist  * distributed with this work for additional information
6*f7bd9df4SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f7bd9df4SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f7bd9df4SAndrew Rist  * "License"); you may not use this file except in compliance
9*f7bd9df4SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*f7bd9df4SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*f7bd9df4SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f7bd9df4SAndrew Rist  * software distributed under the License is distributed on an
15*f7bd9df4SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f7bd9df4SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f7bd9df4SAndrew Rist  * specific language governing permissions and limitations
18*f7bd9df4SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*f7bd9df4SAndrew Rist  *************************************************************/
21*f7bd9df4SAndrew Rist 
22*f7bd9df4SAndrew Rist 
23cdf0e10cSrcweir #ifndef _I18N_TEXTCONERSION_HXX_
24cdf0e10cSrcweir #define _I18N_TEXTCONERSION_HXX_
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
28cdf0e10cSrcweir #include <com/sun/star/i18n/XExtendedTextConversion.hpp>
29cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> // helper for implementations
30cdf0e10cSrcweir 
31cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace i18n {
32cdf0e10cSrcweir 
33cdf0e10cSrcweir //	----------------------------------------------------
34cdf0e10cSrcweir //	class TextConversion
35cdf0e10cSrcweir //	----------------------------------------------------
36cdf0e10cSrcweir class TextConversionImpl : public cppu::WeakImplHelper2
37cdf0e10cSrcweir <
38cdf0e10cSrcweir 	com::sun::star::i18n::XExtendedTextConversion,
39cdf0e10cSrcweir 	com::sun::star::lang::XServiceInfo
40cdf0e10cSrcweir >
41cdf0e10cSrcweir {
42cdf0e10cSrcweir public:
TextConversionImpl(const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> & rxMSF)43cdf0e10cSrcweir 	TextConversionImpl( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ) : xMSF(rxMSF) {};
44cdf0e10cSrcweir 
45cdf0e10cSrcweir         // Methods
46cdf0e10cSrcweir         com::sun::star::i18n::TextConversionResult SAL_CALL
47cdf0e10cSrcweir         getConversions( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
48cdf0e10cSrcweir             const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
49cdf0e10cSrcweir             sal_Int32 nTextConversionOptions )
50cdf0e10cSrcweir             throw(  com::sun::star::uno::RuntimeException,
51cdf0e10cSrcweir                     com::sun::star::lang::IllegalArgumentException,
52cdf0e10cSrcweir                     com::sun::star::lang::NoSupportException );
53cdf0e10cSrcweir         rtl::OUString SAL_CALL
54cdf0e10cSrcweir         getConversion( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
55cdf0e10cSrcweir             const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
56cdf0e10cSrcweir             sal_Int32 nTextConversionOptions )
57cdf0e10cSrcweir             throw(  com::sun::star::uno::RuntimeException,
58cdf0e10cSrcweir                     com::sun::star::lang::IllegalArgumentException,
59cdf0e10cSrcweir                     com::sun::star::lang::NoSupportException );
60cdf0e10cSrcweir         rtl::OUString SAL_CALL
61cdf0e10cSrcweir         getConversionWithOffset( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
62cdf0e10cSrcweir             const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
63cdf0e10cSrcweir             sal_Int32 nTextConversionOptions, com::sun::star::uno::Sequence< sal_Int32 >& offset )
64cdf0e10cSrcweir             throw(  com::sun::star::uno::RuntimeException,
65cdf0e10cSrcweir                     com::sun::star::lang::IllegalArgumentException,
66cdf0e10cSrcweir                     com::sun::star::lang::NoSupportException );
67cdf0e10cSrcweir         sal_Bool SAL_CALL
68cdf0e10cSrcweir         interactiveConversion( const ::com::sun::star::lang::Locale& aLocale,
69cdf0e10cSrcweir             sal_Int16 nTextConversionType, sal_Int32 nTextConversionOptions )
70cdf0e10cSrcweir             throw(  com::sun::star::uno::RuntimeException,
71cdf0e10cSrcweir                     com::sun::star::lang::IllegalArgumentException,
72cdf0e10cSrcweir                     com::sun::star::lang::NoSupportException );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	//XServiceInfo
75cdf0e10cSrcweir 	rtl::OUString SAL_CALL
76cdf0e10cSrcweir         getImplementationName()
77cdf0e10cSrcweir             throw( com::sun::star::uno::RuntimeException );
78cdf0e10cSrcweir 	sal_Bool SAL_CALL
79cdf0e10cSrcweir         supportsService(const rtl::OUString& ServiceName)
80cdf0e10cSrcweir             throw( com::sun::star::uno::RuntimeException );
81cdf0e10cSrcweir 	com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
82cdf0e10cSrcweir         getSupportedServiceNames()
83cdf0e10cSrcweir             throw( com::sun::star::uno::RuntimeException );
84cdf0e10cSrcweir private :
85cdf0e10cSrcweir 	com::sun::star::lang::Locale aLocale;
86cdf0e10cSrcweir 	com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedTextConversion > xTC;
87cdf0e10cSrcweir 	com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xMSF;
88cdf0e10cSrcweir 
89cdf0e10cSrcweir 	void SAL_CALL getLocaleSpecificTextConversion( const com::sun::star::lang::Locale& rLocale )
90cdf0e10cSrcweir             throw( com::sun::star::lang::NoSupportException );
91cdf0e10cSrcweir };
92cdf0e10cSrcweir 
93cdf0e10cSrcweir } // i18n
94cdf0e10cSrcweir } // star
95cdf0e10cSrcweir } // sun
96cdf0e10cSrcweir } // com
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir #endif
100