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: spellparam.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 ************************************************************************/
30 #ifndef SC_SPELLPARAM_HXX
31 #define SC_SPELLPARAM_HXX
33 #include <vcl/font.hxx>
35 // ============================================================================
37 /** Specifiers for sheet conversion (functions iterating over the sheet and modifying cells). */
40 SC_CONVERSION_SPELLCHECK
, /// Spell checker.
41 SC_CONVERSION_HANGULHANJA
, /// Hangul-Hanja converter.
42 SC_CONVERSION_CHINESE_TRANSL
/// Chinese simplified/traditional converter.
45 // ---------------------------------------------------------------------------
47 /** Parameters for conversion. */
48 class ScConversionParam
51 /** Constructs an empty parameter struct with the passed conversion type. */
52 explicit ScConversionParam( ScConversionType eConvType
);
54 /** Constructs parameter struct for text conversion without changing the language. */
55 explicit ScConversionParam(
56 ScConversionType eConvType
,
59 bool bIsInteractive
);
61 /** Constructs parameter struct for text conversion with language change. */
62 explicit ScConversionParam(
63 ScConversionType eConvType
,
64 LanguageType eSourceLang
,
65 LanguageType eTargetLang
,
66 const Font
& rTargetFont
,
68 bool bIsInteractive
);
70 inline ScConversionType
GetType() const { return meConvType
; }
71 inline LanguageType
GetSourceLang() const { return meSourceLang
; }
72 inline LanguageType
GetTargetLang() const { return meTargetLang
; }
73 inline const Font
* GetTargetFont() const { return mbUseTargetFont
? &maTargetFont
: 0; }
74 inline sal_Int32
GetOptions() const { return mnOptions
; }
75 inline bool IsInteractive() const { return mbIsInteractive
; }
78 ScConversionType meConvType
; /// Type of the conversion.
79 LanguageType meSourceLang
; /// Source language for conversion.
80 LanguageType meTargetLang
; /// Target language for conversion.
81 Font maTargetFont
; /// Target font to be used if language has to be changed.
82 sal_Int32 mnOptions
; /// Conversion options.
83 bool mbUseTargetFont
; /// True = Use maTargetFont to change font during conversion.
84 bool mbIsInteractive
; /// True = Text conversion has (specific) dialog that may be raised.
87 // ============================================================================