LibreOffice Module sw (master) 1
SwXDocumentSettings.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <config_features.h>
21#include <config_fuzzers.h>
22
23#include <sal/config.h>
24#include <sal/log.hxx>
25
26#include <utility>
27
28#include <o3tl/any.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>
36#include <doc.hxx>
40#include <docsh.hxx>
41#include <fldupde.hxx>
42#include <linkenum.hxx>
43#include <sfx2/printer.hxx>
44#include <editsh.hxx>
45#include <unotxdoc.hxx>
46#include <cmdid.h>
47#include <unomod.hxx>
48#include <vcl/svapp.hxx>
49#include <svl/asiancfg.hxx>
50#include <tools/stream.hxx>
51
52#include <cfgitems.hxx>
53#include <dbmgr.hxx>
54
55using namespace comphelper;
56using namespace ::com::sun::star;
57using namespace ::com::sun::star::uno;
58using namespace ::com::sun::star::beans;
59using namespace ::com::sun::star::lang;
60using namespace ::com::sun::star::i18n;
61
62namespace {
63
64enum SwDocumentSettingsPropertyHandles
65{
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,
73 HANDLE_PRINTER_NAME,
74 HANDLE_PRINTER_SETUP,
75 HANDLE_PRINTER_PAPER,
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,
88 HANDLE_IS_LABEL_DOC,
89 HANDLE_IS_ADD_FLY_OFFSET,
90 HANDLE_IS_ADD_VERTICAL_FLY_OFFSET,
91 HANDLE_IS_ADD_EXTERNAL_LEADING,
92 HANDLE_OLD_NUMBERING,
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,
113 HANDLE_PROTECT_FORM,
114 HANDLE_MS_WORD_COMP_TRAILING_BLANKS,
115 HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY,
116 HANDLE_TABS_RELATIVE_TO_INDENT,
117 HANDLE_RSID,
118 HANDLE_RSID_ROOT,
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,
125 HANDLE_TAB_OVERFLOW,
126 HANDLE_UNBREAKABLE_NUMBERINGS,
127 HANDLE_STYLES_NODEFAULT,
128 HANDLE_FLOATTABLE_NOMARGINS,
129 HANDLE_CLIPPED_PICTURES,
130 HANDLE_BACKGROUND_PARA_OVER_DRAWINGS,
131 HANDLE_EMBED_FONTS,
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_NO_NUMBERING_SHOW_FOLLOWBY,
158 HANDLE_DROP_CAP_PUNCTUATION,
159 HANDLE_USE_VARIABLE_WIDTH_NBSP,
160};
161
162}
163
165{
166 static PropertyInfo const aWriterSettingsInfoMap[] =
167 {
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},
189
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("NoNumberingShowFollowBy"), HANDLE_NO_NUMBERING_SHOW_FOLLOWBY, cppu::UnoType<bool>::get(), 0 },
261 { OUString("DropCapPunctuation"), HANDLE_DROP_CAP_PUNCTUATION, cppu::UnoType<bool>::get(), 0 },
262 { OUString("UseVariableWidthNBSP"), HANDLE_USE_VARIABLE_WIDTH_NBSP, cppu::UnoType<bool>::get(), 0 },
263
264/*
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},
274
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},
282
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},
287*/
288 { OUString(), 0, css::uno::Type(), 0}
289 };
290 return new MasterPropertySetInfo ( aWriterSettingsInfoMap );
291}
292
295 &Application::GetSolarMutex () )
296, mpModel ( pModel )
297, mpDocSh ( nullptr )
298, mpDoc ( nullptr )
299, mpPrinter( nullptr )
300, mbPreferPrinterPapersize( false )
301{
303}
304
306 noexcept
307{
308}
309
311{
312 return ::cppu::queryInterface(rType,
313 // OWeakObject interfaces
314 static_cast<XInterface*>(static_cast<OWeakObject*>(this)),
315 static_cast<XWeak*>(this),
316 // my own interfaces
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));
322}
324 noexcept
325{
326 OWeakObject::acquire();
327}
329 noexcept
330{
331 OWeakObject::release();
332}
333
334uno::Sequence< uno::Type > SAL_CALL SwXDocumentSettings::getTypes( )
335{
336 static const uno::Sequence< uno::Type > aTypes {
337 // from MasterPropertySet
343 };
344 return aTypes;
345}
346
347uno::Sequence< sal_Int8 > SAL_CALL SwXDocumentSettings::getImplementationId( )
348{
349 return css::uno::Sequence<sal_Int8>();
350}
351
353{
355 if (nullptr == mpDocSh)
356 throw UnknownPropertyException();
357
358 mpDoc = mpDocSh->GetDoc();
359 if (nullptr == mpDoc)
360 throw UnknownPropertyException();
361}
362
364{
365 if (rInfo.mnAttributes & PropertyAttribute::READONLY)
366 throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( nullptr ) );
367
368 switch( rInfo.mnHandle )
369 {
370 case HANDLE_FORBIDDEN_CHARS:
371 break;
372 case HANDLE_LINK_UPDATE_MODE:
373 {
374 sal_Int16 nMode = 0;
375 rValue >>= nMode;
376 switch (nMode)
377 {
378 case NEVER:
379 case MANUAL:
380 case AUTOMATIC:
381 case GLOBALSETTING:
382 break;
383 default:
384 throw IllegalArgumentException();
385 }
387 }
388 break;
389 case HANDLE_FIELD_AUTO_UPDATE:
390 {
391 bool bUpdateField = *o3tl::doAccess<bool>(rValue);
394 nFlag == AUTOUPD_FIELD_AND_CHARTS ?
397 AUTOUPD_OFF );
398 }
399 break;
400 case HANDLE_CHART_AUTO_UPDATE:
401 {
402 bool bUpdateChart = *o3tl::doAccess<bool>(rValue);
405 bUpdateChart ?
408 AUTOUPD_OFF );
409 }
410 break;
411 case HANDLE_ADD_PARA_TABLE_SPACING:
412 {
413 bool bParaSpace = false;
414 rValue >>= bParaSpace;
416 }
417 break;
418 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
419 {
420 bool bParaSpacePage = false;
421 rValue >>= bParaSpacePage;
423 }
424 break;
425 case HANDLE_ALIGN_TAB_STOP_POSITION:
426 {
427 bool bAlignTab = *o3tl::doAccess<bool>(rValue);
429 }
430 break;
431 case HANDLE_PRINTER_NAME:
432 {
433 //the printer must be created
434 OUString sPrinterName;
435 if( !(rValue >>= sPrinterName) )
436 throw IllegalArgumentException();
437
438 if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
439 {
441 if ( pPrinter->GetName() != sPrinterName )
442 {
443 VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
444 assert (! pNewPrinter->isDisposed() );
445 if( pNewPrinter->IsKnown() )
446 {
447 // set printer only once; in _postSetValues
448 mpPrinter = pNewPrinter;
449 }
450 else
451 {
452 pNewPrinter.disposeAndClear();
453 }
454 }
455 }
456
457 }
458 break;
459 case HANDLE_PRINTER_SETUP:
460 {
461 Sequence < sal_Int8 > aSequence;
462 if ( !(rValue >>= aSequence) )
463 throw IllegalArgumentException();
464
465 sal_uInt32 nSize = aSequence.getLength();
466 if( nSize > 0 )
467 {
468 SvMemoryStream aStream (aSequence.getArray(), nSize,
469 StreamMode::READ );
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,
476 VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
477 assert (! pPrinter->isDisposed() );
478 // set printer only once; in _postSetValues
480 mpPrinter = pPrinter;
481 }
482
483 }
484 break;
485 case HANDLE_PRINTER_PAPER:
486 {
487 bool bPreferPrinterPapersize = {}; // spurious -Werror=maybe-uninitialized
488 if(!(rValue >>= bPreferPrinterPapersize))
489 throw IllegalArgumentException();
490 mbPreferPrinterPapersize = bPreferPrinterPapersize;
491 }
492 break;
493 case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
494 {
495 bool bIsKern = *o3tl::doAccess<bool>(rValue);
497 if (SwEditShell* pEditSh = mpDoc->GetEditShell())
498 pEditSh->ChgHyphenation();
499 }
500 break;
501 case HANDLE_CHARACTER_COMPRESSION_TYPE:
502 {
503 sal_Int16 nMode = 0;
504 rValue >>= nMode;
505 switch (static_cast<CharCompressType>(nMode))
506 {
507 case CharCompressType::NONE:
508 case CharCompressType::PunctuationOnly:
509 case CharCompressType::PunctuationAndKana:
510 break;
511 default:
512 throw IllegalArgumentException();
513 }
515 }
516 break;
517 case HANDLE_APPLY_USER_DATA:
518 {
519 mpDocSh->SetUseUserData(*o3tl::doAccess<bool>(rValue));
520 }
521 break;
522 case HANDLE_SAVE_THUMBNAIL:
523 {
524 mpDocSh->SetUseThumbnailSave(*o3tl::doAccess<bool>(rValue));
525 }
526 break;
527 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
528 {
529 bool bSaveGlobal = *o3tl::doAccess<bool>(rValue);
531 }
532 break;
533 case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
534 {
536 if ( rValue >>= aData.sDataSource )
538 }
539 break;
540 case HANDLE_CURRENT_DATABASE_COMMAND:
541 {
543
544 if ( rValue >>= aData.sCommand )
546
547 SAL_WARN_IF( aData.sDataSource.isEmpty() && !aData.sCommand.isEmpty(), "sw.uno",
548 "\"CurrentDatabaseCommand\" property possibly set before \"CurrentDatabaseDataSource\"" );
549 }
550 break;
551 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
552 {
554 if ( rValue >>= aData.nCommandType )
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\"" );
560 }
561 break;
562 case HANDLE_EMBEDDED_DATABASE_NAME:
563 {
564#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
565 OUString sEmbeddedName;
566 if (rValue >>= sEmbeddedName)
567 mpDoc->GetDBManager()->setEmbeddedName(sEmbeddedName, *mpDocSh);
568#endif
569 }
570 break;
571 case HANDLE_SAVE_VERSION_ON_CLOSE:
572 {
573 mpDocSh->SetSaveVersionOnClose( *o3tl::doAccess<bool>(rValue) );
574 }
575 break;
576 case HANDLE_UPDATE_FROM_TEMPLATE:
577 {
578 mpDocSh->SetQueryLoadTemplate( *o3tl::doAccess<bool>(rValue) );
579 }
580 break;
581 case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
582 {
583 sal_Int16 nTmp = 0;
584 rValue >>= nTmp;
585
586 bool bUseVirDev = true;
587 bool bHiResVirDev = true;
588 if( nTmp == document::PrinterIndependentLayout::DISABLED )
589 bUseVirDev = false;
590 else if ( nTmp == document::PrinterIndependentLayout::LOW_RESOLUTION )
591 bHiResVirDev = false;
592 else if ( nTmp != document::PrinterIndependentLayout::HIGH_RESOLUTION )
593 throw IllegalArgumentException();
594
595 mpDoc->getIDocumentDeviceAccess().setReferenceDeviceType( bUseVirDev, bHiResVirDev );
596 }
597 break;
598 case HANDLE_IS_LABEL_DOC :
599 {
600 bool bSet = false;
601 if(!(rValue >>= bSet))
602 throw IllegalArgumentException();
604 }
605 break;
606 case HANDLE_IS_ADD_FLY_OFFSET:
607 {
608 bool bTmp = *o3tl::doAccess<bool>(rValue);
610 }
611 break;
612 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET:
613 {
614 bool bTmp = *o3tl::doAccess<bool>(rValue);
616 }
617 break;
618 case HANDLE_IS_ADD_EXTERNAL_LEADING:
619 {
620 bool bTmp = *o3tl::doAccess<bool>(rValue);
622 }
623 break;
624 case HANDLE_OLD_NUMBERING:
625 {
626 bool bTmp = *o3tl::doAccess<bool>(rValue);
628 }
629 break;
630 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
631 {
632 // ignore - this is a dead property
633 }
634 break;
635 case HANDLE_ALLOW_PRINTJOB_CANCEL:
636 {
637 bool bState = false;
638 if (!(rValue >>= bState))
639 throw IllegalArgumentException();
641 }
642 break;
643 case HANDLE_USE_FORMER_LINE_SPACING:
644 {
645 bool bTmp = *o3tl::doAccess<bool>(rValue);
647 }
648 break;
649 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
650 {
651 bool bTmp = *o3tl::doAccess<bool>(rValue);
653 }
654 break;
655 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS:
656 {
657 bool bTmp = *o3tl::doAccess<bool>(rValue);
659 }
660 break;
661 case HANDLE_USE_FORMER_OBJECT_POSITIONING:
662 {
663 bool bTmp = *o3tl::doAccess<bool>(rValue);
665 }
666 break;
667 case HANDLE_USE_FORMER_TEXT_WRAPPING:
668 {
669 bool bTmp = *o3tl::doAccess<bool>(rValue);
671 }
672 break;
673 case HANDLE_CHANGES_PASSWORD:
674 {
675 Sequence <sal_Int8> aNew;
676 if(rValue >>= aNew)
677 {
679 if(aNew.hasElements())
680 {
684 }
685 }
686 }
687 break;
688 case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
689 {
690 bool bTmp = *o3tl::doAccess<bool>(rValue);
692 }
693 break;
694 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
695 {
696 bool bTmp = *o3tl::doAccess<bool>(rValue);
698 }
699 break;
700 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
701 {
702 bool bTmp = *o3tl::doAccess<bool>(rValue);
704 }
705 break;
706 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
707 {
708 bool bTmp = *o3tl::doAccess<bool>(rValue);
710 }
711 break;
712 case HANDLE_TABLE_ROW_KEEP:
713 {
714 bool bTmp = *o3tl::doAccess<bool>(rValue);
716 }
717 break;
718 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
719 {
720 bool bTmp = *o3tl::doAccess<bool>(rValue);
722 }
723 break;
724 case HANDLE_LOAD_READONLY:
725 {
726 mpDocSh->SetLoadReadonly( *o3tl::doAccess<bool>(rValue) );
727 }
728 break;
729 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
730 {
731 bool bTmp = *o3tl::doAccess<bool>(rValue);
733 }
734 break;
735 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
736 {
737 bool bTmp = *o3tl::doAccess<bool>(rValue);
739 }
740 break;
741 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
742 {
743 bool bTmp = *o3tl::doAccess<bool>(rValue);
745 }
746 break;
747 case HANDLE_USE_OLD_PRINTER_METRICS:
748 // ignore - this is a dead property
749 break;
750 case HANDLE_TABS_RELATIVE_TO_INDENT:
751 {
752 bool bTmp = *o3tl::doAccess<bool>(rValue);
754 }
755 break;
756 case HANDLE_RSID:
757 {
758 sal_uInt32 nTmp = 0;
759 rValue >>= nTmp;
760 mpDoc->setRsid( nTmp );
761 }
762 break;
763 case HANDLE_RSID_ROOT:
764 {
765 sal_uInt32 nTmp = 0;
766 rValue >>= nTmp;
767 mpDoc->setRsidRoot( nTmp );
768 }
769 break;
770 case HANDLE_PROTECT_FORM:
771 {
772 bool bTmp = *o3tl::doAccess<bool>(rValue);
774 }
775 break;
776 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
777 {
778 bool bTmp = *o3tl::doAccess<bool>(rValue);
780 }
781 break;
782 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY:
783 {
784 bool bTmp = *o3tl::doAccess<bool>(rValue);
786 }
787 break;
788 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
789 {
790 bool bTmp = *o3tl::doAccess<bool>(rValue);
792 }
793 break;
794 case HANDLE_MODIFYPASSWORDINFO:
795 {
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 >(),
801 2 );
802
803 if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) )
804 throw beans::PropertyVetoException(
805 "The hash is not allowed to be changed now!",
806 uno::Reference< uno::XInterface >() );
807 }
808 break;
809 case HANDLE_MATH_BASELINE_ALIGNMENT:
810 {
811 bool bTmp = *o3tl::doAccess<bool>(rValue);
813 }
814 break;
815 case HANDLE_INVERT_BORDER_SPACING:
816 {
817 bool bTmp = *o3tl::doAccess<bool>(rValue);
819 }
820 break;
821 case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
822 {
823 bool bTmp = *o3tl::doAccess<bool>(rValue);
825 }
826 break;
827 case HANDLE_SMALL_CAPS_PERCENTAGE_66:
828 {
829 bool bTmp = *o3tl::doAccess<bool>(rValue);
831 }
832 break;
833 case HANDLE_TAB_OVERFLOW:
834 {
835 bool bTmp = *o3tl::doAccess<bool>(rValue);
837 }
838 break;
839 case HANDLE_UNBREAKABLE_NUMBERINGS:
840 {
841 bool bTmp = *o3tl::doAccess<bool>(rValue);
843 }
844 break;
845 case HANDLE_STYLES_NODEFAULT:
846 {
847 bool bTmp = *o3tl::doAccess<bool>(rValue);
849 }
850 break;
851 case HANDLE_FLOATTABLE_NOMARGINS:
852 {
853 bool bTmp = *o3tl::doAccess<bool>(rValue);
855 }
856 break;
857 case HANDLE_CLIPPED_PICTURES:
858 {
859 bool bTmp = *o3tl::doAccess<bool>(rValue);
861 }
862 break;
863 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
864 {
865 bool bTmp = *o3tl::doAccess<bool>(rValue);
867 }
868 break;
869 case HANDLE_EMBED_FONTS:
870 {
871 bool bTmp = *o3tl::doAccess<bool>(rValue);
873 }
874 break;
875 case HANDLE_EMBED_USED_FONTS:
876 {
877 bool bTmp = *o3tl::doAccess<bool>(rValue);
879 }
880 break;
881 case HANDLE_EMBED_LATIN_SCRIPT_FONTS:
882 {
883 bool bTmp = *o3tl::doAccess<bool>(rValue);
885 }
886 break;
887 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS:
888 {
889 bool bTmp = *o3tl::doAccess<bool>(rValue);
891 }
892 break;
893 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS:
894 {
895 bool bTmp = *o3tl::doAccess<bool>(rValue);
897 }
898 break;
899 case HANDLE_EMBED_SYSTEM_FONTS:
900 {
901 bool bTmp = *o3tl::doAccess<bool>(rValue);
903 }
904 break;
905 case HANDLE_TAB_OVER_MARGIN:
906 {
907 bool bTmp = *o3tl::doAccess<bool>(rValue);
909 }
910 break;
911 case HANDLE_TAB_OVER_SPACING:
912 {
913 bool bTmp = *o3tl::doAccess<bool>(rValue);
915 }
916 break;
917 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK:
918 {
919 bool bTmp = *o3tl::doAccess<bool>(rValue);
921 }
922 break;
923 case HANDLE_SURROUND_TEXT_WRAP_SMALL:
924 {
925 bool bTmp = *o3tl::doAccess<bool>(rValue);
927 }
928 break;
929 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
930 {
931 bool bTmp = *o3tl::doAccess<bool>(rValue);
933 }
934 break;
935 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
936 {
937 bool bTmp;
938 if (rValue >>= bTmp)
939 {
942 }
943 }
944 break;
945 case HANDLE_SUBTRACT_FLYS:
946 {
947 bool bTmp;
948 if (rValue >>= bTmp)
949 {
952 }
953 }
954 break;
955 case HANDLE_DISABLE_OFF_PAGE_POSITIONING:
956 {
957 bool bTmp;
958 if (rValue >>= bTmp)
959 {
962 }
963 }
964 break;
965 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA:
966 {
967 bool bTmp;
968 if (rValue >>= bTmp)
969 {
971 bTmp);
972 }
973 }
974 break;
975 case HANDLE_CONTINUOUS_ENDNOTES:
976 {
977 bool bTmp;
978 if (rValue >>= bTmp)
979 {
981 bTmp);
982 }
983 }
984 break;
985 case HANDLE_PROTECT_BOOKMARKS:
986 {
987 bool bTmp;
988 if (rValue >>= bTmp)
989 {
991 bTmp);
992 }
993 }
994 break;
995 case HANDLE_PROTECT_FIELDS:
996 {
997 bool bTmp;
998 if (rValue >>= bTmp)
999 {
1001 bTmp);
1002 }
1003 }
1004 break;
1005 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA:
1006 {
1007 bool bTmp;
1008 if (rValue >>= bTmp)
1009 {
1012 }
1013 }
1014 break;
1015 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA:
1016 {
1017 bool bTmp;
1018 if (rValue >>= bTmp)
1019 {
1022 }
1023 }
1024 break;
1025 case HANDLE_GUTTER_AT_TOP:
1026 {
1027 bool bTmp;
1028 if (rValue >>= bTmp)
1029 {
1031 }
1032 }
1033 break;
1034 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND:
1035 {
1036 bool bTmp;
1037 if (rValue >>= bTmp)
1038 {
1041 }
1042 }
1043 break;
1044 case HANDLE_IMAGE_PREFERRED_DPI:
1045 {
1046 sal_uInt32 nValue = 0;
1047 if (rValue >>= nValue)
1048 {
1050 }
1051 }
1052 break;
1053 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE:
1054 {
1055 bool bTmp;
1056 if (rValue >>= bTmp)
1057 {
1060 }
1061 }
1062 break;
1063 case HANDLE_HYPHENATE_URLS:
1064 {
1065 bool bTmp;
1066 if (rValue >>= bTmp)
1067 {
1070 }
1071 }
1072 break;
1073 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES:
1074 {
1075 bool bTmp;
1076 if (rValue >>= bTmp)
1077 {
1080 }
1081 }
1082 break;
1083 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY:
1084 {
1085 bool bTmp;
1086 if (rValue >>= bTmp)
1089 }
1090 break;
1091 case HANDLE_DROP_CAP_PUNCTUATION:
1092 {
1093 bool bTmp;
1094 if (rValue >>= bTmp)
1097 }
1098 break;
1099 case HANDLE_USE_VARIABLE_WIDTH_NBSP:
1100 {
1101 bool bTmp;
1102 if (rValue >>= bTmp)
1105 }
1106 break;
1107 default:
1108 throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
1109 }
1110}
1111
1113{
1114 // set printer only once, namely here!
1115 if( mpPrinter != nullptr )
1116 {
1117 // #i86352# the printer is also used as container for options by sfx
1118 // when setting a printer it should have decent default options
1119 SfxItemSet aOptions( mpPrinter->GetOptions() );
1121 SwAddPrinterItem aAddPrinterItem (aPrtData);
1122 aOptions.Put(aAddPrinterItem);
1123 mpPrinter->SetOptions( aOptions );
1124 mpPrinter->SetPrinterSettingsPreferred( mbPreferPrinterPapersize );
1125
1127 }
1128
1129 mpPrinter = nullptr;
1130 mpDocSh = nullptr;
1131 mpDoc = nullptr;
1132}
1133
1135{
1137 if (nullptr == mpDocSh)
1138 throw UnknownPropertyException();
1139 mpDoc = mpDocSh->GetDoc();
1140 if (nullptr == mpDoc)
1141 throw UnknownPropertyException();
1142}
1143
1145{
1146 switch( rInfo.mnHandle )
1147 {
1148 case HANDLE_FORBIDDEN_CHARS:
1149 {
1150 rValue <<= Reference<XForbiddenCharacters>(mpModel->GetPropertyHelper());
1151 }
1152 break;
1153 case HANDLE_LINK_UPDATE_MODE:
1154 {
1155 rValue <<= static_cast < sal_Int16 > ( mpDoc->getIDocumentSettingAccess().getLinkUpdateMode(true) );
1156 }
1157 break;
1158 case HANDLE_FIELD_AUTO_UPDATE:
1159 {
1161 rValue <<= nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS;
1162 }
1163 break;
1164 case HANDLE_CHART_AUTO_UPDATE:
1165 {
1167 rValue <<= nFlags == AUTOUPD_FIELD_AND_CHARTS;
1168 }
1169 break;
1170 case HANDLE_ADD_PARA_TABLE_SPACING:
1171 {
1173 }
1174 break;
1175 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
1176 {
1178 }
1179 break;
1180 case HANDLE_ALIGN_TAB_STOP_POSITION:
1181 {
1183 }
1184 break;
1185 case HANDLE_PRINTER_NAME:
1186 {
1187 SfxPrinter *pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
1188 rValue <<= pPrinter ? pPrinter->GetName() : OUString();
1189 }
1190 break;
1191 case HANDLE_PRINTER_SETUP:
1192 {
1193 SfxPrinter *pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
1194 if (pPrinter)
1195 {
1196 SvMemoryStream aStream;
1197 pPrinter->Store( aStream );
1198 sal_uInt32 nSize = aStream.TellEnd();
1199 aStream.Seek ( STREAM_SEEK_TO_BEGIN );
1200 Sequence < sal_Int8 > aSequence( nSize );
1201 aStream.ReadBytes(aSequence.getArray(), nSize);
1202 rValue <<= aSequence;
1203 }
1204 else
1205 {
1206 Sequence < sal_Int8 > aSequence ( 0 );
1207 rValue <<= aSequence;
1208 }
1209 }
1210 break;
1211 case HANDLE_PRINTER_PAPER:
1212 {
1213 SfxPrinter *pTempPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
1214 rValue <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
1215 }
1216 break;
1217 case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
1218 {
1220 }
1221 break;
1222 case HANDLE_APPLY_USER_DATA:
1223 {
1224 rValue <<= mpDocSh->IsUseUserData();
1225 }
1226 break;
1227 case HANDLE_SAVE_THUMBNAIL:
1228 {
1229 rValue <<= mpDocSh->IsUseThumbnailSave();
1230 }
1231 break;
1232 case HANDLE_CHARACTER_COMPRESSION_TYPE:
1233 {
1234 rValue <<= static_cast < sal_Int16 > (mpDoc->getIDocumentSettingAccess().getCharacterCompressionType());
1235 }
1236 break;
1237 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
1238 {
1240 }
1241 break;
1242 case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
1243 {
1244 const SwDBData& rData = mpDoc->GetDBData();
1245 rValue <<= rData.sDataSource;
1246 }
1247 break;
1248 case HANDLE_CURRENT_DATABASE_COMMAND:
1249 {
1250 const SwDBData& rData = mpDoc->GetDBData();
1251 rValue <<= rData.sCommand;
1252 }
1253 break;
1254 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
1255 {
1256 const SwDBData& rData = mpDoc->GetDBData();
1257 rValue <<= rData.nCommandType;
1258 }
1259 break;
1260 case HANDLE_EMBEDDED_DATABASE_NAME:
1261 {
1262#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
1263 rValue <<= mpDoc->GetDBManager()->getEmbeddedName();
1264#else
1265 rValue = uno::Any();
1266#endif
1267 }
1268 break;
1269 case HANDLE_SAVE_VERSION_ON_CLOSE:
1270 {
1271 rValue <<= mpDocSh->IsSaveVersionOnClose();
1272 }
1273 break;
1274 case HANDLE_UPDATE_FROM_TEMPLATE:
1275 {
1276 rValue <<= mpDocSh->IsQueryLoadTemplate();
1277 }
1278 break;
1279 case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
1280 {
1281 // returns short (see css.document.PrinterIndependentLayout)
1284 document::PrinterIndependentLayout::HIGH_RESOLUTION :
1285 document::PrinterIndependentLayout::LOW_RESOLUTION ) :
1286 document::PrinterIndependentLayout::DISABLED;
1287 rValue <<= nVirDevType;
1288 }
1289 break;
1290 case HANDLE_IS_LABEL_DOC:
1291 {
1293 rValue <<= bLabel;
1294 }
1295 break;
1296 case HANDLE_IS_ADD_FLY_OFFSET:
1297 {
1299 }
1300 break;
1301 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET:
1302 {
1304 }
1305 break;
1306 case HANDLE_IS_ADD_EXTERNAL_LEADING:
1307 {
1309 }
1310 break;
1311 case HANDLE_OLD_NUMBERING:
1312 {
1314 }
1315 break;
1316 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
1317 {
1318 rValue <<= false;
1319 }
1320 break;
1321 case HANDLE_ALLOW_PRINTJOB_CANCEL:
1322 {
1323 rValue <<= mpDocSh->Stamp_GetPrintCancelState();
1324 }
1325 break;
1326 case HANDLE_USE_FORMER_LINE_SPACING:
1327 {
1329 }
1330 break;
1331 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
1332 {
1334 }
1335 break;
1336 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS:
1337 {
1339 }
1340 break;
1341 case HANDLE_USE_FORMER_OBJECT_POSITIONING:
1342 {
1344 }
1345 break;
1346 case HANDLE_USE_FORMER_TEXT_WRAPPING:
1347 {
1349 }
1350 break;
1351 case HANDLE_CHANGES_PASSWORD:
1352 {
1354 }
1355 break;
1356 case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
1357 {
1359 }
1360 break;
1361 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
1362 {
1364 }
1365 break;
1366 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
1367 {
1369 }
1370 break;
1371 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
1372 {
1374 }
1375 break;
1376 case HANDLE_TABLE_ROW_KEEP :
1377 {
1379 }
1380 break;
1381 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
1382 {
1384 }
1385 break;
1386 case HANDLE_LOAD_READONLY:
1387 {
1388 rValue <<= mpDocSh->IsLoadReadonly();
1389 }
1390 break;
1391 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
1392 {
1394 }
1395 break;
1396 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
1397 {
1399 }
1400 break;
1401 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
1402 {
1404 }
1405 break;
1406 case HANDLE_USE_OLD_PRINTER_METRICS:
1407 {
1408 rValue <<= false;
1409 }
1410 break;
1411 case HANDLE_TABS_RELATIVE_TO_INDENT:
1412 {
1414 }
1415 break;
1416 case HANDLE_RSID:
1417 {
1418 rValue <<= static_cast < sal_Int32 > ( mpDoc->getRsid() );
1419 }
1420 break;
1421 case HANDLE_RSID_ROOT:
1422 {
1423 rValue <<= static_cast < sal_Int32 > ( mpDoc->getRsidRoot() );
1424 }
1425 break;
1426 case HANDLE_PROTECT_FORM:
1427 {
1429 }
1430 break;
1431 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
1432 {
1434 }
1435 break;
1436 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY:
1437 {
1439 }
1440 break;
1441 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
1442 {
1444 }
1445 break;
1446 case HANDLE_MODIFYPASSWORDINFO:
1447 {
1448 rValue <<= mpDocSh->GetModifyPasswordInfo();
1449 }
1450 break;
1451 case HANDLE_MATH_BASELINE_ALIGNMENT:
1452 {
1454 }
1455 break;
1456 case HANDLE_INVERT_BORDER_SPACING:
1457 {
1459 }
1460 break;
1461 case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
1462 {
1464 }
1465 break;
1466 case HANDLE_SMALL_CAPS_PERCENTAGE_66:
1467 {
1469 }
1470 break;
1471 case HANDLE_TAB_OVERFLOW:
1472 {
1474 }
1475 break;
1476 case HANDLE_UNBREAKABLE_NUMBERINGS:
1477 {
1479 }
1480 break;
1481 case HANDLE_STYLES_NODEFAULT:
1482 {
1484 }
1485 break;
1486 case HANDLE_FLOATTABLE_NOMARGINS:
1487 {
1489 }
1490 break;
1491 case HANDLE_CLIPPED_PICTURES:
1492 {
1494 }
1495 break;
1496 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
1497 {
1499 }
1500 break;
1501 case HANDLE_EMBED_FONTS:
1502 {
1504 }
1505 break;
1506 case HANDLE_EMBED_USED_FONTS:
1507 {
1509 }
1510 break;
1511 case HANDLE_EMBED_LATIN_SCRIPT_FONTS:
1512 {
1514 }
1515 break;
1516 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS:
1517 {
1519 }
1520 break;
1521 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS:
1522 {
1524 }
1525 break;
1526 case HANDLE_EMBED_SYSTEM_FONTS:
1527 {
1529 }
1530 break;
1531 case HANDLE_TAB_OVER_MARGIN:
1532 {
1534 }
1535 break;
1536 case HANDLE_TAB_OVER_SPACING:
1537 {
1539 }
1540 break;
1541 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK:
1542 {
1544 }
1545 break;
1546 case HANDLE_SURROUND_TEXT_WRAP_SMALL:
1547 {
1549 }
1550 break;
1551 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
1552 {
1554 }
1555 break;
1556 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
1557 {
1559 }
1560 break;
1561 case HANDLE_SUBTRACT_FLYS:
1562 {
1564 }
1565 break;
1566 case HANDLE_DISABLE_OFF_PAGE_POSITIONING:
1567 {
1569 }
1570 break;
1571 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA:
1572 {
1573 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1575 }
1576 break;
1577 case HANDLE_CONTINUOUS_ENDNOTES:
1578 {
1579 rValue
1581 }
1582 break;
1583 case HANDLE_PROTECT_BOOKMARKS:
1584 {
1585 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1587 }
1588 break;
1589 case HANDLE_PROTECT_FIELDS:
1590 {
1591 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1593 }
1594 break;
1595 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA:
1596 {
1597 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1599 }
1600 break;
1601 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA:
1602 {
1603 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1605 }
1606 break;
1607 case HANDLE_GUTTER_AT_TOP:
1608 {
1610 }
1611 break;
1612 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND:
1613 {
1614 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1616 }
1617 break;
1618 case HANDLE_IMAGE_PREFERRED_DPI:
1619 {
1621 }
1622 break;
1623 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE:
1624 {
1625 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1627 }
1628 break;
1629 case HANDLE_HYPHENATE_URLS:
1630 {
1631 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1633 }
1634 break;
1635 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES:
1636 {
1637 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1639 }
1640 break;
1641 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY:
1642 {
1643 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1645 }
1646 break;
1647 case HANDLE_DROP_CAP_PUNCTUATION:
1648 {
1649 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1651 }
1652 break;
1653 case HANDLE_USE_VARIABLE_WIDTH_NBSP:
1654 {
1655 rValue <<= mpDoc->getIDocumentSettingAccess().get(
1657 }
1658 break;
1659 default:
1660 throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
1661 }
1662}
1663
1665{
1666 mpDocSh = nullptr;
1667 mpDoc = nullptr;
1668}
1669
1670// XServiceInfo
1672{
1673 return "SwXDocumentSettings";
1674}
1675
1676sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName )
1677{
1678 return cppu::supportsService(this, ServiceName);
1679}
1680
1682{
1683 return { "com.sun.star.document.Settings", "com.sun.star.text.DocumentSettings", "com.sun.star.text.PrintSettings" };
1684}
1685
1686/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ On
RedlineFlags on.
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
@ TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
@ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
@ HYPHENATE_URLS
tdf#152952
@ IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
@ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
@ AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
@ TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
@ MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
@ IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
@ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
@ PROP_LINE_SPACING_SHRINKS_FIRST_LINE
@ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
@ ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
static rtl::Reference< MasterPropertySetInfo > lcl_createSettingsInfo()
CharCompressType
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual void setReferenceDeviceType(bool bNewVirtual, bool bNewHiRes)=0
Sets the type of the reference device used for formatting the document.
virtual void setPrinter(SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged)=0
Set the printer at the document.
virtual const SwPrintData & getPrintData() const =0
Returns the PrintData.
virtual void SetRedlinePassword(const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
virtual void SetRedlineFlags(RedlineFlags eMode)=0
Set a new redline mode.
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword() const =0
virtual sal_uInt16 getLinkUpdateMode(bool bGlobalSettings) const =0
Get the current link update mode.
virtual void setFieldUpdateFlags(SwFieldUpdateFlags nMode)=0
Set the current field update mode.
virtual void setImagePreferredDPI(sal_Int32 nValue)=0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void setLinkUpdateMode(sal_uInt16 nMode)=0
Set the current link update mode.
virtual void setCharacterCompressionType(CharCompressType nType)=0
Set the character compression type for Asian characters.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
virtual SwFieldUpdateFlags getFieldUpdateFlags(bool bGlobalSettings) const =0
Get the current field update mode.
virtual CharCompressType getCharacterCompressionType() const =0
Get the character compression type for Asian characters.
virtual sal_Int32 getImagePreferredDPI()=0
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool SetModifyPasswordInfo(const css::uno::Sequence< css::beans::PropertyValue > &aInfo)
bool IsLoadReadonly() const
bool IsUseUserData() const
void SetQueryLoadTemplate(bool b)
void SetSaveVersionOnClose(bool bSet)
void SetUseThumbnailSave(bool _bNew)
void SetUseUserData(bool bNew)
bool IsUseThumbnailSave() const
bool IsSaveVersionOnClose() const
void SetLoadReadonly(bool _bReadonly)
SfxObjectCreateMode GetCreateMode() const
bool Stamp_GetPrintCancelState() const
const css::uno::Sequence< css::beans::PropertyValue > & GetModifyPasswordInfo() const
bool IsQueryLoadTemplate() const
void Stamp_SetPrintCancelState(bool bState)
void Store(SvStream &rStream) const
static VclPtr< SfxPrinter > Create(SvStream &rStream, std::unique_ptr< SfxItemSet > &&pOptions)
const SfxItemSet & GetOptions() const
virtual sal_uInt64 TellEnd() override
sal_uInt64 Seek(sal_uInt64 nPos)
std::size_t ReadBytes(void *pData, std::size_t nSize)
const OUString & getEmbeddedName() const
Definition: dbmgr.cxx:3171
void setEmbeddedName(const OUString &rEmbeddedName, SwDocShell &rDocShell)
Definition: dbmgr.cxx:3150
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
SwDBData const & GetDBData()
Definition: docfld.cxx:386
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
Definition: doc.cxx:252
SwDBManager * GetDBManager() const
Definition: doc.hxx:685
sal_uInt32 getRsid() const
Definition: doc.cxx:210
sal_uInt32 getRsidRoot() const
Definition: doc.cxx:230
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
void setRsidRoot(sal_uInt32 nVal)
Definition: doc.cxx:235
SwEditShell const * GetEditShell() const
Definition: doccorr.cxx:330
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:190
void setRsid(sal_uInt32 nVal)
Definition: doc.cxx:215
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1337
void ChgDBData(const SwDBData &rNewData)
Definition: doc.cxx:467
virtual void _preGetValues() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual ~SwXDocumentSettings() noexcept override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void _setSingleValue(const comphelper::PropertyInfo &rInfo, const css::uno::Any &rValue) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void SAL_CALL acquire() noexcept override
SwXTextDocument * mpModel
virtual void _postGetValues() override
virtual void _postSetValues() override
virtual void _getSingleValue(const comphelper::PropertyInfo &rInfo, css::uno::Any &rValue) override
VclPtr< SfxPrinter > mpPrinter
the printer should be set only once; since there are several printer-related properties,...
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
SwXDocumentSettings(SwXTextDocument *pModel)
virtual void _preSetValues() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL release() noexcept override
SwXDocumentPropertyHelper * GetPropertyHelper()
Definition: unotxdoc.cxx:408
SwDocShell * GetDocShell()
Definition: unotxdoc.hxx:484
void disposeAndClear()
void registerSlave(ChainablePropertySet *pNewSet) noexcept
css::uno::Type const & get()
#define FN_PARAM_ADDPRINTER
Definition: cmdid.h:803
SwFieldUpdateFlags
Definition: fldupde.hxx:23
@ AUTOUPD_FIELD_ONLY
Definition: fldupde.hxx:25
@ AUTOUPD_OFF
Definition: fldupde.hxx:24
@ AUTOUPD_FIELD_AND_CHARTS
Definition: fldupde.hxx:26
sal_Int16 nValue
Mode eMode
@ NEVER
Definition: linkenum.hxx:24
@ MANUAL
Definition: linkenum.hxx:25
@ GLOBALSETTING
Definition: linkenum.hxx:27
#define SAL_WARN_IF(condition, area, stream)
constexpr OUStringLiteral aData
Definition: ww8scan.hxx:48
class SAL_NO_VTABLE XPropertySet
Type
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
AUTOMATIC
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define STREAM_SEEK_TO_BEGIN
sal_Int32 nCommandType
Definition: swdbdata.hxx:32
OUString sDataSource
Definition: swdbdata.hxx:30
OUString sCommand
Definition: swdbdata.hxx:31
unsigned char sal_Bool
const SvXMLTokenMapEntry aTypes[]