LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/sfx2 - zoomitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 5 60.0 %
Date: 2013-07-09 Functions: 3 4 75.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 _SVX_ZOOMITEM_HXX
      20             : #define _SVX_ZOOMITEM_HXX
      21             : 
      22             : #include <svl/intitem.hxx>
      23             : #include <sfx2/sfxsids.hrc>
      24             : #include "sfx2/dllapi.h"
      25             : 
      26             : //-------------------------------------------------------------------------
      27             : 
      28             : enum SvxZoomType
      29             : {
      30             :     SVX_ZOOM_PERCENT,       // GetValue() ist kein besonderer prozentualer Wert
      31             :     SVX_ZOOM_OPTIMAL,       // GetValue() entspricht der optimalen Gr"o\se
      32             :     SVX_ZOOM_WHOLEPAGE,     // GetValue() entspricht der ganzen Seite
      33             :     SVX_ZOOM_PAGEWIDTH,      // GetValue() entspricht der Seitenbreite
      34             :     SVX_ZOOM_PAGEWIDTH_NOBORDER  // GetValue() pagewidth without border
      35             : };
      36             : 
      37             : //-------------------------------------------------------------------------
      38             : 
      39             : class SFX2_DLLPUBLIC SvxZoomItem: public SfxUInt16Item
      40             : {
      41             :     sal_uInt16                  nValueSet;  // erlaubte Werte (siehe #defines unten)
      42             :     SvxZoomType             eType;
      43             : 
      44             : public:
      45             :     TYPEINFO();
      46             : 
      47             :     SvxZoomItem( SvxZoomType eZoomType = SVX_ZOOM_PERCENT,
      48             :                  sal_uInt16 nVal = 0, sal_uInt16 nWhich = SID_ATTR_ZOOM );
      49             :     SvxZoomItem( const SvxZoomItem& );
      50             :     ~SvxZoomItem();
      51             : 
      52         171 :     void                    SetValueSet( sal_uInt16 nValues ) { nValueSet = nValues; }
      53        4469 :     sal_uInt16                  GetValueSet() const { return nValueSet; }
      54             :     bool                    IsValueAllowed( sal_uInt16 nValue ) const
      55             :                             { return nValue == ( nValue & nValueSet ); }
      56             : 
      57        3519 :     SvxZoomType             GetType() const { return eType; }
      58           0 :     void                    SetType( SvxZoomType eNewType )
      59           0 :                             { eType = eNewType; }
      60             : 
      61             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      62             :     virtual SfxPoolItem*    Create( SvStream& rStrm, sal_uInt16 nVersion ) const;
      63             :     virtual SvStream&       Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const;
      64             :     virtual int             operator==( const SfxPoolItem& ) const;
      65             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      66             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      67             : };
      68             : 
      69             : //------------------------------------------------------------------------
      70             : 
      71             : #define SVX_ZOOM_ENABLE_50          0x0001
      72             : #define SVX_ZOOM_ENABLE_75          0x0002
      73             : #define SVX_ZOOM_ENABLE_100         0x0004
      74             : #define SVX_ZOOM_ENABLE_150         0x0008
      75             : #define SVX_ZOOM_ENABLE_200         0x0010
      76             : #define SVX_ZOOM_ENABLE_OPTIMAL     0x1000
      77             : #define SVX_ZOOM_ENABLE_WHOLEPAGE   0x2000
      78             : #define SVX_ZOOM_ENABLE_PAGEWIDTH   0x4000
      79             : #define SVX_ZOOM_ENABLE_ALL         0x701F
      80             : 
      81             : #endif
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10