LibreOffice Module sw (master)  1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
SwDocStyleSheet Class Referencefinal

#include <docstyle.hxx>

Inheritance diagram for SwDocStyleSheet:
[legend]
Collaboration diagram for SwDocStyleSheet:
[legend]

Public Member Functions

 SwDocStyleSheet (SwDoc &rDoc, SwDocStyleSheetPool &rPool)
 
 SwDocStyleSheet (const SwDocStyleSheet &)
 
void Reset ()
 
void SetFamily (SfxStyleFamily eFam)
 
bool IsPhysical () const
 
void SetPhysical (bool bPhys)
 
virtual void SetHidden (bool bHidden) override
 
virtual bool IsHidden () const override
 
void SetGrabBagItem (const css::uno::Any &rVal)
 
void GetGrabBagItem (css::uno::Any &rVal) const
 
void SetItemSet (const SfxItemSet &rSet, const bool bResetIndentAttrsAtParagraphStyle=false)
 add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value false, which indicates that the indent attributes at a paragraph style should be reset in case that a list style is applied to the paragraph style and no indent attributes are applied. More...
 
virtual SfxItemSetGetItemSet () override
 
virtual std::unique_ptr< SfxItemSetGetItemSetForPreview () override
 
void MergeIndentAttrsOfListStyle (SfxItemSet &rSet)
 new method for paragraph styles to merge indent attributes of applied list style into the given item set, if the list style indent attributes are applicable. More...
 
virtual const OUString & GetParent () const override
 
virtual const OUString & GetFollow () const override
 
virtual sal_uLong GetHelpId (OUString &rFile) override
 
virtual void SetHelpId (const OUString &r, sal_uLong nId) override
 
void PresetName (const OUString &rName)
 Preset the members without physical access. More...
 
void PresetNameAndFamily (const OUString &rName)
 
void PresetParent (const OUString &rName)
 
void PresetFollow (const OUString &rName)
 
virtual bool SetName (const OUString &rNewName, bool bReindexNow=true) override
 
virtual bool SetParent (const OUString &rStr) override
 
virtual bool SetFollow (const OUString &rStr) override
 
virtual bool HasFollowSupport () const override
 
virtual bool HasParentSupport () const override
 
virtual bool HasClearParentSupport () const override
 
virtual OUString GetDescription (MapUnit eUnit) override
 
SwCharFormatGetCharFormat ()
 
SwTextFormatCollGetCollection ()
 
SwFrameFormatGetFrameFormat ()
 
const SwPageDescGetPageDesc ()
 
const SwNumRuleGetNumRule ()
 
void SetNumRule (const SwNumRule &rRule)
 
SwTableAutoFormatGetTableFormat ()
 
virtual bool IsUsed () const override
 
- Public Member Functions inherited from SfxStyleSheetBase
const OUString & GetName () const
 
SfxStyleSheetBasePoolGetPool ()
 
SfxStyleFamily GetFamily () const
 
SfxStyleSearchBits GetMask () const
 
void SetMask (SfxStyleSearchBits mask)
 
bool IsUserDefined () const
 
virtual bool isScStyleSheet () const
 

Private Types

enum  FillStyleType {
  FillOnlyName,
  FillAllInfo,
  FillPhysical,
  FillPreview
}
 Fill StyleSheet with data. More...
 

Private Member Functions

SAL_DLLPRIVATE void Create ()
 Make empty shell a real StyleSheet (Core). More...
 
SAL_DLLPRIVATE bool FillStyleSheet (FillStyleType eFType, std::unique_ptr< SfxItemSet > *o_ppFlatSet=nullptr)
 
virtual ~SwDocStyleSheet () override
 

Private Attributes

SwCharFormatpCharFormat
 
SwTextFormatCollpColl
 
SwFrameFormatpFrameFormat
 
const SwPageDescpDesc
 
const SwNumRulepNumRule
 
SwTableAutoFormatpTableFormat
 
const SwBoxAutoFormatpBoxFormat
 
SwDocrDoc
 
SfxItemSet aCoreSet
 
bool bPhysical
 

Friends

class SwDocStyleSheetPool
 
class SwStyleSheetIterator
 

Additional Inherited Members

- Protected Member Functions inherited from SfxStyleSheetBase
 SfxStyleSheetBase (const OUString &, SfxStyleSheetBasePool *, SfxStyleFamily eFam, SfxStyleSearchBits mask)
 
 SfxStyleSheetBase (const SfxStyleSheetBase &)
 
virtual ~SfxStyleSheetBase () override
 
- Protected Attributes inherited from SfxStyleSheetBase
SfxStyleSheetBasePoolm_pPool
 
SfxStyleFamily nFamily
 
OUString aName
 
OUString aParent
 
OUString aFollow
 
OUString aHelpFile
 
SfxItemSetpSet
 
SfxStyleSearchBits nMask
 
sal_uLong nHelpId
 
bool bMySet
 
bool bHidden
 

Detailed Description

Definition at line 45 of file docstyle.hxx.

Member Enumeration Documentation

Fill StyleSheet with data.

Enumerator
FillOnlyName 
FillAllInfo 
FillPhysical 
FillPreview 

Definition at line 66 of file docstyle.hxx.

Constructor & Destructor Documentation

SwDocStyleSheet::~SwDocStyleSheet ( )
overrideprivatevirtualdefault
SwDocStyleSheet::SwDocStyleSheet ( SwDoc rDoc,
SwDocStyleSheetPool rPool 
)

Definition at line 453 of file docstyle.cxx.

References Auto, Char, XATTR_FILL_FIRST, and XATTR_FILL_LAST.

SwDocStyleSheet::SwDocStyleSheet ( const SwDocStyleSheet )
default

Member Function Documentation

void SwDocStyleSheet::Create ( )
private
bool SwDocStyleSheet::FillStyleSheet ( FillStyleType  eFType,
std::unique_ptr< SfxItemSet > *  o_ppFlatSet = nullptr 
)
private

Definition at line 1855 of file docstyle.cxx.

References SfxStyleSheetBase::aHelpFile, SfxStyleSheetBase::aName, bPhysical, ChrFmt, COLL_DOC_BITS, COLL_EXTRA_BITS, COLL_GET_RANGE_BITS, COLL_HTML_BITS, COLL_LISTS_BITS, COLL_REGISTER_BITS, COLL_TEXT_BITS, FillAllInfo, FillPhysical, FillPreview, FrmFmt, SwDoc::GetDfltCharFormat(), SwDoc::GetDocPattern(), SwDoc::getIDocumentState(), SwDoc::GetIDocumentUndoRedo(), SwFormat::GetName(), SwTextFormatColl::GetNextTextFormatColl(), SwFormat::GetPoolFormatId(), SwNumRule::GetPoolFormatId(), SwFormat::GetPoolHelpId(), SwNumRule::GetPoolHelpId(), SwFormat::GetPoolHlpFileId(), SwNumRule::GetPoolHlpFileId(), SwStyleNameMapper::GetPoolIdFromUIName(), SwStyleNameMapper::GetTextUINameArray(), IDocumentState::IsModified(), SwTableAutoFormat::IsUserDefined(), lcl_DeleteInfoStyles(), lcl_FindCellStyle(), lcl_FindCharFormat(), lcl_FindFrameFormat(), lcl_FindNumRule(), lcl_FindPageDesc(), lcl_FindParaFormat(), lcl_FindTableStyle(), lcl_SaveStyles(), lcl_SwFormatToFlatItemSet(), SfxStyleSheetBase::nFamily, SfxStyleSheetBase::nHelpId, NumRule, PageDesc, pBoxFormat, pCharFormat, pColl, pDesc, pFrameFormat, pNumRule, PresetFollow(), pTableFormat, rDoc, RES_CONDTXTFMTCOLL, RES_POOLCOLL_STANDARD, RES_POOLCOLL_TEXT_BEGIN, IDocumentState::ResetModified(), SfxStyleSheetBase::SetMask(), TxtColl, USER_FMT, USHRT_MAX, and SwFormat::Which().

Referenced by GetCharFormat(), GetCollection(), GetFollow(), GetFrameFormat(), GetItemSet(), GetItemSetForPreview(), GetNumRule(), GetPageDesc(), GetTableFormat(), IsUsed(), SetGrabBagItem(), SetHidden(), SetItemSet(), and SetName().

SwCharFormat * SwDocStyleSheet::GetCharFormat ( )
SwTextFormatColl * SwDocStyleSheet::GetCollection ( )
OUString SwDocStyleSheet::GetDescription ( MapUnit  eUnit)
overridevirtual
const OUString & SwDocStyleSheet::GetFollow ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 766 of file docstyle.cxx.

References SfxStyleSheetBase::aFollow, bPhysical, FillAllInfo, and FillStyleSheet().

SwFrameFormat * SwDocStyleSheet::GetFrameFormat ( )
void SwDocStyleSheet::GetGrabBagItem ( css::uno::Any &  rVal) const
sal_uLong SwDocStyleSheet::GetHelpId ( OUString &  rFile)
overridevirtual
SfxItemSet & SwDocStyleSheet::GetItemSet ( )
overridevirtual
std::unique_ptr< SfxItemSet > SwDocStyleSheet::GetItemSetForPreview ( )
overridevirtual
const SwNumRule * SwDocStyleSheet::GetNumRule ( )
const SwPageDesc * SwDocStyleSheet::GetPageDesc ( )
const OUString & SwDocStyleSheet::GetParent ( ) const
overridevirtual
SwTableAutoFormat * SwDocStyleSheet::GetTableFormat ( )

Definition at line 2184 of file docstyle.cxx.

References bPhysical, FillPhysical, FillStyleSheet(), and pTableFormat.

Referenced by SwDocShell::MakeByExample().

bool SwDocStyleSheet::HasClearParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 807 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

bool SwDocStyleSheet::HasFollowSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 777 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

bool SwDocStyleSheet::HasParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 793 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

bool SwDocStyleSheet::IsHidden ( ) const
overridevirtual
bool SwDocStyleSheet::IsPhysical ( ) const
inline

Definition at line 88 of file docstyle.hxx.

References bPhysical.

bool SwDocStyleSheet::IsUsed ( ) const
overridevirtual
void SwDocStyleSheet::MergeIndentAttrsOfListStyle ( SfxItemSet rSet)
void SwDocStyleSheet::PresetFollow ( const OUString &  rName)
inline

Definition at line 119 of file docstyle.hxx.

Referenced by FillStyleSheet().

void SwDocStyleSheet::PresetName ( const OUString &  rName)
inline

Preset the members without physical access.

Used by StyleSheetPool.

Definition at line 116 of file docstyle.hxx.

References aName.

void SwDocStyleSheet::PresetNameAndFamily ( const OUString &  rName)
void SwDocStyleSheet::PresetParent ( const OUString &  rName)
inline

Definition at line 118 of file docstyle.hxx.

Referenced by SwDocShell::Edit(), and lcl_FindCellStyle().

void SwDocStyleSheet::Reset ( void  )
void SwDocStyleSheet::SetFamily ( SfxStyleFamily  eFam)
inline

Definition at line 86 of file docstyle.hxx.

bool SwDocStyleSheet::SetFollow ( const OUString &  rStr)
overridevirtual
void SwDocStyleSheet::SetGrabBagItem ( const css::uno::Any &  rVal)
void SwDocStyleSheet::SetHelpId ( const OUString &  r,
sal_uLong  nId 
)
overridevirtual

! SFX changed over to ULONG arbitrarily!

Reimplemented from SfxStyleSheetBase.

Definition at line 2361 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily, pCharFormat, pColl, pDesc, pFrameFormat, pNumRule, rDoc, SwDoc::SetDocPattern(), SwFormat::SetPoolHelpId(), and SwFormat::SetPoolHlpFileId().

void SwDocStyleSheet::SetHidden ( bool  bHidden)
overridevirtual
void SwDocStyleSheet::SetItemSet ( const SfxItemSet rSet,
const bool  bResetIndentAttrsAtParagraphStyle = false 
)

add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value false, which indicates that the indent attributes at a paragraph style should be reset in case that a list style is applied to the paragraph style and no indent attributes are applied.

Definition at line 1438 of file docstyle.cxx.

References aCoreSet, SwRewriter::AddRule(), SwTextFormatColl::AssignToListLevelOfOutlineStyle(), bPhysical, SwDoc::CheckForUniqueItemForLineFillNameOrIndex(), SwDoc::ChgFormat(), SwDoc::ChgNumRuleFormats(), SwDoc::ChgPageDesc(), SfxItemSet::ClearInvalidItems(), SfxItemSet::ClearItem(), COLL_DOC_BITS, COLL_EXTRA_BITS, COLL_GET_RANGE_BITS, COLL_HTML_BITS, COLL_LISTS_BITS, COLL_REGISTER_BITS, COLL_TEXT_BITS, COND_COMMAND_COUNT, SwDoc::CopyPageDesc(), SfxItemSet::Count(), SwTextFormatColl::DeleteAssignmentToListLevelOfOutlineStyle(), SwDoc::DelTextFormatColl(), SwFormat::DerivedFrom(), IDocumentUndoRedo::DoesUndo(), END, IDocumentUndoRedo::EndUndo(), FillPhysical, FillStyleSheet(), SwDoc::FindNumRulePtr(), SwDoc::FindPageDesc(), FN_COND_COLL, SwTextFormatColl::GetAssignedOutlineStyleLevel(), SwCondCollItem::GetCmds(), SfxItemIter::GetCurItem(), SfxItemIter::GetCurPos(), numfunc::GetDefaultPositionAndSpaceMode(), SwDoc::getIDocumentStylePoolAccess(), SwDoc::GetIDocumentUndoRedo(), SfxItemSet::GetItemState(), SwFormat::GetItemState(), SfxStyleSheetBase::GetMask(), SfxStyleSheetBase::GetName(), SwFormat::GetName(), SwNumRule::GetName(), SwTextFormatColl::GetNextTextFormatColl(), GetNumRule(), IDocumentStylePoolAccess::GetNumRuleFromPool(), SwDoc::GetPageDesc(), SwFormat::GetPoolFormatId(), SwStyleNameMapper::GetPoolIdFromUIName(), SwCondCollItem::GetStyle(), GetValue, SfxItemSet::GetWhichByPos(), SwModify::HasWriterListeners(), i, SwConditionTextFormatColl::InsertCondition(), INSFMTATTR, SwTextFormatColl::IsAssignedToListLevelOfOutlineStyle(), IsInvalidItem(), ItemSetToPageDesc(), lcl_FindParaFormat(), SwDoc::MakeCondTextFormatColl(), SwClient::ModifyNotification(), SfxItemIter::NextItem(), SfxStyleSheetBase::nFamily, nId, NumRule, pCharFormat, pColl, pFrameFormat, pNumRule, POOLGRP_NOCOLLID, SwDoc::PreDelPageDesc(), rDoc, SwCollCondition::RegisterToFormat(), RES_CONDTXTFMTCOLL, RES_LR_SPACE, RES_PARATR_NUMRULE, SwDoc::ResetAttrAtFormat(), SwFormat::SetAutoUpdateFormat(), SwTextFormatColl::SetNextTextFormatColl(), SwFormat::SetPoolFormatId(), SwNumRule::SetSvxRule(), IDocumentUndoRedo::StartUndo(), UndoArg1, SvxNumRule::UnLinkGraphics(), USHRT_MAX, and SwFormat::Which().

bool SwDocStyleSheet::SetName ( const OUString &  rNewName,
bool  bReindexNow = true 
)
overridevirtual
void SwDocStyleSheet::SetNumRule ( const SwNumRule rRule)

Definition at line 2178 of file docstyle.cxx.

References SwDoc::ChgNumRuleFormats(), pNumRule, and rDoc.

bool SwDocStyleSheet::SetParent ( const OUString &  rStr)
overridevirtual
void SwDocStyleSheet::SetPhysical ( bool  bPhys)

Definition at line 2210 of file docstyle.cxx.

References bPhysical, pCharFormat, pColl, and pFrameFormat.

Referenced by lcl_FindCellStyle(), and Reset().

Friends And Related Function Documentation

friend class SwDocStyleSheetPool
friend

Definition at line 47 of file docstyle.hxx.

friend class SwStyleSheetIterator
friend

Definition at line 48 of file docstyle.hxx.

Member Data Documentation

SfxItemSet SwDocStyleSheet::aCoreSet
private

Definition at line 58 of file docstyle.hxx.

Referenced by Create(), GetItemSet(), and SetItemSet().

bool SwDocStyleSheet::bPhysical
private
const SwBoxAutoFormat* SwDocStyleSheet::pBoxFormat
private

Definition at line 56 of file docstyle.hxx.

Referenced by FillStyleSheet().

SwCharFormat* SwDocStyleSheet::pCharFormat
private
SwTextFormatColl* SwDocStyleSheet::pColl
private
const SwPageDesc* SwDocStyleSheet::pDesc
private

Definition at line 53 of file docstyle.hxx.

Referenced by FillStyleSheet(), GetPageDesc(), IsUsed(), and SetHelpId().

SwFrameFormat* SwDocStyleSheet::pFrameFormat
private
const SwNumRule* SwDocStyleSheet::pNumRule
private
SwTableAutoFormat* SwDocStyleSheet::pTableFormat
private

Definition at line 55 of file docstyle.hxx.

Referenced by Create(), FillStyleSheet(), GetTableFormat(), and IsUsed().

SwDoc& SwDocStyleSheet::rDoc
private

The documentation for this class was generated from the following files: