Update ooo320-m1
[ooovba.git] / chart2 / source / model / main / LayoutContainer.hxx
blob750b354710e0ad8ab30566e6527d2525c1308950
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: LayoutContainer.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART_LAYOUTCONTAINER_HXX
31 #define CHART_LAYOUTCONTAINER_HXX
33 #include <cppuhelper/implbase2.hxx>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/layout/XLayoutContainer.hpp>
37 #include "ServiceMacros.hxx"
39 #include <vector>
40 #include <map>
42 namespace chart
45 class LayoutContainer : public
46 ::cppu::WeakImplHelper2<
47 ::com::sun::star::lang::XServiceInfo,
48 ::com::sun::star::layout::XLayoutContainer >
50 public:
51 LayoutContainer();
52 virtual ~LayoutContainer();
54 /// XServiceInfo declarations
55 APPHELPER_XSERVICEINFO_DECL()
57 protected:
58 // ____ XLayoutContainer ____
59 virtual void SAL_CALL addConstrainedElementByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint )
60 throw (::com::sun::star::layout::IllegalConstraintException,
61 ::com::sun::star::lang::IllegalArgumentException,
62 ::com::sun::star::uno::RuntimeException);
63 virtual void SAL_CALL addElementByIdentifier( const ::rtl::OUString& aIdentifier )
64 throw (::com::sun::star::lang::IllegalArgumentException,
65 ::com::sun::star::uno::RuntimeException);
66 virtual void SAL_CALL removeElementByIdentifier( const ::rtl::OUString& aIdentifier )
67 throw (::com::sun::star::container::NoSuchElementException,
68 ::com::sun::star::uno::RuntimeException);
69 virtual void SAL_CALL setConstraintByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint )
70 throw (::com::sun::star::container::NoSuchElementException,
71 ::com::sun::star::uno::RuntimeException);
72 virtual ::com::sun::star::layout::Constraint SAL_CALL getConstraintByIdentifier( const ::rtl::OUString& aIdentifier )
73 throw (::com::sun::star::container::NoSuchElementException,
74 ::com::sun::star::uno::RuntimeException);
75 virtual ::com::sun::star::uno::Sequence<
76 ::rtl::OUString > SAL_CALL getElementIdentifiers()
77 throw (::com::sun::star::uno::RuntimeException);
79 private:
80 typedef ::std::vector< ::rtl::OUString > tLayoutElements;
82 typedef ::std::map<
83 ::rtl::OUString,
84 ::com::sun::star::layout::Constraint > tConstraintsMap;
86 tLayoutElements m_aLayoutElements;
87 tConstraintsMap m_aConstraints;
90 } // namespace chart
92 // CHART_LAYOUTCONTAINER_HXX
93 #endif