LCOV - code coverage report
Current view: top level - include/svx - pagectrl.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 37 0.0 %
Date: 2014-11-03 Functions: 0 37 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_SVX_PAGECTRL_HXX
      20             : #define INCLUDED_SVX_PAGECTRL_HXX
      21             : 
      22             : #include <vcl/window.hxx>
      23             : #include <svx/svxdllapi.h>
      24             : #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
      25             : 
      26             : // forward ---------------------------------------------------------------
      27             : class SvxBoxItem;
      28             : 
      29             : // class SvxPageWindow ---------------------------------------------------
      30             : class SVX_DLLPUBLIC SvxPageWindow : public vcl::Window
      31             : {
      32             :     using Window::GetBorder;
      33             : 
      34             : private:
      35             :     Size        aWinSize;
      36             :     Size        aSize;
      37             : 
      38             :     long        nTop;
      39             :     long        nBottom;
      40             :     long        nLeft;
      41             :     long        nRight;
      42             : 
      43             :     SvxBoxItem*     pBorder;
      44             :     bool        bResetBackground;
      45             :     bool        bFrameDirection;
      46             :     sal_Int32       nFrameDirection;
      47             : 
      48             :     long        nHdLeft;
      49             :     long        nHdRight;
      50             :     long        nHdDist;
      51             :     long        nHdHeight;
      52             :     SvxBoxItem* pHdBorder;
      53             : 
      54             :     long        nFtLeft;
      55             :     long        nFtRight;
      56             :     long        nFtDist;
      57             :     long        nFtHeight;
      58             :     SvxBoxItem* pFtBorder;
      59             : 
      60             :     //UUUU
      61             :     drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maHeaderFillAttributes;
      62             :     drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maFooterFillAttributes;
      63             :     drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maPageFillAttributes;
      64             : 
      65             :     bool        bFooter :1;
      66             :     bool        bHeader :1;
      67             :     bool        bTable  :1;
      68             :     bool        bHorz   :1;
      69             :     bool        bVert   :1;
      70             : 
      71             :     sal_uInt16      eUsage;
      72             : 
      73             :     OUString    aLeftText;
      74             :     OUString    aRightText;
      75             : 
      76             : protected:
      77             :     virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
      78             : 
      79             :     virtual void DrawPage( const Point& rPoint,
      80             :                            const bool bSecond,
      81             :                            const bool bEnabled );
      82             : 
      83             :     //UUUU
      84             :     void drawFillAttributes(
      85             :         const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
      86             :         const Rectangle& rPaintRange,
      87             :         const Rectangle& rDefineRange);
      88             : 
      89             : public:
      90             :     SvxPageWindow( vcl::Window* pParent );
      91             :     virtual ~SvxPageWindow();
      92             : 
      93             :     //UUUU
      94           0 :     void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maHeaderFillAttributes = rFillAttributes; }
      95           0 :     void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maFooterFillAttributes = rFillAttributes; }
      96           0 :     void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maPageFillAttributes = rFillAttributes; }
      97           0 :     const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const { return maPageFillAttributes; }
      98             : 
      99             :     void        SetWidth(long nW)                       { aSize.Width() = nW; }
     100             :     void        SetHeight(long nH)                  { aSize.Height() = nH; }
     101             : 
     102           0 :     void        SetSize(const Size& rSz)                { aSize = rSz; }
     103           0 :     const Size& GetSize() const                         { return aSize; }
     104             : 
     105           0 :     void        SetTop(long nNew)                       { nTop = nNew; }
     106           0 :     void        SetBottom(long nNew)                    { nBottom = nNew; }
     107           0 :     void        SetLeft(long nNew)                  { nLeft = nNew; }
     108           0 :     void        SetRight(long nNew)                 { nRight = nNew; }
     109             :     void        SetBorder(const SvxBoxItem& rNew);
     110             : 
     111           0 :     long        GetTop() const                          { return nTop; }
     112           0 :     long        GetBottom() const                       { return nBottom; }
     113           0 :     long        GetLeft() const                         { return nLeft; }
     114           0 :     long        GetRight() const                        { return nRight; }
     115             : 
     116             :     const SvxBoxItem&   GetBorder() const;
     117             : 
     118           0 :     void        SetHdLeft(long nNew)                    { nHdLeft = nNew; }
     119           0 :     void        SetHdRight(long nNew)                   { nHdRight = nNew; }
     120           0 :     void        SetHdDist(long nNew)                    { nHdDist = nNew; }
     121           0 :     void        SetHdHeight(long nNew)              { nHdHeight = nNew; }
     122             :     void        SetHdBorder(const SvxBoxItem& rNew);
     123             : 
     124           0 :     long        GetHdLeft() const                       { return nHdLeft; }
     125           0 :     long        GetHdRight() const                      { return nHdRight; }
     126           0 :     long        GetHdDist() const                       { return nHdDist; }
     127           0 :     long        GetHdHeight() const                     { return nHdHeight; }
     128             : 
     129             :     const SvxBoxItem&   GetHdBorder() const             { return *pHdBorder; }
     130             : 
     131           0 :     void        SetFtLeft(long nNew)                    { nFtLeft = nNew; }
     132           0 :     void        SetFtRight(long nNew)                   { nFtRight = nNew; }
     133           0 :     void        SetFtDist(long nNew)                    { nFtDist = nNew; }
     134           0 :     void        SetFtHeight(long nNew)              { nFtHeight = nNew; }
     135             :     void        SetFtBorder(const SvxBoxItem& rNew);
     136             : 
     137           0 :     long        GetFtLeft() const                       { return nFtLeft; }
     138           0 :     long        GetFtRight() const                      { return nFtRight; }
     139           0 :     long        GetFtDist() const                       { return nFtDist; }
     140           0 :     long        GetFtHeight() const                     { return nFtHeight; }
     141             : 
     142             :     const SvxBoxItem&   GetFtBorder() const             { return *pFtBorder; }
     143             : 
     144           0 :     void        SetUsage(sal_uInt16 eU)                 { eUsage = eU; }
     145           0 :     sal_uInt16      GetUsage() const                        { return eUsage; }
     146             : 
     147           0 :     void        SetHeader( bool bNew )                  { bHeader = bNew; }
     148             :     bool        GetHeader() const                       { return bHeader;}
     149           0 :     void        SetFooter( bool bNew )                  { bFooter = bNew; }
     150             :     bool        GetFooter() const                       { return bFooter;}
     151             : 
     152           0 :     void        SetTable( bool bNew )                   { bTable = bNew; }
     153             :     bool        GetTable() const                        { return bTable;}
     154           0 :     void        SetHorz( bool bNew )                    { bHorz = bNew; }
     155             :     bool        GetHorz() const                         { return bHorz;}
     156           0 :     void        SetVert( bool bNew )                    { bVert = bNew; }
     157             :     bool        GetVert() const                         { return bVert;}
     158             : 
     159             :     void        EnableFrameDirection(bool bEnable);
     160             :     //uses enum SvxFrameDirection
     161             :     void        SetFrameDirection(sal_Int32 nDirection);
     162             : 
     163             :     void        ResetBackground();
     164             : 
     165             :     virtual Size GetOptimalSize() const SAL_OVERRIDE;
     166             : };
     167             : 
     168             : #endif // INCLUDED_SVX_PAGECTRL_HXX
     169             : 
     170             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10