LCOV - code coverage report
Current view: top level - include/svx - rulritem.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 14 20 70.0 %
Date: 2014-11-03 Functions: 17 24 70.8 %
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_RULRITEM_HXX
      20             : #define INCLUDED_SVX_RULRITEM_HXX
      21             : 
      22             : #include <tools/gen.hxx>
      23             : #include <svl/poolitem.hxx>
      24             : #include <svx/svxdllapi.h>
      25             : #include <vector>
      26             : 
      27       10540 : class SVX_DLLPUBLIC SvxLongLRSpaceItem : public SfxPoolItem
      28             : {
      29             :     long    mlLeft;         // nLeft or the negativ first-line indentation
      30             :     long    mlRight;        // the unproblematic right edge
      31             : 
      32             :   protected:
      33             : 
      34             :     virtual bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      35             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      36             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      37             : 
      38             :     virtual OUString         GetValueText() const;
      39             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      40             :                                     SfxMapUnit eCoreMetric,
      41             :                                     SfxMapUnit ePresMetric,
      42             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
      43             : 
      44             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      45             : 
      46             : private:
      47             :     SVX_DLLPRIVATE const SvxLongLRSpaceItem& operator=(const SvxLongLRSpaceItem &); // n.i.
      48             : 
      49             : public:
      50             :     TYPEINFO_OVERRIDE();
      51             :     SvxLongLRSpaceItem(long lLeft, long lRight, sal_uInt16 nId);
      52             :     SvxLongLRSpaceItem(const SvxLongLRSpaceItem &);
      53             :     SvxLongLRSpaceItem();
      54             : 
      55        6445 :     long GetLeft() const { return mlLeft;}
      56        3720 :     long GetRight() const { return mlRight;}
      57             :     void SetLeft(long lArgLeft);
      58             :     void SetRight(long lArgRight);
      59             : };
      60             : 
      61       10536 : class SVX_DLLPUBLIC SvxLongULSpaceItem : public SfxPoolItem
      62             : {
      63             :     long    mlLeft;         // nLeft or the negative first-line indentation
      64             :     long    mlRight;        // the unproblematic right edge
      65             : 
      66             :   protected:
      67             : 
      68             :     virtual bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      69             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      70             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      71             : 
      72             :     virtual OUString         GetValueText() const;
      73             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      74             :                                     SfxMapUnit eCoreMetric,
      75             :                                     SfxMapUnit ePresMetric,
      76             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
      77             : 
      78             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      79             : 
      80             : private:
      81             :     SVX_DLLPRIVATE const SvxLongULSpaceItem& operator=(const SvxLongULSpaceItem &); // n.i.
      82             : 
      83             : public:
      84             :     TYPEINFO_OVERRIDE();
      85             :     SvxLongULSpaceItem(long lUpper, long lLower, sal_uInt16 nId);
      86             :     SvxLongULSpaceItem(const SvxLongULSpaceItem &);
      87             :     SvxLongULSpaceItem();
      88             : 
      89        2719 :     long GetUpper() const { return mlLeft;}
      90        1979 :     long GetLower() const { return mlRight;}
      91             :     void SetUpper(long lArgLeft);
      92             :     void SetLower(long lArgRight);
      93             : };
      94             : 
      95        2252 : class SVX_DLLPUBLIC SvxPagePosSizeItem : public SfxPoolItem
      96             : {
      97             :     Point aPos;
      98             :     long lWidth;
      99             :     long lHeight;
     100             : protected:
     101             :     virtual bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
     102             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
     103             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
     104             : 
     105             :     virtual OUString         GetValueText() const;
     106             :     virtual bool GetPresentation( SfxItemPresentation ePres,
     107             :                                     SfxMapUnit eCoreMetric,
     108             :                                     SfxMapUnit ePresMetric,
     109             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
     110             : 
     111             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
     112             : 
     113             : private:
     114             :     SVX_DLLPRIVATE const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &); // n.i.
     115             : public:
     116             :     TYPEINFO_OVERRIDE();
     117             :     SvxPagePosSizeItem(const Point &rPos, long lWidth, long lHeight);
     118             :     SvxPagePosSizeItem(const SvxPagePosSizeItem &);
     119             :     SvxPagePosSizeItem();
     120             : 
     121        1016 :     const Point &GetPos() const { return aPos; }
     122        3013 :     long    GetWidth() const { return lWidth; }
     123        1014 :     long    GetHeight() const { return lHeight; }
     124             : };
     125             : 
     126             : struct SVX_DLLPUBLIC SvxColumnDescription
     127             : {
     128             :     long     nStart;    /* Start of the column */
     129             :     long     nEnd;      /* End of the column */
     130             :     bool     bVisible;  /* Visibility */
     131             : 
     132             :     long nEndMin; //min. possible position of end
     133             :     long nEndMax; //max. possible position of end
     134             : 
     135             :     SvxColumnDescription();
     136             : 
     137             :     SvxColumnDescription(const SvxColumnDescription &rCopy);
     138             : 
     139             :     SvxColumnDescription(long start, long end, bool bVis = true);
     140             : 
     141             :     SvxColumnDescription(long start, long end,
     142             :                          long endMin, long endMax, bool bVis = true);
     143             : 
     144             :     bool operator==(const SvxColumnDescription &rCmp) const;
     145             :     bool operator!=(const SvxColumnDescription &rCmp) const;
     146             :     long GetWidth() const;
     147             : };
     148             : 
     149             : class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem
     150             : {
     151             :     typedef std::vector<SvxColumnDescription> SvxColumnDescriptionVector;
     152             :     SvxColumnDescriptionVector aColumns; // Column array
     153             : 
     154             :     long nLeft;             // Left edge for the table
     155             :     long nRight;            // Right edge for the table; for columns always
     156             :                             // equal to the surrounding frame
     157             :     sal_uInt16 nActColumn;  // the current column
     158             :     bool       bTable;      // table?
     159             :     bool       bOrtho;      // evenly spread columns
     160             : 
     161             : protected:
     162             :     virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
     163             : 
     164             :     virtual OUString GetValueText() const;
     165             : 
     166             :     virtual bool GetPresentation( SfxItemPresentation ePres,
     167             :                                                  SfxMapUnit eCoreMetric,
     168             :                                                  SfxMapUnit ePresMetric,
     169             :                                                  OUString &rText,
     170             :                                                  const IntlWrapper * = 0 ) const SAL_OVERRIDE;
     171             : 
     172             :     virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
     173             :     virtual bool         QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
     174             :     virtual bool         PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
     175             : 
     176             : public:
     177             :     TYPEINFO_OVERRIDE();
     178             :     // right edge of the surrounding frame
     179             :     // nLeft, nRight each the distance to the surrounding frame
     180             :     SvxColumnItem(sal_uInt16 nAct = 0);
     181             :     SvxColumnItem(sal_uInt16 nActCol, sal_uInt16 nLeft, sal_uInt16 nRight = 0); // Table with borders
     182             :     SvxColumnItem(const SvxColumnItem& aItem);
     183             :     virtual ~SvxColumnItem();
     184             : 
     185             :     const SvxColumnItem &operator=(const SvxColumnItem &);
     186             : 
     187             :     SvxColumnDescription&       operator[](sal_uInt16 index);
     188             :     const SvxColumnDescription& operator[](sal_uInt16 index) const;
     189             :     SvxColumnDescription&       At(sal_uInt16 index);
     190             :     SvxColumnDescription&       GetActiveColumnDescription();
     191             : 
     192             :     sal_uInt16  Count() const;
     193             :     void        Insert(const SvxColumnDescription& rDesc, sal_uInt16 nPos);
     194             :     void        Append(const SvxColumnDescription& rDesc);
     195             :     void        SetLeft(long aLeft);
     196             :     void        SetRight(long aRight);
     197          54 :     sal_uInt16  GetActColumn() const { return nActColumn;}
     198             :     bool        IsFirstAct() const;
     199             :     bool        IsLastAct() const;
     200          32 :     long        GetLeft() { return nLeft;}
     201          32 :     long        GetRight() { return nRight;}
     202          24 :     bool        IsTable() const { return bTable;}
     203             :     bool        CalcOrtho() const;
     204             :     void        SetOrtho(bool bVal);
     205             :     bool        IsConsistent() const;
     206             : };
     207             : 
     208             : // class SvxObjectItem ---------------------------------------------------
     209             : 
     210           0 : class SVX_DLLPUBLIC SvxObjectItem : public SfxPoolItem
     211             : {
     212             : private:
     213             :     long nStartX;   /* Start in x direction */
     214             :     long nEndX;     /* End in x direction */
     215             :     long nStartY;   /* Start in y direction */
     216             :     long nEndY;     /* Ende in y direction */
     217             :     bool bLimits; /* boundary limit control by the application */
     218             : 
     219             : protected:
     220             :     virtual bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
     221             : 
     222             :     virtual OUString         GetValueText() const;
     223             :     virtual bool GetPresentation( SfxItemPresentation ePres,
     224             :                                     SfxMapUnit eCoreMetric,
     225             :                                     SfxMapUnit ePresMetric,
     226             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
     227             : 
     228             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
     229             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
     230             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
     231             : 
     232             : private:
     233             :     SVX_DLLPRIVATE const SvxObjectItem &operator=(const SvxObjectItem &); // n.i.
     234             : 
     235             : public:
     236             :     TYPEINFO_OVERRIDE();
     237             :     SvxObjectItem(long nStartX, long nEndX,
     238             :                   long nStartY, long nEndY,
     239             :                   bool bLimits = false);
     240             :     SvxObjectItem(const SvxObjectItem& rCopy);
     241             : 
     242           0 :     bool HasLimits() const { return bLimits;}
     243             : 
     244           0 :     long GetStartX() const { return nStartX;}
     245           0 :     long GetEndX() const { return nEndX;}
     246           0 :     long GetStartY() const { return nStartY;}
     247           0 :     long GetEndY() const { return nEndY;}
     248             : 
     249             :     void SetStartX(long lValue);
     250             :     void SetEndX(long lValue);
     251             :     void SetStartY(long lValue);
     252             :     void SetEndY(long lValue);
     253             : };
     254             : 
     255             : 
     256             : #endif
     257             : 
     258             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10