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