Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / spellparam.hxx
blob4b62732c94e3a7a74f4c3113f01a7005d5c782d5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef SC_SPELLPARAM_HXX
20 #define SC_SPELLPARAM_HXX
22 #include <vcl/font.hxx>
24 // ============================================================================
26 /** Specifiers for sheet conversion (functions iterating over the sheet and modifying cells). */
27 enum ScConversionType
29 SC_CONVERSION_SPELLCHECK, /// Spell checker.
30 SC_CONVERSION_HANGULHANJA, /// Hangul-Hanja converter.
31 SC_CONVERSION_CHINESE_TRANSL /// Chinese simplified/traditional converter.
34 // ---------------------------------------------------------------------------
36 /** Parameters for conversion. */
37 class ScConversionParam
39 public:
40 /** Constructs an empty parameter struct with the passed conversion type. */
41 explicit ScConversionParam( ScConversionType eConvType );
43 /** Constructs parameter struct for text conversion without changing the language. */
44 explicit ScConversionParam(
45 ScConversionType eConvType,
46 LanguageType eLang,
47 sal_Int32 nOptions,
48 bool bIsInteractive );
50 /** Constructs parameter struct for text conversion with language change. */
51 explicit ScConversionParam(
52 ScConversionType eConvType,
53 LanguageType eSourceLang,
54 LanguageType eTargetLang,
55 const Font& rTargetFont,
56 sal_Int32 nOptions,
57 bool bIsInteractive );
59 inline ScConversionType GetType() const { return meConvType; }
60 inline LanguageType GetSourceLang() const { return meSourceLang; }
61 inline LanguageType GetTargetLang() const { return meTargetLang; }
62 inline const Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : 0; }
63 inline sal_Int32 GetOptions() const { return mnOptions; }
64 inline bool IsInteractive() const { return mbIsInteractive; }
66 private:
67 ScConversionType meConvType; /// Type of the conversion.
68 LanguageType meSourceLang; /// Source language for conversion.
69 LanguageType meTargetLang; /// Target language for conversion.
70 Font maTargetFont; /// Target font to be used if language has to be changed.
71 sal_Int32 mnOptions; /// Conversion options.
72 bool mbUseTargetFont; /// True = Use maTargetFont to change font during conversion.
73 bool mbIsInteractive; /// True = Text conversion has (specific) dialog that may be raised.
76 // ============================================================================
78 #endif
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */