LCOV - code coverage report
Current view: top level - svx/inc/svx - paraprev.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_PARAPREV_HXX
      29                 :            : #define _SVX_PARAPREV_HXX
      30                 :            : 
      31                 :            : #include <vcl/window.hxx>
      32                 :            : #include <editeng/svxenum.hxx>
      33                 :            : #include "svx/svxdllapi.h"
      34                 :            : 
      35                 :            : // enum ------------------------------------------------------------------
      36                 :            : 
      37                 :            : enum SvxPrevLineSpace
      38                 :            : {
      39                 :            :     SVX_PREV_LINESPACE_1 = 0,
      40                 :            :     SVX_PREV_LINESPACE_15,
      41                 :            :     SVX_PREV_LINESPACE_2,
      42                 :            :     SVX_PREV_LINESPACE_PROP,
      43                 :            :     SVX_PREV_LINESPACE_MIN,
      44                 :            :     SVX_PREV_LINESPACE_DURCH
      45                 :            : };
      46                 :            : 
      47                 :            : // class SvxParaPrevWindow -----------------------------------------------
      48                 :            : 
      49 [ #  # ][ #  # ]:          0 : class SVX_DLLPUBLIC SvxParaPrevWindow : public Window
      50                 :            : {
      51                 :            :     using Window::Draw;
      52                 :            : private:
      53                 :            :     Size                aWinSize;
      54                 :            :     Size                aSize;
      55                 :            : 
      56                 :            :     // indentation
      57                 :            :     long                nLeftMargin;
      58                 :            :     long                nRightMargin;
      59                 :            :     short               nFirstLineOfst;
      60                 :            :     // distances
      61                 :            :     sal_uInt16              nUpper;
      62                 :            :     sal_uInt16              nLower;
      63                 :            :     // adjustment
      64                 :            :     SvxAdjust           eAdjust;
      65                 :            :     // last line in justification
      66                 :            :     SvxAdjust           eLastLine;
      67                 :            :     // line distance
      68                 :            :     SvxPrevLineSpace    eLine;
      69                 :            :     sal_uInt16              nLineVal;
      70                 :            : 
      71                 :            :     String              aText;
      72                 :            :     Rectangle           Lines[9];
      73                 :            : 
      74                 :            : protected:
      75                 :            :     virtual void Paint( const Rectangle& rRect );
      76                 :            : 
      77                 :            :     void DrawParagraph( sal_Bool bAll );
      78                 :            : 
      79                 :            : public:
      80                 :            :     SvxParaPrevWindow( Window* pParent, const ResId& rId );
      81                 :            : 
      82                 :            :     void        SetFirstLineOfst( short nNew ) { nFirstLineOfst = nNew; }
      83                 :            :     void        SetLeftMargin( long nNew )  { nLeftMargin = nNew; }
      84                 :            :     void        SetRightMargin( long nNew ) { nRightMargin = nNew; }
      85                 :            :     void        SetUpper( sal_uInt16 nNew )         { nUpper = nNew; }
      86                 :            :     void        SetLower( sal_uInt16 nNew )         { nLower = nNew; }
      87                 :            :     void        SetAdjust( SvxAdjust eNew )     { eAdjust = eNew; }
      88                 :            :     void        SetLastLine( SvxAdjust eNew )   { eLastLine = eNew; }
      89                 :            :     void        SetLineSpace( SvxPrevLineSpace eNew, sal_uInt16 nNew = 0 )
      90                 :            :                     {   eLine = eNew; nLineVal = nNew; }
      91                 :          0 :     void        SetText( const String& rStr )   { aText = rStr; }
      92                 :            :     void        SetSize( Size aNew )            { aSize = aNew; }
      93                 :            : 
      94                 :            :     short       GetFirstLineOfst() const        { return nFirstLineOfst; }
      95                 :            :     long        GetLeftMargin() const           { return nLeftMargin; }
      96                 :            :     long        GetRightMargin() const          { return nRightMargin; }
      97                 :            :     sal_uInt16      GetUpper() const                { return nUpper; }
      98                 :            :     sal_uInt16      GetLower() const                { return nLower; }
      99                 :            :     SvxAdjust   GetAdjust() const               { return eAdjust; }
     100                 :            : 
     101                 :            :     SvxPrevLineSpace    GetLineEnum() const     { return eLine; }
     102                 :            :     sal_uInt16              GetLineValue() const    { return nLineVal; }
     103                 :          0 :     String              GetText() const         { return aText; }
     104                 :            :     Size                GetSize() const         { return aSize; }
     105                 :            : 
     106                 :            :     void        Draw( sal_Bool bAll )               { DrawParagraph( bAll ); }
     107                 :            : };
     108                 :            : 
     109                 :            : #endif
     110                 :            : 
     111                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10