LibreOffice Module sc (master)  1
defaultsoptions.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #ifndef INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
11 #define INCLUDED_SC_INC_DEFAULTSOPTIONS_HXX
12 
13 #include <svl/poolitem.hxx>
14 #include <unotools/configitem.hxx>
15 #include "scdllapi.h"
16 #include "types.hxx"
17 
19 {
20 private:
21  SCTAB nInitTabCount; // number of Tabs for new Spreadsheet doc
22  OUString aInitTabPrefix; // The Tab prefix name in new Spreadsheet doc
24 
25 public:
27 
28  void SetDefaults();
29 
30  SCTAB GetInitTabCount() const { return nInitTabCount; }
31  void SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
32  void SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
33  const OUString& GetInitTabPrefix() const { return aInitTabPrefix; }
34  bool GetInitJumboSheets() const { return bJumboSheets; }
35  void SetInitJumboSheets( bool b) { bJumboSheets = b; }
36 
37  bool operator== ( const ScDefaultsOptions& rOpt ) const;
38 
39 };
40 
41 // item for the dialog / options page
42 
44 {
45 public:
46  ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
47  virtual ~ScTpDefaultsItem() override;
48 
49  ScTpDefaultsItem(ScTpDefaultsItem const &) = default;
50  ScTpDefaultsItem(ScTpDefaultsItem &&) = default;
51  ScTpDefaultsItem & operator =(ScTpDefaultsItem const &) = delete; // due to SfxPoolItem
52  ScTpDefaultsItem & operator =(ScTpDefaultsItem &&) = delete; // due to SfxPoolItem
53 
54  virtual bool operator==( const SfxPoolItem& ) const override;
55  virtual ScTpDefaultsItem* Clone( SfxItemPool *pPool = nullptr ) const override;
56 
57  const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
58 
59 private:
61 };
62 
63 // config item
64 
65 class ScDefaultsCfg final : public ScDefaultsOptions, public utl::ConfigItem
66 {
67 private:
68  static css::uno::Sequence<OUString> GetPropertyNames();
69  virtual void ImplCommit() override;
70 
71 public:
72  ScDefaultsCfg();
73 
74  void SetOptions( const ScDefaultsOptions& rNew );
75 
76  virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
77 };
78 
79 #endif
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:517
SCTAB GetInitTabCount() const
virtual bool operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
const ScDefaultsOptions & GetDefaultsOptions() const
SfxPoolItem & operator=(const SfxPoolItem &)=delete
static css::uno::Sequence< OUString > GetPropertyNames()
void SetInitTabPrefix(const OUString &aPrefix)
bool GetInitJumboSheets() const
void SetOptions(const ScDefaultsOptions &rNew)
const OUString & GetInitTabPrefix() const
void SetInitJumboSheets(bool b)
ScDefaultsOptions theOptions
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void ImplCommit() override
void SetInitTabCount(SCTAB nTabs)
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
sal_Int16 SCTAB
Definition: types.hxx:23