LibreOffice Module sw (master)  1
DocumentSettingManager.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTSETTINGMANAGER_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTSETTINGMANAGER_HXX
21 
23 class SwDoc;
24 
25 namespace sw {
28 {
29  std::shared_ptr<SvxForbiddenCharactersTable> mxForbiddenCharsTable;
31 
32  sal_uInt16 mnLinkUpdMode; //< UpdateMode for links.
33 
34  SwFieldUpdateFlags meFieldUpdMode;//< Automatically Update Mode for fields/charts.
35  CharCompressType meChrCmprType;//< for ASIAN: compress punctuation/kana
36 
39 
40  // COMPATIBILITY FLAGS START
41  //
42  //
43  // HISTORY OF THE COMPATIBILITY FLAGS:
44  //
45  // SO5:
46  // mbParaSpaceMax def = false, true since SO8
47  // mbParaSpaceMaxAtPages def = false, true since SO8
48  //
49  // SO6:
50  // mbTabCompat def = false, true since SO8
51  //
52  // SO7:
53  // mbUseVirtualDevice def = true
54  // mbAddFlyOffsets def = false, hidden
55  //
56  // SO7pp1:
57  // bOldNumbering def = false, hidden
58  //
59  // SO8:
60  // mbAddExternalLeading def = true
61  // mbUseHiResolutionVirtualDevice def = true, hidden
62  // mbOldLineSpacing def = false
63  // mbAddParaSpacingToTableCells def = true
64  // mbUseFormerObjectPos def = false
65  // mbUseFormerTextWrapping def = false
66  // mbConsiderWrapOnObjPos def = false
67  //
68  // SO8pp1:
69  // mbIgnoreFirstLineIndentInNumbering def = false, hidden
70  // mbDoNotJustifyLinesWithManualBreak def = false, hidden
71  // mbDoNotResetParaAttrsForNumFont def = false, hidden
72  //
73  // SO8pp3
74  // mbDoNotCaptureDrawObjsOnPage def = false, hidden
75  // - Relevant for drawing objects, which don't follow the text flow, but
76  // whose position is outside the page area:
77  // false: Such drawing objects are captured on the page area of its anchor.
78  // true: Such drawing objects can leave the page area, they aren't captured.
79  // mbTableRowKeep def = false, hidden
80  // mbIgnoreTabsAndBlanksForLineCalculation def = false, hidden
81  // mbClipAsCharacterAnchoredWriterFlyFrame def = false, hidden
82  // - Introduced in order to re-activate clipping of as-character anchored
83  // Writer fly frames in method <SwFlyInContentFrame::MakeAll()> for documents,
84  // which are created with version prior SO8/OOo 2.0
85  //
86  // SO8pp4
87  // mbUnixForceZeroExtLeading def = false, hidden
88  //
89  // SO8pu8
90  //
91  // SO9
92  // #i24363# tab stops relative to indent
93  // mbTabRelativeToIndent def = true, hidden
94  // #i89181# suppress tab stop at left indent for paragraphs in lists, whose
95  // list level position and space mode equals LABEL_ALIGNMENT and whose list
96  // label is followed by a tab character.
97  // mbTabAtLeftIndentForParagraphsInList def = false, hidden
98 
99  bool mbHTMLMode : 1; //< true: Document is in HTMLMode.
100  bool mbIsGlobalDoc : 1; //< true: It's a global document.
101  bool mbGlblDocSaveLinks : 1; //< true: Save sections linked in global document.
102  bool mbIsLabelDoc : 1; //< true: It's a label document.
103  bool mbPurgeOLE : 1; //< true: Purge OLE-Objects
104  bool mbKernAsianPunctuation : 1; //< true: kerning also for ASIAN punctuation
105 
106  bool mbParaSpaceMax : 1;
108  bool mbTabCompat : 1;
110  bool mbAddFlyOffsets : 1;
114  bool mbOldLineSpacing : 1; // #i11859#
116  bool mbUseFormerObjectPos : 1; // #i11860#
118  bool mbConsiderWrapOnObjPos : 1; // #i28701#
119  // true: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
120  // floating screen objects as given by its
121  // attribute 'WrapInfluenceOnObjPos'.
122  bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
124  bool mbFloattableNomargins : 1; //< If paragraph margins next to a floating table should be ignored.
125  bool mEmbedFonts : 1; //< Whether to embed fonts when saving.
126  bool mEmbedUsedFonts : 1; //< Whether to embed fonts that are used by the document when saving.
127  bool mEmbedLatinScriptFonts : 1; //< Whether to embed latin script fonts when saving.
128  bool mEmbedAsianScriptFonts : 1; //< Whether to embed asian script fonts when saving.
129  bool mEmbedComplexScriptFonts : 1; //< Whether to embed complex script fonts when saving.
130  bool mEmbedSystemFonts : 1; //< Whether to embed also system fonts.
131 
132  // non-ui-compatibility flags:
133  bool mbOldNumbering : 1;
136  bool mbDoNotResetParaAttrsForNumFont : 1; // #i53199#
137  bool mbTableRowKeep : 1;
139  bool mbDoNotCaptureDrawObjsOnPage : 1; // #i62875#
141  bool mbUnixForceZeroExtLeading : 1; // #i60945#
142  bool mbTabRelativeToIndent : 1; // #i24363# tab stops relative to indent
143  bool mbProtectForm : 1;
144  bool mbMsWordCompTrailingBlanks : 1; // tdf#104349 tdf#104668
147  bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above
157  bool mbSubtractFlys; // tdf#86578
159 
161  bool mbDisableOffPagePositioning; // tdf#112443
163 
164 public:
165 
167  virtual ~DocumentSettingManager() override;
168 
169  // IDocumentSettingAccess
170  virtual bool get(/*[in]*/ DocumentSettingId id) const override;
171  virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) override;
172  virtual const css::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ LanguageType nLang, /*[in]*/ bool bLocaleData ) const override;
173  virtual void setForbiddenCharacters(/*[in]*/ LanguageType nLang, /*[in]*/ const css::i18n::ForbiddenCharacters& rForbiddenCharacters ) override;
174  virtual std::shared_ptr<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() override;
175  virtual const std::shared_ptr<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const override;
176  virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const override;
177  virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) override;
178  virtual SwFieldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const override;
179  virtual void setFieldUpdateFlags( /*[in]*/ SwFieldUpdateFlags eMode ) override;
180  virtual CharCompressType getCharacterCompressionType() const override;
181  virtual void setCharacterCompressionType( /*[in]*/CharCompressType nType ) override;
182 
183 
184 // Replace all compatibility options with those from rSource.
186 
187  sal_uInt32 Getn32DummyCompatibilityOptions1() const override;
188  void Setn32DummyCompatibilityOptions1( const sal_uInt32 CompatibilityOptions1 ) override;
189  sal_uInt32 Getn32DummyCompatibilityOptions2() const override;
190  void Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2 ) override;
191 
192 };
193 
194 }
195 
196 #endif //_DOCSETTING_HXX
197 
198 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual const css::i18n::ForbiddenCharacters * getForbiddenCharacters(LanguageType nLang, bool bLocaleData) const override
Return the forbidden characters.
SwFieldUpdateFlags
Definition: fldupde.hxx:22
Definition: doc.hxx:185
virtual CharCompressType getCharacterCompressionType() const override
Get the character compression type for Asian characters.
virtual void set(DocumentSettingId id, bool value) override
Set the specified document setting.
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:40
void Setn32DummyCompatibilityOptions1(const sal_uInt32 CompatibilityOptions1) override
Set the n32DummyCompatabilityOptions1.
static LanguageType nLang
Definition: srtdlg.cxx:60
virtual void setLinkUpdateMode(sal_uInt16 nMode) override
Set the current link update mode.
void ReplaceCompatibilityOptions(const DocumentSettingManager &rSource)
virtual void setFieldUpdateFlags(SwFieldUpdateFlags eMode) override
Set the current field update mode.
CharCompressType
virtual std::shared_ptr< SvxForbiddenCharactersTable > & getForbiddenCharacterTable() override
Get the forbidden character table and creates one if necessary.
void Setn32DummyCompatibilityOptions2(const sal_uInt32 CompatibilityOptions2) override
Set the n32DummyCompatabilityOptions2.
Provides access to settings of a document.
virtual void setCharacterCompressionType(CharCompressType nType) override
Set the character compression type for Asian characters.
sal_uInt32 Getn32DummyCompatibilityOptions2() const override
Get the n32DummyCompatabilityOptions2.
virtual SwFieldUpdateFlags getFieldUpdateFlags(bool bGlobalSettings) const override
Get the current field update mode.
virtual void setForbiddenCharacters(LanguageType nLang, const css::i18n::ForbiddenCharacters &rForbiddenCharacters) override
Set the forbidden characters.
virtual sal_uInt16 getLinkUpdateMode(bool bGlobalSettings) const override
Get the current link update mode.
sal_uInt32 Getn32DummyCompatibilityOptions1() const override
Get the n32DummyCompatabilityOptions1.
virtual ~DocumentSettingManager() override
std::shared_ptr< SvxForbiddenCharactersTable > mxForbiddenCharsTable