Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
21 : #define INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
22 :
23 : #include <tools/solar.h>
24 : #include <rtl/ref.hxx>
25 : #include <chcmprse.hxx>
26 : #include <fldupde.hxx>
27 :
28 : class SvxForbiddenCharactersTable;
29 : namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
30 :
31 : enum class DocumentSettingId
32 : {
33 : // COMPATIBILITY FLAGS START
34 : PARA_SPACE_MAX,
35 : PARA_SPACE_MAX_AT_PAGES,
36 :
37 : TAB_COMPAT,
38 :
39 : ADD_FLY_OFFSETS,
40 :
41 : OLD_NUMBERING,
42 :
43 : ADD_EXT_LEADING,
44 : USE_VIRTUAL_DEVICE,
45 : USE_HIRES_VIRTUAL_DEVICE,
46 : OLD_LINE_SPACING,
47 : ADD_PARA_SPACING_TO_TABLE_CELLS,
48 : USE_FORMER_OBJECT_POS,
49 : USE_FORMER_TEXT_WRAPPING,
50 : CONSIDER_WRAP_ON_OBJECT_POSITION,
51 :
52 : IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
53 : DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
54 : DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
55 : OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
56 :
57 : DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
58 : TABLE_ROW_KEEP,
59 : IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
60 : CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
61 :
62 : UNIX_FORCE_ZERO_EXT_LEADING,
63 : TABS_RELATIVE_TO_INDENT,
64 : PROTECT_FORM,
65 : // #i89181#
66 : TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
67 : INVERT_BORDER_SPACING,
68 : COLLAPSE_EMPTY_CELL_PARA,
69 : SMALL_CAPS_PERCENTAGE_66,
70 : TAB_OVERFLOW,
71 : UNBREAKABLE_NUMBERINGS,
72 : CLIPPED_PICTURES,
73 : BACKGROUND_PARA_OVER_DRAWINGS,
74 : TAB_OVER_MARGIN,
75 : // MS Word still wraps text around objects with less space than LO would.
76 : SURROUND_TEXT_WRAP_SMALL,
77 : PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
78 : SUBTRACT_FLYS,
79 : // COMPATIBILITY FLAGS END
80 : BROWSE_MODE,
81 : HTML_MODE,
82 : GLOBAL_DOCUMENT,
83 : GLOBAL_DOCUMENT_SAVE_LINKS,
84 : LABEL_DOCUMENT,
85 : PURGE_OLE,
86 : KERN_ASIAN_PUNCTUATION,
87 : MATH_BASELINE_ALIGNMENT,
88 : STYLES_NODEFAULT,
89 : FLOATTABLE_NOMARGINS,
90 : EMBED_FONTS,
91 : EMBED_SYSTEM_FONTS,
92 : APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
93 : };
94 :
95 : /** Provides access to settings of a document
96 : */
97 2958 : class IDocumentSettingAccess
98 : {
99 : public:
100 : /** Return the specified document setting.
101 :
102 : @param id
103 : [in] the identifier of the document setting to be returned.
104 : See above for a list of valid document setting identifiers.
105 :
106 : @returns
107 : the value of the requested document setting.
108 : */
109 : virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
110 :
111 : /** Set the specified document setting.
112 :
113 : @param id
114 : [in] the identifier of the document setting to be set.
115 : See above for a list of valid document setting identifiers.
116 :
117 : @param value
118 : [in] the new value of the specified document setting.
119 : */
120 : virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
121 :
122 : /** Return the forbidden characters.
123 :
124 : @param nLang
125 : [in] the language for which the forbidden character list is returned.
126 :
127 : @param bLocaleData
128 : [in] if set and there is no user defined forbidden character list for
129 : language lang, the default list for language lang will be returned.
130 :
131 : @returns
132 : a list of forbidden characters.
133 : */
134 : virtual const com::sun::star::i18n::ForbiddenCharacters*
135 : getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0;
136 :
137 : /** Set the forbidden characters.
138 :
139 : @param nLang
140 : [in] the language for which the forbidden character list should be set.
141 :
142 : @param rForbiddenCharacters
143 : [in] the new list of forbidden characters for language lang.
144 : */
145 : virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
146 : /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
147 :
148 : /** Get the forbidden character table and creates one if necessary.
149 :
150 : @returns
151 : the forbidden characters table.
152 : */
153 : virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
154 :
155 : /** Get the forbidden character table.
156 :
157 : @returns
158 : the forbidden characters table.
159 : */
160 : virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
161 :
162 : /** Get the current link update mode.
163 :
164 : @param bGlobalSettings
165 : [in] if set, the link update mode is obtained from the module,
166 : if it is set to GLOBALSETTING
167 :
168 : @returns
169 : the current link update mode.
170 : */
171 : virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
172 :
173 : /** Set the current link update mode.
174 :
175 : @param nMode
176 : [in] the new link update mode.
177 : */
178 : virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
179 :
180 : /** Get the current field update mode.
181 :
182 : @param bGlobalSettings
183 : [in] if set, the field update mode is obtained from the module,
184 : if it is set to GLOBALSETTING
185 :
186 : @returns
187 : the current field update mode.
188 : */
189 : virtual SwFieldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
190 :
191 : /** Set the current field update mode.
192 :
193 : @param nMode
194 : [in] the new field update mode.
195 : */
196 : virtual void setFieldUpdateFlags( /*[in]*/ SwFieldUpdateFlags nMode ) = 0;
197 :
198 : /** Get the character compression type for Asian characters.
199 :
200 : @returns
201 : the current character compression mode.
202 : */
203 : virtual SwCharCompressType getCharacterCompressionType() const = 0;
204 :
205 : /** Set the character compression type for Asian characters.
206 :
207 : @param nMode
208 : [in] the new character compression type.
209 : */
210 : virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
211 :
212 : /** Get the n32DummyCompatabilityOptions1
213 : */
214 : virtual sal_uInt32 Getn32DummyCompatibilityOptions1() const = 0;
215 :
216 : /** Set the n32DummyCompatabilityOptions1
217 : */
218 : virtual void Setn32DummyCompatibilityOptions1( const sal_uInt32 CompatibilityOptions1 ) = 0;
219 :
220 : /** Get the n32DummyCompatabilityOptions2
221 : */
222 : virtual sal_uInt32 Getn32DummyCompatibilityOptions2() const = 0;
223 :
224 : /** Set the n32DummyCompatabilityOptions2
225 : */
226 : virtual void Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2 ) = 0;
227 :
228 : protected:
229 2949 : virtual ~IDocumentSettingAccess() {};
230 : };
231 :
232 : #endif // INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
233 :
234 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|