2014-04-05 14:29:54 +05:30
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at http : //mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice :
*
* Licensed to the Apache Software Foundation ( ASF ) under one or more
* contributor license agreements . See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership . The ASF licenses this file to you under the Apache
* License , Version 2.0 ( the " License " ) ; you may not use this file
* except in compliance with the License . You may obtain a copy of
* the License at http : //www.apache.org/licenses/LICENSE-2.0 .
*/
2014-05-15 12:06:32 +02:00
# ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTSETTINGMANAGER_HXX
# define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTSETTINGMANAGER_HXX
2014-04-05 14:29:54 +05:30
# include <IDocumentSettingAccess.hxx>
class SwDoc ;
namespace sw {
class DocumentSettingManager :
public IDocumentSettingAccess
{
rtl : : Reference < SvxForbiddenCharactersTable > mxForbiddenCharsTable ;
SwDoc & m_rDoc ;
sal_uInt16 mnLinkUpdMode ; //< UpdateMode for links.
2015-05-20 13:05:49 +02:00
SwFieldUpdateFlags meFieldUpdMode ; //< Automatically Update Mode for fields/charts.
2014-04-05 14:29:54 +05:30
SwCharCompressType meChrCmprType ; //< for ASIAN: compress punctuation/kana
2014-05-26 16:16:28 +02:00
sal_uInt32 mn32DummyCompatibilityOptions1 ;
sal_uInt32 mn32DummyCompatibilityOptions2 ;
2014-05-23 14:43:48 +02:00
// COMPATIBILITY FLAGS START
//
//
// HISTORY OF THE COMPATIBILITY FLAGS:
//
// SO5:
2014-11-08 14:19:22 +01:00
// mbParaSpaceMax def = false, true since SO8
// mbParaSpaceMaxAtPages def = false, true since SO8
2014-05-23 14:43:48 +02:00
//
// SO6:
2014-11-08 14:19:22 +01:00
// mbTabCompat def = false, true since SO8
2014-05-23 14:43:48 +02:00
//
// SO7:
2014-11-08 14:19:22 +01:00
// mbUseVirtualDevice def = true
// mbAddFlyOffsets def = false, hidden
2014-05-23 14:43:48 +02:00
//
// SO7pp1:
2014-11-08 14:19:22 +01:00
// bOldNumbering def = false, hidden
2014-05-23 14:43:48 +02:00
//
// SO8:
2014-11-08 14:19:22 +01:00
// mbAddExternalLeading def = true
// mbUseHiResolutionVirtualDevice def = true, hidden
// mbOldLineSpacing def = false
// mbAddParaSpacingToTableCells def = true
// mbUseFormerObjectPos def = false
// mbUseFormerTextWrapping def = false
// mbConsiderWrapOnObjPos def = false
2014-05-23 14:43:48 +02:00
//
// SO8pp1:
2014-11-08 14:19:22 +01:00
// mbIgnoreFirstLineIndentInNumbering def = false, hidden
// mbDoNotJustifyLinesWithManualBreak def = false, hidden
// mbDoNotResetParaAttrsForNumFont def = false, hidden
2014-05-23 14:43:48 +02:00
//
// SO8pp3
2014-11-08 14:19:22 +01:00
// mbDoNotCaptureDrawObjsOnPage def = false, hidden
2014-05-23 14:43:48 +02:00
// - Relevant for drawing objects, which don't follow the text flow, but
// whose position is outside the page area:
2014-11-08 14:19:22 +01:00
// false: Such drawing objects are captured on the page area of its anchor.
// true: Such drawing objects can leave the page area, they aren't captured.
// mbTableRowKeep def = false, hidden
// mbIgnoreTabsAndBlanksForLineCalculation def = false, hidden
// mbClipAsCharacterAnchoredWriterFlyFrame def = false, hidden
2014-05-23 14:43:48 +02:00
// - Introduced in order to re-activate clipping of as-character anchored
2015-11-25 06:03:10 -05:00
// Writer fly frames in method <SwFlyInContentFrame::MakeAll()> for documents,
2014-05-23 14:43:48 +02:00
// which are created with version prior SO8/OOo 2.0
//
// SO8pp4
2014-11-08 14:19:22 +01:00
// mbUnixForceZeroExtLeading def = false, hidden
2014-05-23 14:43:48 +02:00
//
// SO8pu8
//
// SO9
// #i24363# tab stops relative to indent
2014-11-08 14:19:22 +01:00
// mbTabRelativeToIndent def = true, hidden
2014-05-23 14:43:48 +02:00
// #i89181# suppress tab stop at left indent for paragraphs in lists, whose
// list level position and space mode equals LABEL_ALIGNMENT and whose list
// label is followed by a tab character.
2014-11-08 14:19:22 +01:00
// mbTabAtLeftIndentForParagraphsInList def = false, hidden
2014-05-23 14:43:48 +02:00
2014-11-08 14:19:22 +01:00
bool mbHTMLMode : 1 ; //< true: Document is in HTMLMode.
bool mbIsGlobalDoc : 1 ; //< true: It's a global document.
bool mbGlblDocSaveLinks : 1 ; //< true: Save sections linked in global document.
bool mbIsLabelDoc : 1 ; //< true: It's a label document.
bool mbPurgeOLE : 1 ; //< true: Purge OLE-Objects
bool mbKernAsianPunctuation : 1 ; //< true: kerning also for ASIAN punctuation
2014-04-05 14:29:54 +05:30
bool mbParaSpaceMax : 1 ;
bool mbParaSpaceMaxAtPages : 1 ;
bool mbTabCompat : 1 ;
bool mbUseVirtualDevice : 1 ;
bool mbAddFlyOffsets : 1 ;
2016-03-31 15:05:48 +02:00
bool mbAddVerticalFlyOffsets : 1 ;
2014-04-05 14:29:54 +05:30
bool mbAddExternalLeading : 1 ;
bool mbUseHiResolutionVirtualDevice : 1 ;
bool mbOldLineSpacing : 1 ; // #i11859#
bool mbAddParaSpacingToTableCells : 1 ;
bool mbUseFormerObjectPos : 1 ; // #i11860#
bool mbUseFormerTextWrapping : 1 ;
bool mbConsiderWrapOnObjPos : 1 ; // #i28701#
2014-11-08 14:19:22 +01:00
// true: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
2014-04-05 14:29:54 +05:30
// floating screen objects as given by its
// attribute 'WrapInfluenceOnObjPos'.
bool mbMathBaselineAlignment : 1 ; // TL 2010-10-29 #i972#
bool mbStylesNoDefault : 1 ;
bool mbFloattableNomargins : 1 ; //< If paragraph margins next to a floating table should be ignored.
bool mEmbedFonts : 1 ; //< Whether to embed fonts used by the document when saving.
bool mEmbedSystemFonts : 1 ; //< Whether to embed also system fonts.
// non-ui-compatibility flags:
bool mbOldNumbering : 1 ;
bool mbIgnoreFirstLineIndentInNumbering : 1 ; // #i47448#
bool mbDoNotJustifyLinesWithManualBreak : 1 ; // #i49277#
bool mbDoNotResetParaAttrsForNumFont : 1 ; // #i53199#
bool mbTableRowKeep : 1 ;
bool mbIgnoreTabsAndBlanksForLineCalculation : 1 ; // #i3952#
bool mbDoNotCaptureDrawObjsOnPage : 1 ; // #i62875#
bool mbClipAsCharacterAnchoredWriterFlyFrames : 1 ;
bool mbUnixForceZeroExtLeading : 1 ; // #i60945#
bool mbTabRelativeToIndent : 1 ; // #i24363# tab stops relative to indent
bool mbProtectForm : 1 ;
2017-01-13 05:26:07 -08:00
bool mbMsWordCompTrailingBlanks : 1 ; // tdf#104349 tdf#104668
2014-04-05 14:29:54 +05:30
bool mbInvertBorderSpacing : 1 ;
bool mbCollapseEmptyCellPara : 1 ;
bool mbTabAtLeftIndentForParagraphsInList ; // #i89181# - see above
bool mbSmallCapsPercentage66 ;
bool mbTabOverflow ;
bool mbUnbreakableNumberings ;
bool mbClippedPictures ;
bool mbBackgroundParaOverDrawings ;
bool mbTabOverMargin ;
2016-09-01 11:19:56 +03:00
bool mbTreatSingleColumnBreakAsPageBreak ; // tdf#76349
2014-04-05 14:29:54 +05:30
bool mbSurroundTextWrapSmall ;
2014-10-30 15:12:33 +01:00
bool mbPropLineSpacingShrinksFirstLine ; // fdo#79602
tdf#86578: sw: fix rendering of legacy documents with fly achored at fly
Resurrect the special hack "lcl_SubtractFlys" that effectively paints
"lower" flys on top of "higher" flys, defying the z-ordering, if the
lower fly is *anchored* in or at the higher fly.
It turns out that this is not obvious to emulate in any other way that it
is currently implemented:
One idea would be to split up painting of the fly background from the
foreground, by creating 2 different view objects per fly as children
of the SdrPage when decomposing it in svx; but the problem is, they will
be ordered in z-order of the flys, and the point would be to paint the
backgrounds first and in a different order, call it "anchoring order".
What that order should be is hard to tell, there is a conflict between
the defined z-order and the flys that are part of one "anchoring
hierarchy" and should have their backgrounds re-ordered, because
entirely unrelated flys that could belong to different "anchoring
hierarchies" but overlap the first ones may result in a cyclic ordering.
Painting one "anchoring hierarchy" recursively would not get
z-order of flys from different anchoring hierarchies right.
Another difficulty is that heaven-layer backgrounds would need to be
painted before hell-layer ones.
Another aspect of the lcl_SubtractFlys is that it entirely ignores
drawing shapes; only Writer's own flys are handled.
Since none of the above makes much sense, we clearly want to
deprecate the lcl_SubtractFlys rendering.
Introduce a new compatibility flag "SubtractFlysAnchoredAtFlys" so that
the legacy rendering is only active for legacy documents, while new ones
remain free from its taint.
(regression from 6e61ecd09679a66060f932835622821d39e92f01)
Change-Id: I710fe79710b89c8f865ebb7162e14713aac6cc4a
2015-04-10 23:02:01 +02:00
bool mbSubtractFlys ; // tdf#86578
2014-05-29 14:31:20 +02:00
bool mApplyParagraphMarkFormatToNumbering ;
2014-04-05 14:29:54 +05:30
bool mbLastBrowseMode : 1 ;
public :
DocumentSettingManager ( SwDoc & rDoc ) ;
2016-09-13 13:09:01 +02:00
virtual ~ DocumentSettingManager ( ) override ;
2014-04-05 14:29:54 +05:30
// IDocumentSettingAccess
2015-10-12 16:04:04 +02:00
virtual bool get ( /*[in]*/ DocumentSettingId id ) const override ;
virtual void set ( /*[in]*/ DocumentSettingId id , /*[in]*/ bool value ) override ;
2015-11-06 10:51:51 +02:00
virtual const css : : i18n : : ForbiddenCharacters * getForbiddenCharacters ( /*[in]*/ sal_uInt16 nLang , /*[in]*/ bool bLocaleData ) const override ;
virtual void setForbiddenCharacters ( /*[in]*/ sal_uInt16 nLang , /*[in]*/ const css : : i18n : : ForbiddenCharacters & rForbiddenCharacters ) override ;
2015-10-12 16:04:04 +02:00
virtual rtl : : Reference < SvxForbiddenCharactersTable > & getForbiddenCharacterTable ( ) override ;
virtual const rtl : : Reference < SvxForbiddenCharactersTable > & getForbiddenCharacterTable ( ) const override ;
virtual sal_uInt16 getLinkUpdateMode ( /*[in]*/ bool bGlobalSettings ) const override ;
virtual void setLinkUpdateMode ( /*[in]*/ sal_uInt16 nMode ) override ;
virtual SwFieldUpdateFlags getFieldUpdateFlags ( /*[in]*/ bool bGlobalSettings ) const override ;
virtual void setFieldUpdateFlags ( /*[in]*/ SwFieldUpdateFlags eMode ) override ;
virtual SwCharCompressType getCharacterCompressionType ( ) const override ;
virtual void setCharacterCompressionType ( /*[in]*/ SwCharCompressType nType ) override ;
2014-04-05 14:29:54 +05:30
2014-10-12 13:00:46 +02:00
// Replace all compatibility options with those from rSource.
2014-05-26 16:16:28 +02:00
void ReplaceCompatibilityOptions ( const DocumentSettingManager & rSource ) ;
2014-04-05 14:29:54 +05:30
2015-10-12 16:04:04 +02:00
sal_uInt32 Getn32DummyCompatibilityOptions1 ( ) const override ;
void Setn32DummyCompatibilityOptions1 ( const sal_uInt32 CompatibilityOptions1 ) override ;
sal_uInt32 Getn32DummyCompatibilityOptions2 ( ) const override ;
void Setn32DummyCompatibilityOptions2 ( const sal_uInt32 CompatibilityOptions2 ) override ;
2014-05-23 14:43:48 +02:00
2014-04-05 14:29:54 +05:30
} ;
}
# endif //_DOCSETTING_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */