LCOV - code coverage report
Current view: top level - sc/inc - defaultsoptions.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 4 6 66.7 %
Date: 2015-06-13 12:38:46 Functions: 5 7 71.4 %
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             : 
      10             : #ifndef INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
      11             : #define INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
      12             : 
      13             : #include <svl/poolitem.hxx>
      14             : #include <unotools/configitem.hxx>
      15             : #include <formula/grammar.hxx>
      16             : #include "scdllapi.h"
      17             : #include "global.hxx"
      18             : 
      19             : class SC_DLLPUBLIC ScDefaultsOptions
      20             : {
      21             : private:
      22             :     SCTAB nInitTabCount;             // number of Tabs for new Spreadsheet doc
      23             :     OUString aInitTabPrefix;  // The Tab prefix name in new Spreadsheet doc
      24             : 
      25             : public:
      26             :     ScDefaultsOptions();
      27             :     ScDefaultsOptions( const ScDefaultsOptions& rCpy );
      28             :     ~ScDefaultsOptions();
      29             : 
      30             :     void SetDefaults();
      31             : 
      32         187 :     SCTAB GetInitTabCount() const           { return nInitTabCount; }
      33          49 :     void   SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
      34           0 :     void   SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
      35         777 :     OUString GetInitTabPrefix() const { return aInitTabPrefix; }
      36             : 
      37             :     ScDefaultsOptions&  operator=  ( const ScDefaultsOptions& rCpy );
      38             :     bool                operator== ( const ScDefaultsOptions& rOpt ) const;
      39             :     bool                operator!= ( const ScDefaultsOptions& rOpt ) const;
      40             : 
      41             : };
      42             : 
      43             : // item for the dialog / options page
      44             : 
      45             : class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
      46             : {
      47             : public:
      48             :     TYPEINFO_OVERRIDE();
      49             :     ScTpDefaultsItem( sal_uInt16 nWhich,
      50             :                    const ScDefaultsOptions& rOpt );
      51             :     ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
      52             :     virtual ~ScTpDefaultsItem();
      53             : 
      54             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      55             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      56             : 
      57           0 :     const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
      58             : 
      59             : private:
      60             :     ScDefaultsOptions theOptions;
      61             : };
      62             : 
      63             : // config item
      64             : 
      65          32 : class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem
      66             : {
      67             : private:
      68             :     static com::sun::star::uno::Sequence<OUString> GetPropertyNames();
      69             :     virtual void ImplCommit() SAL_OVERRIDE;
      70             : 
      71             : public:
      72             :     ScDefaultsCfg();
      73             : 
      74             :     void SetOptions( const ScDefaultsOptions& rNew );
      75             : 
      76             :     virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE;
      77             : };
      78             : 
      79             : #endif
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11