Bump version to 6.4-15
[LibreOffice.git] / sc / inc / defaultsoptions.hxx
blobdd48dd83d4f91a42d6816784208a30c719496330
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 "scdllapi.h"
16 #include "types.hxx"
18 class SC_DLLPUBLIC ScDefaultsOptions
20 private:
21 SCTAB nInitTabCount; // number of Tabs for new Spreadsheet doc
22 OUString aInitTabPrefix; // The Tab prefix name in new Spreadsheet doc
24 public:
25 ScDefaultsOptions();
27 void SetDefaults();
29 SCTAB GetInitTabCount() const { return nInitTabCount; }
30 void SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
31 void SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
32 const OUString& GetInitTabPrefix() const { return aInitTabPrefix; }
34 bool operator== ( const ScDefaultsOptions& rOpt ) const;
38 // item for the dialog / options page
40 class SC_DLLPUBLIC ScTpDefaultsItem final : public SfxPoolItem
42 public:
43 ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
44 virtual ~ScTpDefaultsItem() override;
46 ScTpDefaultsItem(ScTpDefaultsItem const &) = default;
47 ScTpDefaultsItem(ScTpDefaultsItem &&) = default;
48 ScTpDefaultsItem & operator =(ScTpDefaultsItem const &) = delete; // due to SfxPoolItem
49 ScTpDefaultsItem & operator =(ScTpDefaultsItem &&) = delete; // due to SfxPoolItem
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 const theOptions;
60 // config item
62 class ScDefaultsCfg final : 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: */