diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-07-16 12:47:29 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-07-16 12:47:29 +0000 |
commit | ba9ae69a5579eecd00ea242d5d157bb19cde7859 (patch) | |
tree | cc548b2ce6cd3fc7010ead345ef3ce3f1fa5ee37 /linguistic | |
parent | 2f702e769432fc57627361230c2b01ea8922bab6 (diff) |
INTEGRATION: CWS tl55 (1.3.8); FILE MERGED
2008/06/25 06:03:52 tl 1.3.8.3: #158047# customer specific extension
2008/06/07 15:24:21 tl 1.3.8.2: #i85999# grammar checking framework
2008/05/27 11:17:52 tl 1.3.8.1: #i85999# improve grammar checking framework
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/grammarchecker.hxx | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/linguistic/source/grammarchecker.hxx b/linguistic/source/grammarchecker.hxx index b09f2114bcf1..6bd81ebe8309 100644 --- a/linguistic/source/grammarchecker.hxx +++ b/linguistic/source/grammarchecker.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: grammarchecker.hxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -32,28 +32,28 @@ #define _LINGUISTIC_GRAMMARCHECKER_HXX_ -#include <cppuhelper/implbase4.hxx> -#include <com/sun/star/linguistic2/XGrammarChecker.hpp> -#include <com/sun/star/linguistic2/XGrammarCheckingResultBroadcaster.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <cppuhelper/interfacecontainer.h> -#include <map> +#include <com/sun/star/linguistic2/XGrammarChecker.hpp> #include <com/sun/star/linguistic2/SingleGrammarError.hpp> #include <com/sun/star/linguistic2/XSupportedLocales.hpp> +#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/interfacecontainer.h> + +#include <map> + class GrammarChecker: - public cppu::WeakImplHelper4 + public cppu::WeakImplHelper3 < ::com::sun::star::linguistic2::XGrammarChecker, - ::com::sun::star::linguistic2::XGrammarCheckingResultBroadcaster, ::com::sun::star::lang::XComponent, ::com::sun::star::lang::XServiceInfo > { // com::sun::star::uno::Reference< uno::XComponentContext > m_xContext; - ::cppu::OInterfaceContainerHelper m_aGCListeners; + // disallow use of copy c-tor and assignment operator GrammarChecker( const GrammarChecker & ); GrammarChecker & operator = ( const GrammarChecker & ); @@ -62,53 +62,35 @@ public: explicit GrammarChecker( /* uno::Reference< uno::XComponentContext > const & rXContext */ ); virtual ~GrammarChecker(); - //sal_Int32 m_Doc; - // XSupportedLocales virtual ::sal_Bool SAL_CALL hasLocale( const ::com::sun::star::lang::Locale & aLocale) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getLocales( ) throw ( ::com::sun::star::uno::RuntimeException ); // XGrammarChecker - virtual ::sal_Bool SAL_CALL isSpellChecker( const ::com::sun::star::lang::Locale& aLocale ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isSpellChecker( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL startDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL startParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL doGrammarChecking( ::sal_Int32 nDocId, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraph >& xFlatPara, const ::com::sun::star::lang::Locale& aLocale, ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedSentenceEndPos ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getEndOfSentencePos( ::sal_Int32 nDocId, const ::rtl::OUString& aFlatParaText, const ::com::sun::star::lang::Locale& aLocale, ::sal_Int32 nStartOfSentencePos ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getStartOfSentencePos( ::sal_Int32 nDocId, const ::rtl::OUString& aFlatParaText, const ::com::sun::star::lang::Locale& aLocale ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL requiresPreviousText( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasCheckingDialog( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::linguistic2::GrammarCheckingResult SAL_CALL doGrammarChecking( ::sal_Int32 nDocId, const ::rtl::OUString& aText, const ::com::sun::star::lang::Locale& aLocale, ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedEndOfSentencePos, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& aLanguagePortions, const ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale >& aLanguagePortionsLocales ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL hasOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL runCheckingDialog( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL runOptionsDialog( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - - // XGrammarCheckingResultBroadcaster - virtual ::sal_Bool SAL_CALL addGrammarCheckingResultListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XGrammarCheckingResultListener >& xLstnr ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL removeGrammarCheckingResultListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XGrammarCheckingResultListener >& xLstnr ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL runOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException); // XComponent virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw ( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); static inline ::rtl::OUString getImplementationName_Static(); - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); ::com::sun::star::uno::Sequence< ::com::sun::star::linguistic2::SingleGrammarError > GrammarCheckingInDummy( - ::sal_Int32 nDocId, const ::rtl::OUString aFlatParaText, const ::com::sun::star::lang::Locale & rLocale, + ::sal_Int32 nDocId, const ::rtl::OUString &rFlatParaText, const ::com::sun::star::lang::Locale & rLocale, ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedSentenceEndPos ); |