cid#1640468 Dereference after null check
[LibreOffice.git] / sc / source / ui / optdlg / calcoptionsdlg.hxx
blob97d7bb21c48e95d69f828a7718c1ba5bbbaf0b1e
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 <vcl/weld.hxx>
13 #include <calcconfig.hxx>
15 class ScCalcOptionsDialog : public weld::GenericDialogController
17 public:
18 ScCalcOptionsDialog(weld::Window* pParent, const ScCalcConfig& rConfig, bool bWriteConfig);
19 virtual ~ScCalcOptionsDialog() override;
21 DECL_LINK(AsZeroModifiedHdl, weld::Toggleable&, void);
22 DECL_LINK(ConversionModifiedHdl, weld::ComboBox&, void);
23 DECL_LINK(SyntaxModifiedHdl, weld::ComboBox&, void);
24 DECL_LINK(CurrentDocOnlyHdl, weld::Toggleable&, void);
26 const ScCalcConfig& GetConfig() const { return maConfig; }
27 bool GetWriteCalcConfig() const { return mbWriteConfig; }
29 private:
30 void CoupleEmptyAsZeroToStringConversion();
32 private:
33 ScCalcConfig maConfig;
34 bool mbSelectedEmptyStringAsZero;
35 bool mbWriteConfig;
37 std::unique_ptr<weld::CheckButton> mxEmptyAsZero;
38 std::unique_ptr<weld::ComboBox> mxConversion;
39 std::unique_ptr<weld::CheckButton> mxCurrentDocOnly;
40 std::unique_ptr<weld::ComboBox> mxSyntax;
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */