INTEGRATION: CWS os34 (1.4.18); FILE MERGED

2004/09/16 16:57:02 tl 1.4.18.2: RESYNC: (1.4-1.5); FILE MERGED
2004/08/02 09:48:37 tl 1.4.18.1: #i30303# conversion dictionaries for simplified/traditional Chinese
This commit is contained in:
Rüdiger Timm 2004-09-17 13:04:01 +00:00
parent 4be5e816a1
commit f762801eb5

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: convdic.hxx,v $ * $RCSfile: convdic.hxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: rt $ $Date: 2004-09-09 07:30:11 $ * last change: $Author: rt $ $Date: 2004-09-17 14:04:01 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -65,6 +65,9 @@
#ifndef _COM_SUN_STAR_LINGUISTIC2_XCONVERSIONDICTIONARY_HPP_ #ifndef _COM_SUN_STAR_LINGUISTIC2_XCONVERSIONDICTIONARY_HPP_
#include <com/sun/star/linguistic2/XConversionDictionary.hpp> #include <com/sun/star/linguistic2/XConversionDictionary.hpp>
#endif #endif
#ifndef _COM_SUN_STAR_LINGUISTIC2_XCONVERSIONPROPERTYTYPE_HPP_
#include <com/sun/star/linguistic2/XConversionPropertyType.hpp>
#endif
#ifndef _COM_SUN_STAR_UTIL_XFLUSHABLE_HPP_ #ifndef _COM_SUN_STAR_UTIL_XFLUSHABLE_HPP_
#include <com/sun/star/util/XFlushable.hpp> #include <com/sun/star/util/XFlushable.hpp>
#endif #endif
@ -72,8 +75,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#endif #endif
#ifndef _CPPUHELPER_IMPLBASE3_HXX_ #ifndef _CPPUHELPER_IMPLBASE4_HXX_
#include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx>
#endif #endif
#ifndef _CPPUHELPER_INTERFACECONTAINER_H_ #ifndef _CPPUHELPER_INTERFACECONTAINER_H_
#include <cppuhelper/interfacecontainer.h> #include <cppuhelper/interfacecontainer.h>
@ -85,6 +88,7 @@
#include <hash_map> #include <hash_map>
#include <set> #include <set>
#include <memory>
#ifndef _LINGUISTIC_MISC_HXX_ #ifndef _LINGUISTIC_MISC_HXX_
#include "misc.hxx" #include "misc.hxx"
@ -129,12 +133,16 @@ typedef std::hash_multimap< const rtl::OUString, const rtl::OUString,
typedef std::set< rtl::OUString, StrLT > ConvMapKeySet; typedef std::set< rtl::OUString, StrLT > ConvMapKeySet;
typedef std::hash_multimap< const rtl::OUString, sal_Int16,
std::hash< const rtl::OUString >, StrEQ > PropTypeMap;
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
class ConvDic : class ConvDic :
public ::cppu::WeakImplHelper3 public ::cppu::WeakImplHelper4
< <
::com::sun::star::linguistic2::XConversionDictionary, ::com::sun::star::linguistic2::XConversionDictionary,
::com::sun::star::linguistic2::XConversionPropertyType,
::com::sun::star::util::XFlushable, ::com::sun::star::util::XFlushable,
::com::sun::star::lang::XServiceInfo ::com::sun::star::lang::XServiceInfo
> >
@ -145,8 +153,10 @@ protected:
::cppu::OInterfaceContainerHelper aFlushListeners; ::cppu::OInterfaceContainerHelper aFlushListeners;
ConvMap aFromLeft; ConvMap aFromLeft;
ConvMap aFromRight; std::auto_ptr< ConvMap > pFromRight; // only available for bidirectional conversion dictionaries
std::auto_ptr< PropTypeMap > pConvPropType;
String aMainURL; // URL to file String aMainURL; // URL to file
rtl::OUString aName; rtl::OUString aName;
@ -172,7 +182,8 @@ public:
ConvDic( const String &rName, ConvDic( const String &rName,
INT16 nLanguage, INT16 nLanguage,
sal_Int16 nConversionType, sal_Int16 nConversionType,
const String &rMainURL ); BOOL bBiDirectional,
const String &rMainURL);
virtual ~ConvDic(); virtual ~ConvDic();
// XConversionDictionary // XConversionDictionary
@ -188,6 +199,10 @@ public:
virtual void SAL_CALL removeEntry( const ::rtl::OUString& aLeftText, const ::rtl::OUString& aRightText ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeEntry( const ::rtl::OUString& aLeftText, const ::rtl::OUString& aRightText ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int16 SAL_CALL getMaxCharCount( ::com::sun::star::linguistic2::ConversionDirection eDirection ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int16 SAL_CALL getMaxCharCount( ::com::sun::star::linguistic2::ConversionDirection eDirection ) throw (::com::sun::star::uno::RuntimeException);
// XConversionPropertyType
virtual void SAL_CALL setPropertyType( const ::rtl::OUString& aLeftText, const ::rtl::OUString& aRightText, ::sal_Int16 nPropertyType ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Int16 SAL_CALL getPropertyType( const ::rtl::OUString& aLeftText, const ::rtl::OUString& aRightText ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
// XFlushable // XFlushable
virtual void SAL_CALL flush( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL flush( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addFlushListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XFlushListener >& l ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addFlushListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XFlushListener >& l ) throw (::com::sun::star::uno::RuntimeException);