LOK: tilebench improvements
[LibreOffice.git] / sc / inc / defaultsoptions.hxx
blobbe0e8c110a7a52cfa3d26f170758fb7966fd47e3
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 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>
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
25 public:
26 ScDefaultsOptions();
27 ScDefaultsOptions( const ScDefaultsOptions& rCpy );
28 ~ScDefaultsOptions();
30 void SetDefaults();
32 SCTAB GetInitTabCount() const { return nInitTabCount; }
33 void SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
34 void SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
35 const OUString& GetInitTabPrefix() const { return aInitTabPrefix; }
37 ScDefaultsOptions& operator= ( const ScDefaultsOptions& rCpy );
38 bool operator== ( const ScDefaultsOptions& rOpt ) const;
42 // item for the dialog / options page
44 class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
46 public:
47 ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
48 ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
49 virtual ~ScTpDefaultsItem() override;
51 virtual bool operator==( const SfxPoolItem& ) const override;
52 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
54 const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
56 private:
57 ScDefaultsOptions theOptions;
60 // config item
62 class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem
64 private:
65 static css::uno::Sequence<OUString> GetPropertyNames();
66 virtual void ImplCommit() override;
68 public:
69 ScDefaultsCfg();
71 void SetOptions( const ScDefaultsOptions& rNew );
73 virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */