LibreOffice Module sw (master) 1
lineinfo.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SW_INC_LINEINFO_HXX
20#define INCLUDED_SW_INC_LINEINFO_HXX
21
22#include "calbck.hxx"
23#include <editeng/numitem.hxx>
24#include "swdllapi.h"
25
26class SwCharFormat;
28
30{
35};
36
39{
41 OUString m_aDivider;
42 sal_uInt16 m_nPosFromLeft;
43 sal_uInt16 m_nCountBy;
44 sal_uInt16 m_nDividerCountBy;
52 virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
53
54public:
57
59
60 SwCharFormat *GetCharFormat( IDocumentStylePoolAccess& rIDSPA ) const;
61 void SetCharFormat( SwCharFormat* );
62
63 const SvxNumberType &GetNumType() const { return m_aType; }
64 void SetNumType( SvxNumberType aNew ){ m_aType = aNew; }
65
66 const OUString& GetDivider() const { return m_aDivider; }
67 void SetDivider( const OUString &r ) { m_aDivider = r; }
68 sal_uInt16 GetDividerCountBy() const { return m_nDividerCountBy; }
69 void SetDividerCountBy( sal_uInt16 n ) { m_nDividerCountBy = n; }
70
71 sal_uInt16 GetPosFromLeft() const { return m_nPosFromLeft; }
72 void SetPosFromLeft( sal_uInt16 n) { m_nPosFromLeft = n; }
73
74 sal_uInt16 GetCountBy() const { return m_nCountBy; }
75 void SetCountBy( sal_uInt16 n) { m_nCountBy = n; }
76
77 LineNumberPosition GetPos() const { return m_ePos; }
78 void SetPos( LineNumberPosition eP ){ m_ePos = eP; }
79
80 bool IsPaintLineNumbers() const { return m_bPaintLineNumbers; }
81 void SetPaintLineNumbers( bool b ){ m_bPaintLineNumbers = b; }
82
83 bool IsCountBlankLines() const { return m_bCountBlankLines; }
84 void SetCountBlankLines( bool b ) { m_bCountBlankLines = b; }
85
86 bool IsCountInFlys() const { return m_bCountInFlys; }
87 void SetCountInFlys( bool b ) { m_bCountInFlys = b; }
88
89 bool IsRestartEachPage() const { return m_bRestartEachPage; }
90 void SetRestartEachPage( bool b ) { m_bRestartEachPage = b; }
91
92 bool HasCharFormat() const { return GetRegisteredIn() != nullptr; }
93};
94
95#endif
96
97/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
uno::Type m_aType
Access to the style pool.
Represents the style of a text portion.
Definition: charfmt.hxx:27
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:166
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: calbck.cxx:120
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:39
bool m_bRestartEachPage
Restart counting at the first paragraph of each page (even on follows when paragraphs are split)
Definition: lineinfo.hxx:50
void SetPaintLineNumbers(bool b)
Definition: lineinfo.hxx:81
bool m_bPaintLineNumbers
Should anything be displayed?
Definition: lineinfo.hxx:47
void SetPos(LineNumberPosition eP)
Definition: lineinfo.hxx:78
const OUString & GetDivider() const
Definition: lineinfo.hxx:66
sal_uInt16 m_nDividerCountBy
Interval for display of an user defined string every n lines.
Definition: lineinfo.hxx:44
void SetDividerCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:69
sal_uInt16 GetCountBy() const
Definition: lineinfo.hxx:74
const SvxNumberType & GetNumType() const
Definition: lineinfo.hxx:63
bool m_bCountBlankLines
Count empty lines?
Definition: lineinfo.hxx:48
void SetDivider(const OUString &r)
Definition: lineinfo.hxx:67
sal_uInt16 m_nPosFromLeft
Position for paint.
Definition: lineinfo.hxx:42
bool IsRestartEachPage() const
Definition: lineinfo.hxx:89
void SetCountBlankLines(bool b)
Definition: lineinfo.hxx:84
void SetRestartEachPage(bool b)
Definition: lineinfo.hxx:90
bool IsPaintLineNumbers() const
Definition: lineinfo.hxx:80
bool HasCharFormat() const
Definition: lineinfo.hxx:92
void SetNumType(SvxNumberType aNew)
Definition: lineinfo.hxx:64
void SetCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:75
bool IsCountBlankLines() const
Definition: lineinfo.hxx:83
void SetPosFromLeft(sal_uInt16 n)
Definition: lineinfo.hxx:72
sal_uInt16 GetPosFromLeft() const
Definition: lineinfo.hxx:71
bool m_bCountInFlys
Count also within FlyFrames?
Definition: lineinfo.hxx:49
bool IsCountInFlys() const
Definition: lineinfo.hxx:86
LineNumberPosition m_ePos
Where should the display occur (number and divider)
Definition: lineinfo.hxx:46
sal_uInt16 GetDividerCountBy() const
Definition: lineinfo.hxx:68
void SetCountInFlys(bool b)
Definition: lineinfo.hxx:87
LineNumberPosition GetPos() const
Definition: lineinfo.hxx:77
OUString m_aDivider
String for additional interval (vert. lines user defined)
Definition: lineinfo.hxx:41
sal_uInt16 m_nCountBy
Paint only for every n line.
Definition: lineinfo.hxx:43
SvxNumberType m_aType
e.g. roman linenumbers
Definition: lineinfo.hxx:40
WriterListener & operator=(WriterListener const &)=delete
sal_Int64 n
LineNumberPosition
Definition: lineinfo.hxx:30
@ LINENUMBER_POS_LEFT
Definition: lineinfo.hxx:31
@ LINENUMBER_POS_RIGHT
Definition: lineinfo.hxx:32
@ LINENUMBER_POS_INSIDE
Definition: lineinfo.hxx:33
@ LINENUMBER_POS_OUTSIDE
Definition: lineinfo.hxx:34
#define SW_DLLPUBLIC
Definition: swdllapi.h:28