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 <config_features.h>
21 #include <config_fuzzers.h>
23 #include <sal/config.h>
24 #include <sal/log.hxx>
28 #include <o3tl/any.hxx>
29 #include "SwXDocumentSettings.hxx"
30 #include <comphelper/MasterPropertySetInfo.hxx>
31 #include <cppuhelper/queryinterface.hxx>
32 #include <cppuhelper/supportsservice.hxx>
33 #include <com/sun/star/beans/PropertyAttribute.hpp>
34 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
35 #include <com/sun/star/document/PrinterIndependentLayout.hpp>
37 #include <IDocumentSettingAccess.hxx>
38 #include <IDocumentDeviceAccess.hxx>
39 #include <IDocumentRedlineAccess.hxx>
41 #include <fldupde.hxx>
42 #include <linkenum.hxx>
43 #include <sfx2/printer.hxx>
45 #include <unotxdoc.hxx>
48 #include <vcl/svapp.hxx>
49 #include <svl/asiancfg.hxx>
50 #include <tools/stream.hxx>
52 #include <cfgitems.hxx>
55 using namespace comphelper
;
56 using namespace ::com::sun::star
;
57 using namespace ::com::sun::star::uno
;
58 using namespace ::com::sun::star::beans
;
59 using namespace ::com::sun::star::lang
;
60 using namespace ::com::sun::star::i18n
;
64 enum SwDocumentSettingsPropertyHandles
66 HANDLE_FORBIDDEN_CHARS
,
67 HANDLE_LINK_UPDATE_MODE
,
68 HANDLE_FIELD_AUTO_UPDATE
,
69 HANDLE_CHART_AUTO_UPDATE
,
70 HANDLE_ADD_PARA_TABLE_SPACING
,
71 HANDLE_ADD_PARA_TABLE_SPACING_AT_START
,
72 HANDLE_ALIGN_TAB_STOP_POSITION
,
76 HANDLE_IS_KERN_ASIAN_PUNCTUATION
,
77 HANDLE_CHARACTER_COMPRESSION_TYPE
,
78 HANDLE_APPLY_USER_DATA
,
79 HANDLE_SAVE_THUMBNAIL
,
80 HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS
,
81 HANDLE_CURRENT_DATABASE_DATA_SOURCE
,
82 HANDLE_CURRENT_DATABASE_COMMAND
,
83 HANDLE_CURRENT_DATABASE_COMMAND_TYPE
,
84 HANDLE_EMBEDDED_DATABASE_NAME
,
85 HANDLE_SAVE_VERSION_ON_CLOSE
,
86 HANDLE_UPDATE_FROM_TEMPLATE
,
87 HANDLE_PRINTER_INDEPENDENT_LAYOUT
,
89 HANDLE_IS_ADD_FLY_OFFSET
,
90 HANDLE_IS_ADD_VERTICAL_FLY_OFFSET
,
91 HANDLE_IS_ADD_EXTERNAL_LEADING
,
93 HANDLE_OUTLINELEVEL_YIELDS_NUMBERING
,
94 /* Stampit It disable the print cancel button of the shown progress dialog. */
95 HANDLE_ALLOW_PRINTJOB_CANCEL
,
96 HANDLE_USE_FORMER_LINE_SPACING
,
97 HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS
,
98 HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
,
99 HANDLE_USE_FORMER_OBJECT_POSITIONING
,
100 HANDLE_USE_FORMER_TEXT_WRAPPING
,
101 HANDLE_CHANGES_PASSWORD
,
102 HANDLE_CONSIDER_WRAP_ON_OBJPOS
,
103 HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
,
104 HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
,
105 HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
,
106 HANDLE_TABLE_ROW_KEEP
,
107 HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
,
108 HANDLE_LOAD_READONLY
,
109 HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
,
110 HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES
,
111 HANDLE_UNIX_FORCE_ZERO_EXT_LEADING
,
112 HANDLE_USE_OLD_PRINTER_METRICS
,
114 HANDLE_MS_WORD_COMP_TRAILING_BLANKS
,
115 HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
,
116 HANDLE_TABS_RELATIVE_TO_INDENT
,
119 HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
,
120 HANDLE_MODIFYPASSWORDINFO
,
121 HANDLE_MATH_BASELINE_ALIGNMENT
,
122 HANDLE_INVERT_BORDER_SPACING
,
123 HANDLE_COLLAPSE_EMPTY_CELL_PARA
,
124 HANDLE_SMALL_CAPS_PERCENTAGE_66
,
126 HANDLE_UNBREAKABLE_NUMBERINGS
,
127 HANDLE_STYLES_NODEFAULT
,
128 HANDLE_FLOATTABLE_NOMARGINS
,
129 HANDLE_CLIPPED_PICTURES
,
130 HANDLE_BACKGROUND_PARA_OVER_DRAWINGS
,
132 HANDLE_EMBED_USED_FONTS
,
133 HANDLE_EMBED_LATIN_SCRIPT_FONTS
,
134 HANDLE_EMBED_ASIAN_SCRIPT_FONTS
,
135 HANDLE_EMBED_COMPLEX_SCRIPT_FONTS
,
136 HANDLE_EMBED_SYSTEM_FONTS
,
137 HANDLE_TAB_OVER_MARGIN
,
138 HANDLE_TAB_OVER_SPACING
,
139 HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
,
140 HANDLE_SURROUND_TEXT_WRAP_SMALL
,
141 HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
,
142 HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE
,
143 HANDLE_SUBTRACT_FLYS
,
144 HANDLE_DISABLE_OFF_PAGE_POSITIONING
,
145 HANDLE_EMPTY_DB_FIELD_HIDES_PARA
,
146 HANDLE_CONTINUOUS_ENDNOTES
,
147 HANDLE_PROTECT_BOOKMARKS
,
148 HANDLE_PROTECT_FIELDS
,
149 HANDLE_HEADER_SPACING_BELOW_LAST_PARA
,
150 HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA
,
151 HANDLE_GUTTER_AT_TOP
,
152 HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND
,
153 HANDLE_IMAGE_PREFERRED_DPI
,
154 HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
,
155 HANDLE_HYPHENATE_URLS
,
156 HANDLE_DO_NOT_BREAK_WRAPPED_TABLES
,
157 HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
,
158 HANDLE_NO_NUMBERING_SHOW_FOLLOWBY
,
159 HANDLE_DROP_CAP_PUNCTUATION
,
164 static rtl::Reference
<MasterPropertySetInfo
> lcl_createSettingsInfo()
166 static PropertyInfo
const aWriterSettingsInfoMap
[] =
168 { OUString("ForbiddenCharacters"), HANDLE_FORBIDDEN_CHARS
, cppu::UnoType
<css::i18n::XForbiddenCharacters
>::get(), 0},
169 { OUString("LinkUpdateMode"), HANDLE_LINK_UPDATE_MODE
, cppu::UnoType
<sal_Int16
>::get(), 0},
170 { OUString("FieldAutoUpdate"), HANDLE_FIELD_AUTO_UPDATE
, cppu::UnoType
<bool>::get(), 0},
171 { OUString("ChartAutoUpdate"), HANDLE_CHART_AUTO_UPDATE
, cppu::UnoType
<bool>::get(), 0},
172 { OUString("AddParaTableSpacing"), HANDLE_ADD_PARA_TABLE_SPACING
, cppu::UnoType
<bool>::get(), 0},
173 { OUString("AddParaTableSpacingAtStart"), HANDLE_ADD_PARA_TABLE_SPACING_AT_START
, cppu::UnoType
<bool>::get(), 0},
174 { OUString("AlignTabStopPosition"), HANDLE_ALIGN_TAB_STOP_POSITION
, cppu::UnoType
<bool>::get(), 0},
175 { OUString("PrinterName"), HANDLE_PRINTER_NAME
, cppu::UnoType
<OUString
>::get(), 0},
176 { OUString("PrinterSetup"), HANDLE_PRINTER_SETUP
, cppu::UnoType
< cppu::UnoSequenceType
<sal_Int8
> >::get(), 0},
177 { OUString("PrinterPaperFromSetup"), HANDLE_PRINTER_PAPER
, cppu::UnoType
<bool>::get(), 0},
178 { OUString("IsKernAsianPunctuation"), HANDLE_IS_KERN_ASIAN_PUNCTUATION
, cppu::UnoType
<bool>::get(), 0},
179 { OUString("CharacterCompressionType"), HANDLE_CHARACTER_COMPRESSION_TYPE
, cppu::UnoType
<sal_Int16
>::get(), 0},
180 { OUString("ApplyUserData"), HANDLE_APPLY_USER_DATA
, cppu::UnoType
<bool>::get(), 0 },
181 { OUString("SaveThumbnail"), HANDLE_SAVE_THUMBNAIL
, cppu::UnoType
<bool>::get(), 0 },
182 { OUString("SaveGlobalDocumentLinks"), HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS
, cppu::UnoType
<bool>::get(), 0},
183 { OUString("CurrentDatabaseDataSource"), HANDLE_CURRENT_DATABASE_DATA_SOURCE
, cppu::UnoType
<OUString
>::get(), 0},
184 { OUString("CurrentDatabaseCommand"), HANDLE_CURRENT_DATABASE_COMMAND
, cppu::UnoType
<OUString
>::get(), 0},
185 { OUString("CurrentDatabaseCommandType"), HANDLE_CURRENT_DATABASE_COMMAND_TYPE
, cppu::UnoType
<sal_Int32
>::get(), 0},
186 { OUString("EmbeddedDatabaseName"), HANDLE_EMBEDDED_DATABASE_NAME
, cppu::UnoType
<OUString
>::get(), 0},
187 { OUString("SaveVersionOnClose"), HANDLE_SAVE_VERSION_ON_CLOSE
, cppu::UnoType
<bool>::get(), 0},
188 { OUString("UpdateFromTemplate"), HANDLE_UPDATE_FROM_TEMPLATE
, cppu::UnoType
<bool>::get(), 0},
190 { OUString("PrinterIndependentLayout"), HANDLE_PRINTER_INDEPENDENT_LAYOUT
, cppu::UnoType
<sal_Int16
>::get(), 0},
191 { OUString("IsLabelDocument"), HANDLE_IS_LABEL_DOC
, cppu::UnoType
<bool>::get(), 0},
192 { OUString("AddFrameOffsets"), HANDLE_IS_ADD_FLY_OFFSET
, cppu::UnoType
<bool>::get(), 0},
193 { OUString("AddVerticalFrameOffsets"), HANDLE_IS_ADD_VERTICAL_FLY_OFFSET
, cppu::UnoType
<bool>::get(), 0},
194 { OUString("AddExternalLeading"), HANDLE_IS_ADD_EXTERNAL_LEADING
, cppu::UnoType
<bool>::get(), 0},
195 { OUString("UseOldNumbering"), HANDLE_OLD_NUMBERING
, cppu::UnoType
<bool>::get(), 0},
196 { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING
, cppu::UnoType
<bool>::get(), 0},
197 /* Stampit It disable the print cancel button of the shown progress dialog. */
198 { OUString("AllowPrintJobCancel"), HANDLE_ALLOW_PRINTJOB_CANCEL
, cppu::UnoType
<bool>::get(), 0},
199 { OUString("UseFormerLineSpacing"), HANDLE_USE_FORMER_LINE_SPACING
, cppu::UnoType
<bool>::get(), 0},
200 { OUString("AddParaSpacingToTableCells"), HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS
, cppu::UnoType
<bool>::get(), 0},
201 { OUString("AddParaLineSpacingToTableCells"), HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
, cppu::UnoType
<bool>::get(), 0},
202 { OUString("UseFormerObjectPositioning"), HANDLE_USE_FORMER_OBJECT_POSITIONING
, cppu::UnoType
<bool>::get(), 0},
203 { OUString("UseFormerTextWrapping"), HANDLE_USE_FORMER_TEXT_WRAPPING
, cppu::UnoType
<bool>::get(), 0},
204 { OUString("RedlineProtectionKey"), HANDLE_CHANGES_PASSWORD
, cppu::UnoType
< cppu::UnoSequenceType
<sal_Int8
> >::get(), 0},
205 { OUString("ConsiderTextWrapOnObjPos"), HANDLE_CONSIDER_WRAP_ON_OBJPOS
, cppu::UnoType
<bool>::get(), 0},
206 { OUString("IgnoreFirstLineIndentInNumbering"), HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
, cppu::UnoType
<bool>::get(), 0},
207 { OUString("DoNotJustifyLinesWithManualBreak"), HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
, cppu::UnoType
<bool>::get(), 0},
208 { OUString("DoNotResetParaAttrsForNumFont"), HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
, cppu::UnoType
<bool>::get(), 0},
209 { OUString("TableRowKeep"), HANDLE_TABLE_ROW_KEEP
, cppu::UnoType
<bool>::get(), 0},
210 { OUString("IgnoreTabsAndBlanksForLineCalculation"), HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
, cppu::UnoType
<bool>::get(), 0},
211 { OUString("LoadReadonly"), HANDLE_LOAD_READONLY
, cppu::UnoType
<bool>::get(), 0},
212 { OUString("DoNotCaptureDrawObjsOnPage"), HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
, cppu::UnoType
<bool>::get(), 0},
213 { OUString("ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES
, cppu::UnoType
<bool>::get(), 0},
214 { OUString("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING
, cppu::UnoType
<bool>::get(), 0},
215 { OUString("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS
, cppu::UnoType
<bool>::get(), 0},
216 { OUString("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT
, cppu::UnoType
<bool>::get(), 0},
217 { OUString("Rsid"), HANDLE_RSID
, cppu::UnoType
<sal_Int32
>::get(), 0},
218 { OUString("RsidRoot"), HANDLE_RSID_ROOT
, cppu::UnoType
<sal_Int32
>::get(), 0},
219 { OUString("ProtectForm"), HANDLE_PROTECT_FORM
, cppu::UnoType
<bool>::get(), 0},
220 { OUString("MsWordCompTrailingBlanks"), HANDLE_MS_WORD_COMP_TRAILING_BLANKS
, cppu::UnoType
<bool>::get(), 0 },
221 { OUString("MsWordCompMinLineHeightByFly"), HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
, cppu::UnoType
<bool>::get(), 0 },
222 { OUString("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
, cppu::UnoType
<bool>::get(), 0},
223 { OUString("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO
, cppu::UnoType
< cppu::UnoSequenceType
<css::beans::PropertyValue
> >::get(), 0},
224 { OUString("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT
, cppu::UnoType
<bool>::get(), 0},
225 { OUString("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING
, cppu::UnoType
<bool>::get(), 0},
226 { OUString("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA
, cppu::UnoType
<bool>::get(), 0},
227 { OUString("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66
, cppu::UnoType
<bool>::get(), 0},
228 { OUString("TabOverflow"), HANDLE_TAB_OVERFLOW
, cppu::UnoType
<bool>::get(), 0},
229 { OUString("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS
, cppu::UnoType
<bool>::get(), 0},
230 { OUString("StylesNoDefault"), HANDLE_STYLES_NODEFAULT
, cppu::UnoType
<bool>::get(), 0},
231 { OUString("FloattableNomargins"), HANDLE_FLOATTABLE_NOMARGINS
, cppu::UnoType
<bool>::get(), 0},
232 { OUString("ClippedPictures"), HANDLE_CLIPPED_PICTURES
, cppu::UnoType
<bool>::get(), 0},
233 { OUString("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS
, cppu::UnoType
<bool>::get(), 0},
234 { OUString("EmbedFonts"), HANDLE_EMBED_FONTS
, cppu::UnoType
<bool>::get(), 0},
235 { OUString("EmbedOnlyUsedFonts"), HANDLE_EMBED_USED_FONTS
, cppu::UnoType
<bool>::get(), 0},
236 { OUString("EmbedLatinScriptFonts"), HANDLE_EMBED_LATIN_SCRIPT_FONTS
, cppu::UnoType
<bool>::get(), 0},
237 { OUString("EmbedAsianScriptFonts"), HANDLE_EMBED_ASIAN_SCRIPT_FONTS
, cppu::UnoType
<bool>::get(), 0},
238 { OUString("EmbedComplexScriptFonts"), HANDLE_EMBED_COMPLEX_SCRIPT_FONTS
, cppu::UnoType
<bool>::get(), 0},
239 { OUString("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS
, cppu::UnoType
<bool>::get(), 0},
240 { OUString("TabOverMargin"), HANDLE_TAB_OVER_MARGIN
, cppu::UnoType
<bool>::get(), 0},
241 { OUString("TabOverSpacing"), HANDLE_TAB_OVER_SPACING
, cppu::UnoType
<bool>::get(), 0},
242 { OUString("TreatSingleColumnBreakAsPageBreak"), HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
, cppu::UnoType
<bool>::get(), 0},
243 { OUString("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL
, cppu::UnoType
<bool>::get(), 0},
244 { OUString("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
, cppu::UnoType
<bool>::get(), 0},
245 { OUString("PropLineSpacingShrinksFirstLine"), HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE
, cppu::UnoType
<bool>::get(), 0},
246 { OUString("SubtractFlysAnchoredAtFlys"), HANDLE_SUBTRACT_FLYS
, cppu::UnoType
<bool>::get(), 0},
247 { OUString("DisableOffPagePositioning"), HANDLE_DISABLE_OFF_PAGE_POSITIONING
, cppu::UnoType
<bool>::get(), 0},
248 { OUString("EmptyDbFieldHidesPara"), HANDLE_EMPTY_DB_FIELD_HIDES_PARA
, cppu::UnoType
<bool>::get(), 0 },
249 { OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES
, cppu::UnoType
<bool>::get(), 0 },
250 { OUString("ProtectBookmarks"), HANDLE_PROTECT_BOOKMARKS
, cppu::UnoType
<bool>::get(), 0 },
251 { OUString("ProtectFields"), HANDLE_PROTECT_FIELDS
, cppu::UnoType
<bool>::get(), 0 },
252 { OUString("HeaderSpacingBelowLastPara"), HANDLE_HEADER_SPACING_BELOW_LAST_PARA
, cppu::UnoType
<bool>::get(), 0 },
253 { OUString("FrameAutowidthWithMorePara"), HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA
, cppu::UnoType
<bool>::get(), 0 },
254 { OUString("GutterAtTop"), HANDLE_GUTTER_AT_TOP
, cppu::UnoType
<bool>::get(), 0 },
255 { OUString("FootnoteInColumnToPageEnd"), HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND
, cppu::UnoType
<bool>::get(), 0 },
256 { OUString("ImagePreferredDPI"), HANDLE_IMAGE_PREFERRED_DPI
, cppu::UnoType
<sal_Int32
>::get(), 0 },
257 { OUString("AutoFirstLineIndentDisregardLineSpace"), HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
, cppu::UnoType
<bool>::get(), 0 },
258 { OUString("HyphenateURLs"), HANDLE_HYPHENATE_URLS
, cppu::UnoType
<bool>::get(), 0 },
259 { OUString("DoNotBreakWrappedTables"), HANDLE_DO_NOT_BREAK_WRAPPED_TABLES
, cppu::UnoType
<bool>::get(), 0 },
260 { OUString("AllowTextAfterFloatingTableBreak"), HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
, cppu::UnoType
<bool>::get(), 0 },
261 { OUString("NoNumberingShowFollowBy"), HANDLE_NO_NUMBERING_SHOW_FOLLOWBY
, cppu::UnoType
<bool>::get(), 0 },
262 { OUString("DropCapPunctuation"), HANDLE_DROP_CAP_PUNCTUATION
, cppu::UnoType
<bool>::get(), 0 },
265 * As OS said, we don't have a view when we need to set this, so I have to
266 * find another solution before adding them to this property set - MTG
267 { OUString("IsGridVisible"), HANDLE_IS_GRID_VISIBLE, cppu::UnoType<bool>::get(), 0, 0},
268 { OUString("IsSnapToGrid"), HANDLE_IS_SNAP_TO_GRID, cppu::UnoType<bool>::get(), 0, 0},
269 { OUString("IsSynchroniseAxes"), HANDLE_IS_SYNCHRONISE_AXES, cppu::UnoType<bool>::get(), 0, 0},
270 { OUString("HorizontalGridResolution"), HANDLE_HORIZONTAL_GRID_RESOLUTION, cppu::UnoType<sal_Int32>::get(), 0, 0},
271 { OUString("HorizontalGridSubdivision"), HANDLE_HORIZONTAL_GRID_SUBDIVISION, cppu::UnoType<sal_Int16>::get(), 0, 0},
272 { OUString("VerticalGridResolution"), HANDLE_VERTICAL_GRID_RESOLUTION, cppu::UnoType<sal_Int32>::get(), 0, 0},
273 { OUString("VerticalGridSubdivision"), HANDLE_VERTICAL_GRID_SUBDIVISION, cppu::UnoType<sal_Int16>::get(), 0, 0},
275 { OUString("ShowParagraphEnd"), HANDLE_SHOW_PARAGRAPH_END, cppu::UnoType<bool>::get(), 0, 0},
276 { OUString("ShowOptionalHyphens"), HANDLE_SHOW_OPTIONAL_HYPHENS, cppu::UnoType<bool>::get(), 0, 0},
277 { OUString("ShowSpaces"), HANDLE_SHOW_SPACES, cppu::UnoType<bool>::get(), 0, 0},
278 { OUString("ShowTabs"), HANDLE_SHOW_TABS, cppu::UnoType<bool>::get(), 0, 0},
279 { OUString("ShowBreaks"), HANDLE_SHOW_BREAKS, cppu::UnoType<bool>::get(), 0, 0},
280 { OUString("ShowHiddenText"), HANDLE_SHOW_HIDDEN_TEXT, cppu::UnoType<bool>::get(), 0, 0},
281 { OUString("ShowHiddenParagraphs"), HANDLE_SHOW_HIDDEN_PARAGRAPHS, cppu::UnoType<bool>::get(), 0, 0},
283 { OUString("ShowTextLimitGuide"), HANDLE_SHOW_TEXT_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0},
284 { OUString("ShowTableLimitGuide"), HANDLE_SHOW_TABLE_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0},
285 { OUString("ShowSectionLimitGuide"), HANDLE_SHOW_SECTION_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0},
286 { OUString("ShowGuidesWhileMoving"), HANDLE_SHOW_GUIDES_WHILE_MOVING, cppu::UnoType<bool>::get(), 0, 0},
288 { OUString(), 0, css::uno::Type(), 0}
290 return new MasterPropertySetInfo ( aWriterSettingsInfoMap
);
293 SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument
* pModel
)
294 : MasterPropertySet ( lcl_createSettingsInfo().get(),
295 &Application::GetSolarMutex () )
297 , mpDocSh ( nullptr )
299 , mpPrinter( nullptr )
300 , mbPreferPrinterPapersize( false )
302 registerSlave ( new SwXPrintSettings ( SwXPrintSettingsType::Document
, mpModel
->GetDocShell()->GetDoc() ) );
305 SwXDocumentSettings::~SwXDocumentSettings()
310 Any SAL_CALL
SwXDocumentSettings::queryInterface( const Type
& rType
)
312 return ::cppu::queryInterface(rType
,
313 // OWeakObject interfaces
314 static_cast<XInterface
*>(static_cast<OWeakObject
*>(this)),
315 static_cast<XWeak
*>(this),
317 static_cast<XPropertySet
*>(this),
318 static_cast<XPropertyState
*>(this),
319 static_cast<XMultiPropertySet
*>(this),
320 static_cast<XServiceInfo
*>(this),
321 static_cast<XTypeProvider
*>(this));
323 void SwXDocumentSettings::acquire ()
326 OWeakObject::acquire();
328 void SwXDocumentSettings::release ()
331 OWeakObject::release();
334 uno::Sequence
< uno::Type
> SAL_CALL
SwXDocumentSettings::getTypes( )
336 static const uno::Sequence
< uno::Type
> aTypes
{
337 // from MasterPropertySet
338 cppu::UnoType
<XPropertySet
>::get(),
339 cppu::UnoType
<XPropertyState
>::get(),
340 cppu::UnoType
<XMultiPropertySet
>::get(),
341 cppu::UnoType
<XServiceInfo
>::get(),
342 cppu::UnoType
<XTypeProvider
>::get(),
347 uno::Sequence
< sal_Int8
> SAL_CALL
SwXDocumentSettings::getImplementationId( )
349 return css::uno::Sequence
<sal_Int8
>();
352 void SwXDocumentSettings::_preSetValues ()
354 mpDocSh
= mpModel
->GetDocShell();
355 if (nullptr == mpDocSh
)
356 throw UnknownPropertyException();
358 mpDoc
= mpDocSh
->GetDoc();
359 if (nullptr == mpDoc
)
360 throw UnknownPropertyException();
363 void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo
& rInfo
, const uno::Any
&rValue
)
365 if (rInfo
.mnAttributes
& PropertyAttribute::READONLY
)
366 throw PropertyVetoException ("Property is read-only: " + rInfo
.maName
, static_cast < cppu::OWeakObject
* > ( nullptr ) );
368 switch( rInfo
.mnHandle
)
370 case HANDLE_FORBIDDEN_CHARS
:
372 case HANDLE_LINK_UPDATE_MODE
:
384 throw IllegalArgumentException();
386 mpDoc
->getIDocumentSettingAccess().setLinkUpdateMode(nMode
);
389 case HANDLE_FIELD_AUTO_UPDATE
:
391 bool bUpdateField
= *o3tl::doAccess
<bool>(rValue
);
392 SwFieldUpdateFlags nFlag
= mpDoc
->getIDocumentSettingAccess().getFieldUpdateFlags(true);
393 mpDoc
->getIDocumentSettingAccess().setFieldUpdateFlags( bUpdateField
?
394 nFlag
== AUTOUPD_FIELD_AND_CHARTS
?
395 AUTOUPD_FIELD_AND_CHARTS
:
400 case HANDLE_CHART_AUTO_UPDATE
:
402 bool bUpdateChart
= *o3tl::doAccess
<bool>(rValue
);
403 SwFieldUpdateFlags nFlag
= mpDoc
->getIDocumentSettingAccess().getFieldUpdateFlags(true);
404 mpDoc
->getIDocumentSettingAccess().setFieldUpdateFlags( (nFlag
== AUTOUPD_FIELD_ONLY
|| nFlag
== AUTOUPD_FIELD_AND_CHARTS
) ?
406 AUTOUPD_FIELD_AND_CHARTS
:
411 case HANDLE_ADD_PARA_TABLE_SPACING
:
413 bool bParaSpace
= false;
414 rValue
>>= bParaSpace
;
415 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::PARA_SPACE_MAX
, bParaSpace
);
418 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START
:
420 bool bParaSpacePage
= false;
421 rValue
>>= bParaSpacePage
;
422 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES
, bParaSpacePage
);
425 case HANDLE_ALIGN_TAB_STOP_POSITION
:
427 bool bAlignTab
= *o3tl::doAccess
<bool>(rValue
);
428 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TAB_COMPAT
, bAlignTab
);
431 case HANDLE_PRINTER_NAME
:
433 //the printer must be created
434 OUString sPrinterName
;
435 if( !(rValue
>>= sPrinterName
) )
436 throw IllegalArgumentException();
438 if( !mpPrinter
&& !sPrinterName
.isEmpty() && mpDocSh
->GetCreateMode() != SfxObjectCreateMode::EMBEDDED
)
440 SfxPrinter
* pPrinter
= mpDoc
->getIDocumentDeviceAccess().getPrinter( true );
441 if ( pPrinter
->GetName() != sPrinterName
)
443 VclPtrInstance
<SfxPrinter
> pNewPrinter( pPrinter
->GetOptions().Clone(), sPrinterName
);
444 assert (! pNewPrinter
->isDisposed() );
445 if( pNewPrinter
->IsKnown() )
447 // set printer only once; in _postSetValues
448 mpPrinter
= pNewPrinter
;
452 pNewPrinter
.disposeAndClear();
459 case HANDLE_PRINTER_SETUP
:
461 Sequence
< sal_Int8
> aSequence
;
462 if ( !(rValue
>>= aSequence
) )
463 throw IllegalArgumentException();
465 sal_uInt32 nSize
= aSequence
.getLength();
468 SvMemoryStream
aStream (aSequence
.getArray(), nSize
,
470 aStream
.Seek ( STREAM_SEEK_TO_BEGIN
);
471 auto pItemSet
= std::make_unique
<SfxItemSetFixed
<
472 SID_PRINTER_NOTFOUND_WARN
, SID_PRINTER_NOTFOUND_WARN
,
473 SID_PRINTER_CHANGESTODOC
, SID_PRINTER_CHANGESTODOC
,
474 SID_HTML_MODE
, SID_HTML_MODE
,
475 FN_PARAM_ADDPRINTER
, FN_PARAM_ADDPRINTER
>>( mpDoc
->GetAttrPool() );
476 VclPtr
<SfxPrinter
> pPrinter
= SfxPrinter::Create ( aStream
, std::move(pItemSet
) );
477 assert (! pPrinter
->isDisposed() );
478 // set printer only once; in _postSetValues
479 mpPrinter
.disposeAndClear();
480 mpPrinter
= pPrinter
;
485 case HANDLE_PRINTER_PAPER
:
487 bool bPreferPrinterPapersize
= {}; // spurious -Werror=maybe-uninitialized
488 if(!(rValue
>>= bPreferPrinterPapersize
))
489 throw IllegalArgumentException();
490 mbPreferPrinterPapersize
= bPreferPrinterPapersize
;
493 case HANDLE_IS_KERN_ASIAN_PUNCTUATION
:
495 bool bIsKern
= *o3tl::doAccess
<bool>(rValue
);
496 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION
, bIsKern
);
497 if (SwEditShell
* pEditSh
= mpDoc
->GetEditShell())
498 pEditSh
->ChgHyphenation();
501 case HANDLE_CHARACTER_COMPRESSION_TYPE
:
505 switch (static_cast<CharCompressType
>(nMode
))
507 case CharCompressType::NONE
:
508 case CharCompressType::PunctuationOnly
:
509 case CharCompressType::PunctuationAndKana
:
512 throw IllegalArgumentException();
514 mpDoc
->getIDocumentSettingAccess().setCharacterCompressionType(static_cast<CharCompressType
>(nMode
));
517 case HANDLE_APPLY_USER_DATA
:
519 mpDocSh
->SetUseUserData(*o3tl::doAccess
<bool>(rValue
));
522 case HANDLE_SAVE_THUMBNAIL
:
524 mpDocSh
->SetUseThumbnailSave(*o3tl::doAccess
<bool>(rValue
));
527 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS
:
529 bool bSaveGlobal
= *o3tl::doAccess
<bool>(rValue
);
530 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS
, bSaveGlobal
);
533 case HANDLE_CURRENT_DATABASE_DATA_SOURCE
:
535 SwDBData aData
= mpDoc
->GetDBData();
536 if ( rValue
>>= aData
.sDataSource
)
537 mpDoc
->ChgDBData( aData
);
540 case HANDLE_CURRENT_DATABASE_COMMAND
:
542 SwDBData aData
= mpDoc
->GetDBData();
544 if ( rValue
>>= aData
.sCommand
)
545 mpDoc
->ChgDBData( aData
);
547 SAL_WARN_IF( aData
.sDataSource
.isEmpty() && !aData
.sCommand
.isEmpty(), "sw.uno",
548 "\"CurrentDatabaseCommand\" property possibly set before \"CurrentDatabaseDataSource\"" );
551 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE
:
553 SwDBData aData
= mpDoc
->GetDBData();
554 if ( rValue
>>= aData
.nCommandType
)
555 mpDoc
->ChgDBData( aData
);
556 SAL_WARN_IF( aData
.nCommandType
&& aData
.sDataSource
.isEmpty(), "sw.uno",
557 "\"CurrentDatabaseCommandType\" property possibly set before \"CurrentDatabaseDataSource\"" );
558 SAL_WARN_IF( aData
.nCommandType
&& aData
.sCommand
.isEmpty(), "sw.uno",
559 "\"CurrentDatabaseCommandType\" property possibly set before \"CurrentDatabaseCommand\"" );
562 case HANDLE_EMBEDDED_DATABASE_NAME
:
564 #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
565 OUString sEmbeddedName
;
566 if (rValue
>>= sEmbeddedName
)
567 mpDoc
->GetDBManager()->setEmbeddedName(sEmbeddedName
, *mpDocSh
);
571 case HANDLE_SAVE_VERSION_ON_CLOSE
:
573 mpDocSh
->SetSaveVersionOnClose( *o3tl::doAccess
<bool>(rValue
) );
576 case HANDLE_UPDATE_FROM_TEMPLATE
:
578 mpDocSh
->SetQueryLoadTemplate( *o3tl::doAccess
<bool>(rValue
) );
581 case HANDLE_PRINTER_INDEPENDENT_LAYOUT
:
586 bool bUseVirDev
= true;
587 bool bHiResVirDev
= true;
588 if( nTmp
== document::PrinterIndependentLayout::DISABLED
)
590 else if ( nTmp
== document::PrinterIndependentLayout::LOW_RESOLUTION
)
591 bHiResVirDev
= false;
592 else if ( nTmp
!= document::PrinterIndependentLayout::HIGH_RESOLUTION
)
593 throw IllegalArgumentException();
595 mpDoc
->getIDocumentDeviceAccess().setReferenceDeviceType( bUseVirDev
, bHiResVirDev
);
598 case HANDLE_IS_LABEL_DOC
:
601 if(!(rValue
>>= bSet
))
602 throw IllegalArgumentException();
603 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::LABEL_DOCUMENT
, bSet
);
606 case HANDLE_IS_ADD_FLY_OFFSET
:
608 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
609 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::ADD_FLY_OFFSETS
, bTmp
);
612 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET
:
614 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
615 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS
, bTmp
);
618 case HANDLE_IS_ADD_EXTERNAL_LEADING
:
620 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
621 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::ADD_EXT_LEADING
, bTmp
);
624 case HANDLE_OLD_NUMBERING
:
626 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
627 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::OLD_NUMBERING
, bTmp
);
630 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING
:
632 // ignore - this is a dead property
635 case HANDLE_ALLOW_PRINTJOB_CANCEL
:
638 if (!(rValue
>>= bState
))
639 throw IllegalArgumentException();
640 mpDocSh
->Stamp_SetPrintCancelState(bState
);
643 case HANDLE_USE_FORMER_LINE_SPACING
:
645 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
646 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::OLD_LINE_SPACING
, bTmp
);
649 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS
:
651 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
652 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS
, bTmp
);
655 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
:
657 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
658 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
, bTmp
);
661 case HANDLE_USE_FORMER_OBJECT_POSITIONING
:
663 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
664 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_OBJECT_POS
, bTmp
);
667 case HANDLE_USE_FORMER_TEXT_WRAPPING
:
669 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
670 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_TEXT_WRAPPING
, bTmp
);
673 case HANDLE_CHANGES_PASSWORD
:
675 Sequence
<sal_Int8
> aNew
;
678 mpDoc
->getIDocumentRedlineAccess().SetRedlinePassword(aNew
);
679 if(aNew
.hasElements())
681 RedlineFlags eMode
= mpDoc
->getIDocumentRedlineAccess().GetRedlineFlags();
682 eMode
|= RedlineFlags::On
;
683 mpDoc
->getIDocumentRedlineAccess().SetRedlineFlags( eMode
);
688 case HANDLE_CONSIDER_WRAP_ON_OBJPOS
:
690 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
691 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION
, bTmp
);
694 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
:
696 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
697 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
, bTmp
);
700 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
:
702 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
703 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
, bTmp
);
706 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
:
708 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
709 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
, bTmp
);
712 case HANDLE_TABLE_ROW_KEEP
:
714 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
715 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TABLE_ROW_KEEP
, bTmp
);
718 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
:
720 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
721 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
, bTmp
);
724 case HANDLE_LOAD_READONLY
:
726 mpDocSh
->SetLoadReadonly( *o3tl::doAccess
<bool>(rValue
) );
729 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
:
731 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
732 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
, bTmp
);
735 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES
:
737 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
738 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
, bTmp
);
741 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING
:
743 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
744 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING
, bTmp
);
747 case HANDLE_USE_OLD_PRINTER_METRICS
:
748 // ignore - this is a dead property
750 case HANDLE_TABS_RELATIVE_TO_INDENT
:
752 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
753 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TABS_RELATIVE_TO_INDENT
, bTmp
);
760 mpDoc
->setRsid( nTmp
);
763 case HANDLE_RSID_ROOT
:
767 mpDoc
->setRsidRoot( nTmp
);
770 case HANDLE_PROTECT_FORM
:
772 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
773 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FORM
, bTmp
);
776 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS
:
778 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
779 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS
, bTmp
);
782 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
:
784 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
785 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
, bTmp
);
788 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
:
790 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
791 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
, bTmp
);
794 case HANDLE_MODIFYPASSWORDINFO
:
796 uno::Sequence
< beans::PropertyValue
> aInfo
;
797 if ( !( rValue
>>= aInfo
) )
798 throw lang::IllegalArgumentException(
799 "Value of type Sequence<PropertyValue> expected!",
800 uno::Reference
< uno::XInterface
>(),
803 if ( !mpDocSh
->SetModifyPasswordInfo( aInfo
) )
804 throw beans::PropertyVetoException(
805 "The hash is not allowed to be changed now!",
806 uno::Reference
< uno::XInterface
>() );
809 case HANDLE_MATH_BASELINE_ALIGNMENT
:
811 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
812 mpDoc
->getIDocumentSettingAccess().set( DocumentSettingId::MATH_BASELINE_ALIGNMENT
, bTmp
);
815 case HANDLE_INVERT_BORDER_SPACING
:
817 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
818 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::INVERT_BORDER_SPACING
, bTmp
);
821 case HANDLE_COLLAPSE_EMPTY_CELL_PARA
:
823 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
824 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA
, bTmp
);
827 case HANDLE_SMALL_CAPS_PERCENTAGE_66
:
829 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
830 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::SMALL_CAPS_PERCENTAGE_66
, bTmp
);
833 case HANDLE_TAB_OVERFLOW
:
835 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
836 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVERFLOW
, bTmp
);
839 case HANDLE_UNBREAKABLE_NUMBERINGS
:
841 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
842 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::UNBREAKABLE_NUMBERINGS
, bTmp
);
845 case HANDLE_STYLES_NODEFAULT
:
847 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
848 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::STYLES_NODEFAULT
, bTmp
);
851 case HANDLE_FLOATTABLE_NOMARGINS
:
853 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
854 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::FLOATTABLE_NOMARGINS
, bTmp
);
857 case HANDLE_CLIPPED_PICTURES
:
859 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
860 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::CLIPPED_PICTURES
, bTmp
);
863 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS
:
865 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
866 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS
, bTmp
);
869 case HANDLE_EMBED_FONTS
:
871 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
872 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_FONTS
, bTmp
);
875 case HANDLE_EMBED_USED_FONTS
:
877 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
878 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_USED_FONTS
, bTmp
);
881 case HANDLE_EMBED_LATIN_SCRIPT_FONTS
:
883 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
884 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_LATIN_SCRIPT_FONTS
, bTmp
);
887 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS
:
889 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
890 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_ASIAN_SCRIPT_FONTS
, bTmp
);
893 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS
:
895 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
896 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_COMPLEX_SCRIPT_FONTS
, bTmp
);
899 case HANDLE_EMBED_SYSTEM_FONTS
:
901 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
902 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_SYSTEM_FONTS
, bTmp
);
905 case HANDLE_TAB_OVER_MARGIN
:
907 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
908 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN
, bTmp
);
911 case HANDLE_TAB_OVER_SPACING
:
913 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
914 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_SPACING
, bTmp
);
917 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
:
919 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
920 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
, bTmp
);
923 case HANDLE_SURROUND_TEXT_WRAP_SMALL
:
925 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
926 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL
, bTmp
);
929 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
:
931 bool bTmp
= *o3tl::doAccess
<bool>(rValue
);
932 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
, bTmp
);
935 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE
:
940 mpDoc
->getIDocumentSettingAccess().set(
941 DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE
, bTmp
);
945 case HANDLE_SUBTRACT_FLYS
:
950 mpDoc
->getIDocumentSettingAccess().set(
951 DocumentSettingId::SUBTRACT_FLYS
, bTmp
);
955 case HANDLE_DISABLE_OFF_PAGE_POSITIONING
:
960 mpDoc
->getIDocumentSettingAccess().set(
961 DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING
, bTmp
);
965 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA
:
970 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA
,
975 case HANDLE_CONTINUOUS_ENDNOTES
:
980 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::CONTINUOUS_ENDNOTES
,
985 case HANDLE_PROTECT_BOOKMARKS
:
990 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_BOOKMARKS
,
995 case HANDLE_PROTECT_FIELDS
:
1000 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FIELDS
,
1005 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA
:
1008 if (rValue
>>= bTmp
)
1010 mpDoc
->getIDocumentSettingAccess().set(
1011 DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA
, bTmp
);
1015 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA
:
1018 if (rValue
>>= bTmp
)
1020 mpDoc
->getIDocumentSettingAccess().set(
1021 DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA
, bTmp
);
1025 case HANDLE_GUTTER_AT_TOP
:
1028 if (rValue
>>= bTmp
)
1030 mpDoc
->getIDocumentSettingAccess().set(DocumentSettingId::GUTTER_AT_TOP
, bTmp
);
1034 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND
:
1037 if (rValue
>>= bTmp
)
1039 mpDoc
->getIDocumentSettingAccess().set(
1040 DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND
, bTmp
);
1044 case HANDLE_IMAGE_PREFERRED_DPI
:
1046 sal_uInt32 nValue
= 0;
1047 if (rValue
>>= nValue
)
1049 mpDoc
->getIDocumentSettingAccess().setImagePreferredDPI(nValue
);
1053 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
:
1056 if (rValue
>>= bTmp
)
1058 mpDoc
->getIDocumentSettingAccess().set(
1059 DocumentSettingId::AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
, bTmp
);
1063 case HANDLE_HYPHENATE_URLS
:
1066 if (rValue
>>= bTmp
)
1068 mpDoc
->getIDocumentSettingAccess().set(
1069 DocumentSettingId::HYPHENATE_URLS
, bTmp
);
1073 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES
:
1076 if (rValue
>>= bTmp
)
1078 mpDoc
->getIDocumentSettingAccess().set(
1079 DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES
, bTmp
);
1083 case HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
:
1086 if (rValue
>>= bTmp
)
1088 mpDoc
->getIDocumentSettingAccess().set(
1089 DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
, bTmp
);
1093 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY
:
1096 if (rValue
>>= bTmp
)
1097 mpDoc
->getIDocumentSettingAccess().set(
1098 DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY
, bTmp
);
1101 case HANDLE_DROP_CAP_PUNCTUATION
:
1104 if (rValue
>>= bTmp
)
1105 mpDoc
->getIDocumentSettingAccess().set(
1106 DocumentSettingId::DROP_CAP_PUNCTUATION
, bTmp
);
1110 throw UnknownPropertyException(OUString::number(rInfo
.mnHandle
));
1114 void SwXDocumentSettings::_postSetValues ()
1116 // set printer only once, namely here!
1117 if( mpPrinter
!= nullptr )
1119 // #i86352# the printer is also used as container for options by sfx
1120 // when setting a printer it should have decent default options
1121 SfxItemSet
aOptions( mpPrinter
->GetOptions() );
1122 SwPrintData
aPrtData( mpDoc
->getIDocumentDeviceAccess().getPrintData() );
1123 SwAddPrinterItem
aAddPrinterItem (aPrtData
);
1124 aOptions
.Put(aAddPrinterItem
);
1125 mpPrinter
->SetOptions( aOptions
);
1126 mpPrinter
->SetPrinterSettingsPreferred( mbPreferPrinterPapersize
);
1128 mpDoc
->getIDocumentDeviceAccess().setPrinter( mpPrinter
, true, true );
1131 mpPrinter
= nullptr;
1136 void SwXDocumentSettings::_preGetValues ()
1138 mpDocSh
= mpModel
->GetDocShell();
1139 if (nullptr == mpDocSh
)
1140 throw UnknownPropertyException();
1141 mpDoc
= mpDocSh
->GetDoc();
1142 if (nullptr == mpDoc
)
1143 throw UnknownPropertyException();
1146 void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo
& rInfo
, uno::Any
& rValue
)
1148 switch( rInfo
.mnHandle
)
1150 case HANDLE_FORBIDDEN_CHARS
:
1152 rValue
<<= Reference
<XForbiddenCharacters
>(mpModel
->GetPropertyHelper());
1155 case HANDLE_LINK_UPDATE_MODE
:
1157 rValue
<<= static_cast < sal_Int16
> ( mpDoc
->getIDocumentSettingAccess().getLinkUpdateMode(true) );
1160 case HANDLE_FIELD_AUTO_UPDATE
:
1162 SwFieldUpdateFlags nFlags
= mpDoc
->getIDocumentSettingAccess().getFieldUpdateFlags(true);
1163 rValue
<<= nFlags
== AUTOUPD_FIELD_ONLY
|| nFlags
== AUTOUPD_FIELD_AND_CHARTS
;
1166 case HANDLE_CHART_AUTO_UPDATE
:
1168 SwFieldUpdateFlags nFlags
= mpDoc
->getIDocumentSettingAccess().getFieldUpdateFlags(true);
1169 rValue
<<= nFlags
== AUTOUPD_FIELD_AND_CHARTS
;
1172 case HANDLE_ADD_PARA_TABLE_SPACING
:
1174 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::PARA_SPACE_MAX
);
1177 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START
:
1179 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES
);
1182 case HANDLE_ALIGN_TAB_STOP_POSITION
:
1184 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT
);
1187 case HANDLE_PRINTER_NAME
:
1189 SfxPrinter
*pPrinter
= mpDoc
->getIDocumentDeviceAccess().getPrinter( false );
1190 rValue
<<= pPrinter
? pPrinter
->GetName() : OUString();
1193 case HANDLE_PRINTER_SETUP
:
1195 SfxPrinter
*pPrinter
= mpDoc
->getIDocumentDeviceAccess().getPrinter( false );
1198 SvMemoryStream aStream
;
1199 pPrinter
->Store( aStream
);
1200 sal_uInt32 nSize
= aStream
.TellEnd();
1201 aStream
.Seek ( STREAM_SEEK_TO_BEGIN
);
1202 Sequence
< sal_Int8
> aSequence( nSize
);
1203 aStream
.ReadBytes(aSequence
.getArray(), nSize
);
1204 rValue
<<= aSequence
;
1208 Sequence
< sal_Int8
> aSequence ( 0 );
1209 rValue
<<= aSequence
;
1213 case HANDLE_PRINTER_PAPER
:
1215 SfxPrinter
*pTempPrinter
= mpDoc
->getIDocumentDeviceAccess().getPrinter( false );
1216 rValue
<<= pTempPrinter
&& pTempPrinter
->GetPrinterSettingsPreferred();
1219 case HANDLE_IS_KERN_ASIAN_PUNCTUATION
:
1221 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::KERN_ASIAN_PUNCTUATION
);
1224 case HANDLE_APPLY_USER_DATA
:
1226 rValue
<<= mpDocSh
->IsUseUserData();
1229 case HANDLE_SAVE_THUMBNAIL
:
1231 rValue
<<= mpDocSh
->IsUseThumbnailSave();
1234 case HANDLE_CHARACTER_COMPRESSION_TYPE
:
1236 rValue
<<= static_cast < sal_Int16
> (mpDoc
->getIDocumentSettingAccess().getCharacterCompressionType());
1239 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS
:
1241 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS
);
1244 case HANDLE_CURRENT_DATABASE_DATA_SOURCE
:
1246 const SwDBData
& rData
= mpDoc
->GetDBData();
1247 rValue
<<= rData
.sDataSource
;
1250 case HANDLE_CURRENT_DATABASE_COMMAND
:
1252 const SwDBData
& rData
= mpDoc
->GetDBData();
1253 rValue
<<= rData
.sCommand
;
1256 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE
:
1258 const SwDBData
& rData
= mpDoc
->GetDBData();
1259 rValue
<<= rData
.nCommandType
;
1262 case HANDLE_EMBEDDED_DATABASE_NAME
:
1264 #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
1265 rValue
<<= mpDoc
->GetDBManager()->getEmbeddedName();
1267 rValue
= uno::Any();
1271 case HANDLE_SAVE_VERSION_ON_CLOSE
:
1273 rValue
<<= mpDocSh
->IsSaveVersionOnClose();
1276 case HANDLE_UPDATE_FROM_TEMPLATE
:
1278 rValue
<<= mpDocSh
->IsQueryLoadTemplate();
1281 case HANDLE_PRINTER_INDEPENDENT_LAYOUT
:
1283 // returns short (see css.document.PrinterIndependentLayout)
1284 sal_Int16 nVirDevType
= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE
) ?
1285 ( mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE
) ?
1286 document::PrinterIndependentLayout::HIGH_RESOLUTION
:
1287 document::PrinterIndependentLayout::LOW_RESOLUTION
) :
1288 document::PrinterIndependentLayout::DISABLED
;
1289 rValue
<<= nVirDevType
;
1292 case HANDLE_IS_LABEL_DOC
:
1294 bool bLabel
= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::LABEL_DOCUMENT
);
1298 case HANDLE_IS_ADD_FLY_OFFSET
:
1300 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::ADD_FLY_OFFSETS
);
1303 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET
:
1305 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS
);
1308 case HANDLE_IS_ADD_EXTERNAL_LEADING
:
1310 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::ADD_EXT_LEADING
);
1313 case HANDLE_OLD_NUMBERING
:
1315 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::OLD_NUMBERING
);
1318 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING
:
1323 case HANDLE_ALLOW_PRINTJOB_CANCEL
:
1325 rValue
<<= mpDocSh
->Stamp_GetPrintCancelState();
1328 case HANDLE_USE_FORMER_LINE_SPACING
:
1330 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::OLD_LINE_SPACING
);
1333 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS
:
1335 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS
);
1338 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
:
1340 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
);
1343 case HANDLE_USE_FORMER_OBJECT_POSITIONING
:
1345 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_OBJECT_POS
);
1348 case HANDLE_USE_FORMER_TEXT_WRAPPING
:
1350 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING
);
1353 case HANDLE_CHANGES_PASSWORD
:
1355 rValue
<<= mpDoc
->getIDocumentRedlineAccess().GetRedlinePassword();
1358 case HANDLE_CONSIDER_WRAP_ON_OBJPOS
:
1360 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION
);
1363 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
:
1365 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
);
1368 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
:
1370 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
);
1373 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
:
1375 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
);
1378 case HANDLE_TABLE_ROW_KEEP
:
1380 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::TABLE_ROW_KEEP
);
1383 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
:
1385 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
);
1388 case HANDLE_LOAD_READONLY
:
1390 rValue
<<= mpDocSh
->IsLoadReadonly();
1393 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
:
1395 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
);
1398 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES
:
1400 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
);
1403 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING
:
1405 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING
);
1408 case HANDLE_USE_OLD_PRINTER_METRICS
:
1413 case HANDLE_TABS_RELATIVE_TO_INDENT
:
1415 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::TABS_RELATIVE_TO_INDENT
);
1420 rValue
<<= static_cast < sal_Int32
> ( mpDoc
->getRsid() );
1423 case HANDLE_RSID_ROOT
:
1425 rValue
<<= static_cast < sal_Int32
> ( mpDoc
->getRsidRoot() );
1428 case HANDLE_PROTECT_FORM
:
1430 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM
);
1433 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS
:
1435 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS
);
1438 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
:
1440 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
);
1443 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
:
1445 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
);
1448 case HANDLE_MODIFYPASSWORDINFO
:
1450 rValue
<<= mpDocSh
->GetModifyPasswordInfo();
1453 case HANDLE_MATH_BASELINE_ALIGNMENT
:
1455 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT
);
1458 case HANDLE_INVERT_BORDER_SPACING
:
1460 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::INVERT_BORDER_SPACING
);
1463 case HANDLE_COLLAPSE_EMPTY_CELL_PARA
:
1465 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA
);
1468 case HANDLE_SMALL_CAPS_PERCENTAGE_66
:
1470 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66
);
1473 case HANDLE_TAB_OVERFLOW
:
1475 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::TAB_OVERFLOW
);
1478 case HANDLE_UNBREAKABLE_NUMBERINGS
:
1480 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::UNBREAKABLE_NUMBERINGS
);
1483 case HANDLE_STYLES_NODEFAULT
:
1485 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::STYLES_NODEFAULT
);
1488 case HANDLE_FLOATTABLE_NOMARGINS
:
1490 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::FLOATTABLE_NOMARGINS
);
1493 case HANDLE_CLIPPED_PICTURES
:
1495 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::CLIPPED_PICTURES
);
1498 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS
:
1500 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS
);
1503 case HANDLE_EMBED_FONTS
:
1505 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS
);
1508 case HANDLE_EMBED_USED_FONTS
:
1510 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_USED_FONTS
);
1513 case HANDLE_EMBED_LATIN_SCRIPT_FONTS
:
1515 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_LATIN_SCRIPT_FONTS
);
1518 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS
:
1520 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_ASIAN_SCRIPT_FONTS
);
1523 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS
:
1525 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_COMPLEX_SCRIPT_FONTS
);
1528 case HANDLE_EMBED_SYSTEM_FONTS
:
1530 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_SYSTEM_FONTS
);
1533 case HANDLE_TAB_OVER_MARGIN
:
1535 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::TAB_OVER_MARGIN
);
1538 case HANDLE_TAB_OVER_SPACING
:
1540 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::TAB_OVER_SPACING
);
1543 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
:
1545 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
);
1548 case HANDLE_SURROUND_TEXT_WRAP_SMALL
:
1550 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::SURROUND_TEXT_WRAP_SMALL
);
1553 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
:
1555 rValue
<<= mpDoc
->getIDocumentSettingAccess().get( DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
);
1558 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE
:
1560 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE
);
1563 case HANDLE_SUBTRACT_FLYS
:
1565 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS
);
1568 case HANDLE_DISABLE_OFF_PAGE_POSITIONING
:
1570 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING
);
1573 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA
:
1575 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1576 DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA
);
1579 case HANDLE_CONTINUOUS_ENDNOTES
:
1582 <<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::CONTINUOUS_ENDNOTES
);
1585 case HANDLE_PROTECT_BOOKMARKS
:
1587 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1588 DocumentSettingId::PROTECT_BOOKMARKS
);
1591 case HANDLE_PROTECT_FIELDS
:
1593 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1594 DocumentSettingId::PROTECT_FIELDS
);
1597 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA
:
1599 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1600 DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA
);
1603 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA
:
1605 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1606 DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA
);
1609 case HANDLE_GUTTER_AT_TOP
:
1611 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(DocumentSettingId::GUTTER_AT_TOP
);
1614 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND
:
1616 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1617 DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND
);
1620 case HANDLE_IMAGE_PREFERRED_DPI
:
1622 rValue
<<= mpDoc
->getIDocumentSettingAccess().getImagePreferredDPI();
1625 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
:
1627 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1628 DocumentSettingId::AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
);
1631 case HANDLE_HYPHENATE_URLS
:
1633 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1634 DocumentSettingId::HYPHENATE_URLS
);
1637 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES
:
1639 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1640 DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES
);
1643 case HANDLE_ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
:
1645 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1646 DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK
);
1649 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY
:
1651 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1652 DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY
);
1655 case HANDLE_DROP_CAP_PUNCTUATION
:
1657 rValue
<<= mpDoc
->getIDocumentSettingAccess().get(
1658 DocumentSettingId::DROP_CAP_PUNCTUATION
);
1662 throw UnknownPropertyException(OUString::number(rInfo
.mnHandle
));
1666 void SwXDocumentSettings::_postGetValues ()
1673 OUString SAL_CALL
SwXDocumentSettings::getImplementationName( )
1675 return "SwXDocumentSettings";
1678 sal_Bool SAL_CALL
SwXDocumentSettings::supportsService( const OUString
& ServiceName
)
1680 return cppu::supportsService(this, ServiceName
);
1683 Sequence
< OUString
> SAL_CALL
SwXDocumentSettings::getSupportedServiceNames( )
1685 return { "com.sun.star.document.Settings", "com.sun.star.text.DocumentSettings", "com.sun.star.text.PrintSettings" };
1688 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */