1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lingucfg.hxx,v $
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>
37 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
38 #include <com/sun/star/uno/Sequence.hxx>
40 #ifndef _COM_SUN_STAR_UNO_ANY_H_
41 #include <com/sun/star/uno/Any.h>
45 #include <tools/solar.h>
47 #ifndef _RTL_USTRING_HXX_
48 #include <rtl/ustring.hxx>
50 #ifndef _UTL_CONFIGITEM_HXX_
51 #include <unotools/configitem.hxx>
53 #ifndef _OSL_MUTEX_HXX_
54 #include <osl/mutex.hxx>
56 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
57 #include <bf_svtools/options.hxx>
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
;
73 BOOL bROActiveConvDics
;
75 // Hyphenator service specific options
76 INT16 nHyphMinLeading
,
80 BOOL bROHyphMinLeading
,
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)
95 BOOL bIsSpellInAllLanguages
;
97 BOOL bIsSpellHideMarkings
;
100 BOOL bROIsSpellSpecial
;
101 BOOL bROIsSpellInAllLanguages
;
103 BOOL bROIsSpellHideMarkings
;
104 BOOL bROIsSpellReverse
;
106 // hyphenation options (non-service specific)
110 BOOL bROIsHyphSpecial
;
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
,
125 bIsSpellCapitalization
;
127 BOOL bROIsSpellWithDigits
,
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
153 INT32 nDataFilesChangedCheckValue
;
154 BOOL bRODataFilesChangedCheckValue
;
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(); }
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 //////////////////////////////////////////////////////////////////////