1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
11 #define INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
13 #include <svl/poolitem.hxx>
14 #include <unotools/configitem.hxx>
15 #include <formula/grammar.hxx>
19 class SC_DLLPUBLIC ScDefaultsOptions
22 SCTAB nInitTabCount
; // number of Tabs for new Spreadsheet doc
23 OUString aInitTabPrefix
; // The Tab prefix name in new Spreadsheet doc
27 ScDefaultsOptions( const ScDefaultsOptions
& rCpy
);
32 SCTAB
GetInitTabCount() const { return nInitTabCount
; }
33 void SetInitTabCount( SCTAB nTabs
) { nInitTabCount
= nTabs
; }
34 void SetInitTabPrefix(const OUString
& aPrefix
) { aInitTabPrefix
= aPrefix
; }
35 OUString
GetInitTabPrefix() const { return aInitTabPrefix
; }
37 ScDefaultsOptions
& operator= ( const ScDefaultsOptions
& rCpy
);
38 bool operator== ( const ScDefaultsOptions
& rOpt
) const;
39 bool operator!= ( const ScDefaultsOptions
& rOpt
) const;
43 // item for the dialog / options page
45 class SC_DLLPUBLIC ScTpDefaultsItem
: public SfxPoolItem
49 ScTpDefaultsItem( sal_uInt16 nWhich
,
50 const ScDefaultsOptions
& rOpt
);
51 ScTpDefaultsItem( const ScTpDefaultsItem
& rItem
);
52 virtual ~ScTpDefaultsItem();
54 virtual OUString
GetValueText() const;
55 virtual bool operator==( const SfxPoolItem
& ) const SAL_OVERRIDE
;
56 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const SAL_OVERRIDE
;
58 const ScDefaultsOptions
& GetDefaultsOptions() const { return theOptions
; }
61 ScDefaultsOptions theOptions
;
66 class ScDefaultsCfg
: public ScDefaultsOptions
, public utl::ConfigItem
68 com::sun::star::uno::Sequence
<OUString
> GetPropertyNames();
72 void SetOptions( const ScDefaultsOptions
& rNew
);
74 virtual void Commit() SAL_OVERRIDE
;
75 virtual void Notify( const ::com::sun::star::uno::Sequence
< OUString
>& aPropertyNames
) SAL_OVERRIDE
;
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */