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 bBroadcast=true, 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::optional< 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
 
const OUString & GetLink () const
 
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 (SfxStyleFamily eFamily, 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
 
void SetLink (const OUString &rStr)
 
virtual bool HasFollowSupport () const override
 
virtual bool HasParentSupport () const override
 
virtual bool HasClearParentSupport () const override
 
virtual OUString GetDescription (MapUnit eUnit) override
 
virtual OUString GetUsedBy () 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
 
virtual bool SetName (const OUString &rNewName, bool bReindexNow=true)
 
virtual const OUString & GetParent () const
 
virtual bool SetParent (const OUString &)
 
virtual const OUString & GetFollow () const
 
virtual bool SetFollow (const OUString &)
 
virtual bool HasFollowSupport () const
 
virtual bool HasParentSupport () const
 
virtual bool HasClearParentSupport () const
 
virtual bool IsUsed () const
 
virtual OUString GetDescription (MapUnit eMetric)
 
virtual OUString GetUsedBy ()
 
SfxStyleSheetBasePoolGetPool ()
 
SfxStyleFamily GetFamily () const
 
SfxStyleSearchBits GetMask () const
 
void SetMask (SfxStyleSearchBits mask)
 
bool IsUserDefined () const
 
virtual bool IsHidden () const
 
virtual void SetHidden (bool bValue)
 
virtual sal_uLong GetHelpId (OUString &rFile)
 
virtual void SetHelpId (const OUString &r, sal_uLong nId)
 
virtual SfxItemSetGetItemSet ()
 
virtual std::optional< SfxItemSetGetItemSetForPreview ()
 
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::optional< SfxItemSet > *o_ppFlatSet=nullptr)
 
virtual ~SwDocStyleSheet () override
 

Private Attributes

SwCharFormatm_pCharFormat
 
SwTextFormatCollm_pColl
 
SwFrameFormatm_pFrameFormat
 
const SwPageDescm_pDesc
 
const SwNumRulem_pNumRule
 
SwTableAutoFormatm_pTableFormat
 
const SwBoxAutoFormatm_pBoxFormat
 
SwDocm_rDoc
 
SfxItemSet m_aCoreSet
 
bool m_bPhysical
 
OUString m_aLink
 

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 46 of file docstyle.hxx.

Member Enumeration Documentation

◆ FillStyleType

Fill StyleSheet with data.

Enumerator
FillOnlyName 
FillAllInfo 
FillPhysical 
FillPreview 

Definition at line 68 of file docstyle.hxx.

Constructor & Destructor Documentation

◆ ~SwDocStyleSheet()

SwDocStyleSheet::~SwDocStyleSheet ( )
overrideprivatevirtualdefault

◆ SwDocStyleSheet() [1/2]

SwDocStyleSheet::SwDocStyleSheet ( SwDoc rDoc,
SwDocStyleSheetPool rPool 
)

Definition at line 570 of file docstyle.cxx.

References Auto, Char, SfxStyleSheetBase::nHelpId, XATTR_FILL_FIRST(), and XATTR_FILL_LAST().

◆ SwDocStyleSheet() [2/2]

SwDocStyleSheet::SwDocStyleSheet ( const SwDocStyleSheet )
default

References Reset.

Member Function Documentation

◆ Create()

void SwDocStyleSheet::Create ( )
private

◆ FillStyleSheet()

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

Definition at line 2038 of file docstyle.cxx.

References SfxStyleSheetBase::aHelpFile, SfxStyleSheetBase::aName, 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(), SwTextFormatColl::GetLinkedCharFormat(), SwCharFormat::GetLinkedParaFormat(), SwFormat::GetName(), SwTextFormatColl::GetNextTextFormatColl(), SwFormat::GetPoolFormatId(), SwNumRule::GetPoolFormatId(), SwPageDesc::GetPoolFormatId(), SwFormat::GetPoolHelpId(), SwNumRule::GetPoolHelpId(), SwPageDesc::GetPoolHelpId(), SwFormat::GetPoolHlpFileId(), SwNumRule::GetPoolHlpFileId(), SwPageDesc::GetPoolHlpFileId(), SwStyleNameMapper::GetPoolIdFromUIName(), IDocumentState::IsModified(), SwTableAutoFormat::IsUserDefined(), lcl_DeleteInfoStyles(), lcl_FindCellStyle(), lcl_FindCharFormat(), lcl_FindFrameFormat(), lcl_FindNumRule(), lcl_FindPageDesc(), lcl_FindParaFormat(), lcl_FindTableStyle(), lcl_SaveStyles(), lcl_SwFormatToFlatItemSet(), m_aLink, m_bPhysical, m_pBoxFormat, m_pCharFormat, m_pColl, m_pDesc, m_pFrameFormat, m_pNumRule, m_pTableFormat, m_rDoc, SfxStyleSheetBase::nFamily, SfxStyleSheetBase::nHelpId, NumRule, PageDesc, PresetFollow(), RES_CONDTXTFMTCOLL(), IDocumentState::ResetModified(), SfxStyleSheetBase::SetMask(), SwResId(), TxtColl, USER_FMT, and SwFormat::Which().

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

◆ GetCharFormat()

SwCharFormat * SwDocStyleSheet::GetCharFormat ( )

◆ GetCollection()

SwTextFormatColl * SwDocStyleSheet::GetCollection ( )

◆ GetDescription()

OUString SwDocStyleSheet::GetDescription ( MapUnit  eUnit)
overridevirtual

◆ GetFollow()

const OUString & SwDocStyleSheet::GetFollow ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 883 of file docstyle.cxx.

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

◆ GetFrameFormat()

SwFrameFormat * SwDocStyleSheet::GetFrameFormat ( )

◆ GetGrabBagItem()

void SwDocStyleSheet::GetGrabBagItem ( css::uno::Any &  rVal) const

◆ GetHelpId()

sal_uLong SwDocStyleSheet::GetHelpId ( OUString &  rFile)
overridevirtual

◆ GetItemSet()

SfxItemSet & SwDocStyleSheet::GetItemSet ( )
overridevirtual

◆ GetItemSetForPreview()

std::optional< SfxItemSet > SwDocStyleSheet::GetItemSetForPreview ( )
overridevirtual

◆ GetLink()

const OUString & SwDocStyleSheet::GetLink ( ) const

Definition at line 927 of file docstyle.cxx.

References FillAllInfo, FillStyleSheet(), m_aLink, and m_bPhysical.

◆ GetNumRule()

const SwNumRule * SwDocStyleSheet::GetNumRule ( )

◆ GetPageDesc()

const SwPageDesc * SwDocStyleSheet::GetPageDesc ( )

◆ GetParent()

const OUString & SwDocStyleSheet::GetParent ( ) const
overridevirtual

◆ GetTableFormat()

SwTableAutoFormat * SwDocStyleSheet::GetTableFormat ( )

Definition at line 2390 of file docstyle.cxx.

References FillPhysical, FillStyleSheet(), m_bPhysical, and m_pTableFormat.

Referenced by SwDocShell::MakeByExample().

◆ GetUsedBy()

OUString SwDocStyleSheet::GetUsedBy ( )
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 2466 of file docstyle.cxx.

References m_pNumRule, and SwNumRule::MakeParagraphStyleListString().

◆ HasClearParentSupport()

bool SwDocStyleSheet::HasClearParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 969 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

◆ HasFollowSupport()

bool SwDocStyleSheet::HasFollowSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 939 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

◆ HasParentSupport()

bool SwDocStyleSheet::HasParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 955 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

◆ IsHidden()

bool SwDocStyleSheet::IsHidden ( ) const
overridevirtual

◆ IsPhysical()

bool SwDocStyleSheet::IsPhysical ( ) const
inline

Definition at line 90 of file docstyle.hxx.

◆ IsUsed()

bool SwDocStyleSheet::IsUsed ( ) const
overridevirtual

◆ MergeIndentAttrsOfListStyle()

void SwDocStyleSheet::MergeIndentAttrsOfListStyle ( SfxItemSet rSet)

◆ PresetFollow()

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

Definition at line 122 of file docstyle.hxx.

Referenced by FillStyleSheet().

◆ PresetName()

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

Preset the members without physical access.

Used by StyleSheetPool.

Definition at line 119 of file docstyle.hxx.

References aName.

◆ PresetNameAndFamily()

void SwDocStyleSheet::PresetNameAndFamily ( SfxStyleFamily  eFamily,
const OUString &  rName 
)

Definition at line 2401 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

◆ PresetParent()

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

Definition at line 121 of file docstyle.hxx.

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

◆ Reset()

void SwDocStyleSheet::Reset ( void  )

◆ SetFamily()

void SwDocStyleSheet::SetFamily ( SfxStyleFamily  eFam)
inline

Definition at line 88 of file docstyle.hxx.

◆ SetFollow()

bool SwDocStyleSheet::SetFollow ( const OUString &  rStr)
overridevirtual

◆ SetGrabBagItem()

void SwDocStyleSheet::SetGrabBagItem ( const css::uno::Any &  rVal)

◆ SetHelpId()

void SwDocStyleSheet::SetHelpId ( const OUString &  r,
sal_uLong  nId 
)
overridevirtual

! SFX changed over to ULONG arbitrarily!

Reimplemented from SfxStyleSheetBase.

Definition at line 2570 of file docstyle.cxx.

References m_pCharFormat, m_pColl, m_pDesc, m_pFrameFormat, m_pNumRule, m_rDoc, SfxStyleSheetBase::nFamily, nId, SwDoc::SetDocPattern(), SwFormat::SetPoolHelpId(), and SwFormat::SetPoolHlpFileId().

◆ SetHidden()

void SwDocStyleSheet::SetHidden ( bool  bHidden)
overridevirtual

◆ SetItemSet()

void SwDocStyleSheet::SetItemSet ( const SfxItemSet rSet,
const bool  bBroadcast = true,
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 1616 of file docstyle.cxx.

References SwRewriter::AddRule(), SwTextFormatColl::AssignToListLevelOfOutlineStyle(), SfxBroadcaster::Broadcast(), 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(), END, FillPhysical, FillStyleSheet(), SwDoc::FindNumRulePtr(), SwDoc::FindPageDesc(), FN_COND_COLL, SwTextFormatColl::GetAssignedOutlineStyleLevel(), SwCondCollItem::GetCmds(), SfxItemIter::GetCurItem(), SfxItemIter::GetCurPos(), numfunc::GetDefaultPositionAndSpaceMode(), SwDoc::getIDocumentStylePoolAccess(), SwDoc::GetIDocumentUndoRedo(), SfxItemSet::GetItemIfSet(), SfxItemSet::GetItemState(), SwFormat::GetItemState(), SfxStyleSheetBase::GetMask(), SfxStyleSheetBase::GetName(), SwFormat::GetName(), SwNumRule::GetName(), SwPageDesc::GetName(), SwTextFormatColl::GetNextTextFormatColl(), GetNumRule(), IDocumentStylePoolAccess::GetNumRuleFromPool(), SwDoc::GetPageDesc(), SwFormat::GetPoolFormatId(), SwStyleNameMapper::GetPoolIdFromUIName(), SwCondCollItem::GetStyle(), GetValue, SfxItemSet::GetWhichByPos(), i, SwConditionTextFormatColl::InsertCondition(), INSFMTATTR, SwTextFormatColl::IsAssignedToListLevelOfOutlineStyle(), IsInvalidItem(), ItemSetToPageDesc(), lcl_FindParaFormat(), m_aCoreSet, m_bPhysical, m_pCharFormat, m_pColl, m_pDesc, m_pFrameFormat, m_pNumRule, SfxStyleSheetBase::m_pPool, m_rDoc, SwDoc::MakeCondTextFormatColl(), SfxItemIter::NextItem(), SfxStyleSheetBase::nFamily, nId, NumRule, POOLGRP_NOCOLLID, SwDoc::PreDelPageDesc(), SwCollCondition::RegisterToFormat(), RES_CONDTXTFMTCOLL(), RES_MARGIN_FIRSTLINE(), RES_MARGIN_TEXTLEFT(), RES_PARATR_NUMRULE(), SwDoc::ResetAttrAtFormat(), rSet, SwFormat::SetAutoUpdateOnDirectFormat(), SwTextFormatColl::SetNextTextFormatColl(), SwFormat::SetPoolFormatId(), SwNumRule::SetSvxRule(), UndoArg1, SvxNumRule::UnLinkGraphics(), and SwFormat::Which().

◆ SetLink()

void SwDocStyleSheet::SetLink ( const OUString &  rStr)

◆ SetName()

bool SwDocStyleSheet::SetName ( const OUString &  rNewName,
bool  bReindexNow = true 
)
overridevirtual

◆ SetNumRule()

void SwDocStyleSheet::SetNumRule ( const SwNumRule rRule)

Definition at line 2384 of file docstyle.cxx.

References SwDoc::ChgNumRuleFormats(), m_pNumRule, and m_rDoc.

◆ SetParent()

bool SwDocStyleSheet::SetParent ( const OUString &  rStr)
overridevirtual

◆ SetPhysical()

void SwDocStyleSheet::SetPhysical ( bool  bPhys)

Definition at line 2408 of file docstyle.cxx.

References m_bPhysical, m_pCharFormat, m_pColl, m_pDesc, and m_pFrameFormat.

Referenced by lcl_FindCellStyle(), and Reset().

Friends And Related Function Documentation

◆ SwDocStyleSheetPool

friend class SwDocStyleSheetPool
friend

Definition at line 48 of file docstyle.hxx.

◆ SwStyleSheetIterator

friend class SwStyleSheetIterator
friend

Definition at line 49 of file docstyle.hxx.

Member Data Documentation

◆ m_aCoreSet

SfxItemSet SwDocStyleSheet::m_aCoreSet
private

Definition at line 59 of file docstyle.hxx.

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

◆ m_aLink

OUString SwDocStyleSheet::m_aLink
private

Definition at line 62 of file docstyle.hxx.

Referenced by FillStyleSheet(), and GetLink().

◆ m_bPhysical

bool SwDocStyleSheet::m_bPhysical
private

◆ m_pBoxFormat

const SwBoxAutoFormat* SwDocStyleSheet::m_pBoxFormat
private

Definition at line 57 of file docstyle.hxx.

Referenced by FillStyleSheet().

◆ m_pCharFormat

SwCharFormat* SwDocStyleSheet::m_pCharFormat
private

◆ m_pColl

SwTextFormatColl* SwDocStyleSheet::m_pColl
private

◆ m_pDesc

const SwPageDesc* SwDocStyleSheet::m_pDesc
private

◆ m_pFrameFormat

SwFrameFormat* SwDocStyleSheet::m_pFrameFormat
private

◆ m_pNumRule

const SwNumRule* SwDocStyleSheet::m_pNumRule
private

◆ m_pTableFormat

SwTableAutoFormat* SwDocStyleSheet::m_pTableFormat
private

Definition at line 56 of file docstyle.hxx.

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

◆ m_rDoc

SwDoc& SwDocStyleSheet::m_rDoc
private

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