LCOV - code coverage report
Current view: top level - i18npool/inc - transliteration_commonclass.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 1 100.0 %
Date: 2014-04-11 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef _I18N_TRANSLITERATION_TRANSLITERATION_COMMONCLASS_H_
      20             : #define _I18N_TRANSLITERATION_TRANSLITERATION_COMMONCLASS_H_
      21             : 
      22             : #include <com/sun/star/i18n/XExtendedTransliteration.hpp>
      23             : #include <com/sun/star/i18n/TransliterationType.hpp>
      24             : #include <com/sun/star/lang/XServiceInfo.hpp>
      25             : #include <cppuhelper/implbase2.hxx>
      26             : #include <rtl/ustrbuf.h>
      27             : #include <rtl/ustring.hxx>
      28             : 
      29             : namespace com { namespace sun { namespace star { namespace i18n {
      30             : 
      31       29897 : class transliteration_commonclass : public cppu::WeakImplHelper2<
      32             :                                                                   com::sun::star::i18n::XExtendedTransliteration,
      33             :                                                                   com::sun::star::lang::XServiceInfo
      34             :                                                                 >
      35             : {
      36             : public:
      37             :         transliteration_commonclass();
      38             : 
      39             :         // Methods which are shared.
      40             :         void SAL_CALL
      41             :         loadModule( TransliterationModules modName, const com::sun::star::lang::Locale& rLocale )
      42             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      43             : 
      44             :         void SAL_CALL
      45             :         loadModuleNew( const com::sun::star::uno::Sequence< TransliterationModulesNew >& modName, const com::sun::star::lang::Locale& rLocale )
      46             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      47             : 
      48             :         void SAL_CALL
      49             :         loadModuleByImplName( const OUString& implName, const com::sun::star::lang::Locale& rLocale )
      50             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      51             : 
      52             :         void SAL_CALL
      53             :         loadModulesByImplNames(const com::sun::star::uno::Sequence< OUString >& modNamelist, const com::sun::star::lang::Locale& rLocale)
      54             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      55             : 
      56             :         com::sun::star::uno::Sequence< OUString > SAL_CALL
      57             :         getAvailableModules( const com::sun::star::lang::Locale& rLocale, sal_Int16 sType )
      58             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      59             : 
      60             :         // Methods which should be implemented in each transliteration module.
      61             :         virtual OUString SAL_CALL getName() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      62             : 
      63             :         virtual sal_Int16 SAL_CALL getType(  ) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      64             : 
      65             :         virtual OUString SAL_CALL
      66             :         transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset  )
      67             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      68             : 
      69             :         virtual OUString SAL_CALL
      70             :         folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset)
      71             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      72             : 
      73             :         // Methods in XExtendedTransliteration
      74             :         virtual OUString SAL_CALL
      75             :         transliterateString2String( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount )
      76             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      77             :         virtual OUString SAL_CALL
      78             :         transliterateChar2String( sal_Unicode inChar)
      79             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             :         virtual sal_Unicode SAL_CALL
      81             :         transliterateChar2Char( sal_Unicode inChar )
      82             :         throw(com::sun::star::i18n::MultipleCharsOutputException,
      83             :                 com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      84             : 
      85             :         virtual sal_Bool SAL_CALL
      86             :         equals( const OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1, const OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2 )
      87             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      88             : 
      89             :         virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
      90             :         transliterateRange( const OUString& str1, const OUString& str2 )
      91             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      92             : 
      93             :         virtual sal_Int32 SAL_CALL
      94             :         compareSubstring( const OUString& s1, sal_Int32 off1, sal_Int32 len1, const OUString& s2, sal_Int32 off2, sal_Int32 len2)
      95             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      96             : 
      97             :         virtual sal_Int32 SAL_CALL
      98             :         compareString( const OUString& s1, const OUString& s2)
      99             :         throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     100             : 
     101             :         //XServiceInfo
     102             :         virtual OUString SAL_CALL getImplementationName()
     103             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     104             :         virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName)
     105             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     106             :         virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     107             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     108             : protected:
     109             :         com::sun::star::lang::Locale   aLocale;
     110             :         const sal_Char* transliterationName;
     111             :         const sal_Char* implementationName;
     112             :         sal_Bool useOffset;
     113             : };
     114             : 
     115             : } } } }
     116             : 
     117             : #endif // _I18N_TRANSLITERATION_TRANSLITERATION_COMMONCLASS_H_
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10