merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / IDocumentSettingAccess.hxx
blob3b90c41458474e07814cd1ee96d4ab68856e2e2e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IDocumentSettingAccess.hxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef IDOCUMENTSETTINGACCESS_HXX_INCLUDED
32 #define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
34 #include <tools/solar.h>
35 #ifndef _VOS_REF_HXX
36 #include <vos/ref.hxx>
37 #endif
38 #include <chcmprse.hxx>
39 #include <fldupde.hxx>
41 class SvxForbiddenCharactersTable;
42 namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
44 /** Provides access to settings of a document
46 class IDocumentSettingAccess
48 public:
49 enum DocumentSettingId
51 // COMPATIBILITY FLAGS START
52 PARA_SPACE_MAX,
53 PARA_SPACE_MAX_AT_PAGES,
55 TAB_COMPAT,
57 ADD_FLY_OFFSETS,
59 OLD_NUMBERING,
61 ADD_EXT_LEADING,
62 USE_VIRTUAL_DEVICE,
63 USE_HIRES_VIRTUAL_DEVICE,
64 OLD_LINE_SPACING,
65 ADD_PARA_SPACING_TO_TABLE_CELLS,
66 USE_FORMER_OBJECT_POS,
67 USE_FORMER_TEXT_WRAPPING,
68 CONSIDER_WRAP_ON_OBJECT_POSITION,
70 IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
71 DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
72 DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
73 OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
75 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
76 TABLE_ROW_KEEP,
77 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
78 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
80 UNIX_FORCE_ZERO_EXT_LEADING,
81 USE_OLD_PRINTER_METRICS,
82 TABS_RELATIVE_TO_INDENT,
83 PROTECT_FORM,
84 // --> OD 2008-06-05 #i89181#
85 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
86 // <--
87 INVERT_BORDER_SPACING,
88 COLLAPSE_EMPTY_CELL_PARA,
89 // COMPATIBILITY FLAGS END
91 BROWSE_MODE,
92 HTML_MODE,
93 GLOBAL_DOCUMENT,
94 GLOBAL_DOCUMENT_SAVE_LINKS,
95 LABEL_DOCUMENT,
96 PURGE_OLE,
97 KERN_ASIAN_PUNCTUATION
100 public:
101 /** Return the specified document setting.
103 @param id
104 [in] the identifier of the document setting to be returned.
105 See above for a list of valid document setting identifiers.
107 @returns
108 the value of the requested document setting.
110 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
112 /** Set the specified document setting.
114 @param id
115 [in] the identifier of the document setting to be set.
116 See above for a list of valid document setting identifiers.
118 @param value
119 [in] the new value of the specified document setting.
121 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
123 /** Return the forbidden characters.
125 @param nLang
126 [in] the language for which the forbidden character list is returned.
128 @param bLocaleData
129 [in] if set and there is no user defined forbidden character list for
130 language lang, the default list for language lang will be returned.
132 @returns
133 a list of forbidden characters.
135 virtual const com::sun::star::i18n::ForbiddenCharacters*
136 getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
138 /** Set the forbidden characters.
140 @param nLang
141 [in] the language for which the forbidden character list should be set.
143 @param rForbiddenCharacters
144 [in] the new list of forbidden characters for language lang.
146 virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
147 /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
149 /** Get the forbidden character table and creates one if necessary.
151 @returns
152 the forbidden characters table.
154 virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
156 /** Get the forbidden character table.
158 @returns
159 the forbidden characters table.
161 virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
163 /** Get the current link update mode.
165 @param bGlobalSettings
166 [in] if set, the link update mode is obtained from the module,
167 if it is set to GLOBALSETTING
169 @returns
170 the current link update mode.
172 virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
174 /** Set the current link update mode.
176 @param nMode
177 [in] the new link update mode.
179 virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
181 /** Get the current field update mode.
183 @param bGlobalSettings
184 [in] if set, the field update mode is obtained from the module,
185 if it is set to GLOBALSETTING
187 @returns
188 the current field update mode.
190 virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
192 /** Set the current field update mode.
194 @param nMode
195 [in] the new field update mode.
197 virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0;
199 /** Get the character compression type for Asian characters.
201 @returns
202 the current character compression mode.
204 virtual SwCharCompressType getCharacterCompressionType() const = 0;
206 /** Set the character compression type for Asian characters.
208 @param nMode
209 [in] the new character compression type.
211 virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
213 protected:
214 virtual ~IDocumentSettingAccess() {};
217 #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED