merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / IDocumentSettingAccess.hxx
blob6be53158ddc803d5f472df5688fce131d49e740c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef IDOCUMENTSETTINGACCESS_HXX_INCLUDED
29 #define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
31 #include <tools/solar.h>
32 #ifndef _VOS_REF_HXX
33 #include <vos/ref.hxx>
34 #endif
35 #include <chcmprse.hxx>
36 #include <fldupde.hxx>
38 class SvxForbiddenCharactersTable;
39 namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
41 /** Provides access to settings of a document
43 class IDocumentSettingAccess
45 public:
46 enum DocumentSettingId
48 // COMPATIBILITY FLAGS START
49 PARA_SPACE_MAX,
50 PARA_SPACE_MAX_AT_PAGES,
52 TAB_COMPAT,
54 ADD_FLY_OFFSETS,
56 OLD_NUMBERING,
58 ADD_EXT_LEADING,
59 USE_VIRTUAL_DEVICE,
60 USE_HIRES_VIRTUAL_DEVICE,
61 OLD_LINE_SPACING,
62 ADD_PARA_SPACING_TO_TABLE_CELLS,
63 USE_FORMER_OBJECT_POS,
64 USE_FORMER_TEXT_WRAPPING,
65 CONSIDER_WRAP_ON_OBJECT_POSITION,
67 IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
68 DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
69 DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
70 OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
72 DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
73 TABLE_ROW_KEEP,
74 IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
75 CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
77 UNIX_FORCE_ZERO_EXT_LEADING,
78 USE_OLD_PRINTER_METRICS,
79 TABS_RELATIVE_TO_INDENT,
80 PROTECT_FORM,
81 // --> OD 2008-06-05 #i89181#
82 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
83 // <--
84 // COMPATIBILITY FLAGS END
86 BROWSE_MODE,
87 HTML_MODE,
88 GLOBAL_DOCUMENT,
89 GLOBAL_DOCUMENT_SAVE_LINKS,
90 LABEL_DOCUMENT,
91 PURGE_OLE,
92 KERN_ASIAN_PUNCTUATION
95 public:
96 /** Return the specified document setting.
98 @param id
99 [in] the identifier of the document setting to be returned.
100 See above for a list of valid document setting identifiers.
102 @returns
103 the value of the requested document setting.
105 virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
107 /** Set the specified document setting.
109 @param id
110 [in] the identifier of the document setting to be set.
111 See above for a list of valid document setting identifiers.
113 @param value
114 [in] the new value of the specified document setting.
116 virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
118 /** Return the forbidden characters.
120 @param nLang
121 [in] the language for which the forbidden character list is returned.
123 @param bLocaleData
124 [in] if set and there is no user defined forbidden character list for
125 language lang, the default list for language lang will be returned.
127 @returns
128 a list of forbidden characters.
130 virtual const com::sun::star::i18n::ForbiddenCharacters*
131 getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
133 /** Set the forbidden characters.
135 @param nLang
136 [in] the language for which the forbidden character list should be set.
138 @param rForbiddenCharacters
139 [in] the new list of forbidden characters for language lang.
141 virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
142 /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
144 /** Get the forbidden character table and creates one if necessary.
146 @returns
147 the forbidden characters table.
149 virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
151 /** Get the forbidden character table.
153 @returns
154 the forbidden characters table.
156 virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
158 /** Get the current link update mode.
160 @param bGlobalSettings
161 [in] if set, the link update mode is obtained from the module,
162 if it is set to GLOBALSETTING
164 @returns
165 the current link update mode.
167 virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
169 /** Set the current link update mode.
171 @param nMode
172 [in] the new link update mode.
174 virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
176 /** Get the current field update mode.
178 @param bGlobalSettings
179 [in] if set, the field update mode is obtained from the module,
180 if it is set to GLOBALSETTING
182 @returns
183 the current field update mode.
185 virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
187 /** Set the current field update mode.
189 @param nMode
190 [in] the new field update mode.
192 virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0;
194 /** Get the character compression type for Asian characters.
196 @returns
197 the current character compression mode.
199 virtual SwCharCompressType getCharacterCompressionType() const = 0;
201 /** Set the character compression type for Asian characters.
203 @param nMode
204 [in] the new character compression type.
206 virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
208 protected:
209 virtual ~IDocumentSettingAccess() {};
212 #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED