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 // COMPATIBILITY FLAGS END
93 GLOBAL_DOCUMENT_SAVE_LINKS
,
96 KERN_ASIAN_PUNCTUATION
100 /** Return the specified document setting.
103 [in] the identifier of the document setting to be returned.
104 See above for a list of valid document setting identifiers.
107 the value of the requested document setting.
109 virtual bool get(/*[in]*/ DocumentSettingId id
) const = 0;
111 /** Set the specified document setting.
114 [in] the identifier of the document setting to be set.
115 See above for a list of valid document setting identifiers.
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.
125 [in] the language for which the forbidden character list is returned.
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.
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.
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.
151 the forbidden characters table.
153 virtual vos::ORef
<SvxForbiddenCharactersTable
>& getForbiddenCharacterTable() = 0;
155 /** Get the forbidden character table.
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
169 the current link update mode.
171 virtual sal_uInt16
getLinkUpdateMode( /*[in]*/bool bGlobalSettings
) const = 0;
173 /** Set the current link update mode.
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
187 the current field update mode.
189 virtual SwFldUpdateFlags
getFieldUpdateFlags( /*[in]*/bool bGlobalSettings
) const = 0;
191 /** Set the current field update mode.
194 [in] the new field update mode.
196 virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode
) = 0;
198 /** Get the character compression type for Asian characters.
201 the current character compression mode.
203 virtual SwCharCompressType
getCharacterCompressionType() const = 0;
205 /** Set the character compression type for Asian characters.
208 [in] the new character compression type.
210 virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType
) = 0;
213 virtual ~IDocumentSettingAccess() {};
216 #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED