update credits
[LibreOffice.git] / sc / inc / defaultsoptions.hxx
blobff3ea448784e95a9738dccdef9248a9dffa7752b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef SC_DEFAULTSOPT_HXX
11 #define SC_DEFAULTSOPT_HXX
13 #include <svl/poolitem.hxx>
14 #include <unotools/configitem.hxx>
15 #include "formula/grammar.hxx"
16 #include "scdllapi.h"
17 #include "global.hxx"
19 class SC_DLLPUBLIC ScDefaultsOptions
21 private:
22 SCTAB nInitTabCount; // number of Tabs for new Spreadsheet doc
23 OUString aInitTabPrefix; // The Tab prefix name in new Spreadsheet doc
26 public:
27 ScDefaultsOptions();
28 ScDefaultsOptions( const ScDefaultsOptions& rCpy );
29 ~ScDefaultsOptions();
31 void SetDefaults();
33 SCTAB GetInitTabCount() const { return nInitTabCount; }
34 void SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
35 void SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
36 OUString GetInitTabPrefix() const { return aInitTabPrefix; }
38 ScDefaultsOptions& operator= ( const ScDefaultsOptions& rCpy );
39 bool operator== ( const ScDefaultsOptions& rOpt ) const;
40 bool operator!= ( const ScDefaultsOptions& rOpt ) const;
44 //==================================================================
45 // item for the dialog / options page
46 //==================================================================
48 class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
50 public:
51 TYPEINFO();
52 ScTpDefaultsItem( sal_uInt16 nWhich,
53 const ScDefaultsOptions& rOpt );
54 ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
55 ~ScTpDefaultsItem();
57 virtual String GetValueText() const;
58 virtual int operator==( const SfxPoolItem& ) const;
59 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
61 const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
63 private:
64 ScDefaultsOptions theOptions;
67 //==================================================================
68 // config item
69 //==================================================================
71 class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem
73 com::sun::star::uno::Sequence<OUString> GetPropertyNames();
74 public:
75 ScDefaultsCfg();
77 void SetOptions( const ScDefaultsOptions& rNew );
79 virtual void Commit();
80 virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */