LCOV - code coverage report
Current view: top level - sw/source/uibase/uno - SwXDocumentSettings.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 511 556 91.9 %
Date: 2015-06-13 12:38:46 Functions: 18 21 85.7 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <osl/mutex.hxx>
      21             : #include <sfx2/sfxbasecontroller.hxx>
      22             : #include <SwXDocumentSettings.hxx>
      23             : #include <comphelper/MasterPropertySetInfo.hxx>
      24             : #include <cppuhelper/supportsservice.hxx>
      25             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      26             : #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
      27             : #include <com/sun/star/document/PrinterIndependentLayout.hpp>
      28             : #include <doc.hxx>
      29             : #include <IDocumentSettingAccess.hxx>
      30             : #include <IDocumentDeviceAccess.hxx>
      31             : #include <IDocumentRedlineAccess.hxx>
      32             : #include <docsh.hxx>
      33             : #include <fldupde.hxx>
      34             : #include <linkenum.hxx>
      35             : #include <sfx2/printer.hxx>
      36             : #include <editsh.hxx>
      37             : #include <drawdoc.hxx>
      38             : #include <svl/zforlist.hxx>
      39             : #include <unotxdoc.hxx>
      40             : #include <cmdid.h>
      41             : #include <sfx2/zoomitem.hxx>
      42             : #include <unomod.hxx>
      43             : #include <vcl/svapp.hxx>
      44             : #include <comphelper/servicehelper.hxx>
      45             : 
      46             : #include "swmodule.hxx"
      47             : #include "cfgitems.hxx"
      48             : #include "prtopt.hxx"
      49             : #include "dbmgr.hxx"
      50             : 
      51             : using namespace comphelper;
      52             : using namespace ::com::sun::star;
      53             : using namespace ::com::sun::star::uno;
      54             : using namespace ::com::sun::star::beans;
      55             : using namespace ::com::sun::star::lang;
      56             : using namespace ::com::sun::star::i18n;
      57             : 
      58             : enum SwDocumentSettingsPropertyHandles
      59             : {
      60             :     HANDLE_FORBIDDEN_CHARS,
      61             :     HANDLE_LINK_UPDATE_MODE,
      62             :     HANDLE_FIELD_AUTO_UPDATE,
      63             :     HANDLE_CHART_AUTO_UPDATE,
      64             :     HANDLE_ADD_PARA_TABLE_SPACING,
      65             :     HANDLE_ADD_PARA_TABLE_SPACING_AT_START,
      66             :     HANDLE_ALIGN_TAB_STOP_POSITION,
      67             :     HANDLE_PRINTER_NAME,
      68             :     HANDLE_PRINTER_SETUP,
      69             :     HANDLE_IS_KERN_ASIAN_PUNCTUATION,
      70             :     HANDLE_CHARACTER_COMPRESSION_TYPE,
      71             :     HANDLE_APPLY_USER_DATA,
      72             :     HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS,
      73             :     HANDLE_CURRENT_DATABASE_DATA_SOURCE,
      74             :     HANDLE_CURRENT_DATABASE_COMMAND,
      75             :     HANDLE_CURRENT_DATABASE_COMMAND_TYPE,
      76             :     HANDLE_EMBEDDED_DATABASE_NAME,
      77             :     HANDLE_SAVE_VERSION_ON_CLOSE,
      78             :     HANDLE_IS_GRID_VISIBLE,
      79             :     HANDLE_IS_SNAP_TO_GRID,
      80             :     HANDLE_IS_SYNCHRONISE_AXES,
      81             :     HANDLE_HORIZONTAL_GRID_RESOLUTION,
      82             :     HANDLE_HORIZONTAL_GRID_SUBDIVISION,
      83             :     HANDLE_VERTICAL_GRID_RESOLUTION,
      84             :     HANDLE_VERTICAL_GRID_SUBDIVISION,
      85             :     HANDLE_UPDATE_FROM_TEMPLATE,
      86             :     HANDLE_PRINTER_INDEPENDENT_LAYOUT,
      87             :     HANDLE_IS_LABEL_DOC,
      88             :     HANDLE_IS_ADD_FLY_OFFSET,
      89             :     HANDLE_IS_ADD_EXTERNAL_LEADING,
      90             :     HANDLE_OLD_NUMBERING, // #111955#
      91             :     HANDLE_OUTLINELEVEL_YIELDS_NUMBERING,
      92             :     /* Stampit It disable the print cancel button of the shown progress dialog. */
      93             :     HANDLE_ALLOW_PRINTJOB_CANCEL,
      94             :     HANDLE_USE_FORMER_LINE_SPACING,
      95             :     HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS,
      96             :     HANDLE_USE_FORMER_OBJECT_POSITIONING,
      97             :     HANDLE_USE_FORMER_TEXT_WRAPPING,
      98             :     HANDLE_CHANGES_PASSWORD,
      99             :     HANDLE_CONSIDER_WRAP_ON_OBJPOS,
     100             :     HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
     101             :     HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
     102             :     HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
     103             :     HANDLE_TABLE_ROW_KEEP,
     104             :     HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
     105             :     HANDLE_LOAD_READONLY,
     106             :     HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
     107             :     HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES,
     108             :     HANDLE_UNIX_FORCE_ZERO_EXT_LEADING,
     109             :     HANDLE_USE_OLD_PRINTER_METRICS,
     110             :     HANDLE_PROTECT_FORM,
     111             :     HANDLE_TABS_RELATIVE_TO_INDENT,
     112             :     HANDLE_RSID,
     113             :     HANDLE_RSID_ROOT,
     114             :     // #i89181#
     115             :     HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
     116             :     HANDLE_MODIFYPASSWORDINFO,
     117             :     HANDLE_MATH_BASELINE_ALIGNMENT,
     118             :     HANDLE_INVERT_BORDER_SPACING,
     119             :     HANDLE_COLLAPSE_EMPTY_CELL_PARA,
     120             :     HANDLE_SMALL_CAPS_PERCENTAGE_66,
     121             :     HANDLE_TAB_OVERFLOW,
     122             :     HANDLE_UNBREAKABLE_NUMBERINGS,
     123             :     HANDLE_STYLES_NODEFAULT,
     124             :     HANDLE_FLOATTABLE_NOMARGINS,
     125             :     HANDLE_CLIPPED_PICTURES,
     126             :     HANDLE_BACKGROUND_PARA_OVER_DRAWINGS,
     127             :     HANDLE_EMBED_FONTS,
     128             :     HANDLE_EMBED_SYSTEM_FONTS,
     129             :     HANDLE_TAB_OVER_MARGIN,
     130             :     HANDLE_SURROUND_TEXT_WRAP_SMALL,
     131             :     HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
     132             :     HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
     133             :     HANDLE_SUBTRACT_FLYS,
     134             : };
     135             : 
     136        5838 : static MasterPropertySetInfo * lcl_createSettingsInfo()
     137             : {
     138             :     static PropertyInfo const aWriterSettingsInfoMap[] =
     139             :     {
     140          36 :         { OUString("ForbiddenCharacters"),        HANDLE_FORBIDDEN_CHARS,                 cppu::UnoType<css::i18n::XForbiddenCharacters>::get(),      0,   0},
     141          36 :         { OUString("LinkUpdateMode"),             HANDLE_LINK_UPDATE_MODE,                cppu::UnoType<sal_Int16>::get(),             0,   0},
     142          36 :         { OUString("FieldAutoUpdate"),            HANDLE_FIELD_AUTO_UPDATE,               cppu::UnoType<bool>::get(),           0,   0},
     143          36 :         { OUString("ChartAutoUpdate"),            HANDLE_CHART_AUTO_UPDATE,               cppu::UnoType<bool>::get(),           0,   0},
     144          36 :         { OUString("AddParaTableSpacing"),        HANDLE_ADD_PARA_TABLE_SPACING,          cppu::UnoType<bool>::get(),           0,   0},
     145          36 :         { OUString("AddParaTableSpacingAtStart"), HANDLE_ADD_PARA_TABLE_SPACING_AT_START, cppu::UnoType<bool>::get(),           0,   0},
     146          36 :         { OUString("AlignTabStopPosition"),       HANDLE_ALIGN_TAB_STOP_POSITION,         cppu::UnoType<bool>::get(),           0,   0},
     147          36 :         { OUString("PrinterName"),                HANDLE_PRINTER_NAME,                    cppu::UnoType<OUString>::get(),          0,   0},
     148          36 :         { OUString("PrinterSetup"),               HANDLE_PRINTER_SETUP,                   cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(),           0,   0},
     149          36 :         { OUString("IsKernAsianPunctuation"),     HANDLE_IS_KERN_ASIAN_PUNCTUATION,       cppu::UnoType<bool>::get(),           0,   0},
     150          36 :         { OUString("CharacterCompressionType"),   HANDLE_CHARACTER_COMPRESSION_TYPE,      cppu::UnoType<sal_Int16>::get(),             0,   0},
     151          36 :         { OUString("ApplyUserData"),              HANDLE_APPLY_USER_DATA,                 cppu::UnoType<bool>::get(),           0,   0},
     152          36 :         { OUString("SaveGlobalDocumentLinks"),    HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS,      cppu::UnoType<bool>::get(),           0,   0},
     153          36 :         { OUString("CurrentDatabaseDataSource"),  HANDLE_CURRENT_DATABASE_DATA_SOURCE,    cppu::UnoType<OUString>::get(),          0,   0},
     154          36 :         { OUString("CurrentDatabaseCommand"),     HANDLE_CURRENT_DATABASE_COMMAND,        cppu::UnoType<OUString>::get(),          0,   0},
     155          36 :         { OUString("CurrentDatabaseCommandType"), HANDLE_CURRENT_DATABASE_COMMAND_TYPE,   cppu::UnoType<sal_Int32>::get(),             0,   0},
     156          36 :         { OUString("EmbeddedDatabaseName"),       HANDLE_EMBEDDED_DATABASE_NAME,          cppu::UnoType<OUString>::get(),              0,   0},
     157          36 :         { OUString("SaveVersionOnClose"),         HANDLE_SAVE_VERSION_ON_CLOSE,           cppu::UnoType<bool>::get(),           0,   0},
     158          36 :         { OUString("UpdateFromTemplate"),         HANDLE_UPDATE_FROM_TEMPLATE,            cppu::UnoType<bool>::get(),           0,   0},
     159             : 
     160          36 :         { OUString("PrinterIndependentLayout"),   HANDLE_PRINTER_INDEPENDENT_LAYOUT,      cppu::UnoType<sal_Int16>::get(),             0,   0},
     161          36 :         { OUString("IsLabelDocument"),            HANDLE_IS_LABEL_DOC,                    cppu::UnoType<bool>::get(),           0,   0},
     162          36 :         { OUString("AddFrameOffsets"),            HANDLE_IS_ADD_FLY_OFFSET,               cppu::UnoType<bool>::get(),           0,   0},
     163          36 :         { OUString("AddExternalLeading"),         HANDLE_IS_ADD_EXTERNAL_LEADING,         cppu::UnoType<bool>::get(),           0,   0},
     164          36 :         { OUString("UseOldNumbering"),            HANDLE_OLD_NUMBERING,                   cppu::UnoType<bool>::get(),           0,   0}, // #111955#
     165          36 :         { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType<bool>::get(),           0,   0},
     166             :         /* Stampit It disable the print cancel button of the shown progress dialog. */
     167          36 :         { OUString("AllowPrintJobCancel"),        HANDLE_ALLOW_PRINTJOB_CANCEL,           cppu::UnoType<bool>::get(),           0,   0},
     168          36 :         { OUString("UseFormerLineSpacing"),       HANDLE_USE_FORMER_LINE_SPACING,         cppu::UnoType<bool>::get(),           0,   0},
     169          36 :         { OUString("AddParaSpacingToTableCells"), HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(),           0,   0},
     170          36 :         { OUString("UseFormerObjectPositioning"), HANDLE_USE_FORMER_OBJECT_POSITIONING,   cppu::UnoType<bool>::get(),           0,   0},
     171          36 :         { OUString("UseFormerTextWrapping"),      HANDLE_USE_FORMER_TEXT_WRAPPING,        cppu::UnoType<bool>::get(),           0,   0},
     172          36 :         { OUString("RedlineProtectionKey"),       HANDLE_CHANGES_PASSWORD,                cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(),           0,   0},
     173          36 :         { OUString("ConsiderTextWrapOnObjPos"),   HANDLE_CONSIDER_WRAP_ON_OBJPOS,         cppu::UnoType<bool>::get(),           0,   0},
     174          36 :         { OUString("IgnoreFirstLineIndentInNumbering"),   HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,         cppu::UnoType<bool>::get(),           0,   0},
     175          36 :         { OUString("DoNotJustifyLinesWithManualBreak"),   HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,         cppu::UnoType<bool>::get(),           0,   0},
     176          36 :         { OUString("DoNotResetParaAttrsForNumFont"),   HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,         cppu::UnoType<bool>::get(),           0,   0},
     177          36 :         { OUString("TableRowKeep"),               HANDLE_TABLE_ROW_KEEP,         cppu::UnoType<bool>::get(),           0,   0},
     178          36 :         { OUString("IgnoreTabsAndBlanksForLineCalculation"),   HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,         cppu::UnoType<bool>::get(),           0,   0},
     179          36 :         { OUString("LoadReadonly"),               HANDLE_LOAD_READONLY,                   cppu::UnoType<bool>::get(),           0,   0},
     180          36 :         { OUString("DoNotCaptureDrawObjsOnPage"),   HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, cppu::UnoType<bool>::get(), 0, 0},
     181          36 :         { OUString("ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES, cppu::UnoType<bool>::get(), 0, 0},
     182          36 :         { OUString("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, cppu::UnoType<bool>::get(), 0, 0},
     183          36 :         { OUString("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS, cppu::UnoType<bool>::get(), 0, 0},
     184          36 :         { OUString("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT, cppu::UnoType<bool>::get(), 0, 0},
     185          36 :         { OUString("Rsid"), HANDLE_RSID, cppu::UnoType<sal_Int32>::get(), 0, 0},
     186          36 :         { OUString("RsidRoot"), HANDLE_RSID_ROOT, cppu::UnoType<sal_Int32>::get(), 0, 0},
     187          36 :         { OUString("ProtectForm"), HANDLE_PROTECT_FORM, cppu::UnoType<bool>::get(), 0, 0},
     188             :         // #i89181#
     189          36 :         { OUString("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, cppu::UnoType<bool>::get(), 0, 0},
     190          36 :         { OUString("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), 0,   0},
     191          36 :         { OUString("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, cppu::UnoType<bool>::get(), 0, 0},
     192          36 :         { OUString("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, cppu::UnoType<bool>::get(), 0, 0},
     193          36 :         { OUString("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, cppu::UnoType<bool>::get(), 0, 0},
     194          36 :         { OUString("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, cppu::UnoType<bool>::get(), 0, 0},
     195          36 :         { OUString("TabOverflow"), HANDLE_TAB_OVERFLOW, cppu::UnoType<bool>::get(), 0, 0},
     196          36 :         { OUString("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, cppu::UnoType<bool>::get(), 0, 0},
     197          36 :         { OUString("StylesNoDefault"), HANDLE_STYLES_NODEFAULT, cppu::UnoType<bool>::get(), 0, 0},
     198          36 :         { OUString("FloattableNomargins"), HANDLE_FLOATTABLE_NOMARGINS, cppu::UnoType<bool>::get(), 0, 0},
     199          36 :         { OUString("ClippedPictures"), HANDLE_CLIPPED_PICTURES, cppu::UnoType<bool>::get(), 0, 0},
     200          36 :         { OUString("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, cppu::UnoType<bool>::get(), 0, 0},
     201          36 :         { OUString("EmbedFonts"), HANDLE_EMBED_FONTS, cppu::UnoType<bool>::get(), 0, 0},
     202          36 :         { OUString("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, cppu::UnoType<bool>::get(), 0, 0},
     203          36 :         { OUString("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, cppu::UnoType<bool>::get(), 0, 0},
     204          36 :         { OUString("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, cppu::UnoType<bool>::get(), 0, 0},
     205          36 :         { OUString("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, cppu::UnoType<bool>::get(), 0, 0},
     206          36 :         { OUString("PropLineSpacingShrinksFirstLine"),       HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE,         cppu::UnoType<bool>::get(),           0,   0},
     207          36 :         { OUString("SubtractFlysAnchoredAtFlys"),       HANDLE_SUBTRACT_FLYS,         cppu::UnoType<bool>::get(),           0,   0},
     208             : /*
     209             :  * As OS said, we don't have a view when we need to set this, so I have to
     210             :  * find another solution before adding them to this property set - MTG
     211             :         { OUString("IsGridVisible"),              HANDLE_IS_GRID_VISIBLE,                 cppu::UnoType<bool>::get(),           0,   0},
     212             :         { OUString("IsSnapToGrid"),               HANDLE_IS_SNAP_TO_GRID,                 cppu::UnoType<bool>::get(),           0,   0},
     213             :         { OUString("IsSynchroniseAxes"),          HANDLE_IS_SYNCHRONISE_AXES,             cppu::UnoType<bool>::get(),           0,   0},
     214             :         { OUString("HorizontalGridResolution"),   HANDLE_HORIZONTAL_GRID_RESOLUTION,      cppu::UnoType<sal_Int32>::get(),             0,   0},
     215             :         { OUString("HorizontalGridSubdivision"),  HANDLE_HORIZONTAL_GRID_SUBDIVISION,     cppu::UnoType<sal_Int16>::get(),             0,   0},
     216             :         { OUString("VerticalGridResolution"),     HANDLE_VERTICAL_GRID_RESOLUTION,        cppu::UnoType<sal_Int32>::get(),             0,   0},
     217             :         { OUString("VerticalGridSubdivision"),    HANDLE_VERTICAL_GRID_SUBDIVISION,       cppu::UnoType<sal_Int16>::get(),             0,   0},
     218             : 
     219             :         { OUString("ShowParagraphEnd"),           HANDLE_SHOW_PARAGRAPH_END,              cppu::UnoType<bool>::get(),           0,   0},
     220             :         { OUString("ShowOptionalHyphens"),        HANDLE_SHOW_OPTIONAL_HYPHENS,           cppu::UnoType<bool>::get(),           0,   0},
     221             :         { OUString("ShowSpaces"),                 HANDLE_SHOW_SPACES,                     cppu::UnoType<bool>::get(),           0,   0},
     222             :         { OUString("ShowTabs"),                   HANDLE_SHOW_TABS,                       cppu::UnoType<bool>::get(),           0,   0},
     223             :         { OUString("ShowBreaks"),                 HANDLE_SHOW_BREAKS,                     cppu::UnoType<bool>::get(),           0,   0},
     224             :         { OUString("ShowHiddenText"),             HANDLE_SHOW_HIDDEN_TEXT,                cppu::UnoType<bool>::get(),           0,   0},
     225             :         { OUString("ShowHiddenParagraphs"),       HANDLE_SHOW_HIDDEN_PARAGRAPHS,          cppu::UnoType<bool>::get(),           0,   0},
     226             : 
     227             :         { OUString("ShowTextLimitGuide"),         HANDLE_SHOW_TEXT_LIMIT_GUIDE,           cppu::UnoType<bool>::get(),           0,   0},
     228             :         { OUString("ShowTableLimitGuide"),        HANDLE_SHOW_TABLE_LIMIT_GUIDE,          cppu::UnoType<bool>::get(),           0,   0},
     229             :         { OUString("ShowSectionLimitGuide"),      HANDLE_SHOW_SECTION_LIMIT_GUIDE,        cppu::UnoType<bool>::get(),           0,   0},
     230             :         { OUString("ShowGuidesWhileMoving"),      HANDLE_SHOW_GUIDES_WHILE_MOVING,        cppu::UnoType<bool>::get(),           0,   0},
     231             : */
     232             :         { OUString(), 0, css::uno::Type(), 0, 0 }
     233        8214 :     };
     234        5838 :     return new MasterPropertySetInfo ( aWriterSettingsInfoMap );
     235             : }
     236             : 
     237        5838 : SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel )
     238             : : MasterPropertySet ( lcl_createSettingsInfo (),
     239        5838 :                       &Application::GetSolarMutex () )
     240             : , mxModel ( pModel )
     241             : , mpModel ( pModel )
     242             : , mpDocSh ( NULL )
     243             : , mpDoc ( NULL )
     244        5838 : , mpPrinter( NULL )
     245             : {
     246        5838 :     registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) );
     247        5838 : }
     248             : 
     249       11676 : SwXDocumentSettings::~SwXDocumentSettings()
     250        5838 :     throw()
     251             : {
     252       11676 : }
     253             : 
     254        5842 : Any SAL_CALL SwXDocumentSettings::queryInterface( const Type& rType )
     255             :     throw(RuntimeException, std::exception)
     256             : {
     257             :         return ::cppu::queryInterface ( rType,
     258             :                                         // OWeakObject interfaces
     259             :                                         dynamic_cast< XInterface* > ( dynamic_cast< OWeakObject*  >(this) ),
     260             :                                         dynamic_cast< XWeak* > ( this ),
     261             :                                         // my own interfaces
     262             :                                         dynamic_cast< XPropertySet*  > ( this ),
     263             :                                         dynamic_cast< XPropertyState* > ( this ),
     264             :                                         dynamic_cast< XMultiPropertySet* > ( this ),
     265             :                                         dynamic_cast< XServiceInfo* > ( this ),
     266        5842 :                                         dynamic_cast< XTypeProvider* > ( this ) );
     267             : }
     268       21476 : void SwXDocumentSettings::acquire ()
     269             :     throw ()
     270             : {
     271       21476 :     OWeakObject::acquire();
     272       21476 : }
     273       21476 : void SwXDocumentSettings::release ()
     274             :     throw ()
     275             : {
     276       21476 :     OWeakObject::release();
     277       21476 : }
     278             : 
     279           0 : uno::Sequence< uno::Type > SAL_CALL SwXDocumentSettings::getTypes(  )
     280             :     throw (RuntimeException, std::exception)
     281             : {
     282           0 :     SolarMutexGuard aGuard;
     283             : 
     284           0 :     uno::Sequence< uno::Type > aBaseTypes( 5 );
     285           0 :     uno::Type* pBaseTypes = aBaseTypes.getArray();
     286             : 
     287             :     // from MasterPropertySet
     288           0 :     pBaseTypes[0] = cppu::UnoType<XPropertySet>::get();
     289           0 :     pBaseTypes[1] = cppu::UnoType<XPropertyState>::get();
     290           0 :     pBaseTypes[2] = cppu::UnoType<XMultiPropertySet>::get();
     291             : 
     292           0 :     pBaseTypes[3] = cppu::UnoType<XServiceInfo>::get();
     293           0 :     pBaseTypes[4] = cppu::UnoType<XTypeProvider>::get();
     294             : 
     295           0 :     return aBaseTypes;
     296             : }
     297             : 
     298           0 : uno::Sequence< sal_Int8 > SAL_CALL SwXDocumentSettings::getImplementationId(  )
     299             :     throw (RuntimeException, std::exception)
     300             : {
     301           0 :     return css::uno::Sequence<sal_Int8>();
     302             : }
     303             : 
     304       57329 : void SwXDocumentSettings::_preSetValues ()
     305             :         throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
     306             : {
     307       57329 :     mpDocSh = mpModel->GetDocShell();
     308       57329 :     if (NULL == mpDocSh)
     309           0 :         throw UnknownPropertyException();
     310             : 
     311       57329 :     mpDoc = mpDocSh->GetDoc();
     312       57329 :     if (NULL == mpDoc)
     313           0 :         throw UnknownPropertyException();
     314       57329 : }
     315             : 
     316       57329 : void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
     317             :         throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     318             : {
     319       57329 :     if (rInfo.mnAttributes & PropertyAttribute::READONLY)
     320           0 :         throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( 0 ) );
     321             : 
     322       57329 :     switch( rInfo.mnHandle )
     323             :     {
     324             :         case HANDLE_FORBIDDEN_CHARS:
     325          31 :             break;
     326             :         case HANDLE_LINK_UPDATE_MODE:
     327             :         {
     328         284 :             sal_Int16 nMode = 0;
     329         284 :             rValue >>= nMode;
     330         284 :             switch (nMode)
     331             :             {
     332             :                 case NEVER:
     333             :                 case MANUAL:
     334             :                 case AUTOMATIC:
     335             :                 case GLOBALSETTING:
     336         284 :                     break;
     337             :                 default:
     338           0 :                     throw IllegalArgumentException();
     339             :             }
     340         284 :             mpDoc->getIDocumentSettingAccess().setLinkUpdateMode(nMode);
     341             :         }
     342         284 :         break;
     343             :         case HANDLE_FIELD_AUTO_UPDATE:
     344             :         {
     345         284 :             bool bUpdateField = *static_cast<sal_Bool const *>(rValue.getValue());
     346         284 :             SwFieldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
     347         284 :             mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( bUpdateField ?
     348             :                                         nFlag == AUTOUPD_FIELD_AND_CHARTS ?
     349             :                                         AUTOUPD_FIELD_AND_CHARTS :
     350             :                                         AUTOUPD_FIELD_ONLY :
     351         284 :                                         AUTOUPD_OFF );
     352             :         }
     353         284 :         break;
     354             :         case HANDLE_CHART_AUTO_UPDATE:
     355             :         {
     356         285 :             bool bUpdateChart = *static_cast<sal_Bool const *>(rValue.getValue());
     357         285 :             SwFieldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
     358         570 :             mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( (nFlag == AUTOUPD_FIELD_ONLY || nFlag == AUTOUPD_FIELD_AND_CHARTS ) ?
     359             :                                         bUpdateChart ?
     360             :                                         AUTOUPD_FIELD_AND_CHARTS :
     361             :                                         AUTOUPD_FIELD_ONLY :
     362         570 :                                         AUTOUPD_OFF );
     363             :         }
     364         285 :         break;
     365             :         case HANDLE_ADD_PARA_TABLE_SPACING:
     366             :         {
     367        2252 :             bool bParaSpace = false;
     368        2252 :             rValue >>= bParaSpace;
     369        2252 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PARA_SPACE_MAX, bParaSpace );
     370             :         }
     371        2252 :         break;
     372             :         case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
     373             :         {
     374         285 :             bool bParaSpacePage = false;
     375         285 :             rValue >>= bParaSpacePage;
     376         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES, bParaSpacePage );
     377             :         }
     378         285 :         break;
     379             :         case HANDLE_ALIGN_TAB_STOP_POSITION:
     380             :         {
     381         285 :             bool bAlignTab = *static_cast<sal_Bool const *>(rValue.getValue());
     382         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_COMPAT, bAlignTab);
     383             :         }
     384         285 :         break;
     385             :         case HANDLE_PRINTER_NAME:
     386             :         {
     387             :             //the printer must be created
     388         284 :             OUString sPrinterName;
     389         284 :             if( rValue >>= sPrinterName  )
     390             :             {
     391         284 :                 if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
     392             :                 {
     393          18 :                     SfxPrinter* pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( true );
     394          18 :                     if ( OUString ( pPrinter->GetName()) != sPrinterName )
     395             :                     {
     396          16 :                         VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
     397             :                         assert (! pNewPrinter->isDisposed() );
     398          16 :                         if( pNewPrinter->IsKnown() )
     399             :                         {
     400             :                             // set printer only once; in _postSetValues
     401           0 :                             mpPrinter = pNewPrinter;
     402             :                         }
     403             :                         else
     404             :                         {
     405          16 :                             pNewPrinter.disposeAndClear();
     406          16 :                         }
     407             :                     }
     408             :                 }
     409             :             }
     410             :             else
     411           0 :                 throw IllegalArgumentException();
     412             :         }
     413         284 :         break;
     414             :         case HANDLE_PRINTER_SETUP:
     415             :         {
     416         284 :             Sequence < sal_Int8 > aSequence;
     417         284 :             if ( rValue >>= aSequence )
     418             :             {
     419         284 :                 sal_uInt32 nSize = aSequence.getLength();
     420         284 :                 if( nSize > 0 )
     421             :                 {
     422          22 :                     SvMemoryStream aStream (aSequence.getArray(), nSize,
     423          44 :                                             StreamMode::READ );
     424          22 :                     aStream.Seek ( STREAM_SEEK_TO_BEGIN );
     425             :                     static sal_uInt16 const nRange[] =
     426             :                     {
     427             :                         FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
     428             :                         SID_HTML_MODE,  SID_HTML_MODE,
     429             :                         SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
     430             :                         SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
     431             :                         0
     432             :                     };
     433          22 :                     SfxItemSet *pItemSet = new SfxItemSet( mpDoc->GetAttrPool(), nRange );
     434          44 :                     VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, pItemSet );
     435             :                     assert (! pPrinter->isDisposed() );
     436             :                     // set printer only once; in _postSetValues
     437          22 :                     mpPrinter.disposeAndClear();
     438          44 :                     mpPrinter = pPrinter;
     439             :                 }
     440             :             }
     441             :             else
     442           0 :                 throw IllegalArgumentException();
     443             :         }
     444         284 :         break;
     445             :         case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
     446             :         {
     447         284 :             bool bIsKern = *static_cast<sal_Bool const *>(rValue.getValue());
     448         284 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION, bIsKern);
     449         284 :             SwEditShell* pEditSh = mpDoc->GetEditShell();
     450         284 :             if(pEditSh)
     451           0 :                 pEditSh->ChgHyphenation();
     452             :         }
     453         284 :         break;
     454             :         case HANDLE_CHARACTER_COMPRESSION_TYPE:
     455             :         {
     456         284 :             sal_Int16 nMode = 0;
     457         284 :             rValue >>= nMode;
     458         284 :             switch (nMode)
     459             :             {
     460             :                 case CHARCOMPRESS_NONE:
     461             :                 case CHARCOMPRESS_PUNCTUATION:
     462             :                 case CHARCOMPRESS_PUNCTUATION_KANA:
     463         284 :                     break;
     464             :                 default:
     465           0 :                     throw IllegalArgumentException();
     466             :             }
     467         284 :             mpDoc->getIDocumentSettingAccess().setCharacterCompressionType(static_cast < SwCharCompressType > (nMode) );
     468             :         }
     469         284 :         break;
     470             :         case HANDLE_APPLY_USER_DATA:
     471             :         {
     472         284 :             mpDocSh->SetUseUserData( *static_cast<sal_Bool const *>(rValue.getValue()) );
     473             :         }
     474         284 :         break;
     475             :         case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
     476             :         {
     477         285 :             bool bSaveGlobal = *static_cast<sal_Bool const *>(rValue.getValue());
     478         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS, bSaveGlobal );
     479             :         }
     480         285 :         break;
     481             :         case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
     482             :         {
     483         284 :             SwDBData aData = mpDoc->GetDBData();
     484         284 :             if ( rValue >>= aData.sDataSource )
     485         284 :                 mpDoc->ChgDBData( aData );
     486             :         }
     487         284 :         break;
     488             :         case HANDLE_CURRENT_DATABASE_COMMAND:
     489             :         {
     490         284 :             SwDBData aData = mpDoc->GetDBData();
     491             : 
     492         284 :             if ( rValue >>= aData.sCommand )
     493         284 :                 mpDoc->ChgDBData( aData );
     494             : 
     495             :             SAL_WARN_IF( aData.sDataSource.isEmpty() && !aData.sCommand.isEmpty(), "sw.uno",
     496         284 :                 "\"CurrentDatabaseCommand\" property possibly set before \"CurrentDatabaseDataSource\"" );
     497             :         }
     498         284 :         break;
     499             :         case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
     500             :         {
     501         284 :             SwDBData aData = mpDoc->GetDBData();
     502         284 :             if ( rValue >>= aData.nCommandType )
     503         284 :                 mpDoc->ChgDBData( aData );
     504             :             SAL_WARN_IF( aData.nCommandType && aData.sDataSource.isEmpty(), "sw.uno",
     505             :                 "\"CurrentDatabaseCommandType\" property possibly set before \"CurrentDatabaseDataSource\"" );
     506             :             SAL_WARN_IF( aData.nCommandType && aData.sCommand.isEmpty(), "sw.uno",
     507         284 :                 "\"CurrentDatabaseCommandType\" property possibly set before \"CurrentDatabaseCommand\"" );
     508             :         }
     509         284 :         break;
     510             :         case HANDLE_EMBEDDED_DATABASE_NAME:
     511             :         {
     512          67 :             OUString sEmbeddedName;
     513          67 :             if (rValue >>= sEmbeddedName)
     514          67 :                 mpDoc->GetDBManager()->setEmbeddedName(sEmbeddedName, *mpDocSh);
     515             :         }
     516          67 :         break;
     517             :         case HANDLE_SAVE_VERSION_ON_CLOSE:
     518             :         {
     519         284 :             mpDocSh->SetSaveVersionOnClose( *static_cast<sal_Bool const *>(rValue.getValue()) );
     520             :         }
     521         284 :         break;
     522             :         case HANDLE_UPDATE_FROM_TEMPLATE:
     523             :         {
     524         284 :             mpDocSh->SetQueryLoadTemplate( *static_cast<sal_Bool const *>(rValue.getValue()) );
     525             :         }
     526         284 :         break;
     527             :         case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
     528             :         {
     529         285 :             sal_Int16 nTmp = 0;
     530         285 :             rValue >>= nTmp;
     531             : 
     532         285 :             bool bUseVirDev = true;
     533         285 :             bool bHiResVirDev = true;
     534         285 :             if( nTmp == document::PrinterIndependentLayout::DISABLED )
     535          15 :                 bUseVirDev = false;
     536         270 :             else if ( nTmp == document::PrinterIndependentLayout::LOW_RESOLUTION )
     537           3 :                 bHiResVirDev = false;
     538         267 :             else if ( nTmp != document::PrinterIndependentLayout::HIGH_RESOLUTION )
     539           0 :                 throw IllegalArgumentException();
     540             : 
     541         285 :             mpDoc->getIDocumentDeviceAccess().setReferenceDeviceType( bUseVirDev, bHiResVirDev );
     542             :         }
     543         285 :         break;
     544             :         case HANDLE_IS_LABEL_DOC :
     545             :         {
     546         285 :             bool bSet = false;
     547         285 :             if(!(rValue >>= bSet))
     548           0 :                 throw IllegalArgumentException();
     549         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::LABEL_DOCUMENT, bSet);
     550             :         }
     551         285 :         break;
     552             :         case HANDLE_IS_ADD_FLY_OFFSET:
     553             :         {
     554        1808 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     555        1808 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_FLY_OFFSETS, bTmp);
     556             :         }
     557        1808 :         break;
     558             :         case HANDLE_IS_ADD_EXTERNAL_LEADING:
     559             :         {
     560         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     561         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_EXT_LEADING, bTmp);
     562             :         }
     563         285 :         break;
     564             :         case HANDLE_OLD_NUMBERING: // #111955#
     565             :         {
     566        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     567        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OLD_NUMBERING, bTmp);
     568             :         }
     569        1809 :         break;
     570             :         case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
     571             :         {
     572         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     573         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE, bTmp);
     574             :         }
     575         285 :         break;
     576             :         case HANDLE_ALLOW_PRINTJOB_CANCEL:
     577             :         {
     578         284 :             bool bState = false;
     579         284 :             if (!(rValue >>= bState))
     580           0 :                 throw IllegalArgumentException();
     581         284 :             mpDocSh->Stamp_SetPrintCancelState(bState);
     582             :         }
     583         284 :         break;
     584             :         case HANDLE_USE_FORMER_LINE_SPACING:
     585             :         {
     586        1810 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     587        1810 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OLD_LINE_SPACING, bTmp);
     588             :         }
     589        1810 :         break;
     590             :         case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
     591             :         {
     592        1810 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     593        1810 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS, bTmp);
     594             :         }
     595        1810 :         break;
     596             :         case HANDLE_USE_FORMER_OBJECT_POSITIONING:
     597             :         {
     598        1810 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     599        1810 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_OBJECT_POS, bTmp);
     600             :         }
     601        1810 :         break;
     602             :         case HANDLE_USE_FORMER_TEXT_WRAPPING:
     603             :         {
     604        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     605        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_TEXT_WRAPPING, bTmp);
     606             :         }
     607        1809 :         break;
     608             :         case HANDLE_CHANGES_PASSWORD:
     609             :         {
     610           0 :             Sequence <sal_Int8> aNew;
     611           0 :             if(rValue >>= aNew)
     612             :             {
     613           0 :                 mpDoc->getIDocumentRedlineAccess().SetRedlinePassword(aNew);
     614           0 :                 if(aNew.getLength())
     615             :                 {
     616           0 :                     sal_uInt16 eMode = mpDoc->getIDocumentRedlineAccess().GetRedlineMode();
     617           0 :                     eMode = eMode|nsRedlineMode_t::REDLINE_ON;
     618           0 :                     mpDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( eMode ));
     619             :                 }
     620           0 :             }
     621             :         }
     622           0 :         break;
     623             :         case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
     624             :         {
     625        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     626        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION, bTmp );
     627             :         }
     628        1809 :         break;
     629             :         case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
     630             :         {
     631        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     632        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, bTmp);
     633             :         }
     634        1809 :         break;
     635             :         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
     636             :         {
     637         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     638         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, bTmp);
     639             :         }
     640         285 :         break;
     641             :         case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
     642             :         {
     643        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     644        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, bTmp);
     645             :         }
     646        1809 :         break;
     647             :         case HANDLE_TABLE_ROW_KEEP:
     648             :         {
     649        1807 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     650        1807 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TABLE_ROW_KEEP, bTmp);
     651             :         }
     652        1807 :         break;
     653             :         case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
     654             :         {
     655        1806 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     656        1806 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, bTmp);
     657             :         }
     658        1806 :         break;
     659             :         case HANDLE_LOAD_READONLY:
     660             :         {
     661         285 :             mpDocSh->SetLoadReadonly( *static_cast<sal_Bool const *>(rValue.getValue()) );
     662             :         }
     663         285 :         break;
     664             :         case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
     665             :         {
     666         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     667         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, bTmp);
     668             :         }
     669         285 :         break;
     670             :         case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
     671             :         {
     672         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     673         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME, bTmp);
     674             :         }
     675         285 :         break;
     676             :         case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
     677             :         {
     678         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     679         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING, bTmp);
     680             :         }
     681         285 :         break;
     682             :         case HANDLE_USE_OLD_PRINTER_METRICS:
     683             :             // ignore - this is a dead property
     684         285 :         break;
     685             :         case HANDLE_TABS_RELATIVE_TO_INDENT:
     686             :         {
     687        2238 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     688        2238 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TABS_RELATIVE_TO_INDENT, bTmp);
     689             :         }
     690        2238 :         break;
     691             :         case HANDLE_RSID:
     692             :         {
     693         259 :             sal_uInt32 nTmp = 0;
     694         259 :             rValue >>= nTmp;
     695         259 :             mpDoc->setRsid( nTmp );
     696             :         }
     697         259 :         break;
     698             :         case HANDLE_RSID_ROOT:
     699             :         {
     700         259 :             sal_uInt32 nTmp = 0;
     701         259 :             rValue >>= nTmp;
     702         259 :             mpDoc->setRsidRoot( nTmp );
     703             :         }
     704         259 :         break;
     705             :         case HANDLE_PROTECT_FORM:
     706             :         {
     707         279 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     708         279 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FORM, bTmp);
     709             :         }
     710         279 :         break;
     711             :         // #i89181#
     712             :         case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
     713             :         {
     714         279 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     715         279 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, bTmp);
     716             :         }
     717         279 :         break;
     718             :         case HANDLE_MODIFYPASSWORDINFO:
     719             :         {
     720           0 :             uno::Sequence< beans::PropertyValue > aInfo;
     721           0 :             if ( !( rValue >>= aInfo ) )
     722             :                 throw lang::IllegalArgumentException(
     723             :                     OUString( "Value of type Sequence<PropertyValue> expected!" ),
     724             :                     uno::Reference< uno::XInterface >(),
     725           0 :                     2 );
     726             : 
     727           0 :             if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) )
     728             :                 throw beans::PropertyVetoException(
     729             :                     OUString( "The hash is not allowed to be changed now!" ),
     730           0 :                     uno::Reference< uno::XInterface >() );
     731             :         }
     732           0 :         break;
     733             :         case HANDLE_MATH_BASELINE_ALIGNMENT:
     734             :         {
     735         264 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     736         264 :             mpDoc->getIDocumentSettingAccess().set( DocumentSettingId::MATH_BASELINE_ALIGNMENT, bTmp );
     737             :         }
     738         264 :         break;
     739             :         case HANDLE_INVERT_BORDER_SPACING:
     740             :         {
     741        1792 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     742        1792 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::INVERT_BORDER_SPACING, bTmp);
     743             :         }
     744        1792 :         break;
     745             :         case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
     746             :         {
     747        1792 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     748        1792 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA, bTmp);
     749             :         }
     750        1792 :         break;
     751             :         case HANDLE_SMALL_CAPS_PERCENTAGE_66:
     752             :         {
     753         285 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     754         285 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::SMALL_CAPS_PERCENTAGE_66, bTmp);
     755             :         }
     756         285 :         break;
     757             :         case HANDLE_TAB_OVERFLOW:
     758             :         {
     759        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     760        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVERFLOW, bTmp);
     761             :         }
     762        1809 :         break;
     763             :         case HANDLE_UNBREAKABLE_NUMBERINGS:
     764             :         {
     765        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     766        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::UNBREAKABLE_NUMBERINGS, bTmp);
     767             :         }
     768        1809 :         break;
     769             :         case HANDLE_STYLES_NODEFAULT:
     770             :         {
     771        2199 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     772        2199 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::STYLES_NODEFAULT, bTmp);
     773             :         }
     774        2199 :         break;
     775             :         case HANDLE_FLOATTABLE_NOMARGINS:
     776             :         {
     777        1770 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     778        1770 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::FLOATTABLE_NOMARGINS, bTmp);
     779             :         }
     780        1770 :         break;
     781             :         case HANDLE_CLIPPED_PICTURES:
     782             :         {
     783        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     784        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CLIPPED_PICTURES, bTmp);
     785             :         }
     786        1809 :         break;
     787             :         case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
     788             :         {
     789        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     790        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS, bTmp);
     791             :         }
     792        1809 :         break;
     793             :         case HANDLE_EMBED_FONTS:
     794             :         {
     795         241 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     796         241 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_FONTS, bTmp);
     797             :         }
     798         241 :         break;
     799             :         case HANDLE_EMBED_SYSTEM_FONTS:
     800             :         {
     801         335 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     802         335 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_SYSTEM_FONTS, bTmp);
     803             :         }
     804         335 :         break;
     805             :         case HANDLE_TAB_OVER_MARGIN:
     806             :         {
     807        1809 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     808        1809 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN, bTmp);
     809             :         }
     810        1809 :         break;
     811             :         case HANDLE_SURROUND_TEXT_WRAP_SMALL:
     812             :         {
     813        2158 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     814        2158 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, bTmp);
     815             :         }
     816        2158 :         break;
     817             :         case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
     818             :         {
     819        2112 :             bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
     820        2112 :             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp);
     821             :         }
     822        2112 :         break;
     823             :         case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
     824             :         {
     825             :             bool bTmp;
     826        1809 :             if (rValue >>= bTmp)
     827             :             {
     828        1809 :                 mpDoc->getIDocumentSettingAccess().set(
     829        1809 :                     DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, bTmp);
     830             :             }
     831             :         }
     832        1809 :         break;
     833             :         case HANDLE_SUBTRACT_FLYS:
     834             :         {
     835             :             bool bTmp;
     836         285 :             if (rValue >>= bTmp)
     837             :             {
     838         285 :                 mpDoc->getIDocumentSettingAccess().set(
     839         285 :                     DocumentSettingId::SUBTRACT_FLYS, bTmp);
     840             :             }
     841             :         }
     842         285 :         break;
     843             :         default:
     844           0 :             throw UnknownPropertyException();
     845             :     }
     846       57329 : }
     847             : 
     848       57329 : void SwXDocumentSettings::_postSetValues ()
     849             :         throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
     850             : {
     851             :     // set printer only once, namely here!
     852       57329 :     if( mpPrinter != nullptr )
     853             :     {
     854             :         // #i86352# the printer is also used as container for options by sfx
     855             :         // when setting a printer it should have decent default options
     856          22 :         SfxItemSet aOptions( mpPrinter->GetOptions() );
     857          44 :         SwPrintData aPrtData( mpDoc->getIDocumentDeviceAccess().getPrintData() );
     858          44 :         SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData);
     859          22 :         aOptions.Put(aAddPrinterItem);
     860          22 :         mpPrinter->SetOptions( aOptions );
     861             : 
     862          44 :         mpDoc->getIDocumentDeviceAccess().setPrinter( mpPrinter, true, true );
     863             :     }
     864             : 
     865       57329 :     mpPrinter = 0;
     866       57329 :     mpDocSh = 0;
     867       57329 :     mpDoc = 0;
     868       57329 : }
     869             : 
     870        4729 : void SwXDocumentSettings::_preGetValues ()
     871             :         throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
     872             : {
     873        4729 :     mpDocSh = mpModel->GetDocShell();
     874        4729 :     if (NULL == mpDocSh)
     875           0 :         throw UnknownPropertyException();
     876        4729 :     mpDoc = mpDocSh->GetDoc();
     877        4729 :     if (NULL == mpDoc)
     878           0 :         throw UnknownPropertyException();
     879        4729 : }
     880             : 
     881        4729 : void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
     882             :         throw (beans::UnknownPropertyException, lang::WrappedTargetException,
     883             :                uno::RuntimeException)
     884             : {
     885        4729 :     switch( rInfo.mnHandle )
     886             :     {
     887             :         case HANDLE_FORBIDDEN_CHARS:
     888             :         {
     889         103 :             Reference<XForbiddenCharacters> xRet(*mpModel->GetPropertyHelper(), UNO_QUERY);
     890         103 :             rValue <<= xRet;
     891             :         }
     892         103 :         break;
     893             :         case HANDLE_LINK_UPDATE_MODE:
     894             :         {
     895          72 :             rValue <<= static_cast < sal_Int16 > ( mpDoc->getIDocumentSettingAccess().getLinkUpdateMode(true) );
     896             :         }
     897          72 :         break;
     898             :         case HANDLE_FIELD_AUTO_UPDATE:
     899             :         {
     900          72 :             SwFieldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
     901          72 :             rValue <<= nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS;
     902             :         }
     903          72 :         break;
     904             :         case HANDLE_CHART_AUTO_UPDATE:
     905             :         {
     906          74 :             SwFieldUpdateFlags nFlags = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
     907          74 :             rValue <<= nFlags == AUTOUPD_FIELD_AND_CHARTS;
     908             :         }
     909          74 :         break;
     910             :         case HANDLE_ADD_PARA_TABLE_SPACING:
     911             :         {
     912          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::PARA_SPACE_MAX);
     913             :         }
     914          74 :         break;
     915             :         case HANDLE_ADD_PARA_TABLE_SPACING_AT_START:
     916             :         {
     917          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES);
     918             :         }
     919          74 :         break;
     920             :         case HANDLE_ALIGN_TAB_STOP_POSITION:
     921             :         {
     922          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT);
     923             :         }
     924          74 :         break;
     925             :         case HANDLE_PRINTER_NAME:
     926             :         {
     927          72 :             SfxPrinter *pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
     928          72 :             rValue <<= pPrinter ? OUString ( pPrinter->GetName()) : OUString();
     929             :         }
     930          72 :         break;
     931             :         case HANDLE_PRINTER_SETUP:
     932             :         {
     933          72 :             SfxPrinter *pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
     934          72 :             if (pPrinter)
     935             :             {
     936           3 :                 SvMemoryStream aStream;
     937           3 :                 pPrinter->Store( aStream );
     938           3 :                 aStream.Seek ( STREAM_SEEK_TO_END );
     939           3 :                 sal_uInt32 nSize = aStream.Tell();
     940           3 :                 aStream.Seek ( STREAM_SEEK_TO_BEGIN );
     941           6 :                 Sequence < sal_Int8 > aSequence( nSize );
     942           3 :                 aStream.Read ( aSequence.getArray(), nSize );
     943           6 :                 rValue <<= aSequence;
     944             :             }
     945             :             else
     946             :             {
     947          69 :                 Sequence < sal_Int8 > aSequence ( 0 );
     948          69 :                 rValue <<= aSequence;
     949             :             }
     950             :         }
     951          72 :         break;
     952             :         case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
     953             :         {
     954          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::KERN_ASIAN_PUNCTUATION);
     955             :         }
     956          72 :         break;
     957             :         case HANDLE_APPLY_USER_DATA:
     958             :         {
     959          72 :             rValue <<= mpDocSh->IsUseUserData();
     960             :         }
     961          72 :         break;
     962             :         case HANDLE_CHARACTER_COMPRESSION_TYPE:
     963             :         {
     964          72 :             rValue <<= static_cast < sal_Int16 > (mpDoc->getIDocumentSettingAccess().getCharacterCompressionType());
     965             :         }
     966          72 :         break;
     967             :         case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
     968             :         {
     969          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS);
     970             :         }
     971          74 :         break;
     972             :         case HANDLE_CURRENT_DATABASE_DATA_SOURCE:
     973             :         {
     974          72 :             const SwDBData& rData = mpDoc->GetDBDesc();
     975          72 :             rValue <<= rData.sDataSource;
     976             :         }
     977          72 :         break;
     978             :         case HANDLE_CURRENT_DATABASE_COMMAND:
     979             :         {
     980          72 :             const SwDBData& rData = mpDoc->GetDBDesc();
     981          72 :             rValue <<= rData.sCommand;
     982             :         }
     983          72 :         break;
     984             :         case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
     985             :         {
     986          72 :             const SwDBData& rData = mpDoc->GetDBDesc();
     987          72 :             rValue <<= rData.nCommandType;
     988             :         }
     989          72 :         break;
     990             :         case HANDLE_EMBEDDED_DATABASE_NAME:
     991             :         {
     992          72 :             rValue <<= mpDoc->GetDBManager()->getEmbeddedName();
     993             :         }
     994          72 :         break;
     995             :         case HANDLE_SAVE_VERSION_ON_CLOSE:
     996             :         {
     997          72 :             rValue <<= mpDocSh->IsSaveVersionOnClose();
     998             :         }
     999          72 :         break;
    1000             :         case HANDLE_UPDATE_FROM_TEMPLATE:
    1001             :         {
    1002          72 :             rValue <<= mpDocSh->IsQueryLoadTemplate();
    1003             :         }
    1004          72 :         break;
    1005             :         case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
    1006             :         {
    1007             :             // returns short (see css.document.PrinterIndependentLayout)
    1008          72 :             sal_Int16 nVirDevType = mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE) ?
    1009          69 :                                     ( mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE) ?
    1010             :                                       document::PrinterIndependentLayout::HIGH_RESOLUTION :
    1011             :                                       document::PrinterIndependentLayout::LOW_RESOLUTION ) :
    1012         141 :                                     document::PrinterIndependentLayout::DISABLED;
    1013          72 :             rValue <<= nVirDevType;
    1014             :         }
    1015          72 :         break;
    1016             :         case HANDLE_IS_LABEL_DOC:
    1017             :         {
    1018          74 :             bool bLabel = mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::LABEL_DOCUMENT);
    1019          74 :             rValue <<= bLabel;
    1020             :         }
    1021          74 :         break;
    1022             :         case HANDLE_IS_ADD_FLY_OFFSET:
    1023             :         {
    1024          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_FLY_OFFSETS);
    1025             :         }
    1026          72 :         break;
    1027             :         case HANDLE_IS_ADD_EXTERNAL_LEADING:
    1028             :         {
    1029          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_EXT_LEADING);
    1030             :         }
    1031          72 :         break;
    1032             :         case HANDLE_OLD_NUMBERING: // #111955#
    1033             :         {
    1034          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::OLD_NUMBERING);
    1035             :         }
    1036          72 :         break;
    1037             :         case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING: // #111955#
    1038             :         {
    1039          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE);
    1040             :         }
    1041          72 :         break;
    1042             :         case HANDLE_ALLOW_PRINTJOB_CANCEL:
    1043             :         {
    1044          72 :             rValue <<= mpDocSh->Stamp_GetPrintCancelState();
    1045             :         }
    1046          72 :         break;
    1047             :         case HANDLE_USE_FORMER_LINE_SPACING:
    1048             :         {
    1049          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::OLD_LINE_SPACING);
    1050             :         }
    1051          74 :         break;
    1052             :         case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
    1053             :         {
    1054          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS);
    1055             :         }
    1056          74 :         break;
    1057             :         case HANDLE_USE_FORMER_OBJECT_POSITIONING:
    1058             :         {
    1059          74 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_OBJECT_POS);
    1060             :         }
    1061          74 :         break;
    1062             :         case HANDLE_USE_FORMER_TEXT_WRAPPING:
    1063             :         {
    1064          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING);
    1065             :         }
    1066          72 :         break;
    1067             :         case HANDLE_CHANGES_PASSWORD:
    1068             :         {
    1069          72 :             rValue <<= mpDoc->getIDocumentRedlineAccess().GetRedlinePassword();
    1070             :         }
    1071          72 :         break;
    1072             :         case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
    1073             :         {
    1074          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
    1075             :         }
    1076          72 :         break;
    1077             :         case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
    1078             :         {
    1079          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING);
    1080             :         }
    1081          72 :         break;
    1082             :         case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
    1083             :         {
    1084          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK);
    1085             :         }
    1086          72 :         break;
    1087             :         case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
    1088             :         {
    1089          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT);
    1090             :         }
    1091          72 :         break;
    1092             :         case HANDLE_TABLE_ROW_KEEP :
    1093             :         {
    1094          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::TABLE_ROW_KEEP);
    1095             :         }
    1096          72 :         break;
    1097             :         case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
    1098             :         {
    1099          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION);
    1100             :         }
    1101          72 :         break;
    1102             :         case HANDLE_LOAD_READONLY:
    1103             :         {
    1104          72 :             rValue <<= mpDocSh->IsLoadReadonly();
    1105             :         }
    1106          72 :         break;
    1107             :         case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
    1108             :         {
    1109          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE);
    1110             :         }
    1111          72 :         break;
    1112             :         case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
    1113             :         {
    1114          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME);
    1115             :         }
    1116          72 :         break;
    1117             :         case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
    1118             :         {
    1119          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING);
    1120             :         }
    1121          72 :         break;
    1122             :         case HANDLE_USE_OLD_PRINTER_METRICS:
    1123             :         {
    1124          72 :             rValue <<= false;
    1125             :         }
    1126          72 :         break;
    1127             :         case HANDLE_TABS_RELATIVE_TO_INDENT:
    1128             :         {
    1129          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::TABS_RELATIVE_TO_INDENT);
    1130             :         }
    1131          72 :         break;
    1132             :         case HANDLE_RSID:
    1133             :         {
    1134          72 :             rValue <<= static_cast < sal_Int32 > ( mpDoc->getRsid() );
    1135             :         }
    1136          72 :         break;
    1137             :         case HANDLE_RSID_ROOT:
    1138             :         {
    1139          72 :             rValue <<= static_cast < sal_Int32 > ( mpDoc->getRsidRoot() );
    1140             :         }
    1141          72 :         break;
    1142             :         case HANDLE_PROTECT_FORM:
    1143             :         {
    1144          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM);
    1145             :         }
    1146          72 :         break;
    1147             :         // #i89181#
    1148             :         case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
    1149             :         {
    1150          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
    1151             :         }
    1152          72 :         break;
    1153             :         case HANDLE_MODIFYPASSWORDINFO:
    1154             :         {
    1155          72 :             rValue <<= mpDocSh->GetModifyPasswordInfo();
    1156             :         }
    1157          72 :         break;
    1158             :         case HANDLE_MATH_BASELINE_ALIGNMENT:
    1159             :         {
    1160          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT );
    1161             :         }
    1162          72 :         break;
    1163             :         case HANDLE_INVERT_BORDER_SPACING:
    1164             :         {
    1165          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::INVERT_BORDER_SPACING);
    1166             :         }
    1167          72 :         break;
    1168             :         case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
    1169             :         {
    1170          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA );
    1171             :         }
    1172          72 :         break;
    1173             :         case HANDLE_SMALL_CAPS_PERCENTAGE_66:
    1174             :         {
    1175          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 );
    1176             :         }
    1177          72 :         break;
    1178             :         case HANDLE_TAB_OVERFLOW:
    1179             :         {
    1180          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::TAB_OVERFLOW );
    1181             :         }
    1182          72 :         break;
    1183             :         case HANDLE_UNBREAKABLE_NUMBERINGS:
    1184             :         {
    1185          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::UNBREAKABLE_NUMBERINGS );
    1186             :         }
    1187          72 :         break;
    1188             :         case HANDLE_STYLES_NODEFAULT:
    1189             :         {
    1190          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::STYLES_NODEFAULT );
    1191             :         }
    1192          72 :         break;
    1193             :         case HANDLE_FLOATTABLE_NOMARGINS:
    1194             :         {
    1195          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::FLOATTABLE_NOMARGINS );
    1196             :         }
    1197          72 :         break;
    1198             :         case HANDLE_CLIPPED_PICTURES:
    1199             :         {
    1200          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::CLIPPED_PICTURES );
    1201             :         }
    1202          72 :         break;
    1203             :         case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
    1204             :         {
    1205          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS );
    1206             :         }
    1207          72 :         break;
    1208             :         case HANDLE_EMBED_FONTS:
    1209             :         {
    1210          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS );
    1211             :         }
    1212          72 :         break;
    1213             :         case HANDLE_EMBED_SYSTEM_FONTS:
    1214             :         {
    1215          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_SYSTEM_FONTS );
    1216             :         }
    1217          72 :         break;
    1218             :         case HANDLE_TAB_OVER_MARGIN:
    1219             :         {
    1220          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::TAB_OVER_MARGIN );
    1221             :         }
    1222          72 :         break;
    1223             :         case HANDLE_SURROUND_TEXT_WRAP_SMALL:
    1224             :         {
    1225          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::SURROUND_TEXT_WRAP_SMALL );
    1226             :         }
    1227          72 :         break;
    1228             :         case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
    1229             :         {
    1230          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING );
    1231             :         }
    1232          72 :         break;
    1233             :         case HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE:
    1234             :         {
    1235          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE);
    1236             :         }
    1237          72 :         break;
    1238             :         case HANDLE_SUBTRACT_FLYS:
    1239             :         {
    1240          72 :             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS);
    1241             :         }
    1242          72 :         break;
    1243             :         default:
    1244           0 :             throw UnknownPropertyException();
    1245             :     }
    1246        4729 : }
    1247             : 
    1248        4729 : void SwXDocumentSettings::_postGetValues ()
    1249             :         throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
    1250             : {
    1251        4729 :     mpDocSh = 0;
    1252        4729 :     mpDoc = 0;
    1253        4729 : }
    1254             : 
    1255             : // XServiceInfo
    1256           0 : OUString SAL_CALL SwXDocumentSettings::getImplementationName(  )
    1257             :     throw(RuntimeException, std::exception)
    1258             : {
    1259           0 :     return OUString("com.sun.star.comp.Writer.DocumentSettings");
    1260             : }
    1261             : 
    1262           2 : sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName )
    1263             :     throw(RuntimeException, std::exception)
    1264             : {
    1265           2 :     return cppu::supportsService(this, ServiceName);
    1266             : }
    1267             : 
    1268           2 : Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames(  )
    1269             :     throw(RuntimeException, std::exception)
    1270             : {
    1271           2 :     Sequence< OUString > aSeq( 3 );
    1272           2 :     aSeq[0] = "com.sun.star.document.Settings";
    1273           2 :     aSeq[1] = "com.sun.star.text.DocumentSettings";
    1274           2 :     aSeq[2] = "com.sun.star.text.PrintSettings";
    1275           2 :     return aSeq;
    1276         177 : }
    1277             : 
    1278             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11