LCOV - code coverage report
Current view: top level - sc/inc - defaultsoptions.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 6 66.7 %
Date: 2012-08-25 Functions: 5 7 71.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*
       3                 :            :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       4                 :            :  *
       5                 :            :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :            :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :            :  * the License. You may obtain a copy of the License at
       8                 :            :  * http://www.mozilla.org/MPL/
       9                 :            :  *
      10                 :            :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :            :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :            :  * for the specific language governing rights and limitations under the
      13                 :            :  * License.
      14                 :            :  *
      15                 :            :  * The Initial Developer of the Original Code is
      16                 :            :  *       Albert Thuswaldner <albert.thuswaldner@gmail.com>
      17                 :            :  * Portions created by the Initial Developer are Copyright (C) 2012 the
      18                 :            :  * Initial Developer. All Rights Reserved.
      19                 :            :  *
      20                 :            :  * Contributor(s):
      21                 :            :  *
      22                 :            :  * Alternatively, the contents of this file may be used under the terms of
      23                 :            :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      24                 :            :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      25                 :            :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      26                 :            :  * instead of those above.
      27                 :            :  */
      28                 :            : 
      29                 :            : #ifndef SC_DEFAULTSOPT_HXX
      30                 :            : #define SC_DEFAULTSOPT_HXX
      31                 :            : 
      32                 :            : #include <svl/poolitem.hxx>
      33                 :            : #include <unotools/configitem.hxx>
      34                 :            : #include "formula/grammar.hxx"
      35                 :            : #include "scdllapi.h"
      36                 :            : #include "global.hxx"
      37                 :            : 
      38                 :            : class SC_DLLPUBLIC ScDefaultsOptions
      39                 :            : {
      40                 :            : private:
      41                 :            :     SCTAB nInitTabCount;             // number of Tabs for new Spreadsheet doc
      42                 :            :     ::rtl::OUString aInitTabPrefix;  // The Tab prefix name in new Spreadsheet doc
      43                 :            : 
      44                 :            : 
      45                 :            : public:
      46                 :            :     ScDefaultsOptions();
      47                 :            :     ScDefaultsOptions( const ScDefaultsOptions& rCpy );
      48                 :            :     ~ScDefaultsOptions();
      49                 :            : 
      50                 :            :     void SetDefaults();
      51                 :            : 
      52                 :        195 :     SCTAB GetInitTabCount() const           { return nInitTabCount; }
      53                 :         51 :     void   SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
      54                 :          0 :     void   SetInitTabPrefix(const rtl::OUString& aPrefix) { aInitTabPrefix = aPrefix; }
      55                 :        553 :     ::rtl::OUString GetInitTabPrefix() const { return aInitTabPrefix; }
      56                 :            : 
      57                 :            :     ScDefaultsOptions&  operator=  ( const ScDefaultsOptions& rCpy );
      58                 :            :     bool                operator== ( const ScDefaultsOptions& rOpt ) const;
      59                 :            :     bool                operator!= ( const ScDefaultsOptions& rOpt ) const;
      60                 :            : 
      61                 :            : };
      62                 :            : 
      63                 :            : //==================================================================
      64                 :            : // item for the dialog / options page
      65                 :            : //==================================================================
      66                 :            : 
      67                 :            : class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
      68                 :            : {
      69                 :            : public:
      70                 :            :     TYPEINFO();
      71                 :            :     ScTpDefaultsItem( sal_uInt16 nWhich,
      72                 :            :                    const ScDefaultsOptions& rOpt );
      73                 :            :     ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
      74                 :            :     ~ScTpDefaultsItem();
      75                 :            : 
      76                 :            :     virtual String          GetValueText() const;
      77                 :            :     virtual int             operator==( const SfxPoolItem& ) const;
      78                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      79                 :            : 
      80                 :          0 :     const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
      81                 :            : 
      82                 :            : private:
      83                 :            :     ScDefaultsOptions theOptions;
      84                 :            : };
      85                 :            : 
      86                 :            : //==================================================================
      87                 :            : // config item
      88                 :            : //==================================================================
      89                 :            : 
      90 [ +  - ][ -  + ]:         36 : class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem
      91                 :            : {
      92                 :            :     com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
      93                 :            : public:
      94                 :            :     ScDefaultsCfg();
      95                 :            : 
      96                 :            :     void SetOptions( const ScDefaultsOptions& rNew );
      97                 :            : 
      98                 :            :     virtual void Commit();
      99                 :            :     virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
     100                 :            : };
     101                 :            : 
     102                 :            : #endif
     103                 :            : 
     104                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10