update credits
[LibreOffice.git] / include / svx / paraprev.hxx
blobebef6399fcacb6397ece337c1e09714010eaa934
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _SVX_PARAPREV_HXX
20 #define _SVX_PARAPREV_HXX
22 #include <vcl/window.hxx>
23 #include <editeng/svxenum.hxx>
24 #include "svx/svxdllapi.h"
26 // enum ------------------------------------------------------------------
28 enum SvxPrevLineSpace
30 SVX_PREV_LINESPACE_1 = 0,
31 SVX_PREV_LINESPACE_15,
32 SVX_PREV_LINESPACE_2,
33 SVX_PREV_LINESPACE_PROP,
34 SVX_PREV_LINESPACE_MIN,
35 SVX_PREV_LINESPACE_DURCH
38 // class SvxParaPrevWindow -----------------------------------------------
40 class SVX_DLLPUBLIC SvxParaPrevWindow : public Window
42 using Window::Draw;
43 private:
44 Size aWinSize;
45 Size aSize;
47 // indentation
48 long nLeftMargin;
49 long nRightMargin;
50 short nFirstLineOfst;
51 // distances
52 sal_uInt16 nUpper;
53 sal_uInt16 nLower;
54 // adjustment
55 SvxAdjust eAdjust;
56 // last line in justification
57 SvxAdjust eLastLine;
58 // line distance
59 SvxPrevLineSpace eLine;
60 sal_uInt16 nLineVal;
62 String aText;
63 Rectangle Lines[9];
65 protected:
66 virtual void Paint( const Rectangle& rRect );
68 void DrawParagraph( sal_Bool bAll );
70 public:
71 SvxParaPrevWindow( Window* pParent, const ResId& rId );
73 void SetFirstLineOfst( short nNew ) { nFirstLineOfst = nNew; }
74 void SetLeftMargin( long nNew ) { nLeftMargin = nNew; }
75 void SetRightMargin( long nNew ) { nRightMargin = nNew; }
76 void SetUpper( sal_uInt16 nNew ) { nUpper = nNew; }
77 void SetLower( sal_uInt16 nNew ) { nLower = nNew; }
78 void SetAdjust( SvxAdjust eNew ) { eAdjust = eNew; }
79 void SetLastLine( SvxAdjust eNew ) { eLastLine = eNew; }
80 void SetLineSpace( SvxPrevLineSpace eNew, sal_uInt16 nNew = 0 )
81 { eLine = eNew; nLineVal = nNew; }
82 void SetText( const OUString& rStr ) { aText = rStr; }
83 void SetSize( Size aNew ) { aSize = aNew; }
85 short GetFirstLineOfst() const { return nFirstLineOfst; }
86 long GetLeftMargin() const { return nLeftMargin; }
87 long GetRightMargin() const { return nRightMargin; }
88 sal_uInt16 GetUpper() const { return nUpper; }
89 sal_uInt16 GetLower() const { return nLower; }
90 SvxAdjust GetAdjust() const { return eAdjust; }
92 SvxPrevLineSpace GetLineEnum() const { return eLine; }
93 sal_uInt16 GetLineValue() const { return nLineVal; }
94 OUString GetText() const { return aText; }
95 Size GetSize() const { return aSize; }
97 void Draw( sal_Bool bAll ) { DrawParagraph( bAll ); }
100 #endif
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */