Avoid potential negative array index access to cached text.
[LibreOffice.git] / sfx2 / inc / notebookbar / NotebookbarTabControl.hxx
blobebbffc4f9b1a8fc92541be32e0ac708f34daaedc
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/tabctrl.hxx>
14 #include <com/sun/star/frame/XFrame.hpp>
16 namespace com::sun::star::ui { class XUIConfigurationListener; }
17 namespace com::sun::star::uno { class XComponentContext; }
19 class NotebookbarTabControl final : public NotebookbarTabControlBase
21 friend class ChangedUIEventListener;
23 public:
24 NotebookbarTabControl( Window* pParent );
25 ~NotebookbarTabControl() override;
27 virtual void KeyInput( const KeyEvent& rKEvt ) override;
28 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
29 virtual void StateChanged(StateChangedType nStateChange) override;
30 virtual Size calculateRequisition() const override;
32 private:
33 static void FillShortcutsToolBox(css::uno::Reference<css::uno::XComponentContext> const & xContext,
34 const css::uno::Reference<css::frame::XFrame>& xFrame,
35 const OUString& aModuleName,
36 ToolBox* pShortcuts
38 void ArrowStops( sal_uInt16 nCode );
40 DECL_LINK(OpenNotebookbarPopupMenu, NotebookBar*, void);
42 css::uno::Reference<css::ui::XUIConfigurationListener> m_pListener;
43 css::uno::Reference<css::frame::XFrame> m_xFrame;
44 bool m_bInitialized;
45 bool m_bInvalidate;
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */