nss: upgrade to release 3.73
[LibreOffice.git] / sw / inc / IDocumentSettingAccess.hxx
blob8273954f4a71bc17ada1662a0d967a11cbce8abc
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 .
20 #ifndef INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
21 #define INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
23 #include <sal/types.h>
24 #include "fldupde.hxx"
25 #include <i18nlangtag/lang.h>
26 #include <memory>
28 class SvxForbiddenCharactersTable;
29 namespace com::sun::star::i18n
31 struct ForbiddenCharacters;
33 enum class CharCompressType;
35 enum class DocumentSettingId
37 // COMPATIBILITY FLAGS START
38 PARA_SPACE_MAX,
39 PARA_SPACE_MAX_AT_PAGES,
41 TAB_COMPAT,
43 ADD_FLY_OFFSETS,
44 ADD_VERTICAL_FLY_OFFSETS,
46 OLD_NUMBERING,
48 ADD_EXT_LEADING,
49 USE_VIRTUAL_DEVICE,
50 USE_HIRES_VIRTUAL_DEVICE,
51 OLD_LINE_SPACING,
52 ADD_PARA_SPACING_TO_TABLE_CELLS,
53 ADD_PARA_LINE_SPACING_TO_TABLE_CELLS,
54 USE_FORMER_OBJECT_POS,
55 USE_FORMER_TEXT_WRAPPING,
56 CONSIDER_WRAP_ON_OBJECT_POSITION,
58 IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
59 DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
60 TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK,
61 DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
63 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
64 TABLE_ROW_KEEP,
65 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
66 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
68 // tdf#104349 tdf#104668
69 MS_WORD_COMP_TRAILING_BLANKS,
70 // tdf#128197 MS Word in some modes can have line height based on shape height, not on font
71 MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY,
72 UNIX_FORCE_ZERO_EXT_LEADING,
73 TABS_RELATIVE_TO_INDENT,
74 PROTECT_FORM,
75 // #i89181#
76 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
77 INVERT_BORDER_SPACING,
78 COLLAPSE_EMPTY_CELL_PARA,
79 SMALL_CAPS_PERCENTAGE_66,
80 TAB_OVERFLOW,
81 UNBREAKABLE_NUMBERINGS,
82 CLIPPED_PICTURES,
83 BACKGROUND_PARA_OVER_DRAWINGS,
84 TAB_OVER_MARGIN,
85 // MS Word still wraps text around objects with less space than LO would.
86 SURROUND_TEXT_WRAP_SMALL,
87 PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
88 SUBTRACT_FLYS,
89 // tdf#112443 disable off-page content positioning
90 DISABLE_OFF_PAGE_POSITIONING,
91 EMPTY_DB_FIELD_HIDES_PARA,
92 // COMPATIBILITY FLAGS END
93 BROWSE_MODE,
94 HTML_MODE,
95 GLOBAL_DOCUMENT,
96 GLOBAL_DOCUMENT_SAVE_LINKS,
97 LABEL_DOCUMENT,
98 PURGE_OLE,
99 KERN_ASIAN_PUNCTUATION,
100 MATH_BASELINE_ALIGNMENT,
101 STYLES_NODEFAULT,
102 FLOATTABLE_NOMARGINS,
103 EMBED_FONTS,
104 EMBED_USED_FONTS,
105 EMBED_LATIN_SCRIPT_FONTS,
106 EMBED_ASIAN_SCRIPT_FONTS,
107 EMBED_COMPLEX_SCRIPT_FONTS,
108 EMBED_SYSTEM_FONTS,
109 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
110 CONTINUOUS_ENDNOTES,
111 PROTECT_BOOKMARKS,
112 PROTECT_FIELDS,
113 HEADER_SPACING_BELOW_LAST_PARA,
114 FRAME_AUTOWIDTH_WITH_MORE_PARA,
117 /** Provides access to settings of a document
119 class IDocumentSettingAccess
121 public:
122 /** Return the specified document setting.
124 @param id
125 [in] the identifier of the document setting to be returned.
126 See above for a list of valid document setting identifiers.
128 @returns
129 the value of the requested document setting.
131 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
133 /** Set the specified document setting.
135 @param id
136 [in] the identifier of the document setting to be set.
137 See above for a list of valid document setting identifiers.
139 @param value
140 [in] the new value of the specified document setting.
142 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
144 /** Return the forbidden characters.
146 @param nLang
147 [in] the language for which the forbidden character list is returned.
149 @param bLocaleData
150 [in] if set and there is no user defined forbidden character list for
151 language lang, the default list for language lang will be returned.
153 @returns
154 a list of forbidden characters.
156 virtual const css::i18n::ForbiddenCharacters*
157 getForbiddenCharacters(/*[in]*/ LanguageType nLang, /*[in]*/ bool bLocaleData) const = 0;
159 /** Set the forbidden characters.
161 @param nLang
162 [in] the language for which the forbidden character list should be set.
164 @param rForbiddenCharacters
165 [in] the new list of forbidden characters for language lang.
167 virtual void
168 setForbiddenCharacters(/*[in]*/ LanguageType nLang,
169 /*[in]*/ const css::i18n::ForbiddenCharacters& rForbiddenCharacters)
170 = 0;
172 /** Get the forbidden character table and creates one if necessary.
174 @returns
175 the forbidden characters table.
177 virtual std::shared_ptr<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
179 /** Get the forbidden character table.
181 @returns
182 the forbidden characters table.
184 virtual const std::shared_ptr<SvxForbiddenCharactersTable>&
185 getForbiddenCharacterTable() const = 0;
187 /** Get the current link update mode.
189 @param bGlobalSettings
190 [in] if set, the link update mode is obtained from the module,
191 if it is set to GLOBALSETTING
193 @returns
194 the current link update mode.
196 virtual sal_uInt16 getLinkUpdateMode(/*[in]*/ bool bGlobalSettings) const = 0;
198 /** Set the current link update mode.
200 @param nMode
201 [in] the new link update mode.
203 virtual void setLinkUpdateMode(/*[in]*/ sal_uInt16 nMode) = 0;
205 /** Get the current field update mode.
207 @param bGlobalSettings
208 [in] if set, the field update mode is obtained from the module,
209 if it is set to GLOBALSETTING
211 @returns
212 the current field update mode.
214 virtual SwFieldUpdateFlags getFieldUpdateFlags(/*[in]*/ bool bGlobalSettings) const = 0;
216 /** Set the current field update mode.
218 @param nMode
219 [in] the new field update mode.
221 virtual void setFieldUpdateFlags(/*[in]*/ SwFieldUpdateFlags nMode) = 0;
223 /** Get the character compression type for Asian characters.
225 @returns
226 the current character compression mode.
228 virtual CharCompressType getCharacterCompressionType() const = 0;
230 /** Set the character compression type for Asian characters.
232 @param nMode
233 [in] the new character compression type.
235 virtual void setCharacterCompressionType(/*[in]*/ CharCompressType nType) = 0;
237 /** Get the n32DummyCompatibilityOptions1
239 virtual sal_uInt32 Getn32DummyCompatibilityOptions1() const = 0;
241 /** Set the n32DummyCompatibilityOptions1
243 virtual void Setn32DummyCompatibilityOptions1(const sal_uInt32 CompatibilityOptions1) = 0;
245 /** Get the n32DummyCompatibilityOptions2
247 virtual sal_uInt32 Getn32DummyCompatibilityOptions2() const = 0;
249 /** Set the n32DummyCompatibilityOptions2
251 virtual void Setn32DummyCompatibilityOptions2(const sal_uInt32 CompatibilityOptions2) = 0;
253 protected:
254 virtual ~IDocumentSettingAccess(){};
257 #endif // INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
259 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */