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 
26 class SwCharFormat;
28 
30 {
35 };
36 
39 {
41  OUString aDivider;
42  sal_uInt16 nPosFromLeft;
43  sal_uInt16 nCountBy;
44  sal_uInt16 nDividerCountBy;
49  bool bCountInFlys;
52 protected:
53  virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
54 
55 public:
58 
60 
61  SwCharFormat *GetCharFormat( IDocumentStylePoolAccess& rIDSPA ) const;
62  void SetCharFormat( SwCharFormat* );
63 
64  const SvxNumberType &GetNumType() const { return aType; }
65  void SetNumType( SvxNumberType aNew ){ aType = aNew; }
66 
67  const OUString& GetDivider() const { return aDivider; }
68  void SetDivider( const OUString &r ) { aDivider = r; }
69  sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
70  void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
71 
72  sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; }
73  void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; }
74 
75  sal_uInt16 GetCountBy() const { return nCountBy; }
76  void SetCountBy( sal_uInt16 n) { nCountBy = n; }
77 
78  LineNumberPosition GetPos() const { return ePos; }
79  void SetPos( LineNumberPosition eP ){ ePos = eP; }
80 
81  bool IsPaintLineNumbers() const { return bPaintLineNumbers; }
82  void SetPaintLineNumbers( bool b ){ bPaintLineNumbers = b; }
83 
84  bool IsCountBlankLines() const { return bCountBlankLines; }
85  void SetCountBlankLines( bool b ) { bCountBlankLines = b; }
86 
87  bool IsCountInFlys() const { return bCountInFlys; }
88  void SetCountInFlys( bool b ) { bCountInFlys = b; }
89 
90  bool IsRestartEachPage() const { return bRestartEachPage; }
91  void SetRestartEachPage( bool b ) { bRestartEachPage = b; }
92 
93  bool HasCharFormat() const { return GetRegisteredIn() != nullptr; }
94 };
95 
96 #endif
97 
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetRestartEachPage(bool b)
Definition: lineinfo.hxx:91
sal_uInt16 GetCountBy() const
Definition: lineinfo.hxx:75
void SetPos(LineNumberPosition eP)
Definition: lineinfo.hxx:79
void SetPosFromLeft(sal_uInt16 n)
Definition: lineinfo.hxx:73
bool IsCountBlankLines() const
Definition: lineinfo.hxx:84
bool IsCountInFlys() const
Definition: lineinfo.hxx:87
bool bPaintLineNumbers
Should anything be displayed?
Definition: lineinfo.hxx:47
void SetPaintLineNumbers(bool b)
Definition: lineinfo.hxx:82
bool IsRestartEachPage() const
Definition: lineinfo.hxx:90
void SetCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:76
bool bRestartEachPage
Restart counting at the first paragraph of each page (even on follows when paragraphs are split) ...
Definition: lineinfo.hxx:50
void SetDividerCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:70
sal_uInt16 GetPosFromLeft() const
Definition: lineinfo.hxx:72
void SetCountInFlys(bool b)
Definition: lineinfo.hxx:88
sal_uInt16 nCountBy
Paint only for every n line.
Definition: lineinfo.hxx:43
bool bCountInFlys
Count also within FlyFrames?
Definition: lineinfo.hxx:49
bool HasCharFormat() const
Definition: lineinfo.hxx:93
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
LineNumberPosition
Definition: lineinfo.hxx:29
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
sal_uInt16 nPosFromLeft
Position for paint.
Definition: lineinfo.hxx:42
bool IsPaintLineNumbers() const
Definition: lineinfo.hxx:81
LineNumberPosition GetPos() const
Definition: lineinfo.hxx:78
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:157
bool bCountBlankLines
Count empty lines?
Definition: lineinfo.hxx:48
sal_uInt16 nDividerCountBy
Interval for display of an user defined string every n lines.
Definition: lineinfo.hxx:44
WriterListener & operator=(WriterListener const &)=delete
void SetCountBlankLines(bool b)
Definition: lineinfo.hxx:85
SvxNumberType aType
e.g. roman linenumbers
Definition: lineinfo.hxx:40
void SetDivider(const OUString &r)
Definition: lineinfo.hxx:68
Access to the style pool.
const OUString & GetDivider() const
Definition: lineinfo.hxx:67
const SvxNumberType & GetNumType() const
Definition: lineinfo.hxx:64
sal_uInt16 GetDividerCountBy() const
Definition: lineinfo.hxx:69
OUString aDivider
String for additional interval (vert. lines user defined)
Definition: lineinfo.hxx:41
LineNumberPosition ePos
Where should the display occur (number and divider)
Definition: lineinfo.hxx:46
virtual void Modify(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
Definition: calbck.cxx:130
void SetNumType(SvxNumberType aNew)
Definition: lineinfo.hxx:65