CWS-TOOLING: integrate CWS os146
[LibreOffice.git] / i18npool / inc / textconversionImpl.hxx
blobcd7a15778a781121316f0f7964ea8f47b38c5a03
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _I18N_TEXTCONERSION_HXX_
28 #define _I18N_TEXTCONERSION_HXX_
30 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/i18n/XExtendedTextConversion.hpp>
33 #include <cppuhelper/implbase2.hxx> // helper for implementations
35 namespace com { namespace sun { namespace star { namespace i18n {
37 // ----------------------------------------------------
38 // class TextConversion
39 // ----------------------------------------------------
40 class TextConversionImpl : public cppu::WeakImplHelper2
42 com::sun::star::i18n::XExtendedTextConversion,
43 com::sun::star::lang::XServiceInfo
46 public:
47 TextConversionImpl( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ) : xMSF(rxMSF) {};
49 // Methods
50 com::sun::star::i18n::TextConversionResult SAL_CALL
51 getConversions( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
52 const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
53 sal_Int32 nTextConversionOptions )
54 throw( com::sun::star::uno::RuntimeException,
55 com::sun::star::lang::IllegalArgumentException,
56 com::sun::star::lang::NoSupportException );
57 rtl::OUString SAL_CALL
58 getConversion( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
59 const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
60 sal_Int32 nTextConversionOptions )
61 throw( com::sun::star::uno::RuntimeException,
62 com::sun::star::lang::IllegalArgumentException,
63 com::sun::star::lang::NoSupportException );
64 rtl::OUString SAL_CALL
65 getConversionWithOffset( const ::rtl::OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
66 const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nTextConversionType,
67 sal_Int32 nTextConversionOptions, com::sun::star::uno::Sequence< sal_Int32 >& offset )
68 throw( com::sun::star::uno::RuntimeException,
69 com::sun::star::lang::IllegalArgumentException,
70 com::sun::star::lang::NoSupportException );
71 sal_Bool SAL_CALL
72 interactiveConversion( const ::com::sun::star::lang::Locale& aLocale,
73 sal_Int16 nTextConversionType, sal_Int32 nTextConversionOptions )
74 throw( com::sun::star::uno::RuntimeException,
75 com::sun::star::lang::IllegalArgumentException,
76 com::sun::star::lang::NoSupportException );
78 //XServiceInfo
79 rtl::OUString SAL_CALL
80 getImplementationName()
81 throw( com::sun::star::uno::RuntimeException );
82 sal_Bool SAL_CALL
83 supportsService(const rtl::OUString& ServiceName)
84 throw( com::sun::star::uno::RuntimeException );
85 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
86 getSupportedServiceNames()
87 throw( com::sun::star::uno::RuntimeException );
88 private :
89 com::sun::star::lang::Locale aLocale;
90 com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedTextConversion > xTC;
91 com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xMSF;
93 void SAL_CALL getLocaleSpecificTextConversion( const com::sun::star::lang::Locale& rLocale )
94 throw( com::sun::star::lang::NoSupportException );
97 } // i18n
98 } // star
99 } // sun
100 } // com
103 #endif