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 $
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>
36 #include <vos/ref.hxx>
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
49 enum DocumentSettingId
51 // COMPATIBILITY FLAGS START
53 PARA_SPACE_MAX_AT_PAGES
,
63 USE_HIRES_VIRTUAL_DEVICE
,
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
,
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
,
84 // --> OD 2008-06-05 #i89181#
85 TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
,
87 INVERT_BORDER_SPACING
,
88 COLLAPSE_EMPTY_CELL_PARA
,
89 // COMPATIBILITY FLAGS END
94 GLOBAL_DOCUMENT_SAVE_LINKS
,
97 KERN_ASIAN_PUNCTUATION
101 /** Return the specified document setting.
104 [in] the identifier of the document setting to be returned.
105 See above for a list of valid document setting identifiers.
108 the value of the requested document setting.
110 virtual bool get(/*[in]*/ DocumentSettingId id
) const = 0;
112 /** Set the specified document setting.
115 [in] the identifier of the document setting to be set.
116 See above for a list of valid document setting identifiers.
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.
126 [in] the language for which the forbidden character list is returned.
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.
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.
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.
152 the forbidden characters table.
154 virtual vos::ORef
<SvxForbiddenCharactersTable
>& getForbiddenCharacterTable() = 0;
156 /** Get the forbidden character table.
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
170 the current link update mode.
172 virtual sal_uInt16
getLinkUpdateMode( /*[in]*/bool bGlobalSettings
) const = 0;
174 /** Set the current link update mode.
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
188 the current field update mode.
190 virtual SwFldUpdateFlags
getFieldUpdateFlags( /*[in]*/bool bGlobalSettings
) const = 0;
192 /** Set the current field update mode.
195 [in] the new field update mode.
197 virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode
) = 0;
199 /** Get the character compression type for Asian characters.
202 the current character compression mode.
204 virtual SwCharCompressType
getCharacterCompressionType() const = 0;
206 /** Set the character compression type for Asian characters.
209 [in] the new character compression type.
211 virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType
) = 0;
214 virtual ~IDocumentSettingAccess() {};
217 #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED