LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - IDocumentSettingAccess.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2012-12-27 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef IDOCUMENTSETTINGACCESS_HXX_INCLUDED
      21             : #define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
      22             : 
      23             : #include <tools/solar.h>
      24             : #include <rtl/ref.hxx>
      25             : #include <chcmprse.hxx>
      26             : #include <fldupde.hxx>
      27             : 
      28             : class SvxForbiddenCharactersTable;
      29             : namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
      30             : 
      31             :  /** Provides access to settings of a document
      32             :  */
      33         276 :  class IDocumentSettingAccess
      34             :  {
      35             :  public:
      36             :      enum DocumentSettingId
      37             :      {
      38             :          // COMPATIBILITY FLAGS START
      39             :          PARA_SPACE_MAX,
      40             :          PARA_SPACE_MAX_AT_PAGES,
      41             : 
      42             :          TAB_COMPAT,
      43             : 
      44             :          ADD_FLY_OFFSETS,
      45             : 
      46             :          OLD_NUMBERING,
      47             : 
      48             :          ADD_EXT_LEADING,
      49             :          USE_VIRTUAL_DEVICE,
      50             :          USE_HIRES_VIRTUAL_DEVICE,
      51             :          OLD_LINE_SPACING,
      52             :          ADD_PARA_SPACING_TO_TABLE_CELLS,
      53             :          USE_FORMER_OBJECT_POS,
      54             :          USE_FORMER_TEXT_WRAPPING,
      55             :          CONSIDER_WRAP_ON_OBJECT_POSITION,
      56             : 
      57             :          IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
      58             :          DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
      59             :          DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
      60             :          OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
      61             : 
      62             :          DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
      63             :          TABLE_ROW_KEEP,
      64             :          IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
      65             :          CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
      66             : 
      67             :          UNIX_FORCE_ZERO_EXT_LEADING,
      68             :          USE_OLD_PRINTER_METRICS,
      69             :          TABS_RELATIVE_TO_INDENT,
      70             :          PROTECT_FORM,
      71             :          // #i89181#
      72             :          TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
      73             :          INVERT_BORDER_SPACING,
      74             :          COLLAPSE_EMPTY_CELL_PARA,
      75             :          SMALL_CAPS_PERCENTAGE_66,
      76             :          TAB_OVERFLOW,
      77             :          UNBREAKABLE_NUMBERINGS,
      78             :          CLIPPED_PICTURES,
      79             :          BACKGROUND_PARA_OVER_DRAWINGS,
      80             :          // COMPATIBILITY FLAGS END
      81             : 
      82             :          BROWSE_MODE,
      83             :          HTML_MODE,
      84             :          GLOBAL_DOCUMENT,
      85             :          GLOBAL_DOCUMENT_SAVE_LINKS,
      86             :          LABEL_DOCUMENT,
      87             :          PURGE_OLE,
      88             :          KERN_ASIAN_PUNCTUATION,
      89             :          MATH_BASELINE_ALIGNMENT,
      90             :          STYLES_NODEFAULT,
      91             :          FLOATTABLE_NOMARGINS,
      92             :          EMBED_FONTS,
      93             :          EMBED_SYSTEM_FONTS
      94             :      };
      95             : 
      96             :  public:
      97             :     /** Return the specified document setting.
      98             : 
      99             :        @param id
     100             :        [in] the identifier of the document setting to be returned.
     101             :        See above for a list of valid document setting identifiers.
     102             : 
     103             :        @returns
     104             :        the value of the requested document setting.
     105             :     */
     106             :     virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
     107             : 
     108             :     /** Set the specified document setting.
     109             : 
     110             :         @param id
     111             :         [in] the identifier of the document setting to be set.
     112             :         See above for a list of valid document setting identifiers.
     113             : 
     114             :         @param value
     115             :         [in] the new value of the specified document setting.
     116             :     */
     117             :     virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
     118             : 
     119             :     /** Return the forbidden characters.
     120             : 
     121             :        @param nLang
     122             :        [in] the language for which the forbidden character list is returned.
     123             : 
     124             :        @param bLocaleData
     125             :        [in] if set and there is no user defined forbidden character list for
     126             :             language lang, the default list for language lang will be returned.
     127             : 
     128             :        @returns
     129             :        a list of forbidden characters.
     130             :     */
     131             :     virtual const com::sun::star::i18n::ForbiddenCharacters*
     132             :         getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0;
     133             : 
     134             :     /** Set the forbidden characters.
     135             : 
     136             :        @param nLang
     137             :        [in] the language for which the forbidden character list should be set.
     138             : 
     139             :        @param rForbiddenCharacters
     140             :        [in] the new list of forbidden characters for language lang.
     141             :     */
     142             :     virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
     143             :                                         /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
     144             : 
     145             :     /** Get the forbidden character table and creates one if necessary.
     146             : 
     147             :        @returns
     148             :        the forbidden characters table.
     149             :     */
     150             :     virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
     151             : 
     152             :     /** Get the forbidden character table.
     153             : 
     154             :        @returns
     155             :        the forbidden characters table.
     156             :     */
     157             :     virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
     158             : 
     159             :     /** Get the current link update mode.
     160             : 
     161             :        @param bGlobalSettings
     162             :        [in] if set, the link update mode is obtained from the module,
     163             :             if it is set to GLOBALSETTING
     164             : 
     165             :        @returns
     166             :        the current link update mode.
     167             :     */
     168             :     virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
     169             : 
     170             :     /** Set the current link update mode.
     171             : 
     172             :        @param nMode
     173             :        [in] the new link update mode.
     174             :     */
     175             :     virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
     176             : 
     177             :     /** Get the current field update mode.
     178             : 
     179             :        @param bGlobalSettings
     180             :        [in] if set, the field update mode is obtained from the module,
     181             :             if it is set to GLOBALSETTING
     182             : 
     183             :        @returns
     184             :        the current field update mode.
     185             :     */
     186             :     virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
     187             : 
     188             :     /** Set the current field update mode.
     189             : 
     190             :        @param nMode
     191             :        [in] the new field update mode.
     192             :     */
     193             :     virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode )  = 0;
     194             : 
     195             :     /** Get the character compression type for Asian characters.
     196             : 
     197             :        @returns
     198             :        the current character compression mode.
     199             :     */
     200             :     virtual SwCharCompressType getCharacterCompressionType() const = 0;
     201             : 
     202             :     /** Set the character compression type for Asian characters.
     203             : 
     204             :        @param nMode
     205             :        [in] the new character compression type.
     206             :     */
     207             :     virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
     208             : 
     209             : protected:
     210         102 :     virtual ~IDocumentSettingAccess() {};
     211             :  };
     212             : 
     213             : #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
     214             : 
     215             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10