cid#1640468 Dereference after null check
[LibreOffice.git] / sc / source / ui / inc / tpdefaults.hxx
blobd3760948b6b37ff53fbbbd5cc724fc664a4a65bb
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 #pragma once
12 #include <sfx2/tabdlg.hxx>
14 class ScTpDefaultsOptions : public SfxTabPage
16 public:
17 explicit ScTpDefaultsOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
18 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet);
19 virtual ~ScTpDefaultsOptions() override;
21 virtual OUString GetAllStrings() override;
23 virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
24 virtual void Reset(const SfxItemSet* rCoreSet) override;
25 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
27 private:
28 void CheckNumSheets();
29 void CheckPrefix();
30 void OnFocusPrefixInput();
32 DECL_LINK( NumModifiedHdl, weld::Entry&, void );
33 DECL_LINK( PrefixModifiedHdl, weld::Entry&, void );
34 DECL_LINK( PrefixEditOnFocusHdl, weld::Widget&, void );
36 private:
37 // Stores old Sheet Prefix
38 OUString maOldPrefixValue;
40 std::unique_ptr<weld::SpinButton> m_xEdNSheets;
41 std::unique_ptr<weld::Widget> m_xEdNSheetsImg;
42 std::unique_ptr<weld::Entry> m_xEdSheetPrefix;
43 std::unique_ptr<weld::Widget> m_xEdSheetPrefixImg;
44 std::unique_ptr<weld::CheckButton> m_xEdJumboSheets;
45 std::unique_ptr<weld::Widget> m_xEdJumboSheetsImg;
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */