Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / sw / inc / IDocumentSettingAccess.hxx
blob7822215057d7f54814ce5ce81ced448e570d1d94
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 <tools/solar.h>
24 #include <rtl/ref.hxx>
25 #include <fldupde.hxx>
26 #include <i18nlangtag/lang.h>
28 class SvxForbiddenCharactersTable;
29 namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
30 enum class CharCompressType;
32 enum class DocumentSettingId
34 // COMPATIBILITY FLAGS START
35 PARA_SPACE_MAX,
36 PARA_SPACE_MAX_AT_PAGES,
38 TAB_COMPAT,
40 ADD_FLY_OFFSETS,
41 ADD_VERTICAL_FLY_OFFSETS,
43 OLD_NUMBERING,
45 ADD_EXT_LEADING,
46 USE_VIRTUAL_DEVICE,
47 USE_HIRES_VIRTUAL_DEVICE,
48 OLD_LINE_SPACING,
49 ADD_PARA_SPACING_TO_TABLE_CELLS,
50 USE_FORMER_OBJECT_POS,
51 USE_FORMER_TEXT_WRAPPING,
52 CONSIDER_WRAP_ON_OBJECT_POSITION,
54 IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
55 DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
56 TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK,
57 DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
59 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
60 TABLE_ROW_KEEP,
61 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
62 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
64 // tdf#104349 tdf#104668
65 MS_WORD_COMP_TRAILING_BLANKS,
67 UNIX_FORCE_ZERO_EXT_LEADING,
68 TABS_RELATIVE_TO_INDENT,
69 PROTECT_FORM,
70 // #i89181#
71 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
72 INVERT_BORDER_SPACING,
73 COLLAPSE_EMPTY_CELL_PARA,
74 SMALL_CAPS_PERCENTAGE_66,
75 TAB_OVERFLOW,
76 UNBREAKABLE_NUMBERINGS,
77 CLIPPED_PICTURES,
78 BACKGROUND_PARA_OVER_DRAWINGS,
79 TAB_OVER_MARGIN,
80 // MS Word still wraps text around objects with less space than LO would.
81 SURROUND_TEXT_WRAP_SMALL,
82 PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
83 SUBTRACT_FLYS,
84 // COMPATIBILITY FLAGS END
85 BROWSE_MODE,
86 HTML_MODE,
87 GLOBAL_DOCUMENT,
88 GLOBAL_DOCUMENT_SAVE_LINKS,
89 LABEL_DOCUMENT,
90 PURGE_OLE,
91 KERN_ASIAN_PUNCTUATION,
92 MATH_BASELINE_ALIGNMENT,
93 STYLES_NODEFAULT,
94 FLOATTABLE_NOMARGINS,
95 EMBED_FONTS,
96 EMBED_SYSTEM_FONTS,
97 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
100 /** Provides access to settings of a document
102 class IDocumentSettingAccess
104 public:
105 /** Return the specified document setting.
107 @param id
108 [in] the identifier of the document setting to be returned.
109 See above for a list of valid document setting identifiers.
111 @returns
112 the value of the requested document setting.
114 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
116 /** Set the specified document setting.
118 @param id
119 [in] the identifier of the document setting to be set.
120 See above for a list of valid document setting identifiers.
122 @param value
123 [in] the new value of the specified document setting.
125 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
127 /** Return the forbidden characters.
129 @param nLang
130 [in] the language for which the forbidden character list is returned.
132 @param bLocaleData
133 [in] if set and there is no user defined forbidden character list for
134 language lang, the default list for language lang will be returned.
136 @returns
137 a list of forbidden characters.
139 virtual const css::i18n::ForbiddenCharacters*
140 getForbiddenCharacters(/*[in]*/ LanguageType nLang, /*[in]*/ bool bLocaleData ) const = 0;
142 /** Set the forbidden characters.
144 @param nLang
145 [in] the language for which the forbidden character list should be set.
147 @param rForbiddenCharacters
148 [in] the new list of forbidden characters for language lang.
150 virtual void setForbiddenCharacters(/*[in]*/ LanguageType nLang,
151 /*[in]*/ const css::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
153 /** Get the forbidden character table and creates one if necessary.
155 @returns
156 the forbidden characters table.
158 virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
160 /** Get the forbidden character table.
162 @returns
163 the forbidden characters table.
165 virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
167 /** Get the current link update mode.
169 @param bGlobalSettings
170 [in] if set, the link update mode is obtained from the module,
171 if it is set to GLOBALSETTING
173 @returns
174 the current link update mode.
176 virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
178 /** Set the current link update mode.
180 @param nMode
181 [in] the new link update mode.
183 virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
185 /** Get the current field update mode.
187 @param bGlobalSettings
188 [in] if set, the field update mode is obtained from the module,
189 if it is set to GLOBALSETTING
191 @returns
192 the current field update mode.
194 virtual SwFieldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
196 /** Set the current field update mode.
198 @param nMode
199 [in] the new field update mode.
201 virtual void setFieldUpdateFlags( /*[in]*/ SwFieldUpdateFlags nMode ) = 0;
203 /** Get the character compression type for Asian characters.
205 @returns
206 the current character compression mode.
208 virtual CharCompressType getCharacterCompressionType() const = 0;
210 /** Set the character compression type for Asian characters.
212 @param nMode
213 [in] the new character compression type.
215 virtual void setCharacterCompressionType( /*[in]*/CharCompressType nType ) = 0;
217 /** Get the n32DummyCompatabilityOptions1
219 virtual sal_uInt32 Getn32DummyCompatibilityOptions1() const = 0;
221 /** Set the n32DummyCompatabilityOptions1
223 virtual void Setn32DummyCompatibilityOptions1( const sal_uInt32 CompatibilityOptions1 ) = 0;
225 /** Get the n32DummyCompatabilityOptions2
227 virtual sal_uInt32 Getn32DummyCompatibilityOptions2() const = 0;
229 /** Set the n32DummyCompatabilityOptions2
231 virtual void Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2 ) = 0;
233 protected:
234 virtual ~IDocumentSettingAccess() {};
237 #endif // INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
239 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */