Avoid potential negative array index access to cached text.
[LibreOffice.git] / chart2 / source / controller / dialogs / tp_Wizard_TitlesAndObjects.hxx
blobd2c30d8b43632b3ba03a14ec65340e3940ee953a
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <TimerTriggeredControllerLock.hxx>
24 #include <vcl/wizardmachine.hxx>
25 #include <rtl/ref.hxx>
27 #include <memory>
29 namespace chart { class LegendPositionResources; }
30 namespace chart { class TitleResources; }
31 namespace com::sun::star::chart2 { class XChartDocument; }
32 namespace com::sun::star::uno { class XComponentContext; }
34 namespace chart
36 class ChartModel;
38 class TitlesAndObjectsTabPage final : public vcl::OWizardPage
40 public:
41 TitlesAndObjectsTabPage(weld::Container* pPage, weld::DialogController* pController,
42 rtl::Reference<::chart::ChartModel> xChartModel,
43 const css::uno::Reference< css::uno::XComponentContext >& xContext);
44 virtual ~TitlesAndObjectsTabPage() override;
46 virtual void initializePage() override;
47 virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override;
48 virtual bool canAdvance() const override;
50 private:
51 void commitToModel();
52 DECL_LINK( ChangeHdl, LinkParamNone*, void );
53 DECL_LINK( ChangeEditHdl, weld::Entry&, void );
54 DECL_LINK( ChangeCheckBoxHdl, weld::Toggleable&, void );
56 std::unique_ptr< TitleResources > m_xTitleResources;
57 std::unique_ptr< LegendPositionResources > m_xLegendPositionResources;
59 rtl::Reference<::chart::ChartModel> m_xChartModel;
60 css::uno::Reference< css::uno::XComponentContext> m_xCC;
62 bool m_bCommitToModel;
63 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
65 std::unique_ptr<weld::CheckButton> m_xCB_Grid_X;
66 std::unique_ptr<weld::CheckButton> m_xCB_Grid_Y;
67 std::unique_ptr<weld::CheckButton> m_xCB_Grid_Z;
70 } //namespace chart
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */