update ooo310-m15
[ooovba.git] / sw / inc / IDocumentSettingAccess.hxx
blobb7b683f6a81b1a4c0f47bd51fa4447ffe74a45fc
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 // COMPATIBILITY FLAGS END
90 BROWSE_MODE,
91 HTML_MODE,
92 GLOBAL_DOCUMENT,
93 GLOBAL_DOCUMENT_SAVE_LINKS,
94 LABEL_DOCUMENT,
95 PURGE_OLE,
96 KERN_ASIAN_PUNCTUATION
99 public:
100 /** Return the specified document setting.
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.
106 @returns
107 the value of the requested document setting.
109 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
111 /** Set the specified document setting.
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.
117 @param value
118 [in] the new value of the specified document setting.
120 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
122 /** Return the forbidden characters.
124 @param nLang
125 [in] the language for which the forbidden character list is returned.
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.
131 @returns
132 a list of forbidden characters.
134 virtual const com::sun::star::i18n::ForbiddenCharacters*
135 getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
137 /** Set the forbidden characters.
139 @param nLang
140 [in] the language for which the forbidden character list should be set.
142 @param rForbiddenCharacters
143 [in] the new list of forbidden characters for language lang.
145 virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
146 /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
148 /** Get the forbidden character table and creates one if necessary.
150 @returns
151 the forbidden characters table.
153 virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
155 /** Get the forbidden character table.
157 @returns
158 the forbidden characters table.
160 virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
162 /** Get the current link update mode.
164 @param bGlobalSettings
165 [in] if set, the link update mode is obtained from the module,
166 if it is set to GLOBALSETTING
168 @returns
169 the current link update mode.
171 virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
173 /** Set the current link update mode.
175 @param nMode
176 [in] the new link update mode.
178 virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
180 /** Get the current field update mode.
182 @param bGlobalSettings
183 [in] if set, the field update mode is obtained from the module,
184 if it is set to GLOBALSETTING
186 @returns
187 the current field update mode.
189 virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
191 /** Set the current field update mode.
193 @param nMode
194 [in] the new field update mode.
196 virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0;
198 /** Get the character compression type for Asian characters.
200 @returns
201 the current character compression mode.
203 virtual SwCharCompressType getCharacterCompressionType() const = 0;
205 /** Set the character compression type for Asian characters.
207 @param nMode
208 [in] the new character compression type.
210 virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
212 protected:
213 virtual ~IDocumentSettingAccess() {};
216 #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED