19#ifndef INCLUDED_SW_INC_NUMRULE_HXX
20#define INCLUDED_SW_INC_NUMRULE_HXX
23#include <rtl/ustring.hxx>
31#include <unordered_map>
55 SAL_DLLPRIVATE
void UpdateNumNodes(
SwDoc& rDoc);
57 using SvxNumberFormat::operator ==;
58 using SvxNumberFormat::operator !=;
88 bool IsEnumeration()
const;
89 bool IsItemize()
const;
110 static const sal_uInt16 saDefNumIndents[
MAXLEVEL ];
115 std::unique_ptr<SwNumFormat> maFormats[
MAXLEVEL ];
156 void Reset(
const OUString& rName );
158 const SwNumFormat* GetNumFormat( sal_uInt16 i )
const;
166 OUString MakeNumString(
const SwNodeNum&,
bool bInclStrings =
true )
const;
170 const bool bInclStrings =
true,
171 const unsigned int _nRestrictToThisLevel =
MAXLEVEL,
172 Extremities* pExtremities =
nullptr,
174 OUString MakeRefNumString(
const SwNodeNum& rNodeNum,
175 const bool bInclSuperiorNumLabels,
176 const int nRestrictInclToThisLevel )
const;
177 OUString MakeParagraphStyleListString()
const;
181 SwNumRule::tTextNodeList::size_type GetTextNodeListSize()
const;
186 SwNumRule::tParagraphStyleList::size_type GetParagraphStyleListSize()
const;
192 msDefaultListId = sDefaultListId;
196 return msDefaultListId;
204 std::unordered_map<OUString, SwNumRule *>* pNumRuleMap );
206 static OUString GetOutlineRuleName();
208 static sal_uInt16 GetNumIndent(
sal_uInt8 nLvl );
209 static sal_uInt16 GetBullIndent(
sal_uInt8 nLvl );
213 mbInvalidRuleFlag =
true; }
222 void CheckCharFormats(
SwDoc& rDoc );
226 void SetName(
const OUString& rNm,
233 void SetInvalidRule(
bool bFlag );
244 void SetCountPhantoms(
bool bCountPhantoms);
263 void ChangeIndent(
const sal_Int32 nDiff );
265 void SetIndent(
const short nNewIndent,
266 const sal_uInt16 nListLevel );
269 void SetIndentOfFirstListLevelAndChangeOthers(
const short nNewIndent );
273 void GetGrabBagItem(css::uno::Any& rVal)
const;
274 void SetGrabBagItem(
const css::uno::Any& rVal);
Provides access to the lists of a document.
void dumpAsXml(xmlTextWriterPtr w) const
const SwModify * GetRegisteredIn() const
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
sal_uInt16 mnPoolFormatId
Id-for NumRules created "automatically".
void SetUsedByRedline(bool bUsed)
void SetAutoRule(bool bFlag)
void SetRuleType(SwNumRuleType eNew)
sal_uInt16 mnPoolHelpId
HelpId for this Pool-style.
SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode
it needs to export as part of tracked numbering change
sal_uInt8 GetPoolHlpFileId() const
void SetAbsSpaces(bool bFlag)
std::vector< SwTextFormatColl * > tParagraphStyleList
bool IsCountPhantoms() const
bool IsUsedByRedline() const
bool IsOutlineRule() const
void SetHidden(bool bValue)
void SetPoolHelpId(sal_uInt16 nId)
bool IsContinusNum() const
bool operator!=(const SwNumRule &r) const
bool mbContinusNum
Continuous numbering without levels.
const OUString & GetDefaultListId() const
bool IsInvalidRule() const
void SetDefaultListId(const OUString &sDefaultListId)
const OUString & GetName() const
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat IDs.
void SetPoolHlpFileId(sal_uInt8 nId)
static sal_uInt16 snRefCount
std::unordered_map< OUString, SwNumRule * > * mpNumRuleMap
unordered_map containing "name->rule" relation
std::vector< SwTextNode * > tTextNodeList
void SetPoolFormatId(sal_uInt16 nId)
void SetContinusNum(bool bFlag)
sal_uInt8 mnPoolHlpFileId
FilePos at Doc on style helps.
SwNumRuleType GetRuleType() const
tParagraphStyleList maParagraphStyleList
container for associated paragraph styles
bool mbHidden
Is the numbering rule to be hidden in the UI?
sal_uInt16 GetPoolHelpId() const
Query and set Help-IDs for document styles.
bool mbAbsSpaces
Levels represent absolute indents.
tTextNodeList maTextNodeList
container for associated text nodes
std::shared_ptr< SfxGrabBagItem > mpGrabBagItem
Style InteropGrabBag.
Represents the style of a paragraph.
SwTextNode is a paragraph in the document model.
Used by the UI to modify the document model.
struct _xmlTextWriter * xmlTextWriterPtr
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
std::vector< tSwNumTreeNumber > tNumberVector
namespace for static functions and methods for numbering and bullets
bool IsDefBulletFontUserDefined()
determine if default bullet font is user defined
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
bool ChangeIndentOnTabAtFirstPosOfFirstListItem()
configuration, if at first position of the first list item the <TAB>-key increased the indent of the ...
sal_Unicode GetBulletChar(sal_uInt8 nLevel)
retrieve unicode of character used for the default bullet list for the given list level
bool NumDownChangesIndent(const SwWrtShell &rShell)
Decides if increasing ("downing") the numbering level will change the amount of indentation or not.
OUString const & GetDefBulletFontname()
retrieve font family name used for the default bullet list characters
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
const sal_Unicode cBulletChar
Character for lists.
static LanguageType nLang
constexpr sal_uInt8 MAXLEVEL