LCOV - code coverage report
Current view: top level - sc/inc - printopt.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 7 8 87.5 %
Date: 2015-06-13 12:38:46 Functions: 8 9 88.9 %
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 INCLUDED_SC_INC_PRINTOPT_HXX
      21             : #define INCLUDED_SC_INC_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             :     bool    bSkipEmpty;
      31             :     bool    bAllSheets;
      32             :     bool    bForceBreaks;
      33             : 
      34             : public:
      35             :                 ScPrintOptions();
      36             :                 ScPrintOptions( const ScPrintOptions& rCpy );
      37             :                 ~ScPrintOptions();
      38             : 
      39          67 :     bool    GetSkipEmpty() const            { return bSkipEmpty; }
      40          12 :     void    SetSkipEmpty( bool bVal )       { bSkipEmpty = bVal; }
      41          24 :     bool    GetAllSheets() const            { return bAllSheets; }
      42          12 :     void    SetAllSheets( bool bVal )       { bAllSheets = bVal; }
      43         189 :     bool    GetForceBreaks() const              { return bForceBreaks; }
      44           9 :     void    SetForceBreaks( bool bVal )     { bForceBreaks = bVal; }
      45             : 
      46             :     void    SetDefaults();
      47             : 
      48             :     const ScPrintOptions&   operator=  ( const ScPrintOptions& rCpy );
      49             :     bool                    operator== ( const ScPrintOptions& rOpt ) const;
      50             :     bool                    operator!= ( const ScPrintOptions& rOpt ) const;
      51             : };
      52             : 
      53             : // item for the dialog / options page
      54             : 
      55             : class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem
      56             : {
      57             : public:
      58             :                 TYPEINFO_OVERRIDE();
      59             :                 ScTpPrintItem( sal_uInt16 nWhich,
      60             :                                const ScPrintOptions& rOpt );
      61             :                 ScTpPrintItem( const ScTpPrintItem& rItem );
      62             :                 virtual ~ScTpPrintItem();
      63             : 
      64             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      65             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      66             : 
      67           0 :     const ScPrintOptions&   GetPrintOptions() const { return theOptions; }
      68             : 
      69             : private:
      70             :     ScPrintOptions theOptions;
      71             : };
      72             : 
      73             : // config item
      74             : 
      75           8 : class ScPrintCfg : public ScPrintOptions, public utl::ConfigItem
      76             : {
      77             : private:
      78             :     static com::sun::star::uno::Sequence<OUString> GetPropertyNames();
      79             : 
      80             :     virtual void    ImplCommit() SAL_OVERRIDE;
      81             : 
      82             : public:
      83             :             ScPrintCfg();
      84             : 
      85             :     void            SetOptions( const ScPrintOptions& rNew );
      86             : 
      87             :     virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE;
      88             : };
      89             : 
      90             : #endif
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11