Avoid potential negative array index access to cached text.
[LibreOffice.git] / extensions / source / propctrlr / taborder.hxx
blobe43f010e8282ea335d2e39dcb603518a6ace490e
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 <com/sun/star/awt/XTabControllerModel.hpp>
23 #include <com/sun/star/awt/XControlContainer.hpp>
24 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <vcl/weld.hxx>
28 namespace pcr
30 //= TabOrderDialog
31 class TabOrderDialog : public weld::GenericDialogController
33 css::uno::Reference< css::awt::XTabControllerModel >
34 m_xTempModel;
35 css::uno::Reference< css::awt::XTabControllerModel >
36 m_xModel;
37 css::uno::Reference< css::awt::XControlContainer >
38 m_xControlContainer;
39 css::uno::Reference< css::uno::XComponentContext >
40 m_xORB;
42 std::unique_ptr<weld::TreeView> m_xLB_Controls;
43 std::unique_ptr<weld::Button> m_xPB_OK;
44 std::unique_ptr<weld::Button> m_xPB_MoveUp;
45 std::unique_ptr<weld::Button> m_xPB_MoveDown;
46 std::unique_ptr<weld::Button> m_xPB_AutoOrder;
48 DECL_LINK( ModelHasMoved, weld::TreeView&, void );
49 DECL_LINK( MoveUpClickHdl, weld::Button&, void );
50 DECL_LINK( MoveDownClickHdl, weld::Button&, void );
51 DECL_LINK( AutoOrderClickHdl, weld::Button&, void );
52 DECL_LINK( OKClickHdl, weld::Button&, void );
54 void FillList();
55 void MoveSelection(int nRelPos);
57 public:
58 TabOrderDialog(
59 weld::Window* pParent,
60 const css::uno::Reference< css::awt::XTabControllerModel >& _rxTabModel,
61 const css::uno::Reference< css::awt::XControlContainer >& _rxControlCont,
62 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
65 virtual ~TabOrderDialog() override;
67 void SetModified();
71 } // namespace pcr
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */