Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / inc / IDocumentSettingAccess.hxx
blobad1d95c10b0d99b58f2e15866e10f27ae42a38be
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 #pragma once
22 #include <sal/types.h>
23 #include "fldupde.hxx"
24 #include <i18nlangtag/lang.h>
25 #include <memory>
27 class SvxForbiddenCharactersTable;
28 namespace com::sun::star::i18n
30 struct ForbiddenCharacters;
32 enum class CharCompressType;
34 enum class DocumentSettingId
36 // COMPATIBILITY FLAGS START
37 PARA_SPACE_MAX,
38 PARA_SPACE_MAX_AT_PAGES,
40 TAB_COMPAT,
42 ADD_FLY_OFFSETS,
43 ADD_VERTICAL_FLY_OFFSETS,
45 OLD_NUMBERING,
47 ADD_EXT_LEADING,
48 USE_VIRTUAL_DEVICE,
49 USE_HIRES_VIRTUAL_DEVICE,
50 OLD_LINE_SPACING,
51 ADD_PARA_SPACING_TO_TABLE_CELLS,
52 ADD_PARA_LINE_SPACING_TO_TABLE_CELLS,
53 USE_FORMER_OBJECT_POS,
54 USE_FORMER_TEXT_WRAPPING,
55 CONSIDER_WRAP_ON_OBJECT_POSITION,
57 IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
58 DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
59 TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK,
60 DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
62 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
63 TABLE_ROW_KEEP,
64 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
65 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
67 // tdf#104349 tdf#104668
68 MS_WORD_COMP_TRAILING_BLANKS,
69 // tdf#128197 MS Word in some modes can have line height based on shape height, not on font
70 MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY,
71 UNIX_FORCE_ZERO_EXT_LEADING,
72 TABS_RELATIVE_TO_INDENT,
73 PROTECT_FORM,
74 // #i89181#
75 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
76 INVERT_BORDER_SPACING,
77 COLLAPSE_EMPTY_CELL_PARA,
78 SMALL_CAPS_PERCENTAGE_66,
79 TAB_OVERFLOW,
80 UNBREAKABLE_NUMBERINGS,
81 CLIPPED_PICTURES,
82 BACKGROUND_PARA_OVER_DRAWINGS,
83 TAB_OVER_MARGIN,
84 TAB_OVER_SPACING,
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 // tdf#129448: Auto first-line indent should not be effected by line space
93 AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE,
94 HYPHENATE_URLS, ///< tdf#152952
95 DO_NOT_BREAK_WRAPPED_TABLES,
96 ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK,
97 // COMPATIBILITY FLAGS END
98 BROWSE_MODE,
99 HTML_MODE,
100 GLOBAL_DOCUMENT,
101 GLOBAL_DOCUMENT_SAVE_LINKS,
102 LABEL_DOCUMENT,
103 PURGE_OLE,
104 KERN_ASIAN_PUNCTUATION,
105 MATH_BASELINE_ALIGNMENT,
106 STYLES_NODEFAULT,
107 FLOATTABLE_NOMARGINS,
108 EMBED_FONTS,
109 EMBED_USED_FONTS,
110 EMBED_LATIN_SCRIPT_FONTS,
111 EMBED_ASIAN_SCRIPT_FONTS,
112 EMBED_COMPLEX_SCRIPT_FONTS,
113 EMBED_SYSTEM_FONTS,
114 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
115 CONTINUOUS_ENDNOTES,
116 PROTECT_BOOKMARKS,
117 PROTECT_FIELDS,
118 HEADER_SPACING_BELOW_LAST_PARA,
119 FRAME_AUTOWIDTH_WITH_MORE_PARA,
120 GUTTER_AT_TOP,
121 // footnoteContainer default position is the page end instead of the column end
122 // only if "evenly distributed" is set, and "collected at the end" is not set
123 FOOTNOTE_IN_COLUMN_TO_PAGEEND,
124 // Should we display follow by symbol for numbered paragraph if numbering exists, but "None"?
125 NO_NUMBERING_SHOW_FOLLOWBY,
126 // drop cap punctuation: smaller dashes, bullet, asterisks, quotation marks etc.
127 // by extending the rounding box of the glyph to the baseline
128 DROP_CAP_PUNCTUATION,
131 /** Provides access to settings of a document
133 class IDocumentSettingAccess
135 public:
136 /** Return the specified document setting.
138 @param id
139 [in] the identifier of the document setting to be returned.
140 See above for a list of valid document setting identifiers.
142 @returns
143 the value of the requested document setting.
145 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
147 /** Set the specified document setting.
149 @param id
150 [in] the identifier of the document setting to be set.
151 See above for a list of valid document setting identifiers.
153 @param value
154 [in] the new value of the specified document setting.
156 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
158 /** Return the forbidden characters.
160 @param nLang
161 [in] the language for which the forbidden character list is returned.
163 @param bLocaleData
164 [in] if set and there is no user defined forbidden character list for
165 language lang, the default list for language lang will be returned.
167 @returns
168 a list of forbidden characters.
170 virtual const css::i18n::ForbiddenCharacters*
171 getForbiddenCharacters(/*[in]*/ LanguageType nLang, /*[in]*/ bool bLocaleData) const = 0;
173 /** Set the forbidden characters.
175 @param nLang
176 [in] the language for which the forbidden character list should be set.
178 @param rForbiddenCharacters
179 [in] the new list of forbidden characters for language lang.
181 virtual void
182 setForbiddenCharacters(/*[in]*/ LanguageType nLang,
183 /*[in]*/ const css::i18n::ForbiddenCharacters& rForbiddenCharacters)
184 = 0;
186 /** Get the forbidden character table and creates one if necessary.
188 @returns
189 the forbidden characters table.
191 virtual std::shared_ptr<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
193 /** Get the forbidden character table.
195 @returns
196 the forbidden characters table.
198 virtual const std::shared_ptr<SvxForbiddenCharactersTable>&
199 getForbiddenCharacterTable() const = 0;
201 /** Get the current link update mode.
203 @param bGlobalSettings
204 [in] if set, the link update mode is obtained from the module,
205 if it is set to GLOBALSETTING
207 @returns
208 the current link update mode.
210 virtual sal_uInt16 getLinkUpdateMode(/*[in]*/ bool bGlobalSettings) const = 0;
212 /** Set the current link update mode.
214 @param nMode
215 [in] the new link update mode.
217 virtual void setLinkUpdateMode(/*[in]*/ sal_uInt16 nMode) = 0;
219 /** Get the current field update mode.
221 @param bGlobalSettings
222 [in] if set, the field update mode is obtained from the module,
223 if it is set to GLOBALSETTING
225 @returns
226 the current field update mode.
228 virtual SwFieldUpdateFlags getFieldUpdateFlags(/*[in]*/ bool bGlobalSettings) const = 0;
230 /** Set the current field update mode.
232 @param nMode
233 [in] the new field update mode.
235 virtual void setFieldUpdateFlags(/*[in]*/ SwFieldUpdateFlags nMode) = 0;
237 /** Get the character compression type for Asian characters.
239 @returns
240 the current character compression mode.
242 virtual CharCompressType getCharacterCompressionType() const = 0;
244 /** Set the character compression type for Asian characters.
246 @param nMode
247 [in] the new character compression type.
249 virtual void setCharacterCompressionType(/*[in]*/ CharCompressType nType) = 0;
251 /** Get the n32DummyCompatibilityOptions1
253 virtual sal_uInt32 Getn32DummyCompatibilityOptions1() const = 0;
255 /** Set the n32DummyCompatibilityOptions1
257 virtual void Setn32DummyCompatibilityOptions1(const sal_uInt32 CompatibilityOptions1) = 0;
259 /** Get the n32DummyCompatibilityOptions2
261 virtual sal_uInt32 Getn32DummyCompatibilityOptions2() const = 0;
263 /** Set the n32DummyCompatibilityOptions2
265 virtual void Setn32DummyCompatibilityOptions2(const sal_uInt32 CompatibilityOptions2) = 0;
267 virtual sal_Int32 getImagePreferredDPI() = 0;
268 virtual void setImagePreferredDPI(sal_Int32 nValue) = 0;
270 protected:
271 virtual ~IDocumentSettingAccess(){};
274 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */