1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sal/types.h>
23 #include "fldupde.hxx"
24 #include <i18nlangtag/lang.h>
27 class SvxForbiddenCharactersTable
;
28 namespace com::sun::star::i18n
30 struct ForbiddenCharacters
;
32 enum class CharCompressType
;
34 enum class DocumentSettingId
36 // COMPATIBILITY FLAGS START
38 PARA_SPACE_MAX_AT_PAGES
,
43 ADD_VERTICAL_FLY_OFFSETS
,
49 USE_HIRES_VIRTUAL_DEVICE
,
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
,
61 // tdf#159382: MS Word compatible handling of space between footnote number and text
62 NO_GAP_AFTER_NOTE_NUMBER
,
64 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
,
66 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
,
67 IGNORE_HIDDEN_CHARS_FOR_LINE_CALCULATION
,
68 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
,
70 // tdf#104349 tdf#104668
71 MS_WORD_COMP_TRAILING_BLANKS
,
72 // tdf#128197 MS Word in some modes can have line height based on shape height, not on font
73 MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
,
74 UNIX_FORCE_ZERO_EXT_LEADING
,
75 TABS_RELATIVE_TO_INDENT
,
78 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
,
79 INVERT_BORDER_SPACING
,
80 COLLAPSE_EMPTY_CELL_PARA
,
81 SMALL_CAPS_PERCENTAGE_66
,
83 UNBREAKABLE_NUMBERINGS
,
85 BACKGROUND_PARA_OVER_DRAWINGS
,
88 // MS Word still wraps text around objects with less space than LO would.
89 SURROUND_TEXT_WRAP_SMALL
,
90 PROP_LINE_SPACING_SHRINKS_FIRST_LINE
,
92 // tdf#112443 disable off-page content positioning
93 DISABLE_OFF_PAGE_POSITIONING
,
94 EMPTY_DB_FIELD_HIDES_PARA
,
95 // tdf#129448: Auto first-line indent should not be effected by line space
96 AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
,
97 HYPHENATE_URLS
, ///< tdf#152952
98 DO_NOT_BREAK_WRAPPED_TABLES
,
99 ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
,
100 // tdf#119908 new paragraph justification
101 JUSTIFY_LINES_WITH_SHRINKING
,
102 APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH
,
103 APPLY_PARAGRAPH_MARK_FORMAT_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH
,
104 DO_NOT_MIRROR_RTL_DRAW_OBJS
,
105 // COMPATIBILITY FLAGS END
109 GLOBAL_DOCUMENT_SAVE_LINKS
,
112 KERN_ASIAN_PUNCTUATION
,
113 MATH_BASELINE_ALIGNMENT
,
117 EMBED_LATIN_SCRIPT_FONTS
,
118 EMBED_ASIAN_SCRIPT_FONTS
,
119 EMBED_COMPLEX_SCRIPT_FONTS
,
121 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
,
125 HEADER_SPACING_BELOW_LAST_PARA
,
126 FRAME_AUTOWIDTH_WITH_MORE_PARA
,
128 // footnoteContainer default position is the page end instead of the column end
129 // only if "evenly distributed" is set, and "collected at the end" is not set
130 FOOTNOTE_IN_COLUMN_TO_PAGEEND
,
131 // Should we display follow by symbol for numbered paragraph if numbering exists, but "None"?
132 NO_NUMBERING_SHOW_FOLLOWBY
,
133 // drop cap punctuation: smaller dashes, bullet, asterisks, quotation marks etc.
134 // by extending the rounding box of the glyph to the baseline
135 DROP_CAP_PUNCTUATION
,
136 // render NBSP as standard-space-width (prettier when justified)
137 USE_VARIABLE_WIDTH_NBSP
,
138 // overlap background shapes if anchored in body
139 PAINT_HELL_OVER_HEADER_FOOTER
,
140 // tdf#155229 calculate minimum row height including horizontal border width
141 MIN_ROW_HEIGHT_INCL_BORDER
,
142 // tdf#129808 MS Word always includes ext leading for text grid line height
143 MS_WORD_COMP_GRID_METRICS
,
144 // tdf#161233 pictures with wrap polygon should not be clipped
145 NO_CLIPPING_WITH_WRAP_POLYGON
,
148 /** Provides access to settings of a document
150 class IDocumentSettingAccess
153 /** Return the specified document setting.
156 [in] the identifier of the document setting to be returned.
157 See above for a list of valid document setting identifiers.
160 the value of the requested document setting.
162 virtual bool get(/*[in]*/ DocumentSettingId id
) const = 0;
164 /** Set the specified document setting.
167 [in] the identifier of the document setting to be set.
168 See above for a list of valid document setting identifiers.
171 [in] the new value of the specified document setting.
173 virtual void set(/*[in]*/ DocumentSettingId id
, /*[in]*/ bool value
) = 0;
175 /** Return the forbidden characters.
178 [in] the language for which the forbidden character list is returned.
181 [in] if set and there is no user defined forbidden character list for
182 language lang, the default list for language lang will be returned.
185 a list of forbidden characters.
187 virtual const css::i18n::ForbiddenCharacters
*
188 getForbiddenCharacters(/*[in]*/ LanguageType nLang
, /*[in]*/ bool bLocaleData
) const = 0;
190 /** Set the forbidden characters.
193 [in] the language for which the forbidden character list should be set.
195 @param rForbiddenCharacters
196 [in] the new list of forbidden characters for language lang.
199 setForbiddenCharacters(/*[in]*/ LanguageType nLang
,
200 /*[in]*/ const css::i18n::ForbiddenCharacters
& rForbiddenCharacters
)
203 /** Get the forbidden character table and creates one if necessary.
206 the forbidden characters table.
208 virtual std::shared_ptr
<SvxForbiddenCharactersTable
>& getForbiddenCharacterTable() = 0;
210 /** Get the forbidden character table.
213 the forbidden characters table.
215 virtual const std::shared_ptr
<SvxForbiddenCharactersTable
>&
216 getForbiddenCharacterTable() const = 0;
218 /** Get the current link update mode.
220 @param bGlobalSettings
221 [in] if set, the link update mode is obtained from the module,
222 if it is set to GLOBALSETTING
225 the current link update mode.
227 virtual sal_uInt16
getLinkUpdateMode(/*[in]*/ bool bGlobalSettings
) const = 0;
229 /** Set the current link update mode.
232 [in] the new link update mode.
234 virtual void setLinkUpdateMode(/*[in]*/ sal_uInt16 nMode
) = 0;
236 /** Get the current field update mode.
238 @param bGlobalSettings
239 [in] if set, the field update mode is obtained from the module,
240 if it is set to GLOBALSETTING
243 the current field update mode.
245 virtual SwFieldUpdateFlags
getFieldUpdateFlags(/*[in]*/ bool bGlobalSettings
) const = 0;
247 /** Set the current field update mode.
250 [in] the new field update mode.
252 virtual void setFieldUpdateFlags(/*[in]*/ SwFieldUpdateFlags nMode
) = 0;
254 /** Get the character compression type for Asian characters.
257 the current character compression mode.
259 virtual CharCompressType
getCharacterCompressionType() const = 0;
261 /** Set the character compression type for Asian characters.
264 [in] the new character compression type.
266 virtual void setCharacterCompressionType(/*[in]*/ CharCompressType nType
) = 0;
268 /** Get the n32DummyCompatibilityOptions1
270 virtual sal_uInt32
Getn32DummyCompatibilityOptions1() const = 0;
272 /** Set the n32DummyCompatibilityOptions1
274 virtual void Setn32DummyCompatibilityOptions1(const sal_uInt32 CompatibilityOptions1
) = 0;
276 /** Get the n32DummyCompatibilityOptions2
278 virtual sal_uInt32
Getn32DummyCompatibilityOptions2() const = 0;
280 /** Set the n32DummyCompatibilityOptions2
282 virtual void Setn32DummyCompatibilityOptions2(const sal_uInt32 CompatibilityOptions2
) = 0;
284 virtual sal_Int32
getImagePreferredDPI() = 0;
285 virtual void setImagePreferredDPI(sal_Int32 nValue
) = 0;
288 virtual ~IDocumentSettingAccess(){};
291 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */