Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sw / lineinfo.hxx
blob36675d24c46f02199cb0846dbdcb6d13513eab6b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lineinfo.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SW_LINEINFO_HXX
31 #define SW_LINEINFO_HXX
34 #ifndef _CALBCK_HXX
35 #include "calbck.hxx"
36 #endif
37 #ifndef _NUMRULE_HXX
38 #include "numrule.hxx"
39 #endif
40 namespace binfilter {
42 class SwCharFmt;
43 class SwDoc;
45 enum LineNumberPosition
47 LINENUMBER_POS_LEFT,
48 LINENUMBER_POS_RIGHT,
49 LINENUMBER_POS_INSIDE,
50 LINENUMBER_POS_OUTSIDE
53 class SwLineNumberInfo : public SwClient //purpose of derivation from SwClient:
54 //character style for displaying the numbers.
56 SvxNumberType aType; //e.g. roman linenumbers
57 String aDivider; //String for aditional interval (vert. lines user defined)
58 USHORT nPosFromLeft; //Position for paint
59 USHORT nCountBy; //Paint only for every n line
60 USHORT nDividerCountBy; //Interval for display of an user defined
61 //string every n lines
62 LineNumberPosition ePos; //Where should the display occur (number and divicer)
63 BOOL bPaintLineNumbers; //Should anything be displayed?
64 BOOL bCountBlankLines; //Count empty lines?
65 BOOL bCountInFlys; //Count also within FlyFrames?
66 BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
67 //(even on follows when paragraphs are splitted)
69 public:
70 SwLineNumberInfo();
71 SwLineNumberInfo(const SwLineNumberInfo&);
73 SwLineNumberInfo& operator=(const SwLineNumberInfo&);
74 BOOL operator==( const SwLineNumberInfo& rInf ) const;
76 SwCharFmt *GetCharFmt(SwDoc &rDoc) const;
77 void SetCharFmt( SwCharFmt* );
79 const SvxNumberType &GetNumType() const { return aType; }
80 void SetNumType( SvxNumberType aNew ){ aType = aNew; }
82 const String &GetDivider() const { return aDivider; }
83 void SetDivider( const String &r ) { aDivider = r; }
84 USHORT GetDividerCountBy() const { return nDividerCountBy; }
85 void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
87 USHORT GetPosFromLeft() const { return nPosFromLeft; }
88 void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
90 USHORT GetCountBy() const { return nCountBy; }
91 void SetCountBy( USHORT n) { nCountBy = n; }
93 LineNumberPosition GetPos() const { return ePos; }
94 void SetPos( LineNumberPosition eP ){ ePos = eP; }
96 BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
97 void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
99 BOOL IsCountBlankLines() const { return bCountBlankLines; }
100 void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
102 BOOL IsCountInFlys() const { return bCountInFlys; }
103 void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
105 BOOL IsRestartEachPage() const { return bRestartEachPage; }
106 void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
108 virtual void Modify( SfxPoolItem*, SfxPoolItem* );
113 } //namespace binfilter
114 #endif