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 #pragma once
11 
12 #include <svl/poolitem.hxx>
13 #include <unotools/configitem.hxx>
14 #include "scdllapi.h"
15 #include "types.hxx"
16 
18 {
19 private:
20  SCTAB nInitTabCount; // number of Tabs for new Spreadsheet doc
21  OUString aInitTabPrefix; // The Tab prefix name in new Spreadsheet doc
23 
24 public:
26 
27  void SetDefaults();
28 
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; }
33  bool GetInitJumboSheets() const { return bJumboSheets; }
34  void SetInitJumboSheets( bool b) { bJumboSheets = b; }
35 
36  bool operator== ( const ScDefaultsOptions& rOpt ) const;
37 
38 };
39 
40 // item for the dialog / options page
41 
43 {
44 public:
45  ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
46  virtual ~ScTpDefaultsItem() override;
47 
48  ScTpDefaultsItem(ScTpDefaultsItem const &) = default;
49  ScTpDefaultsItem(ScTpDefaultsItem &&) = default;
50  ScTpDefaultsItem & operator =(ScTpDefaultsItem const &) = delete; // due to SfxPoolItem
51  ScTpDefaultsItem & operator =(ScTpDefaultsItem &&) = delete; // due to SfxPoolItem
52 
53  virtual bool operator==( const SfxPoolItem& ) const override;
54  virtual ScTpDefaultsItem* Clone( SfxItemPool *pPool = nullptr ) const override;
55 
56  const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
57 
58 private:
60 };
61 
62 // config item
63 
64 class ScDefaultsCfg final : public ScDefaultsOptions, public utl::ConfigItem
65 {
66 private:
67  static css::uno::Sequence<OUString> GetPropertyNames();
68  virtual void ImplCommit() override;
69 
70 public:
71  ScDefaultsCfg();
72 
73  void SetOptions( const ScDefaultsOptions& rNew );
74 
75  virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
76 };
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518
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:27
sal_Int16 SCTAB
Definition: types.hxx:22