LCOV - code coverage report
Current view: top level - include/svx - algitem.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 15 0.0 %
Date: 2014-04-14 Functions: 0 11 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_ALGITEM_HXX
      20             : #define INCLUDED_SVX_ALGITEM_HXX
      21             : 
      22             : #include <svx/svxids.hrc>
      23             : #include <svl/poolitem.hxx>
      24             : #include <svl/eitem.hxx>
      25             : #include <editeng/svxenum.hxx>
      26             : #include <svx/svxdllapi.h>
      27             : 
      28             : class SvStream;
      29             : 
      30             : 
      31             : 
      32           0 : class SVX_DLLPUBLIC SvxOrientationItem: public SfxEnumItem
      33             : {
      34             : public:
      35             :     TYPEINFO_OVERRIDE();
      36             : 
      37             :     SvxOrientationItem(
      38             :         const SvxCellOrientation eOrientation /*= SVX_ORIENTATION_STANDARD*/,
      39             :         const sal_uInt16 nId );
      40             : 
      41             :     SvxOrientationItem(
      42             :         sal_Int32 nRotation, bool bStacked,
      43             :         const sal_uInt16 nId );
      44             : 
      45             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      46             :                                     SfxMapUnit eCoreMetric,
      47             :                                     SfxMapUnit ePresMetric,
      48             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
      49             : 
      50             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      51             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      52             : 
      53             :     virtual sal_uInt16          GetValueCount() const SAL_OVERRIDE;
      54             :     virtual OUString        GetValueText( sal_uInt16 nVal ) const;
      55             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      56             :     virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE;
      57             : 
      58           0 :     inline  SvxOrientationItem& operator=(const SvxOrientationItem& rOrientation)
      59             :             {
      60           0 :                 SetValue( rOrientation.GetValue() );
      61           0 :                 return *this;
      62             :             }
      63             : 
      64             :     /** Returns sal_True, if the item represents STACKED state. */
      65             :     bool                    IsStacked() const;
      66             :     /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
      67             :     sal_Int32               GetRotation( sal_Int32 nStdAngle = 0 ) const;
      68             :     /** Fills this item according to passed item values. */
      69             :     void                    SetFromRotation( sal_Int32 nRotation, bool bStacked );
      70             : };
      71             : 
      72             : 
      73             : 
      74           0 : class SVX_DLLPUBLIC SvxMarginItem: public SfxPoolItem
      75             : {
      76             :     sal_Int16       nLeftMargin;
      77             :     sal_Int16       nTopMargin;
      78             :     sal_Int16       nRightMargin;
      79             :     sal_Int16       nBottomMargin;
      80             : public:
      81             :     TYPEINFO_OVERRIDE();
      82             :     SvxMarginItem( const sal_uInt16 nId  );
      83             :     SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
      84             :                    sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
      85             :                    const sal_uInt16 nId  );
      86             :     SvxMarginItem( const SvxMarginItem& );
      87             : 
      88             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      89             :                                     SfxMapUnit eCoreMetric,
      90             :                                     SfxMapUnit ePresMetric,
      91             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
      92             : 
      93             :     virtual bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      94             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      95             :     virtual SfxPoolItem*     Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE;
      96             :     virtual SvStream&        Store( SvStream&, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
      97             : 
      98             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      99             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
     100             : 
     101           0 :             sal_Int16       GetLeftMargin() const {return nLeftMargin; }
     102             :             void            SetLeftMargin(sal_Int16 nLeft);
     103           0 :             sal_Int16       GetTopMargin() const {return nTopMargin; }
     104             :             void            SetTopMargin(sal_Int16 nTop);
     105           0 :             sal_Int16       GetRightMargin() const {return nRightMargin; }
     106             :             void            SetRightMargin(sal_Int16 nRight);
     107           0 :             sal_Int16       GetBottomMargin() const {return nBottomMargin; }
     108             :             void            SetBottomMargin(sal_Int16 nBottom);
     109             : 
     110           0 :     inline  SvxMarginItem& operator=(const SvxMarginItem& rMargin)
     111             :             {
     112           0 :                 nLeftMargin = rMargin.nLeftMargin;
     113           0 :                 nTopMargin = rMargin.nTopMargin;
     114           0 :                 nRightMargin = rMargin.nRightMargin;
     115           0 :                 nBottomMargin = rMargin.nBottomMargin;
     116           0 :                 return *this;
     117             :             }
     118             : };
     119             : 
     120             : #endif
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10