LibreOffice Module lingucomponent (master) 1
macspellimp.hxx
Go to the documentation of this file.
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
20#ifndef INCLUDED_LINGUCOMPONENT_SOURCE_SPELLCHECK_MACOSXSPELL_MACSPELLIMP_HXX
21#define INCLUDED_LINGUCOMPONENT_SOURCE_SPELLCHECK_MACOSXSPELL_MACSPELLIMP_HXX
22
25
26#include <premac.h>
27#ifdef MACOSX
28#import <Cocoa/Cocoa.h>
29#else
30#include <UIKit/UIKit.h>
31#endif
32#include <postmac.h>
33#include <com/sun/star/lang/XComponent.hpp>
34#include <com/sun/star/lang/XInitialization.hpp>
35#include <com/sun/star/lang/XServiceDisplayName.hpp>
36#include <com/sun/star/beans/XPropertySet.hpp>
37#include <com/sun/star/lang/XServiceInfo.hpp>
38#include <com/sun/star/linguistic2/XSpellChecker.hpp>
39#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
40
41#include <linguistic/misc.hxx>
43
44#include <lingutil.hxx>
45
46using namespace ::com::sun::star::uno;
47using namespace ::com::sun::star::beans;
48using namespace ::com::sun::star::lang;
49using namespace ::com::sun::star::linguistic2;
50
52 public cppu::WeakImplHelper
53 <
54 XSpellChecker,
55 XLinguServiceEventBroadcaster,
56 XInitialization,
57 XComponent,
58 XServiceInfo,
59 XServiceDisplayName
60 >
61{
62 Sequence< Locale > aSuppLocales;
63 rtl_TextEncoding * aDEncs;
65 OUString * aDNames;
66 sal_Int32 numdict;
67#ifdef MACOSX
68 int macTag; // unique tag for this doc
69#else
70 UITextChecker * pChecker;
71#endif
75
78
79 linguistic::PropertyHelper_Spell & GetPropHelper_Impl();
80 linguistic::PropertyHelper_Spell & GetPropHelper()
81 {
83 }
84
85 sal_Int16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
86 Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
87
88public:
90 virtual ~MacSpellChecker() override;
91
92 // XSupportedLocales (for XSpellChecker)
93 virtual Sequence< Locale > SAL_CALL getLocales() override;
94 virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) override;
95
96 // XSpellChecker
97 virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence<PropertyValue>& rProperties ) override;
98 virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence<PropertyValue>& rProperties ) override;
99
100 // XLinguServiceEventBroadcaster
101 virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) override;
102 virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) override;
103
104 // XServiceDisplayName
105 virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) override;
106
107 // XInitialization
108 virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) override;
109
110 // XComponent
111 virtual void SAL_CALL dispose() override;
112 virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) override;
113 virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) override;
114
115 // XServiceInfo
116 virtual OUString SAL_CALL getImplementationName() override;
117 virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
118 virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
119};
120
121#endif
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Sequence< Locale > SAL_CALL getLocales() override
Definition: macspellimp.mm:96
virtual void SAL_CALL dispose() override
Definition: macspellimp.mm:623
virtual Reference< XSpellAlternatives > SAL_CALL spell(const OUString &rWord, const Locale &rLocale, const css::uno::Sequence< PropertyValue > &rProperties) override
Definition: macspellimp.mm:536
virtual sal_Bool SAL_CALL removeLinguServiceEventListener(const Reference< XLinguServiceEventListener > &rxLstnr) override
Definition: macspellimp.mm:571
virtual sal_Bool SAL_CALL addLinguServiceEventListener(const Reference< XLinguServiceEventListener > &rxLstnr) override
Definition: macspellimp.mm:556
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: macspellimp.mm:666
linguistic::PropertyHelper_Spell & GetPropHelper_Impl()
Definition: macspellimp.mm:83
virtual OUString SAL_CALL getImplementationName() override
Definition: macspellimp.mm:656
OUString * aDNames
Definition: macspellimp.hxx:65
virtual ~MacSpellChecker() override
Definition: macspellimp.mm:69
UITextChecker * pChecker
Definition: macspellimp.hxx:70
virtual void SAL_CALL addEventListener(const Reference< XEventListener > &rxListener) override
Definition: macspellimp.mm:637
virtual sal_Bool SAL_CALL hasLocale(const Locale &rLocale) override
Definition: macspellimp.mm:347
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: macspellimp.mm:661
MacSpellChecker(const MacSpellChecker &)=delete
rtl::Reference< linguistic::PropertyHelper_Spell > xPropHelper
Definition: macspellimp.hxx:73
virtual sal_Bool SAL_CALL isValid(const OUString &rWord, const Locale &rLocale, const css::uno::Sequence< PropertyValue > &rProperties) override
Definition: macspellimp.mm:429
virtual void SAL_CALL removeEventListener(const Reference< XEventListener > &rxListener) override
Definition: macspellimp.mm:647
Sequence< Locale > aSuppLocales
Definition: macspellimp.hxx:62
linguistic::PropertyHelper_Spell & GetPropHelper()
Definition: macspellimp.hxx:80
sal_Int32 numdict
Definition: macspellimp.hxx:66
MacSpellChecker & operator=(const MacSpellChecker &)=delete
Reference< XSpellAlternatives > GetProposals(const OUString &rWord, const Locale &rLocale)
Definition: macspellimp.mm:467
sal_Int16 GetSpellFailure(const OUString &rWord, const Locale &rLocale)
Definition: macspellimp.mm:369
::comphelper::OInterfaceContainerHelper3< XEventListener > aEvtListeners
Definition: macspellimp.hxx:72
virtual void SAL_CALL initialize(const Sequence< Any > &rArguments) override
Definition: macspellimp.mm:595
virtual OUString SAL_CALL getServiceDisplayName(const Locale &rLocale) override
Definition: macspellimp.mm:587
rtl_TextEncoding * aDEncs
Definition: macspellimp.hxx:63
unsigned char sal_Bool