1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <libxml/xmlwriter.h>
22 #include <DocumentSettingManager.hxx>
24 #include <IDocumentDrawModelAccess.hxx>
25 #include <IDocumentState.hxx>
26 #include <IDocumentLayoutAccess.hxx>
27 #include <comphelper/lok.hxx>
28 #include <comphelper/processfactory.hxx>
29 #include <editeng/forbiddencharacterstable.hxx>
30 #include <osl/diagnose.h>
31 #include <svx/svdmodel.hxx>
32 #include <svl/asiancfg.hxx>
33 #include <unotools/compatibility.hxx>
34 #include <unotools/configmgr.hxx>
35 #include <drawdoc.hxx>
36 #include <swmodule.hxx>
37 #include <linkenum.hxx>
38 #include <rootfrm.hxx>
39 #include <breakit.hxx>
42 /* IDocumentSettingAccess */
44 sw::DocumentSettingManager::DocumentSettingManager(SwDoc
&rDoc
)
46 mnLinkUpdMode( GLOBALSETTING
),
47 meFieldUpdMode( AUTOUPD_GLOBALSETTING
),
48 meChrCmprType( CharCompressType::NONE
),
49 mn32DummyCompatibilityOptions1(0),
50 mn32DummyCompatibilityOptions2(0),
53 mbGlblDocSaveLinks(false),
56 mbKernAsianPunctuation(false),
58 // COMPATIBILITY FLAGS START
60 mbAddFlyOffsets(false),
61 mbAddVerticalFlyOffsets(false),
62 mbUseHiResolutionVirtualDevice(true),
63 mbMathBaselineAlignment(false), // default for *old* documents is 'off'
64 mbStylesNoDefault(false),
65 mbFloattableNomargins(false),
67 mEmbedUsedFonts(false),
68 mEmbedLatinScriptFonts(true),
69 mEmbedAsianScriptFonts(true),
70 mEmbedComplexScriptFonts(true),
71 mEmbedSystemFonts(false),
72 mbOldNumbering(false),
73 mbIgnoreFirstLineIndentInNumbering(false),
74 mbDoNotResetParaAttrsForNumFont(false),
75 mbTableRowKeep(false),
76 mbIgnoreTabsAndBlanksForLineCalculation(false),
77 mbDoNotCaptureDrawObjsOnPage(false),
78 mbClipAsCharacterAnchoredWriterFlyFrames(false),
79 mbUnixForceZeroExtLeading(false),
80 mbTabRelativeToIndent(true),
81 mbProtectForm(false), // i#78591#
82 mbMsWordCompTrailingBlanks(false), // tdf#104349 tdf#104668
83 mbMsWordCompMinLineHeightByFly(false),
84 mbInvertBorderSpacing (false),
85 mbCollapseEmptyCellPara(true),
86 mbTabAtLeftIndentForParagraphsInList(false), //#i89181#
87 mbSmallCapsPercentage66(false),
89 mbUnbreakableNumberings(false),
90 mbClippedPictures(false),
91 mbBackgroundParaOverDrawings(false),
92 mbTabOverMargin(false),
93 mbTabOverSpacing(false),
94 mbTreatSingleColumnBreakAsPageBreak(false),
95 mbSurroundTextWrapSmall(false),
96 mbPropLineSpacingShrinksFirstLine(true),
97 mbSubtractFlys(false),
98 mApplyParagraphMarkFormatToNumbering(false),
99 mbLastBrowseMode( false ),
100 mbDisableOffPagePositioning ( false ),
101 mbProtectBookmarks(false),
102 mbProtectFields(false),
103 mbHeaderSpacingBelowLastPara(false),
104 mbFrameAutowidthWithMorePara(false),
105 mbGutterAtTop(false),
106 mbFootnoteInColumnToPageEnd(false),
107 mnImagePreferredDPI(0),
108 mbAutoFirstLineIndentDisregardLineSpace(true),
109 mbNoNumberingShowFollowBy(false),
110 mbDropCapPunctuation(true)
112 // COMPATIBILITY FLAGS END
114 // COMPATIBILITY FLAGS START
116 // Note: Any non-hidden compatibility flag should obtain its default
117 // by asking SvtCompatibilityOptions, see below.
119 if (!utl::ConfigManager::IsFuzzing())
121 const SvtCompatibilityOptions aOptions
;
122 mbParaSpaceMax
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::AddSpacing
);
123 mbParaSpaceMaxAtPages
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::AddSpacingAtPages
);
124 mbTabCompat
= !aOptions
.GetDefault( SvtCompatibilityEntry::Index::UseOurTabStops
);
125 mbUseVirtualDevice
= true;
126 mbAddExternalLeading
= !aOptions
.GetDefault( SvtCompatibilityEntry::Index::NoExtLeading
);
127 mbOldLineSpacing
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::UseLineSpacing
);
128 mbAddParaSpacingToTableCells
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::AddTableSpacing
);
129 mbAddParaLineSpacingToTableCells
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::AddTableLineSpacing
);
130 mbUseFormerObjectPos
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::UseObjectPositioning
);
131 mbUseFormerTextWrapping
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::UseOurTextWrapping
);
132 mbConsiderWrapOnObjPos
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::ConsiderWrappingStyle
);
133 mbDoNotJustifyLinesWithManualBreak
= !aOptions
.GetDefault( SvtCompatibilityEntry::Index::ExpandWordSpace
);
134 mbProtectForm
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::ProtectForm
);
135 mbMsWordCompTrailingBlanks
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::MsWordTrailingBlanks
);
136 mbSubtractFlys
= aOptions
.GetDefault( SvtCompatibilityEntry::Index::SubtractFlysAnchoredAtFlys
);
137 mbEmptyDbFieldHidesPara
138 = aOptions
.GetDefault(SvtCompatibilityEntry::Index::EmptyDbFieldHidesPara
);
142 mbParaSpaceMax
= false;
143 mbParaSpaceMaxAtPages
= false;
145 mbUseVirtualDevice
= true;
146 mbAddExternalLeading
= true;
147 mbOldLineSpacing
= false;
148 mbAddParaSpacingToTableCells
= false;
149 mbAddParaLineSpacingToTableCells
= false;
150 mbUseFormerObjectPos
= false;
151 mbUseFormerTextWrapping
= false;
152 mbConsiderWrapOnObjPos
= false;
153 mbDoNotJustifyLinesWithManualBreak
= true;
154 mbProtectForm
= false;
155 mbMsWordCompTrailingBlanks
= false;
156 mbSubtractFlys
= false;
157 mbEmptyDbFieldHidesPara
= true;
160 // COMPATIBILITY FLAGS END
165 sw::DocumentSettingManager::~DocumentSettingManager()
169 /* IDocumentSettingAccess */
170 bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id
) const
174 // COMPATIBILITY FLAGS START
175 case DocumentSettingId::PARA_SPACE_MAX
: return mbParaSpaceMax
; //(n8Dummy1 & DUMMY_PARASPACEMAX);
176 case DocumentSettingId::PARA_SPACE_MAX_AT_PAGES
: return mbParaSpaceMaxAtPages
; //(n8Dummy1 & DUMMY_PARASPACEMAX_AT_PAGES);
177 case DocumentSettingId::TAB_COMPAT
: return mbTabCompat
; //(n8Dummy1 & DUMMY_TAB_COMPAT);
178 case DocumentSettingId::ADD_FLY_OFFSETS
: return mbAddFlyOffsets
; //(n8Dummy2 & DUMMY_ADD_FLY_OFFSETS);
179 case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS
: return mbAddVerticalFlyOffsets
;
180 case DocumentSettingId::ADD_EXT_LEADING
: return mbAddExternalLeading
; //(n8Dummy2 & DUMMY_ADD_EXTERNAL_LEADING);
181 case DocumentSettingId::USE_VIRTUAL_DEVICE
: return mbUseVirtualDevice
; //(n8Dummy1 & DUMMY_USE_VIRTUAL_DEVICE);
182 case DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE
: return mbUseHiResolutionVirtualDevice
; //(n8Dummy2 & DUMMY_USE_HIRES_VIR_DEV);
183 case DocumentSettingId::OLD_NUMBERING
: return mbOldNumbering
;
184 case DocumentSettingId::OLD_LINE_SPACING
: return mbOldLineSpacing
;
185 case DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS
: return mbAddParaSpacingToTableCells
;
186 case DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
: return mbAddParaLineSpacingToTableCells
;
187 case DocumentSettingId::USE_FORMER_OBJECT_POS
: return mbUseFormerObjectPos
;
188 case DocumentSettingId::USE_FORMER_TEXT_WRAPPING
: return mbUseFormerTextWrapping
;
189 case DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION
: return mbConsiderWrapOnObjPos
;
190 case DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
: return mbDoNotJustifyLinesWithManualBreak
;
191 case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
: return mbIgnoreFirstLineIndentInNumbering
;
192 case DocumentSettingId::TABLE_ROW_KEEP
: return mbTableRowKeep
;
193 case DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
: return mbIgnoreTabsAndBlanksForLineCalculation
;
194 case DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
: return mbDoNotCaptureDrawObjsOnPage
;
196 case DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
: return mbClipAsCharacterAnchoredWriterFlyFrames
;
197 case DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING
: return mbUnixForceZeroExtLeading
;
198 case DocumentSettingId::TABS_RELATIVE_TO_INDENT
: return mbTabRelativeToIndent
;
199 case DocumentSettingId::PROTECT_FORM
: return mbProtectForm
;
200 // tdf#104349 tdf#104668
201 case DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS
: return mbMsWordCompTrailingBlanks
;
202 case DocumentSettingId::MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
: return mbMsWordCompMinLineHeightByFly
;
204 case DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
: return mbTabAtLeftIndentForParagraphsInList
;
205 case DocumentSettingId::INVERT_BORDER_SPACING
: return mbInvertBorderSpacing
;
206 case DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA
: return mbCollapseEmptyCellPara
;
207 case DocumentSettingId::SMALL_CAPS_PERCENTAGE_66
: return mbSmallCapsPercentage66
;
208 case DocumentSettingId::TAB_OVERFLOW
: return mbTabOverflow
;
209 case DocumentSettingId::UNBREAKABLE_NUMBERINGS
: return mbUnbreakableNumberings
;
210 case DocumentSettingId::CLIPPED_PICTURES
: return mbClippedPictures
;
211 case DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS
: return mbBackgroundParaOverDrawings
;
212 case DocumentSettingId::TAB_OVER_MARGIN
: return mbTabOverMargin
;
213 case DocumentSettingId::TAB_OVER_SPACING
: return mbTabOverSpacing
;
214 case DocumentSettingId::TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
: return mbTreatSingleColumnBreakAsPageBreak
;
215 case DocumentSettingId::SURROUND_TEXT_WRAP_SMALL
: return mbSurroundTextWrapSmall
;
216 case DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE
: return mbPropLineSpacingShrinksFirstLine
;
217 case DocumentSettingId::SUBTRACT_FLYS
: return mbSubtractFlys
;
219 case DocumentSettingId::BROWSE_MODE
: return mbLastBrowseMode
; // Attention: normally the SwViewShell has to be asked!
220 case DocumentSettingId::HTML_MODE
: return mbHTMLMode
;
221 case DocumentSettingId::GLOBAL_DOCUMENT
: return mbIsGlobalDoc
;
222 case DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS
: return mbGlblDocSaveLinks
;
223 case DocumentSettingId::LABEL_DOCUMENT
: return mbIsLabelDoc
;
224 case DocumentSettingId::PURGE_OLE
: return mbPurgeOLE
;
225 case DocumentSettingId::KERN_ASIAN_PUNCTUATION
: return mbKernAsianPunctuation
;
226 case DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
: return mbDoNotResetParaAttrsForNumFont
;
227 case DocumentSettingId::MATH_BASELINE_ALIGNMENT
: return mbMathBaselineAlignment
;
228 case DocumentSettingId::STYLES_NODEFAULT
: return mbStylesNoDefault
;
229 case DocumentSettingId::FLOATTABLE_NOMARGINS
: return mbFloattableNomargins
;
230 case DocumentSettingId::EMBED_FONTS
: return mEmbedFonts
;
231 case DocumentSettingId::EMBED_USED_FONTS
: return mEmbedUsedFonts
;
232 case DocumentSettingId::EMBED_LATIN_SCRIPT_FONTS
: return mEmbedLatinScriptFonts
;
233 case DocumentSettingId::EMBED_ASIAN_SCRIPT_FONTS
: return mEmbedAsianScriptFonts
;
234 case DocumentSettingId::EMBED_COMPLEX_SCRIPT_FONTS
: return mEmbedComplexScriptFonts
;
235 case DocumentSettingId::EMBED_SYSTEM_FONTS
: return mEmbedSystemFonts
;
236 case DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
: return mApplyParagraphMarkFormatToNumbering
;
237 case DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING
: return mbDisableOffPagePositioning
;
238 case DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA
: return mbEmptyDbFieldHidesPara
;
239 case DocumentSettingId::CONTINUOUS_ENDNOTES
: return mbContinuousEndnotes
;
240 case DocumentSettingId::PROTECT_BOOKMARKS
: return mbProtectBookmarks
;
241 case DocumentSettingId::PROTECT_FIELDS
: return mbProtectFields
;
242 case DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA
: return mbHeaderSpacingBelowLastPara
;
243 case DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA
: return mbFrameAutowidthWithMorePara
;
244 case DocumentSettingId::GUTTER_AT_TOP
:
245 return mbGutterAtTop
;
246 case DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND
: return mbFootnoteInColumnToPageEnd
;
247 case DocumentSettingId::AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
:
248 return mbAutoFirstLineIndentDisregardLineSpace
;
249 case DocumentSettingId::HYPHENATE_URLS
: return mbHyphenateURLs
;
250 case DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES
:
251 return mbDoNotBreakWrappedTables
;
252 case DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
:
253 return mbAllowTextAfterFloatingTableBreak
;
254 case DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY
: return mbNoNumberingShowFollowBy
;
255 case DocumentSettingId::DROP_CAP_PUNCTUATION
: return mbDropCapPunctuation
;
257 OSL_FAIL("Invalid setting id");
262 void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id
, /*[in]*/ bool value
)
266 // COMPATIBILITY FLAGS START
267 case DocumentSettingId::PARA_SPACE_MAX
:
268 mbParaSpaceMax
= value
;
270 case DocumentSettingId::PARA_SPACE_MAX_AT_PAGES
:
271 mbParaSpaceMaxAtPages
= value
;
273 case DocumentSettingId::TAB_COMPAT
:
276 case DocumentSettingId::ADD_FLY_OFFSETS
:
277 mbAddFlyOffsets
= value
;
279 case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS
:
280 mbAddVerticalFlyOffsets
= value
;
282 case DocumentSettingId::ADD_EXT_LEADING
:
283 mbAddExternalLeading
= value
;
285 case DocumentSettingId::USE_VIRTUAL_DEVICE
:
286 mbUseVirtualDevice
= value
;
288 case DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE
:
289 mbUseHiResolutionVirtualDevice
= value
;
291 case DocumentSettingId::OLD_NUMBERING
:
292 if (mbOldNumbering
!= value
)
294 mbOldNumbering
= value
;
296 const SwNumRuleTable
& rNmTable
= m_rDoc
.GetNumRuleTable();
297 for( SwNumRuleTable::size_type n
= 0; n
< rNmTable
.size(); ++n
)
298 rNmTable
[n
]->SetInvalidRule(true);
300 m_rDoc
.UpdateNumRule();
302 SwNumRule
*pOutlineRule
= m_rDoc
.GetOutlineNumRule();
305 pOutlineRule
->Validate(m_rDoc
);
306 // counting of phantoms depends on <IsOldNumbering()>
307 pOutlineRule
->SetCountPhantoms( !mbOldNumbering
);
311 case DocumentSettingId::OLD_LINE_SPACING
:
312 mbOldLineSpacing
= value
;
314 case DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS
:
315 mbAddParaSpacingToTableCells
= value
;
317 case DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
:
318 mbAddParaLineSpacingToTableCells
= value
;
320 case DocumentSettingId::USE_FORMER_OBJECT_POS
:
321 mbUseFormerObjectPos
= value
;
323 case DocumentSettingId::USE_FORMER_TEXT_WRAPPING
:
324 mbUseFormerTextWrapping
= value
;
326 case DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION
:
327 mbConsiderWrapOnObjPos
= value
;
329 case DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
:
330 mbDoNotJustifyLinesWithManualBreak
= value
;
332 case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
:
333 mbIgnoreFirstLineIndentInNumbering
= value
;
336 case DocumentSettingId::TABLE_ROW_KEEP
:
337 mbTableRowKeep
= value
;
340 case DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
:
341 mbIgnoreTabsAndBlanksForLineCalculation
= value
;
344 case DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
:
345 mbDoNotCaptureDrawObjsOnPage
= value
;
349 case DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
:
350 mbClipAsCharacterAnchoredWriterFlyFrames
= value
;
353 case DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING
:
354 mbUnixForceZeroExtLeading
= value
;
357 case DocumentSettingId::PROTECT_FORM
:
358 mbProtectForm
= value
;
362 case DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS
:
363 mbMsWordCompTrailingBlanks
= value
;
366 case DocumentSettingId::MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
:
367 mbMsWordCompMinLineHeightByFly
= value
;
370 case DocumentSettingId::TABS_RELATIVE_TO_INDENT
:
371 mbTabRelativeToIndent
= value
;
374 case DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
:
375 mbTabAtLeftIndentForParagraphsInList
= value
;
378 case DocumentSettingId::INVERT_BORDER_SPACING
:
379 mbInvertBorderSpacing
= value
;
382 case DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA
:
383 mbCollapseEmptyCellPara
= value
;
386 case DocumentSettingId::SMALL_CAPS_PERCENTAGE_66
:
387 mbSmallCapsPercentage66
= value
;
390 case DocumentSettingId::TAB_OVERFLOW
:
391 mbTabOverflow
= value
;
394 case DocumentSettingId::UNBREAKABLE_NUMBERINGS
:
395 mbUnbreakableNumberings
= value
;
398 case DocumentSettingId::CLIPPED_PICTURES
:
399 mbClippedPictures
= value
;
402 case DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS
:
403 mbBackgroundParaOverDrawings
= value
;
406 case DocumentSettingId::TAB_OVER_MARGIN
:
407 mbTabOverMargin
= value
;
410 case DocumentSettingId::TAB_OVER_SPACING
:
411 mbTabOverSpacing
= value
;
414 case DocumentSettingId::TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
:
415 mbTreatSingleColumnBreakAsPageBreak
= value
;
418 case DocumentSettingId::SURROUND_TEXT_WRAP_SMALL
:
419 mbSurroundTextWrapSmall
= value
;
422 case DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE
:
423 mbPropLineSpacingShrinksFirstLine
= value
;
426 case DocumentSettingId::SUBTRACT_FLYS
:
427 mbSubtractFlys
= value
;
430 case DocumentSettingId::AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
:
431 mbAutoFirstLineIndentDisregardLineSpace
= value
;
434 case DocumentSettingId::HYPHENATE_URLS
:
435 mbHyphenateURLs
= value
;
438 case DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES
:
439 mbDoNotBreakWrappedTables
= value
;
442 case DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
:
443 mbAllowTextAfterFloatingTableBreak
= value
;
446 case DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY
:
447 mbNoNumberingShowFollowBy
= value
;
450 case DocumentSettingId::DROP_CAP_PUNCTUATION
:
451 mbDropCapPunctuation
= value
;
454 // COMPATIBILITY FLAGS END
456 case DocumentSettingId::BROWSE_MODE
: //can be used temporary (load/save) when no SwViewShell is available
457 // Can't render in webview successfully.
458 if (comphelper::LibreOfficeKit::isActive())
459 mbLastBrowseMode
= false;
461 mbLastBrowseMode
= value
;
464 case DocumentSettingId::HTML_MODE
:
468 case DocumentSettingId::GLOBAL_DOCUMENT
:
469 mbIsGlobalDoc
= value
;
472 case DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS
:
473 mbGlblDocSaveLinks
= value
;
476 case DocumentSettingId::LABEL_DOCUMENT
:
477 mbIsLabelDoc
= value
;
480 case DocumentSettingId::PURGE_OLE
:
484 case DocumentSettingId::KERN_ASIAN_PUNCTUATION
:
485 mbKernAsianPunctuation
= value
;
488 case DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
:
489 mbDoNotResetParaAttrsForNumFont
= value
;
491 case DocumentSettingId::MATH_BASELINE_ALIGNMENT
:
492 mbMathBaselineAlignment
= value
;
494 case DocumentSettingId::STYLES_NODEFAULT
:
495 mbStylesNoDefault
= value
;
497 case DocumentSettingId::FLOATTABLE_NOMARGINS
:
498 mbFloattableNomargins
= value
;
500 case DocumentSettingId::EMBED_FONTS
:
503 case DocumentSettingId::EMBED_USED_FONTS
:
504 mEmbedUsedFonts
= value
;
506 case DocumentSettingId::EMBED_LATIN_SCRIPT_FONTS
:
507 mEmbedLatinScriptFonts
= value
;
509 case DocumentSettingId::EMBED_ASIAN_SCRIPT_FONTS
:
510 mEmbedAsianScriptFonts
= value
;
512 case DocumentSettingId::EMBED_COMPLEX_SCRIPT_FONTS
:
513 mEmbedComplexScriptFonts
= value
;
515 case DocumentSettingId::EMBED_SYSTEM_FONTS
:
516 mEmbedSystemFonts
= value
;
518 case DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
:
519 mApplyParagraphMarkFormatToNumbering
= value
;
521 case DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING
:
522 mbDisableOffPagePositioning
= value
;
524 case DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA
:
525 mbEmptyDbFieldHidesPara
= value
;
527 case DocumentSettingId::CONTINUOUS_ENDNOTES
:
528 mbContinuousEndnotes
= value
;
530 case DocumentSettingId::PROTECT_BOOKMARKS
:
531 mbProtectBookmarks
= value
;
533 case DocumentSettingId::PROTECT_FIELDS
:
534 mbProtectFields
= value
;
536 case DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA
:
537 mbHeaderSpacingBelowLastPara
= value
;
539 case DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA
:
540 mbFrameAutowidthWithMorePara
= value
;
542 case DocumentSettingId::GUTTER_AT_TOP
:
543 mbGutterAtTop
= value
;
545 case DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND
:
546 mbFootnoteInColumnToPageEnd
= value
;
549 OSL_FAIL("Invalid setting id");
553 const css::i18n::ForbiddenCharacters
*
554 sw::DocumentSettingManager::getForbiddenCharacters(/*[in]*/ LanguageType nLang
, /*[in]*/ bool bLocaleData
) const
556 const css::i18n::ForbiddenCharacters
* pRet
= nullptr;
557 if (mxForbiddenCharsTable
)
558 pRet
= mxForbiddenCharsTable
->GetForbiddenCharacters( nLang
, false );
559 if( bLocaleData
&& !pRet
&& g_pBreakIt
)
560 pRet
= &g_pBreakIt
->GetForbidden( nLang
);
564 void sw::DocumentSettingManager::setForbiddenCharacters(/*[in]*/ LanguageType nLang
,
565 /*[in]*/ const css::i18n::ForbiddenCharacters
& rFChars
)
567 if (!mxForbiddenCharsTable
)
568 mxForbiddenCharsTable
= SvxForbiddenCharactersTable::makeForbiddenCharactersTable(::comphelper::getProcessComponentContext());
569 mxForbiddenCharsTable
->SetForbiddenCharacters( nLang
, rFChars
);
571 SdrModel
*pDrawModel
= m_rDoc
.getIDocumentDrawModelAccess().GetDrawModel();
574 pDrawModel
->SetForbiddenCharsTable(mxForbiddenCharsTable
);
575 if( !m_rDoc
.IsInReading() )
576 pDrawModel
->ReformatAllTextObjects();
579 SwRootFrame
* pTmpRoot
= m_rDoc
.getIDocumentLayoutAccess().GetCurrentLayout();
580 if( pTmpRoot
&& !m_rDoc
.IsInReading() )
582 pTmpRoot
->StartAllAction();
583 for(SwRootFrame
* aLayout
: m_rDoc
.GetAllLayouts())
584 aLayout
->InvalidateAllContent(SwInvalidateFlags::Size
);
585 pTmpRoot
->EndAllAction();
587 m_rDoc
.getIDocumentState().SetModified();
590 std::shared_ptr
<SvxForbiddenCharactersTable
>& sw::DocumentSettingManager::getForbiddenCharacterTable()
592 if (!mxForbiddenCharsTable
)
593 mxForbiddenCharsTable
= SvxForbiddenCharactersTable::makeForbiddenCharactersTable(::comphelper::getProcessComponentContext());
594 return mxForbiddenCharsTable
;
597 const std::shared_ptr
<SvxForbiddenCharactersTable
>& sw::DocumentSettingManager::getForbiddenCharacterTable() const
599 return mxForbiddenCharsTable
;
602 sal_uInt16
sw::DocumentSettingManager::getLinkUpdateMode( /*[in]*/bool bGlobalSettings
) const
604 sal_uInt16 nRet
= mnLinkUpdMode
;
605 if( bGlobalSettings
&& GLOBALSETTING
== nRet
)
606 nRet
= SW_MOD()->GetLinkUpdMode();
610 void sw::DocumentSettingManager::setLinkUpdateMode( /*[in]*/sal_uInt16 eMode
)
612 mnLinkUpdMode
= eMode
;
615 SwFieldUpdateFlags
sw::DocumentSettingManager::getFieldUpdateFlags( /*[in]*/bool bGlobalSettings
) const
617 SwFieldUpdateFlags eRet
= meFieldUpdMode
;
618 if( bGlobalSettings
&& AUTOUPD_GLOBALSETTING
== eRet
)
619 eRet
= SW_MOD()->GetFieldUpdateFlags();
623 void sw::DocumentSettingManager::setFieldUpdateFlags(/*[in]*/SwFieldUpdateFlags eMode
)
625 meFieldUpdMode
= eMode
;
628 CharCompressType
sw::DocumentSettingManager::getCharacterCompressionType() const
630 return meChrCmprType
;
633 void sw::DocumentSettingManager::setCharacterCompressionType( /*[in]*/CharCompressType n
)
635 if( meChrCmprType
== n
)
640 SdrModel
*pDrawModel
= m_rDoc
.getIDocumentDrawModelAccess().GetDrawModel();
643 pDrawModel
->SetCharCompressType( n
);
644 if( !m_rDoc
.IsInReading() )
645 pDrawModel
->ReformatAllTextObjects();
648 SwRootFrame
* pTmpRoot
= m_rDoc
.getIDocumentLayoutAccess().GetCurrentLayout();
649 if( pTmpRoot
&& !m_rDoc
.IsInReading() )
651 pTmpRoot
->StartAllAction();
652 for( auto aLayout
: m_rDoc
.GetAllLayouts() )
653 aLayout
->InvalidateAllContent(SwInvalidateFlags::Size
);
654 pTmpRoot
->EndAllAction();
656 m_rDoc
.getIDocumentState().SetModified();
660 void sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSettingManager
& rSource
)
662 Setn32DummyCompatibilityOptions1( rSource
.Getn32DummyCompatibilityOptions1() );
663 Setn32DummyCompatibilityOptions2( rSource
.Getn32DummyCompatibilityOptions2() );
665 // No mbHTMLMode: this is the subset of mbLastBrowseMode, which can be temporarily enabled even
666 // for non-SwWebDocShells.
667 // No mbIsGlobalDoc: this is true for SwGlobalDocShells.
668 mbGlblDocSaveLinks
= rSource
.mbGlblDocSaveLinks
;
669 mbIsLabelDoc
= rSource
.mbIsLabelDoc
;
670 mbPurgeOLE
= rSource
.mbPurgeOLE
;
671 mbKernAsianPunctuation
= rSource
.mbKernAsianPunctuation
;
672 mbParaSpaceMax
= rSource
.mbParaSpaceMax
;
673 mbParaSpaceMaxAtPages
= rSource
.mbParaSpaceMaxAtPages
;
674 mbTabCompat
= rSource
.mbTabCompat
;
675 mbUseVirtualDevice
= rSource
.mbUseVirtualDevice
;
676 mbAddFlyOffsets
= rSource
.mbAddFlyOffsets
;
677 mbAddVerticalFlyOffsets
= rSource
.mbAddVerticalFlyOffsets
;
678 mbAddExternalLeading
= rSource
.mbAddExternalLeading
;
679 mbUseHiResolutionVirtualDevice
= rSource
.mbUseHiResolutionVirtualDevice
;
680 mbOldLineSpacing
= rSource
.mbOldLineSpacing
;
681 mbAddParaSpacingToTableCells
= rSource
.mbAddParaSpacingToTableCells
;
682 mbAddParaLineSpacingToTableCells
= rSource
.mbAddParaLineSpacingToTableCells
;
683 mbUseFormerObjectPos
= rSource
.mbUseFormerObjectPos
;
684 mbUseFormerTextWrapping
= rSource
.mbUseFormerTextWrapping
;
685 mbConsiderWrapOnObjPos
= rSource
.mbConsiderWrapOnObjPos
;
686 mbMathBaselineAlignment
= rSource
.mbMathBaselineAlignment
;
687 mbStylesNoDefault
= rSource
.mbStylesNoDefault
;
688 mbFloattableNomargins
= rSource
.mbFloattableNomargins
;
689 mbOldNumbering
= rSource
.mbOldNumbering
;
690 mbIgnoreFirstLineIndentInNumbering
= rSource
.mbIgnoreFirstLineIndentInNumbering
;
691 mbDoNotJustifyLinesWithManualBreak
= rSource
.mbDoNotJustifyLinesWithManualBreak
;
692 mbDoNotResetParaAttrsForNumFont
= rSource
.mbDoNotResetParaAttrsForNumFont
;
693 mbTableRowKeep
= rSource
.mbTableRowKeep
;
694 mbIgnoreTabsAndBlanksForLineCalculation
= rSource
.mbIgnoreTabsAndBlanksForLineCalculation
;
695 mbDoNotCaptureDrawObjsOnPage
= rSource
.mbDoNotCaptureDrawObjsOnPage
;
696 mbClipAsCharacterAnchoredWriterFlyFrames
= rSource
.mbClipAsCharacterAnchoredWriterFlyFrames
;
697 mbUnixForceZeroExtLeading
= rSource
.mbUnixForceZeroExtLeading
;
698 mbTabRelativeToIndent
= rSource
.mbTabRelativeToIndent
;
699 mbProtectForm
= rSource
.mbProtectForm
;
700 mbMsWordCompTrailingBlanks
= rSource
.mbMsWordCompTrailingBlanks
;
701 mbMsWordCompMinLineHeightByFly
= rSource
.mbMsWordCompMinLineHeightByFly
;
702 mbInvertBorderSpacing
= rSource
.mbInvertBorderSpacing
;
703 mbCollapseEmptyCellPara
= rSource
.mbCollapseEmptyCellPara
;
704 mbTabAtLeftIndentForParagraphsInList
= rSource
.mbTabAtLeftIndentForParagraphsInList
;
705 mbSmallCapsPercentage66
= rSource
.mbSmallCapsPercentage66
;
706 mbTabOverflow
= rSource
.mbTabOverflow
;
707 mbUnbreakableNumberings
= rSource
.mbUnbreakableNumberings
;
708 mbClippedPictures
= rSource
.mbClippedPictures
;
709 mbBackgroundParaOverDrawings
= rSource
.mbBackgroundParaOverDrawings
;
710 mbTabOverMargin
= rSource
.mbTabOverMargin
;
711 mbTabOverSpacing
= rSource
.mbTabOverSpacing
;
712 mbTreatSingleColumnBreakAsPageBreak
= rSource
.mbTreatSingleColumnBreakAsPageBreak
;
713 mbSurroundTextWrapSmall
= rSource
.mbSurroundTextWrapSmall
;
714 mbPropLineSpacingShrinksFirstLine
= rSource
.mbPropLineSpacingShrinksFirstLine
;
715 mbSubtractFlys
= rSource
.mbSubtractFlys
;
716 // No mbLastBrowseMode: this is false by default everywhere
717 mbDisableOffPagePositioning
= rSource
.mbDisableOffPagePositioning
;
718 mbEmptyDbFieldHidesPara
= rSource
.mbEmptyDbFieldHidesPara
;
719 mbContinuousEndnotes
= rSource
.mbContinuousEndnotes
;
720 // No mbProtectBookmarks: this is false by default everywhere
721 // No mbProtectFields: this is false by default everywhere
722 mbHeaderSpacingBelowLastPara
= rSource
.mbHeaderSpacingBelowLastPara
;
723 mbFrameAutowidthWithMorePara
= rSource
.mbFrameAutowidthWithMorePara
;
724 mbFootnoteInColumnToPageEnd
= rSource
.mbFootnoteInColumnToPageEnd
;
725 mbDropCapPunctuation
= rSource
.mbDropCapPunctuation
;
728 sal_uInt32
sw::DocumentSettingManager::Getn32DummyCompatibilityOptions1() const
730 return mn32DummyCompatibilityOptions1
;
733 void sw::DocumentSettingManager::Setn32DummyCompatibilityOptions1( const sal_uInt32 CompatibilityOptions1
)
735 mn32DummyCompatibilityOptions1
= CompatibilityOptions1
;
738 sal_uInt32
sw::DocumentSettingManager::Getn32DummyCompatibilityOptions2() const
740 return mn32DummyCompatibilityOptions2
;
743 void sw::DocumentSettingManager::Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2
)
745 mn32DummyCompatibilityOptions2
= CompatibilityOptions2
;
748 void sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter
) const
750 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("DocumentSettingManager"));
752 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbHTMLMode"));
753 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
754 BAD_CAST(OString::boolean(mbHTMLMode
).getStr()));
755 (void)xmlTextWriterEndElement(pWriter
);
757 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbIsGlobalDoc"));
758 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
759 BAD_CAST(OString::boolean(mbIsGlobalDoc
).getStr()));
760 (void)xmlTextWriterEndElement(pWriter
);
762 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbGlblDocSaveLinks"));
763 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
764 BAD_CAST(OString::boolean(mbGlblDocSaveLinks
).getStr()));
765 (void)xmlTextWriterEndElement(pWriter
);
767 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbIsLabelDoc"));
768 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
769 BAD_CAST(OString::boolean(mbIsLabelDoc
).getStr()));
770 (void)xmlTextWriterEndElement(pWriter
);
772 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbPurgeOLE"));
773 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
774 BAD_CAST(OString::boolean(mbPurgeOLE
).getStr()));
775 (void)xmlTextWriterEndElement(pWriter
);
777 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbKernAsianPunctuation"));
778 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
779 BAD_CAST(OString::boolean(mbKernAsianPunctuation
).getStr()));
780 (void)xmlTextWriterEndElement(pWriter
);
782 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbParaSpaceMax"));
783 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
784 BAD_CAST(OString::boolean(mbParaSpaceMax
).getStr()));
785 (void)xmlTextWriterEndElement(pWriter
);
787 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbParaSpaceMaxAtPages"));
788 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
789 BAD_CAST(OString::boolean(mbParaSpaceMaxAtPages
).getStr()));
790 (void)xmlTextWriterEndElement(pWriter
);
792 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabCompat"));
793 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
794 BAD_CAST(OString::boolean(mbTabCompat
).getStr()));
795 (void)xmlTextWriterEndElement(pWriter
);
797 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUseVirtualDevice"));
798 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
799 BAD_CAST(OString::boolean(mbUseVirtualDevice
).getStr()));
800 (void)xmlTextWriterEndElement(pWriter
);
802 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAddFlyOffsets"));
803 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
804 BAD_CAST(OString::boolean(mbAddFlyOffsets
).getStr()));
805 (void)xmlTextWriterEndElement(pWriter
);
807 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAddVerticalFlyOffsets"));
808 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
809 BAD_CAST(OString::boolean(mbAddVerticalFlyOffsets
).getStr()));
810 (void)xmlTextWriterEndElement(pWriter
);
812 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAddExternalLeading"));
813 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
814 BAD_CAST(OString::boolean(mbAddExternalLeading
).getStr()));
815 (void)xmlTextWriterEndElement(pWriter
);
817 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUseHiResolutionVirtualDevice"));
818 (void)xmlTextWriterWriteAttribute(
819 pWriter
, BAD_CAST("value"),
820 BAD_CAST(OString::boolean(mbUseHiResolutionVirtualDevice
).getStr()));
821 (void)xmlTextWriterEndElement(pWriter
);
823 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbOldLineSpacing"));
824 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
825 BAD_CAST(OString::boolean(mbOldLineSpacing
).getStr()));
826 (void)xmlTextWriterEndElement(pWriter
);
828 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAddParaSpacingToTableCells"));
829 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
830 BAD_CAST(OString::boolean(mbAddParaSpacingToTableCells
).getStr()));
831 (void)xmlTextWriterEndElement(pWriter
);
832 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAddParaLineSpacingToTableCells"));
833 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
834 BAD_CAST(OString::boolean(mbAddParaLineSpacingToTableCells
).getStr()));
835 (void)xmlTextWriterEndElement(pWriter
);
837 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUseFormerObjectPos"));
838 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
839 BAD_CAST(OString::boolean(mbUseFormerObjectPos
).getStr()));
840 (void)xmlTextWriterEndElement(pWriter
);
842 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUseFormerTextWrapping"));
843 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
844 BAD_CAST(OString::boolean(mbUseFormerTextWrapping
).getStr()));
845 (void)xmlTextWriterEndElement(pWriter
);
847 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbConsiderWrapOnObjPos"));
848 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
849 BAD_CAST(OString::boolean(mbConsiderWrapOnObjPos
).getStr()));
850 (void)xmlTextWriterEndElement(pWriter
);
852 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbMathBaselineAlignment"));
853 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
854 BAD_CAST(OString::boolean(mbMathBaselineAlignment
).getStr()));
855 (void)xmlTextWriterEndElement(pWriter
);
857 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbStylesNoDefault"));
858 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
859 BAD_CAST(OString::boolean(mbStylesNoDefault
).getStr()));
860 (void)xmlTextWriterEndElement(pWriter
);
862 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbFloattableNomargins"));
863 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
864 BAD_CAST(OString::boolean(mbFloattableNomargins
).getStr()));
865 (void)xmlTextWriterEndElement(pWriter
);
867 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbOldNumbering"));
868 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
869 BAD_CAST(OString::boolean(mbOldNumbering
).getStr()));
870 (void)xmlTextWriterEndElement(pWriter
);
872 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbIgnoreFirstLineIndentInNumbering"));
873 (void)xmlTextWriterWriteAttribute(
874 pWriter
, BAD_CAST("value"),
875 BAD_CAST(OString::boolean(mbIgnoreFirstLineIndentInNumbering
).getStr()));
876 (void)xmlTextWriterEndElement(pWriter
);
878 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbDoNotJustifyLinesWithManualBreak"));
879 (void)xmlTextWriterWriteAttribute(
880 pWriter
, BAD_CAST("value"),
881 BAD_CAST(OString::boolean(mbDoNotJustifyLinesWithManualBreak
).getStr()));
882 (void)xmlTextWriterEndElement(pWriter
);
884 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbDoNotResetParaAttrsForNumFont"));
885 (void)xmlTextWriterWriteAttribute(
886 pWriter
, BAD_CAST("value"),
887 BAD_CAST(OString::boolean(mbDoNotResetParaAttrsForNumFont
).getStr()));
888 (void)xmlTextWriterEndElement(pWriter
);
890 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTableRowKeep"));
891 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
892 BAD_CAST(OString::boolean(mbTableRowKeep
).getStr()));
893 (void)xmlTextWriterEndElement(pWriter
);
895 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbIgnoreTabsAndBlanksForLineCalculation"));
896 (void)xmlTextWriterWriteAttribute(
897 pWriter
, BAD_CAST("value"),
898 BAD_CAST(OString::boolean(mbIgnoreTabsAndBlanksForLineCalculation
).getStr()));
899 (void)xmlTextWriterEndElement(pWriter
);
901 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbDoNotCaptureDrawObjsOnPage"));
902 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
903 BAD_CAST(OString::boolean(mbDoNotCaptureDrawObjsOnPage
).getStr()));
904 (void)xmlTextWriterEndElement(pWriter
);
906 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbClipAsCharacterAnchoredWriterFlyFrames"));
907 (void)xmlTextWriterWriteAttribute(
908 pWriter
, BAD_CAST("value"),
909 BAD_CAST(OString::boolean(mbClipAsCharacterAnchoredWriterFlyFrames
).getStr()));
910 (void)xmlTextWriterEndElement(pWriter
);
912 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUnixForceZeroExtLeading"));
913 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
914 BAD_CAST(OString::boolean(mbUnixForceZeroExtLeading
).getStr()));
915 (void)xmlTextWriterEndElement(pWriter
);
917 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabRelativeToIndent"));
918 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
919 BAD_CAST(OString::boolean(mbTabRelativeToIndent
).getStr()));
920 (void)xmlTextWriterEndElement(pWriter
);
922 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbProtectForm"));
923 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
924 BAD_CAST(OString::boolean(mbProtectForm
).getStr()));
925 (void)xmlTextWriterEndElement(pWriter
);
927 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbMsWordCompTrailingBlanks"));
928 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
929 BAD_CAST(OString::boolean(mbMsWordCompTrailingBlanks
).getStr()));
930 (void)xmlTextWriterEndElement(pWriter
);
932 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbMsWordCompMinLineHeightByFly"));
933 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
934 BAD_CAST(OString::boolean(mbMsWordCompMinLineHeightByFly
).getStr()));
935 (void)xmlTextWriterEndElement(pWriter
);
937 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbInvertBorderSpacing"));
938 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
939 BAD_CAST(OString::boolean(mbInvertBorderSpacing
).getStr()));
940 (void)xmlTextWriterEndElement(pWriter
);
942 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbCollapseEmptyCellPara"));
943 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
944 BAD_CAST(OString::boolean(mbCollapseEmptyCellPara
).getStr()));
945 (void)xmlTextWriterEndElement(pWriter
);
947 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabAtLeftIndentForParagraphsInList"));
948 (void)xmlTextWriterWriteAttribute(
949 pWriter
, BAD_CAST("value"),
950 BAD_CAST(OString::boolean(mbTabAtLeftIndentForParagraphsInList
).getStr()));
951 (void)xmlTextWriterEndElement(pWriter
);
953 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbSmallCapsPercentage66"));
954 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
955 BAD_CAST(OString::boolean(mbSmallCapsPercentage66
).getStr()));
956 (void)xmlTextWriterEndElement(pWriter
);
958 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabOverflow"));
959 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
960 BAD_CAST(OString::boolean(mbTabOverflow
).getStr()));
961 (void)xmlTextWriterEndElement(pWriter
);
963 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbUnbreakableNumberings"));
964 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
965 BAD_CAST(OString::boolean(mbUnbreakableNumberings
).getStr()));
966 (void)xmlTextWriterEndElement(pWriter
);
968 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbClippedPictures"));
969 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
970 BAD_CAST(OString::boolean(mbClippedPictures
).getStr()));
971 (void)xmlTextWriterEndElement(pWriter
);
973 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbBackgroundParaOverDrawings"));
974 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
975 BAD_CAST(OString::boolean(mbBackgroundParaOverDrawings
).getStr()));
976 (void)xmlTextWriterEndElement(pWriter
);
978 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabOverMargin"));
979 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
980 BAD_CAST(OString::boolean(mbTabOverMargin
).getStr()));
981 (void)xmlTextWriterEndElement(pWriter
);
983 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTabOverSpacing"));
984 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
985 BAD_CAST(OString::boolean(mbTabOverSpacing
).getStr()));
986 (void)xmlTextWriterEndElement(pWriter
);
988 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbTreatSingleColumnBreakAsPageBreak"));
989 (void)xmlTextWriterWriteAttribute(
990 pWriter
, BAD_CAST("value"),
991 BAD_CAST(OString::boolean(mbTreatSingleColumnBreakAsPageBreak
).getStr()));
992 (void)xmlTextWriterEndElement(pWriter
);
994 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbSurroundTextWrapSmall"));
995 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
996 BAD_CAST(OString::boolean(mbSurroundTextWrapSmall
).getStr()));
997 (void)xmlTextWriterEndElement(pWriter
);
999 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbPropLineSpacingShrinksFirstLine"));
1000 (void)xmlTextWriterWriteAttribute(
1001 pWriter
, BAD_CAST("value"),
1002 BAD_CAST(OString::boolean(mbPropLineSpacingShrinksFirstLine
).getStr()));
1003 (void)xmlTextWriterEndElement(pWriter
);
1005 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbSubtractFlys"));
1006 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1007 BAD_CAST(OString::boolean(mbSubtractFlys
).getStr()));
1008 (void)xmlTextWriterEndElement(pWriter
);
1010 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbLastBrowseMode"));
1011 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1012 BAD_CAST(OString::boolean(mbLastBrowseMode
).getStr()));
1013 (void)xmlTextWriterEndElement(pWriter
);
1015 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbDisableOffPagePositioning"));
1016 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1017 BAD_CAST(OString::boolean(mbDisableOffPagePositioning
).getStr()));
1018 (void)xmlTextWriterEndElement(pWriter
);
1020 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbEmptyDbFieldHidesPara"));
1021 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1022 BAD_CAST(OString::boolean(mbEmptyDbFieldHidesPara
).getStr()));
1023 (void)xmlTextWriterEndElement(pWriter
);
1025 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbContinuousEndnotes"));
1026 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1027 BAD_CAST(OString::boolean(mbContinuousEndnotes
).getStr()));
1028 (void)xmlTextWriterEndElement(pWriter
);
1030 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbHeaderSpacingBelowLastPara"));
1031 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1032 BAD_CAST(OString::boolean(mbHeaderSpacingBelowLastPara
).getStr()));
1033 (void)xmlTextWriterEndElement(pWriter
);
1035 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbFrameAutowidthWithMorePara"));
1036 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1037 BAD_CAST(OString::boolean(mbFrameAutowidthWithMorePara
).getStr()));
1038 (void)xmlTextWriterEndElement(pWriter
);
1040 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbGutterAtTop"));
1041 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1042 BAD_CAST(OString::boolean(mbGutterAtTop
).getStr()));
1043 (void)xmlTextWriterEndElement(pWriter
);
1045 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbFootnoteInColumnToPageEnd"));
1046 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1047 BAD_CAST(OString::boolean(mbFootnoteInColumnToPageEnd
).getStr()));
1048 (void)xmlTextWriterEndElement(pWriter
);
1050 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbHyphenateURLs"));
1051 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1052 BAD_CAST(OString::boolean(mbHyphenateURLs
).getStr()));
1053 (void)xmlTextWriterEndElement(pWriter
);
1055 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbDoNotBreakWrappedTables"));
1056 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1057 BAD_CAST(OString::boolean(mbDoNotBreakWrappedTables
).getStr()));
1058 (void)xmlTextWriterEndElement(pWriter
);
1060 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mbAllowTextAfterFloatingTableBreak"));
1061 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1062 BAD_CAST(OString::boolean(mbAllowTextAfterFloatingTableBreak
).getStr()));
1063 (void)xmlTextWriterEndElement(pWriter
);
1065 (void)xmlTextWriterStartElement(pWriter
, BAD_CAST("mnImagePreferredDPI"));
1066 (void)xmlTextWriterWriteAttribute(pWriter
, BAD_CAST("value"),
1067 BAD_CAST(OString::number(mnImagePreferredDPI
).getStr()));
1069 (void)xmlTextWriterEndElement(pWriter
);
1071 (void)xmlTextWriterEndElement(pWriter
);
1074 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */