diff options
Diffstat (limited to 'inc/bf_svtools/lingucfg.hxx')
-rw-r--r-- | inc/bf_svtools/lingucfg.hxx | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/inc/bf_svtools/lingucfg.hxx b/inc/bf_svtools/lingucfg.hxx new file mode 100644 index 000000000..d875d08b4 --- /dev/null +++ b/inc/bf_svtools/lingucfg.hxx @@ -0,0 +1,153 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _SVTOOLS_LINGUCFG_HXX_ +#define _SVTOOLS_LINGUCFG_HXX_ + +#include <com/sun/star/beans/PropertyValues.hpp> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Any.h> + +#include <bf_svtools/bf_solar.h> +#include <rtl/ustring.hxx> +#include <unotools/configitem.hxx> +#include <osl/mutex.hxx> +#include <bf_svtools/options.hxx> + +namespace binfilter +{ + +class SvtLinguConfigItem; + +////////////////////////////////////////////////////////////////////// + +struct SvtLinguOptions +{ + ::com::sun::star::uno::Sequence< rtl::OUString > aActiveDics; + ::com::sun::star::uno::Sequence< rtl::OUString > aActiveConvDics; + + BOOL bROActiveDics; + BOOL bROActiveConvDics; + + // Hyphenator service specific options + INT16 nHyphMinLeading, + nHyphMinTrailing, + nHyphMinWordLength; + + BOOL bROHyphMinLeading, + bROHyphMinTrailing, + bROHyphMinWordLength; + + // misc options (non-service specific) + INT16 nDefaultLanguage; + INT16 nDefaultLanguage_CJK; + INT16 nDefaultLanguage_CTL; + + BOOL bRODefaultLanguage; + BOOL bRODefaultLanguage_CJK; + BOOL bRODefaultLanguage_CTL; + + // spelling options (non-service specific) + BOOL bIsSpellSpecial; + BOOL bIsSpellAuto; + BOOL bIsSpellReverse; + + BOOL bROIsSpellSpecial; + BOOL bROIsSpellAuto; + BOOL bROIsSpellReverse; + + // hyphenation options (non-service specific) + BOOL bIsHyphSpecial; + BOOL bIsHyphAuto; + + BOOL bROIsHyphSpecial; + BOOL bROIsHyphAuto; + + // common to SpellChecker, Hyphenator and Thesaurus service + BOOL bIsUseDictionaryList; + BOOL bIsIgnoreControlCharacters; + + BOOL bROIsUseDictionaryList; + BOOL bROIsIgnoreControlCharacters; + + // SpellChecker service specific options + BOOL bIsSpellWithDigits, + bIsSpellUpperCase, + bIsSpellCapitalization; + + BOOL bROIsSpellWithDigits, + bROIsSpellUpperCase, + bROIsSpellCapitalization; + + // text conversion specific options + BOOL bIsIgnorePostPositionalWord; + BOOL bIsAutoCloseDialog; + BOOL bIsShowEntriesRecentlyUsedFirst; + BOOL bIsAutoReplaceUniqueEntries; + BOOL bIsDirectionToSimplified; + BOOL bIsUseCharacterVariants; + BOOL bIsTranslateCommonTerms; + BOOL bIsReverseMapping; + + BOOL bROIsIgnorePostPositionalWord; + BOOL bROIsAutoCloseDialog; + BOOL bROIsShowEntriesRecentlyUsedFirst; + BOOL bROIsAutoReplaceUniqueEntries; + BOOL bROIsDirectionToSimplified; + BOOL bROIsUseCharacterVariants; + BOOL bROIsTranslateCommonTerms; + BOOL bROIsReverseMapping; + + // check value need to determine if the configuration needs to updatet + // or not (used for a quick check if data files have been changed/added + // or deleted + INT32 nDataFilesChangedCheckValue; + BOOL bRODataFilesChangedCheckValue; + + SvtLinguOptions(); +}; + +////////////////////////////////////////////////////////////////////// + +class SvtLinguConfig: public Options +{ + + // disallow copy-constructor and assignment-operator for now + SvtLinguConfig( const SvtLinguConfig & ); + SvtLinguConfig & operator = ( const SvtLinguConfig & ); + + // returns static object + SvtLinguConfigItem & GetConfigItem(); + + SvtLinguConfigItem & GetConfigItem() const { return const_cast< SvtLinguConfig * >( this )->GetConfigItem(); } + +public: + SvtLinguConfig(); + virtual ~SvtLinguConfig(); + + BOOL GetOptions( SvtLinguOptions &rOptions ) const; +}; + +////////////////////////////////////////////////////////////////////// + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |