20#include <config_features.h>
21#include <config_fuzzers.h>
33#include <com/sun/star/beans/PropertyAttribute.hpp>
34#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
35#include <com/sun/star/document/PrinterIndependentLayout.hpp>
64enum 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,
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_NO_NUMBERING_SHOW_FOLLOWBY,
158 HANDLE_DROP_CAP_PUNCTUATION,
159 HANDLE_USE_VARIABLE_WIDTH_NBSP,
201 { OUString(
"AddParaLineSpacingToTableCells"), HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS,
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},
210 { OUString(
"IgnoreTabsAndBlanksForLineCalculation"), HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
cppu::UnoType<bool>::get(), 0},
213 { OUString(
"ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES,
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},
242 { OUString(
"TreatSingleColumnBreakAsPageBreak"), HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK,
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},
257 { OUString(
"AutoFirstLineIndentDisregardLineSpace"), HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE,
cppu::UnoType<bool>::get(), 0 },
288 { OUString(), 0, css::uno::Type(), 0}
299, mpPrinter( nullptr )
300, mbPreferPrinterPapersize( false )
312 return ::cppu::queryInterface(rType,
315 static_cast<XWeak*
>(
this),
318 static_cast<XPropertyState*
>(
this),
319 static_cast<XMultiPropertySet*
>(
this),
320 static_cast<XServiceInfo*
>(
this),
321 static_cast<XTypeProvider*
>(
this));
326 OWeakObject::acquire();
331 OWeakObject::release();
336 static const uno::Sequence< uno::Type >
aTypes {
349 return css::uno::Sequence<sal_Int8>();
356 throw UnknownPropertyException();
359 if (
nullptr ==
mpDoc)
360 throw UnknownPropertyException();
366 throw PropertyVetoException (
"Property is read-only: " + rInfo.
maName,
static_cast < cppu::OWeakObject *
> (
nullptr ) );
370 case HANDLE_FORBIDDEN_CHARS:
372 case HANDLE_LINK_UPDATE_MODE:
384 throw IllegalArgumentException();
389 case HANDLE_FIELD_AUTO_UPDATE:
391 bool bUpdateField = *o3tl::doAccess<bool>(rValue);
400 case HANDLE_CHART_AUTO_UPDATE:
402 bool bUpdateChart = *o3tl::doAccess<bool>(rValue);
411 case HANDLE_ADD_PARA_TABLE_SPACING:
413 bool bParaSpace =
false;
414 rValue >>= bParaSpace;
418 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
420 bool bParaSpacePage =
false;
421 rValue >>= bParaSpacePage;
425 case HANDLE_ALIGN_TAB_STOP_POSITION:
427 bool bAlignTab = *o3tl::doAccess<bool>(rValue);
431 case HANDLE_PRINTER_NAME:
434 OUString sPrinterName;
435 if( !(rValue >>= sPrinterName) )
436 throw IllegalArgumentException();
441 if ( pPrinter->GetName() != sPrinterName )
444 assert (! pNewPrinter->isDisposed() );
445 if( pNewPrinter->IsKnown() )
459 case HANDLE_PRINTER_SETUP:
461 Sequence < sal_Int8 > aSequence;
462 if ( !(rValue >>= aSequence) )
463 throw IllegalArgumentException();
465 sal_uInt32 nSize = aSequence.getLength();
472 SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
473 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
474 SID_HTML_MODE, SID_HTML_MODE,
477 assert (! pPrinter->isDisposed() );
485 case HANDLE_PRINTER_PAPER:
487 bool bPreferPrinterPapersize = {};
488 if(!(rValue >>= bPreferPrinterPapersize))
489 throw IllegalArgumentException();
493 case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
495 bool bIsKern = *o3tl::doAccess<bool>(rValue);
498 pEditSh->ChgHyphenation();
501 case HANDLE_CHARACTER_COMPRESSION_TYPE:
507 case CharCompressType::NONE:
508 case CharCompressType::PunctuationOnly:
509 case CharCompressType::PunctuationAndKana:
512 throw IllegalArgumentException();
517 case HANDLE_APPLY_USER_DATA:
522 case HANDLE_SAVE_THUMBNAIL:
527 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
529 bool bSaveGlobal = *o3tl::doAccess<bool>(rValue);
533 case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
536 if ( rValue >>=
aData.sDataSource )
540 case HANDLE_CURRENT_DATABASE_COMMAND:
544 if ( rValue >>=
aData.sCommand )
548 "\"CurrentDatabaseCommand\" property possibly set before \"CurrentDatabaseDataSource\"" );
551 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
554 if ( rValue >>=
aData.nCommandType )
557 "\"CurrentDatabaseCommandType\" property possibly set before \"CurrentDatabaseDataSource\"" );
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)
571 case HANDLE_SAVE_VERSION_ON_CLOSE:
576 case HANDLE_UPDATE_FROM_TEMPLATE:
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();
598 case HANDLE_IS_LABEL_DOC :
601 if(!(rValue >>= bSet))
602 throw IllegalArgumentException();
606 case HANDLE_IS_ADD_FLY_OFFSET:
608 bool bTmp = *o3tl::doAccess<bool>(rValue);
612 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET:
614 bool bTmp = *o3tl::doAccess<bool>(rValue);
618 case HANDLE_IS_ADD_EXTERNAL_LEADING:
620 bool bTmp = *o3tl::doAccess<bool>(rValue);
624 case HANDLE_OLD_NUMBERING:
626 bool bTmp = *o3tl::doAccess<bool>(rValue);
630 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
635 case HANDLE_ALLOW_PRINTJOB_CANCEL:
638 if (!(rValue >>= bState))
639 throw IllegalArgumentException();
643 case HANDLE_USE_FORMER_LINE_SPACING:
645 bool bTmp = *o3tl::doAccess<bool>(rValue);
649 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
651 bool bTmp = *o3tl::doAccess<bool>(rValue);
655 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS:
657 bool bTmp = *o3tl::doAccess<bool>(rValue);
661 case HANDLE_USE_FORMER_OBJECT_POSITIONING:
663 bool bTmp = *o3tl::doAccess<bool>(rValue);
667 case HANDLE_USE_FORMER_TEXT_WRAPPING:
669 bool bTmp = *o3tl::doAccess<bool>(rValue);
673 case HANDLE_CHANGES_PASSWORD:
675 Sequence <sal_Int8> aNew;
679 if(aNew.hasElements())
688 case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
690 bool bTmp = *o3tl::doAccess<bool>(rValue);
694 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
696 bool bTmp = *o3tl::doAccess<bool>(rValue);
700 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
702 bool bTmp = *o3tl::doAccess<bool>(rValue);
706 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
708 bool bTmp = *o3tl::doAccess<bool>(rValue);
712 case HANDLE_TABLE_ROW_KEEP:
714 bool bTmp = *o3tl::doAccess<bool>(rValue);
718 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
720 bool bTmp = *o3tl::doAccess<bool>(rValue);
724 case HANDLE_LOAD_READONLY:
729 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
731 bool bTmp = *o3tl::doAccess<bool>(rValue);
735 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
737 bool bTmp = *o3tl::doAccess<bool>(rValue);
741 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
743 bool bTmp = *o3tl::doAccess<bool>(rValue);
747 case HANDLE_USE_OLD_PRINTER_METRICS:
750 case HANDLE_TABS_RELATIVE_TO_INDENT:
752 bool bTmp = *o3tl::doAccess<bool>(rValue);
763 case HANDLE_RSID_ROOT:
770 case HANDLE_PROTECT_FORM:
772 bool bTmp = *o3tl::doAccess<bool>(rValue);
776 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
778 bool bTmp = *o3tl::doAccess<bool>(rValue);
782 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY:
784 bool bTmp = *o3tl::doAccess<bool>(rValue);
788 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
790 bool bTmp = *o3tl::doAccess<bool>(rValue);
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 >(),
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);
815 case HANDLE_INVERT_BORDER_SPACING:
817 bool bTmp = *o3tl::doAccess<bool>(rValue);
821 case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
823 bool bTmp = *o3tl::doAccess<bool>(rValue);
827 case HANDLE_SMALL_CAPS_PERCENTAGE_66:
829 bool bTmp = *o3tl::doAccess<bool>(rValue);
833 case HANDLE_TAB_OVERFLOW:
835 bool bTmp = *o3tl::doAccess<bool>(rValue);
839 case HANDLE_UNBREAKABLE_NUMBERINGS:
841 bool bTmp = *o3tl::doAccess<bool>(rValue);
845 case HANDLE_STYLES_NODEFAULT:
847 bool bTmp = *o3tl::doAccess<bool>(rValue);
851 case HANDLE_FLOATTABLE_NOMARGINS:
853 bool bTmp = *o3tl::doAccess<bool>(rValue);
857 case HANDLE_CLIPPED_PICTURES:
859 bool bTmp = *o3tl::doAccess<bool>(rValue);
863 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
865 bool bTmp = *o3tl::doAccess<bool>(rValue);
869 case HANDLE_EMBED_FONTS:
871 bool bTmp = *o3tl::doAccess<bool>(rValue);
875 case HANDLE_EMBED_USED_FONTS:
877 bool bTmp = *o3tl::doAccess<bool>(rValue);
881 case HANDLE_EMBED_LATIN_SCRIPT_FONTS:
883 bool bTmp = *o3tl::doAccess<bool>(rValue);
887 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS:
889 bool bTmp = *o3tl::doAccess<bool>(rValue);
893 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS:
895 bool bTmp = *o3tl::doAccess<bool>(rValue);
899 case HANDLE_EMBED_SYSTEM_FONTS:
901 bool bTmp = *o3tl::doAccess<bool>(rValue);
905 case HANDLE_TAB_OVER_MARGIN:
907 bool bTmp = *o3tl::doAccess<bool>(rValue);
911 case HANDLE_TAB_OVER_SPACING:
913 bool bTmp = *o3tl::doAccess<bool>(rValue);
917 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK:
919 bool bTmp = *o3tl::doAccess<bool>(rValue);
923 case HANDLE_SURROUND_TEXT_WRAP_SMALL:
925 bool bTmp = *o3tl::doAccess<bool>(rValue);
929 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
931 bool bTmp = *o3tl::doAccess<bool>(rValue);
935 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
945 case HANDLE_SUBTRACT_FLYS:
955 case HANDLE_DISABLE_OFF_PAGE_POSITIONING:
965 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA:
975 case HANDLE_CONTINUOUS_ENDNOTES:
985 case HANDLE_PROTECT_BOOKMARKS:
995 case HANDLE_PROTECT_FIELDS:
1005 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA:
1008 if (rValue >>= bTmp)
1015 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA:
1018 if (rValue >>= bTmp)
1025 case HANDLE_GUTTER_AT_TOP:
1028 if (rValue >>= bTmp)
1034 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND:
1037 if (rValue >>= bTmp)
1044 case HANDLE_IMAGE_PREFERRED_DPI:
1053 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE:
1056 if (rValue >>= bTmp)
1063 case HANDLE_HYPHENATE_URLS:
1066 if (rValue >>= bTmp)
1073 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES:
1076 if (rValue >>= bTmp)
1083 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY:
1086 if (rValue >>= bTmp)
1091 case HANDLE_DROP_CAP_PUNCTUATION:
1094 if (rValue >>= bTmp)
1099 case HANDLE_USE_VARIABLE_WIDTH_NBSP:
1102 if (rValue >>= bTmp)
1108 throw UnknownPropertyException(OUString::number(rInfo.
mnHandle));
1122 aOptions.
Put(aAddPrinterItem);
1138 throw UnknownPropertyException();
1140 if (
nullptr ==
mpDoc)
1141 throw UnknownPropertyException();
1148 case HANDLE_FORBIDDEN_CHARS:
1153 case HANDLE_LINK_UPDATE_MODE:
1158 case HANDLE_FIELD_AUTO_UPDATE:
1164 case HANDLE_CHART_AUTO_UPDATE:
1170 case HANDLE_ADD_PARA_TABLE_SPACING:
1175 case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
1180 case HANDLE_ALIGN_TAB_STOP_POSITION:
1185 case HANDLE_PRINTER_NAME:
1188 rValue <<= pPrinter ? pPrinter->GetName() : OUString();
1191 case HANDLE_PRINTER_SETUP:
1197 pPrinter->
Store( aStream );
1198 sal_uInt32 nSize = aStream.
TellEnd();
1200 Sequence < sal_Int8 > aSequence( nSize );
1201 aStream.
ReadBytes(aSequence.getArray(), nSize);
1202 rValue <<= aSequence;
1206 Sequence < sal_Int8 > aSequence ( 0 );
1207 rValue <<= aSequence;
1211 case HANDLE_PRINTER_PAPER:
1214 rValue <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
1217 case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
1222 case HANDLE_APPLY_USER_DATA:
1227 case HANDLE_SAVE_THUMBNAIL:
1232 case HANDLE_CHARACTER_COMPRESSION_TYPE:
1237 case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
1242 case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
1248 case HANDLE_CURRENT_DATABASE_COMMAND:
1254 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
1260 case HANDLE_EMBEDDED_DATABASE_NAME:
1262#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
1269 case HANDLE_SAVE_VERSION_ON_CLOSE:
1274 case HANDLE_UPDATE_FROM_TEMPLATE:
1279 case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
1284 document::PrinterIndependentLayout::HIGH_RESOLUTION :
1285 document::PrinterIndependentLayout::LOW_RESOLUTION ) :
1286 document::PrinterIndependentLayout::DISABLED;
1287 rValue <<= nVirDevType;
1290 case HANDLE_IS_LABEL_DOC:
1296 case HANDLE_IS_ADD_FLY_OFFSET:
1301 case HANDLE_IS_ADD_VERTICAL_FLY_OFFSET:
1306 case HANDLE_IS_ADD_EXTERNAL_LEADING:
1311 case HANDLE_OLD_NUMBERING:
1316 case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
1321 case HANDLE_ALLOW_PRINTJOB_CANCEL:
1326 case HANDLE_USE_FORMER_LINE_SPACING:
1331 case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
1336 case HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS:
1341 case HANDLE_USE_FORMER_OBJECT_POSITIONING:
1346 case HANDLE_USE_FORMER_TEXT_WRAPPING:
1351 case HANDLE_CHANGES_PASSWORD:
1356 case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
1361 case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
1366 case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
1371 case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
1376 case HANDLE_TABLE_ROW_KEEP :
1381 case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
1386 case HANDLE_LOAD_READONLY:
1391 case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
1396 case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
1401 case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
1406 case HANDLE_USE_OLD_PRINTER_METRICS:
1411 case HANDLE_TABS_RELATIVE_TO_INDENT:
1418 rValue <<= static_cast < sal_Int32 > (
mpDoc->
getRsid() );
1421 case HANDLE_RSID_ROOT:
1426 case HANDLE_PROTECT_FORM:
1431 case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
1436 case HANDLE_MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY:
1441 case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
1446 case HANDLE_MODIFYPASSWORDINFO:
1451 case HANDLE_MATH_BASELINE_ALIGNMENT:
1456 case HANDLE_INVERT_BORDER_SPACING:
1461 case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
1466 case HANDLE_SMALL_CAPS_PERCENTAGE_66:
1471 case HANDLE_TAB_OVERFLOW:
1476 case HANDLE_UNBREAKABLE_NUMBERINGS:
1481 case HANDLE_STYLES_NODEFAULT:
1486 case HANDLE_FLOATTABLE_NOMARGINS:
1491 case HANDLE_CLIPPED_PICTURES:
1496 case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
1501 case HANDLE_EMBED_FONTS:
1506 case HANDLE_EMBED_USED_FONTS:
1511 case HANDLE_EMBED_LATIN_SCRIPT_FONTS:
1516 case HANDLE_EMBED_ASIAN_SCRIPT_FONTS:
1521 case HANDLE_EMBED_COMPLEX_SCRIPT_FONTS:
1526 case HANDLE_EMBED_SYSTEM_FONTS:
1531 case HANDLE_TAB_OVER_MARGIN:
1536 case HANDLE_TAB_OVER_SPACING:
1541 case HANDLE_TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK:
1546 case HANDLE_SURROUND_TEXT_WRAP_SMALL:
1551 case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
1556 case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
1561 case HANDLE_SUBTRACT_FLYS:
1566 case HANDLE_DISABLE_OFF_PAGE_POSITIONING:
1571 case HANDLE_EMPTY_DB_FIELD_HIDES_PARA:
1577 case HANDLE_CONTINUOUS_ENDNOTES:
1583 case HANDLE_PROTECT_BOOKMARKS:
1589 case HANDLE_PROTECT_FIELDS:
1595 case HANDLE_HEADER_SPACING_BELOW_LAST_PARA:
1601 case HANDLE_FRAME_AUTOWIDTH_WITH_MORE_PARA:
1607 case HANDLE_GUTTER_AT_TOP:
1612 case HANDLE_FOOTNOTE_IN_COLUMN_TO_PAGEEND:
1618 case HANDLE_IMAGE_PREFERRED_DPI:
1623 case HANDLE_AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE:
1629 case HANDLE_HYPHENATE_URLS:
1635 case HANDLE_DO_NOT_BREAK_WRAPPED_TABLES:
1641 case HANDLE_NO_NUMBERING_SHOW_FOLLOWBY:
1647 case HANDLE_DROP_CAP_PUNCTUATION:
1653 case HANDLE_USE_VARIABLE_WIDTH_NBSP:
1660 throw UnknownPropertyException(OUString::number(rInfo.
mnHandle));
1673 return "SwXDocumentSettings";
1683 return {
"com.sun.star.document.Settings",
"com.sun.star.text.DocumentSettings",
"com.sun.star.text.PrintSettings" };
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ SMALL_CAPS_PERCENTAGE_66
@ BACKGROUND_PARA_OVER_DRAWINGS
@ CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
@ TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK
@ SURROUND_TEXT_WRAP_SMALL
@ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
@ HYPHENATE_URLS
tdf#152952
@ GLOBAL_DOCUMENT_SAVE_LINKS
@ USE_FORMER_TEXT_WRAPPING
@ IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
@ HEADER_SPACING_BELOW_LAST_PARA
@ ADD_VERTICAL_FLY_OFFSETS
@ PARA_SPACE_MAX_AT_PAGES
@ EMBED_COMPLEX_SCRIPT_FONTS
@ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
@ COLLAPSE_EMPTY_CELL_PARA
@ DISABLE_OFF_PAGE_POSITIONING
@ AUTO_FIRST_LINE_INDENT_DISREGARD_LINE_SPACE
@ TABS_RELATIVE_TO_INDENT
@ FRAME_AUTOWIDTH_WITH_MORE_PARA
@ TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
@ ADD_PARA_SPACING_TO_TABLE_CELLS
@ USE_HIRES_VIRTUAL_DEVICE
@ NO_NUMBERING_SHOW_FOLLOWBY
@ EMBED_LATIN_SCRIPT_FONTS
@ MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY
@ IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
@ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE
@ USE_VARIABLE_WIDTH_NBSP
@ EMBED_ASIAN_SCRIPT_FONTS
@ DO_NOT_BREAK_WRAPPED_TABLES
@ EMPTY_DB_FIELD_HIDES_PARA
@ MS_WORD_COMP_TRAILING_BLANKS
@ MATH_BASELINE_ALIGNMENT
@ UNIX_FORCE_ZERO_EXT_LEADING
@ PROP_LINE_SPACING_SHRINKS_FIRST_LINE
@ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
@ ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
@ FOOTNOTE_IN_COLUMN_TO_PAGEEND
static rtl::Reference< MasterPropertySetInfo > lcl_createSettingsInfo()
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
void setEmbeddedName(const OUString &rEmbeddedName, SwDocShell &rDocShell)
SwDoc * GetDoc()
returns Doc. But be careful!
SwDBData const & GetDBData()
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
SwDBManager * GetDBManager() const
sal_uInt32 getRsid() const
sal_uInt32 getRsidRoot() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
void setRsidRoot(sal_uInt32 nVal)
SwEditShell const * GetEditShell() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
void setRsid(sal_uInt32 nVal)
const SwAttrPool & GetAttrPool() const
void ChgDBData(const SwDBData &rNewData)
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,...
bool mbPreferPrinterPapersize
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()
SwDocShell * GetDocShell()
void registerSlave(ChainablePropertySet *pNewSet) noexcept
css::uno::Type const & get()
#define FN_PARAM_ADDPRINTER
@ AUTOUPD_FIELD_AND_CHARTS
#define SAL_WARN_IF(condition, area, stream)
constexpr OUStringLiteral aData
class SAL_NO_VTABLE XPropertySet
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define STREAM_SEEK_TO_BEGIN