Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svtools / lingucfg.hxx
blob2b77d8924ba2b48e779e0f82ffbaed001e4aaa63
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lingucfg.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVTOOLS_LINGUCFG_HXX_
32 #define _SVTOOLS_LINGUCFG_HXX_
34 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_
35 #include <com/sun/star/beans/PropertyValues.hpp>
36 #endif
37 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
38 #include <com/sun/star/uno/Sequence.hxx>
39 #endif
40 #ifndef _COM_SUN_STAR_UNO_ANY_H_
41 #include <com/sun/star/uno/Any.h>
42 #endif
44 #ifndef _SOLAR_H
45 #include <tools/solar.h>
46 #endif
47 #ifndef _RTL_USTRING_HXX_
48 #include <rtl/ustring.hxx>
49 #endif
50 #ifndef _UTL_CONFIGITEM_HXX_
51 #include <unotools/configitem.hxx>
52 #endif
53 #ifndef _OSL_MUTEX_HXX_
54 #include <osl/mutex.hxx>
55 #endif
56 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
57 #include <bf_svtools/options.hxx>
58 #endif
60 namespace binfilter
63 class SvtLinguConfigItem;
65 //////////////////////////////////////////////////////////////////////
67 struct SvtLinguOptions
69 ::com::sun::star::uno::Sequence< rtl::OUString > aActiveDics;
70 ::com::sun::star::uno::Sequence< rtl::OUString > aActiveConvDics;
72 BOOL bROActiveDics;
73 BOOL bROActiveConvDics;
75 // Hyphenator service specific options
76 INT16 nHyphMinLeading,
77 nHyphMinTrailing,
78 nHyphMinWordLength;
80 BOOL bROHyphMinLeading,
81 bROHyphMinTrailing,
82 bROHyphMinWordLength;
84 // misc options (non-service specific)
85 INT16 nDefaultLanguage;
86 INT16 nDefaultLanguage_CJK;
87 INT16 nDefaultLanguage_CTL;
89 BOOL bRODefaultLanguage;
90 BOOL bRODefaultLanguage_CJK;
91 BOOL bRODefaultLanguage_CTL;
93 // spelling options (non-service specific)
94 BOOL bIsSpellSpecial;
95 BOOL bIsSpellInAllLanguages;
96 BOOL bIsSpellAuto;
97 BOOL bIsSpellHideMarkings;
98 BOOL bIsSpellReverse;
100 BOOL bROIsSpellSpecial;
101 BOOL bROIsSpellInAllLanguages;
102 BOOL bROIsSpellAuto;
103 BOOL bROIsSpellHideMarkings;
104 BOOL bROIsSpellReverse;
106 // hyphenation options (non-service specific)
107 BOOL bIsHyphSpecial;
108 BOOL bIsHyphAuto;
110 BOOL bROIsHyphSpecial;
111 BOOL bROIsHyphAuto;
113 // common to SpellChecker, Hyphenator and Thesaurus service
114 BOOL bIsGermanPreReform;
115 BOOL bIsUseDictionaryList;
116 BOOL bIsIgnoreControlCharacters;
118 BOOL bROIsGermanPreReform;
119 BOOL bROIsUseDictionaryList;
120 BOOL bROIsIgnoreControlCharacters;
122 // SpellChecker service specific options
123 BOOL bIsSpellWithDigits,
124 bIsSpellUpperCase,
125 bIsSpellCapitalization;
127 BOOL bROIsSpellWithDigits,
128 bROIsSpellUpperCase,
129 bROIsSpellCapitalization;
131 // text conversion specific options
132 BOOL bIsIgnorePostPositionalWord;
133 BOOL bIsAutoCloseDialog;
134 BOOL bIsShowEntriesRecentlyUsedFirst;
135 BOOL bIsAutoReplaceUniqueEntries;
136 BOOL bIsDirectionToSimplified;
137 BOOL bIsUseCharacterVariants;
138 BOOL bIsTranslateCommonTerms;
139 BOOL bIsReverseMapping;
141 BOOL bROIsIgnorePostPositionalWord;
142 BOOL bROIsAutoCloseDialog;
143 BOOL bROIsShowEntriesRecentlyUsedFirst;
144 BOOL bROIsAutoReplaceUniqueEntries;
145 BOOL bROIsDirectionToSimplified;
146 BOOL bROIsUseCharacterVariants;
147 BOOL bROIsTranslateCommonTerms;
148 BOOL bROIsReverseMapping;
150 // check value need to determine if the configuration needs to updatet
151 // or not (used for a quick check if data files have been changed/added
152 // or deleted
153 INT32 nDataFilesChangedCheckValue;
154 BOOL bRODataFilesChangedCheckValue;
156 SvtLinguOptions();
159 //////////////////////////////////////////////////////////////////////
161 class SvtLinguConfig: public Options
164 // disallow copy-constructor and assignment-operator for now
165 SvtLinguConfig( const SvtLinguConfig & );
166 SvtLinguConfig & operator = ( const SvtLinguConfig & );
168 // returns static object
169 SvtLinguConfigItem & GetConfigItem();
171 SvtLinguConfigItem & GetConfigItem() const { return const_cast< SvtLinguConfig * >( this )->GetConfigItem(); }
173 public:
174 SvtLinguConfig();
175 virtual ~SvtLinguConfig();
178 // borrowed from utl::ConfigItem
180 com::sun::star::uno::Sequence< rtl::OUString >
181 GetNodeNames( const rtl::OUString &rNode );
183 BOOL GetOptions( SvtLinguOptions &rOptions ) const;
186 //////////////////////////////////////////////////////////////////////
190 #endif