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

Member Enumeration Documentation

Fill StyleSheet with data.

Enumerator
FillOnlyName 
FillAllInfo 
FillPhysical 
FillPreview 

Definition at line 69 of file docstyle.hxx.

Constructor & Destructor Documentation

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

Definition at line 411 of file docstyle.cxx.

References Auto, Char, SfxStyleSheetBase::nHelpId, 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::optional< SfxItemSet > *  o_ppFlatSet = nullptr 
)
private

Definition at line 1868 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().

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

Reimplemented from SfxStyleSheetBase.

Definition at line 726 of file docstyle.cxx.

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

SwFrameFormat * SwDocStyleSheet::GetFrameFormat ( )
void SwDocStyleSheet::GetGrabBagItem ( css::uno::Any &  rVal) const
sal_uLong SwDocStyleSheet::GetHelpId ( OUString &  rFile)
overridevirtual
SfxItemSet & SwDocStyleSheet::GetItemSet ( )
overridevirtual
std::optional< SfxItemSet > SwDocStyleSheet::GetItemSetForPreview ( )
overridevirtual
const OUString & SwDocStyleSheet::GetLink ( ) const

Definition at line 770 of file docstyle.cxx.

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

const SwNumRule * SwDocStyleSheet::GetNumRule ( )
const SwPageDesc * SwDocStyleSheet::GetPageDesc ( )
const OUString & SwDocStyleSheet::GetParent ( ) const
overridevirtual
SwTableAutoFormat * SwDocStyleSheet::GetTableFormat ( )

Definition at line 2214 of file docstyle.cxx.

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

Referenced by SwDocShell::MakeByExample().

OUString SwDocStyleSheet::GetUsedBy ( )
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 2284 of file docstyle.cxx.

References m_pNumRule, and SwNumRule::MakeParagraphStyleListString().

bool SwDocStyleSheet::HasClearParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 812 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

bool SwDocStyleSheet::HasFollowSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 782 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

bool SwDocStyleSheet::HasParentSupport ( ) const
overridevirtual

Reimplemented from SfxStyleSheetBase.

Definition at line 798 of file docstyle.cxx.

References SfxStyleSheetBase::nFamily.

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

Definition at line 91 of file docstyle.hxx.

References m_bPhysical.

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

Definition at line 123 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 120 of file docstyle.hxx.

References aName.

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

Definition at line 2225 of file docstyle.cxx.

References SfxStyleSheetBase::aName, and SfxStyleSheetBase::nFamily.

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

Definition at line 122 of file docstyle.hxx.

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

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

Definition at line 89 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 2388 of file docstyle.cxx.

References m_pCharFormat, m_pColl, m_pDesc, m_pFrameFormat, m_pNumRule, m_rDoc, SfxStyleSheetBase::nFamily, 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 1453 of file docstyle.cxx.

References SwRewriter::AddRule(), SwTextFormatColl::AssignToListLevelOfOutlineStyle(), SvtBroadcaster::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(), 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(), SwPageDesc::GetName(), SwNumRule::GetName(), SwTextFormatColl::GetNextTextFormatColl(), sw::BroadcasterMixin::GetNotifier(), 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(), m_aCoreSet, m_bPhysical, m_pCharFormat, m_pColl, m_pDesc, m_pFrameFormat, m_pNumRule, m_rDoc, SwDoc::MakeCondTextFormatColl(), SfxItemIter::NextItem(), SfxStyleSheetBase::nFamily, nId, NumRule, POOLGRP_NOCOLLID, SwDoc::PreDelPageDesc(), 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(), and SwFormat::Which().

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

Definition at line 2208 of file docstyle.cxx.

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

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

Definition at line 2232 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

friend class SwDocStyleSheetPool
friend

Definition at line 49 of file docstyle.hxx.

friend class SwStyleSheetIterator
friend

Definition at line 50 of file docstyle.hxx.

Member Data Documentation

SfxItemSet SwDocStyleSheet::m_aCoreSet
private

Definition at line 60 of file docstyle.hxx.

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

OUString SwDocStyleSheet::m_aLink
private

Definition at line 63 of file docstyle.hxx.

Referenced by FillStyleSheet(), and GetLink().

bool SwDocStyleSheet::m_bPhysical
private
const SwBoxAutoFormat* SwDocStyleSheet::m_pBoxFormat
private

Definition at line 58 of file docstyle.hxx.

Referenced by FillStyleSheet().

SwCharFormat* SwDocStyleSheet::m_pCharFormat
private
SwTextFormatColl* SwDocStyleSheet::m_pColl
private
const SwPageDesc* SwDocStyleSheet::m_pDesc
private
SwFrameFormat* SwDocStyleSheet::m_pFrameFormat
private
const SwNumRule* SwDocStyleSheet::m_pNumRule
private
SwTableAutoFormat* SwDocStyleSheet::m_pTableFormat
private

Definition at line 57 of file docstyle.hxx.

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

SwDoc& SwDocStyleSheet::m_rDoc
private

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