19 #ifndef INCLUDED_SW_INC_DOCSTYLE_HXX
20 #define INCLUDED_SW_INC_DOCSTYLE_HXX
22 #include <rtl/ref.hxx>
23 #include <rtl/ustring.hxx>
29 #include <unordered_map>
65 SAL_DLLPRIVATE
void Create();
76 std::optional<SfxItemSet> * o_ppFlatSet =
nullptr);
93 virtual void SetHidden(
bool bHidden )
override;
94 virtual bool IsHidden( )
const override;
103 const bool bResetIndentAttrsAtParagraphStyle =
false );
110 virtual const OUString&
GetParent()
const override;
111 virtual const OUString&
GetFollow()
const override;
112 const OUString&
GetLink()
const;
124 virtual bool SetName(
const OUString& rNewName,
bool bReindexNow =
true)
override;
125 virtual bool SetParent(
const OUString& rStr)
override;
126 virtual bool SetFollow(
const OUString& rStr)
override;
127 void SetLink(
const OUString& rStr);
144 virtual bool IsUsed()
const override;
149 struct hash<
std::pair<SfxStyleFamily,OUString>>
151 std::size_t
operator()(std::pair<SfxStyleFamily,OUString>
const & pair)
const
152 {
return static_cast<std::size_t
>(pair.first) ^ std::size_t(pair.second.hashCode()); }
163 std::vector<std::pair<SfxStyleFamily, OUString>>
maImpl;
164 typedef std::unordered_map<std::pair<SfxStyleFamily, OUString>, sal_uInt32>
UniqueHash;
170 void clear() { maImpl.clear(); maUnique.clear(); }
171 size_t size() {
return maImpl.size(); }
172 bool empty() {
return maImpl.empty(); }
175 const std::pair<SfxStyleFamily,OUString> &
operator[](sal_uInt32 nIdx) {
return maImpl[ nIdx ]; }
196 virtual sal_Int32
Count()
override;
228 const OUString &rParent )
override;
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
const OUString & GetLink() const
virtual bool IsUsed() const
virtual const OUString & GetFollow() const
virtual std::optional< SfxItemSet > GetItemSetForPreview()
SwStyleSheetIterator(SwDocStyleSheetPool &rBase, SfxStyleFamily eFam, SfxStyleSearchBits n)
Represents the style of a paragraph.
bool m_bOrganizer
Organizer.
virtual bool HasClearParentSupport() const
SwTableAutoFormat * GetTableFormat()
void SetNumRule(const SwNumRule &rRule)
virtual SfxStyleSheetBase * First() override
virtual bool SetParent(const OUString &)
virtual bool IsHidden() const
virtual rtl::Reference< SfxStyleSheetBase > Create(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask) override
void InvalidateIterator()
void GetGrabBagItem(css::uno::Any &rVal) const
virtual const OUString & GetParent() const
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual SfxItemSet & GetItemSet()
std::size_t operator()(std::pair< SfxStyleFamily, OUString > const &pair) const
virtual sal_uLong GetHelpId(OUString &rFile)
virtual void SetHelpId(const OUString &r, sal_uLong nId)
void PresetNameAndFamily(SfxStyleFamily eFamily, const OUString &rName)
SwDocStyleSheetPool(SwDoc &, bool bOrganizer)
virtual SfxStyleSheetBase * operator[](sal_Int32 nIdx) override
virtual void SetHidden(bool bValue)
virtual ~SwDocStyleSheetPool() override
rtl::Reference< SwDocStyleSheet > mxIterSheet
virtual SfxStyleSheetBase * Next() override
SwFrameFormat * GetFrameFormat()
virtual bool SetFollow(const OUString &)
const SwPageDesc * GetPageDesc()
SwCharFormat * GetCharFormat()
virtual bool SetParent(SfxStyleFamily eFam, const OUString &rStyle, const OUString &rParent) override
void PresetParent(const OUString &rName)
SwTableAutoFormat * m_pTableFormat
virtual SfxStyleSheetBase * Find(const OUString &rStr) override
SwCharFormat * m_pCharFormat
void SetGrabBagItem(const css::uno::Any &rVal)
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
virtual bool HasFollowSupport() const
void MergeIndentAttrsOfListStyle(SfxItemSet &rSet)
new method for paragraph styles to merge indent attributes of applied list style into the given item ...
void PresetFollow(const OUString &rName)
void SetItemSet(const SfxItemSet &rSet, const bool bResetIndentAttrsAtParagraphStyle=false)
add optional parameter , default value false, which indicates that...
SwDocStyleSheet(SwDoc &rDoc, SwDocStyleSheetPool &rPool)
void SetPhysical(bool bPhys)
SwFrameFormat * m_pFrameFormat
SAL_DLLPRIVATE void Create()
Make empty shell a real StyleSheet (Core).
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
const SwBoxAutoFormat * m_pBoxFormat
FillStyleType
Fill StyleSheet with data.
const SwNumRule * m_pNumRule
virtual ~SwStyleSheetIterator() override
void AppendStyleList(const std::vector< OUString > &rLst, bool bUsed, bool bTestHidden, bool bOnlyHidden, SwGetPoolIdFromName nSection, SfxStyleFamily eFamily)
void PresetName(const OUString &rName)
Preset the members without physical access.
SwTextFormatColl * GetCollection()
const SwPageDesc * m_pDesc
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) override
SwTextFormatColl * m_pColl
virtual ~SwDocStyleSheet() override
virtual OUString GetUsedBy()
rtl::Reference< SwDocStyleSheet > mxStyleSheet
SAL_DLLPRIVATE bool FillStyleSheet(FillStyleType eFType, std::optional< SfxItemSet > *o_ppFlatSet=nullptr)
void SetLink(const OUString &rStr)
void SetFamily(SfxStyleFamily eFam)
virtual sal_Int32 Count() override
bool IsOrganizerMode() const
virtual bool HasParentSupport() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
rtl::Reference< SwDocStyleSheet > mxStyleSheet
void InvalidateIterator()
virtual OUString GetDescription(MapUnit eMetric)
virtual void Remove(SfxStyleSheetBase *pStyle) override