24 #include <lineinfo.hxx>
28 #include <osl/diagnose.h>
57 m_nDividerCountBy( 3 ),
59 m_bPaintLineNumbers(
false ),
60 m_bCountBlankLines( true ),
61 m_bCountInFlys(
false ),
62 m_bRestartEachPage(
false )
68 m_aDivider( rCpy.GetDivider() ),
69 m_nPosFromLeft( rCpy.GetPosFromLeft() ),
70 m_nCountBy( rCpy.GetCountBy() ),
71 m_nDividerCountBy( rCpy.GetDividerCountBy() ),
72 m_ePos( rCpy.GetPos() ),
73 m_bPaintLineNumbers( rCpy.IsPaintLineNumbers() ),
74 m_bCountBlankLines( rCpy.IsCountBlankLines() ),
75 m_bCountInFlys( rCpy.IsCountInFlys() ),
76 m_bRestartEachPage( rCpy.IsRestartEachPage() )
104 pFormat->
Add( const_cast<SwLineNumberInfo*>(
this) );
111 OSL_ENSURE( pChFormat,
"SetCharFormat, 0 is not a valid pointer" );
112 pChFormat->
Add(
this );
117 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
127 aLayout->AllAddPaintRect();
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
SwLineNumberInfo & operator=(const SwLineNumberInfo &)
void Add(SwClient *pDepend)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
constexpr auto toTwips(N number, Length from)
const SwLineNumberInfo & GetLineNumberInfo() const
virtual const SwRootFrame * GetCurrentLayout() const =0
sal_uInt16 GetCountBy() const
virtual void SetModified()=0
Must be called manually at changes of format.
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
sal_uInt16 m_nPosFromLeft
Position for paint.
LineNumberPosition m_ePos
Where should the display occur (number and divider)
bool IsCountBlankLines() const
bool IsCountInFlys() const
The root element of a Writer document layout.
bool m_bCountBlankLines
Count empty lines?
void StartListeningToSameModifyAs(const SwClient &)
bool IsRestartEachPage() const
bool m_bPaintLineNumbers
Should anything be displayed?
bool m_bCountInFlys
Count also within FlyFrames?
sal_uInt16 m_nDividerCountBy
Interval for display of an user defined string every n lines.
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
std::optional< sw::ModifyChangedHint > CheckRegistration(const SfxPoolItem *pOldValue)
sal_uInt16 GetPosFromLeft() const
IDocumentState const & getIDocumentState() const
bool m_bRestartEachPage
Restart counting at the first paragraph of each page (even on follows when paragraphs are split) ...
OUString m_aDivider
String for additional interval (vert. lines user defined)
SvxNumberType m_aType
e.g. roman linenumbers
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
< purpose of derivation from SwClient: character style for displaying the numbers.
void SetCharFormat(SwCharFormat *)
bool IsPaintLineNumbers() const
LineNumberPosition GetPos() const
const SwModify * GetRegisteredIn() const
SwCharFormat * GetCharFormat(IDocumentStylePoolAccess &rIDSPA) const
sal_uInt16 m_nCountBy
Paint only for every n line.
void SetLineNumberInfo(const SwLineNumberInfo &rInfo)
Access to the style pool.
const OUString & GetDivider() const
std::unique_ptr< SwLineNumberInfo > mpLineNumberInfo
void StartAllAction()
Set up Start-/EndAction for all Shells on an as high as possible (Shell section) level.
const SvxNumberType & GetNumType() const
sal_uInt16 GetDividerCountBy() const
void EndAllAction(bool bVirDev=false)
bool m_bDetectedRangeSegmentation false