LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sc/inc - printopt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 6 83.3 %
Date: 2013-07-09 Functions: 6 7 85.7 %
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             : 
      20             : #ifndef SC_PRINTOPT_HXX
      21             : #define SC_PRINTOPT_HXX
      22             : 
      23             : #include <svl/poolitem.hxx>
      24             : #include <unotools/configitem.hxx>
      25             : #include "scdllapi.h"
      26             : 
      27             : class SC_DLLPUBLIC ScPrintOptions
      28             : {
      29             : private:
      30             :     sal_Bool    bSkipEmpty;
      31             :     sal_Bool    bAllSheets;
      32             : 
      33             : public:
      34             :                 ScPrintOptions();
      35             :                 ScPrintOptions( const ScPrintOptions& rCpy );
      36             :                 ~ScPrintOptions();
      37             : 
      38          82 :     sal_Bool    GetSkipEmpty() const            { return bSkipEmpty; }
      39           4 :     void    SetSkipEmpty( sal_Bool bVal )       { bSkipEmpty = bVal; }
      40          26 :     sal_Bool    GetAllSheets() const            { return bAllSheets; }
      41           4 :     void    SetAllSheets( sal_Bool bVal )       { bAllSheets = bVal; }
      42             : 
      43             :     void    SetDefaults();
      44             : 
      45             :     const ScPrintOptions&   operator=  ( const ScPrintOptions& rCpy );
      46             :     bool                    operator== ( const ScPrintOptions& rOpt ) const;
      47             :     bool                    operator!= ( const ScPrintOptions& rOpt ) const;
      48             : };
      49             : 
      50             : //==================================================================
      51             : // item for the dialog / options page
      52             : //==================================================================
      53             : 
      54             : class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem
      55             : {
      56             : public:
      57             :                 TYPEINFO();
      58             :                 ScTpPrintItem( sal_uInt16 nWhich,
      59             :                                const ScPrintOptions& rOpt );
      60             :                 ScTpPrintItem( const ScTpPrintItem& rItem );
      61             :                 ~ScTpPrintItem();
      62             : 
      63             :     virtual OUString        GetValueText() const;
      64             :     virtual int             operator==( const SfxPoolItem& ) const;
      65             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      66             : 
      67           0 :     const ScPrintOptions&   GetPrintOptions() const { return theOptions; }
      68             : 
      69             : private:
      70             :     ScPrintOptions theOptions;
      71             : };
      72             : 
      73             : //==================================================================
      74             : // config item
      75             : //==================================================================
      76             : 
      77           2 : class ScPrintCfg : public ScPrintOptions, public utl::ConfigItem
      78             : {
      79             :     com::sun::star::uno::Sequence<OUString> GetPropertyNames();
      80             : 
      81             : public:
      82             :             ScPrintCfg();
      83             : 
      84             :     void            SetOptions( const ScPrintOptions& rNew );
      85             : 
      86             :     virtual void    Commit();
      87             :     virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
      88             : };
      89             : 
      90             : #endif
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10