Avoid potential negative array index access to cached text.
[LibreOffice.git] / toolkit / inc / awt / vclxtabpagecontainer.hxx
blobe300e03affcbbd210463a6ad545471b783ed2719
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/container/XContainerListener.hpp>
23 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
24 #include <com/sun/star/awt/tab/XTabPageContainer.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include <toolkit/helper/listenermultiplexer.hxx>
27 #include <awt/vclxcontainer.hxx>
30 typedef cppu::ImplInheritanceHelper< VCLXContainer,
31 css::awt::tab::XTabPageContainer,
32 css::beans::XPropertiesChangeListener,
33 css::container::XContainerListener
34 > VCLXTabPageContainer_Base;
35 class VCLXTabPageContainer final : public VCLXTabPageContainer_Base
37 public:
38 VCLXTabPageContainer();
39 virtual ~VCLXTabPageContainer() override;
41 // css::awt::XView
42 void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
44 // css::awt::grid::XTabPageContainer
45 virtual ::sal_Int16 SAL_CALL getActiveTabPageID() override;
46 virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) override;
47 virtual ::sal_Int16 SAL_CALL getTabPageCount( ) override;
48 virtual sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) override;
49 virtual css::uno::Reference< css::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) override;
50 virtual css::uno::Reference< css::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) override;
51 virtual void SAL_CALL addTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) override;
52 virtual void SAL_CALL removeTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) override;
54 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
56 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
57 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
58 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
59 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
61 // css::beans::XPropertiesChangeListener
62 virtual void SAL_CALL propertiesChange( const ::css::uno::Sequence< ::css::beans::PropertyChangeEvent >& aEvent ) override;
64 // css::awt::XVclWindowPeer
65 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
66 private:
67 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
69 TabPageListenerMultiplexer m_aTabPageListeners;
70 ::std::vector< css::uno::Reference< css::awt::tab::XTabPage > > m_aTabPages;
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */