LCOV - code coverage report
Current view: top level - sw/inc - IDocumentSettingAccess.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 2 100.0 %
Date: 2014-11-03 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 INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
      21             : #define INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
      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        5052 :  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             :          TABS_RELATIVE_TO_INDENT,
      69             :          PROTECT_FORM,
      70             :          // #i89181#
      71             :          TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
      72             :          INVERT_BORDER_SPACING,
      73             :          COLLAPSE_EMPTY_CELL_PARA,
      74             :          SMALL_CAPS_PERCENTAGE_66,
      75             :          TAB_OVERFLOW,
      76             :          UNBREAKABLE_NUMBERINGS,
      77             :          CLIPPED_PICTURES,
      78             :          BACKGROUND_PARA_OVER_DRAWINGS,
      79             :          TAB_OVER_MARGIN,
      80             :          // MS Word still wraps text around objects with less space than LO would.
      81             :          SURROUND_TEXT_WRAP_SMALL,
      82             :          PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
      83             :          // COMPATIBILITY FLAGS END
      84             : 
      85             :          BROWSE_MODE,
      86             :          HTML_MODE,
      87             :          GLOBAL_DOCUMENT,
      88             :          GLOBAL_DOCUMENT_SAVE_LINKS,
      89             :          LABEL_DOCUMENT,
      90             :          PURGE_OLE,
      91             :          KERN_ASIAN_PUNCTUATION,
      92             :          MATH_BASELINE_ALIGNMENT,
      93             :          STYLES_NODEFAULT,
      94             :          FLOATTABLE_NOMARGINS,
      95             :          EMBED_FONTS,
      96             :          EMBED_SYSTEM_FONTS,
      97             :          APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
      98             :      };
      99             : 
     100             :  public:
     101             :     /** Return the specified document setting.
     102             : 
     103             :        @param id
     104             :        [in] the identifier of the document setting to be returned.
     105             :        See above for a list of valid document setting identifiers.
     106             : 
     107             :        @returns
     108             :        the value of the requested document setting.
     109             :     */
     110             :     virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
     111             : 
     112             :     /** Set the specified document setting.
     113             : 
     114             :         @param id
     115             :         [in] the identifier of the document setting to be set.
     116             :         See above for a list of valid document setting identifiers.
     117             : 
     118             :         @param value
     119             :         [in] the new value of the specified document setting.
     120             :     */
     121             :     virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
     122             : 
     123             :     /** Return the forbidden characters.
     124             : 
     125             :        @param nLang
     126             :        [in] the language for which the forbidden character list is returned.
     127             : 
     128             :        @param bLocaleData
     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.
     131             : 
     132             :        @returns
     133             :        a list of forbidden characters.
     134             :     */
     135             :     virtual const com::sun::star::i18n::ForbiddenCharacters*
     136             :         getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0;
     137             : 
     138             :     /** Set the forbidden characters.
     139             : 
     140             :        @param nLang
     141             :        [in] the language for which the forbidden character list should be set.
     142             : 
     143             :        @param rForbiddenCharacters
     144             :        [in] the new list of forbidden characters for language lang.
     145             :     */
     146             :     virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
     147             :                                         /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
     148             : 
     149             :     /** Get the forbidden character table and creates one if necessary.
     150             : 
     151             :        @returns
     152             :        the forbidden characters table.
     153             :     */
     154             :     virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
     155             : 
     156             :     /** Get the forbidden character table.
     157             : 
     158             :        @returns
     159             :        the forbidden characters table.
     160             :     */
     161             :     virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
     162             : 
     163             :     /** Get the current link update mode.
     164             : 
     165             :        @param bGlobalSettings
     166             :        [in] if set, the link update mode is obtained from the module,
     167             :             if it is set to GLOBALSETTING
     168             : 
     169             :        @returns
     170             :        the current link update mode.
     171             :     */
     172             :     virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
     173             : 
     174             :     /** Set the current link update mode.
     175             : 
     176             :        @param nMode
     177             :        [in] the new link update mode.
     178             :     */
     179             :     virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
     180             : 
     181             :     /** Get the current field update mode.
     182             : 
     183             :        @param bGlobalSettings
     184             :        [in] if set, the field update mode is obtained from the module,
     185             :             if it is set to GLOBALSETTING
     186             : 
     187             :        @returns
     188             :        the current field update mode.
     189             :     */
     190             :     virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
     191             : 
     192             :     /** Set the current field update mode.
     193             : 
     194             :        @param nMode
     195             :        [in] the new field update mode.
     196             :     */
     197             :     virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode )  = 0;
     198             : 
     199             :     /** Get the character compression type for Asian characters.
     200             : 
     201             :        @returns
     202             :        the current character compression mode.
     203             :     */
     204             :     virtual SwCharCompressType getCharacterCompressionType() const = 0;
     205             : 
     206             :     /** Set the character compression type for Asian characters.
     207             : 
     208             :        @param nMode
     209             :        [in] the new character compression type.
     210             :     */
     211             :     virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
     212             : 
     213             :     /** Get the n32DummyCompatabilityOptions1
     214             :     */
     215             :     virtual sal_uInt32 Getn32DummyCompatibilityOptions1() const = 0;
     216             : 
     217             :     /** Set the n32DummyCompatabilityOptions1
     218             :     */
     219             :     virtual void Setn32DummyCompatibilityOptions1( const sal_uInt32 CompatibilityOptions1 ) = 0;
     220             : 
     221             :     /** Get the n32DummyCompatabilityOptions2
     222             :     */
     223             :     virtual sal_uInt32 Getn32DummyCompatibilityOptions2() const = 0;
     224             : 
     225             :     /** Set the n32DummyCompatabilityOptions2
     226             :     */
     227             :     virtual void Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2 ) = 0;
     228             : 
     229             : protected:
     230        5045 :     virtual ~IDocumentSettingAccess() {};
     231             :  };
     232             : 
     233             : #endif // INCLUDED_SW_INC_IDOCUMENTSETTINGACCESS_HXX
     234             : 
     235             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10