1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef CHART_LAYOUTCONTAINER_HXX 24 #define CHART_LAYOUTCONTAINER_HXX 25 26 #include <cppuhelper/implbase2.hxx> 27 #include <com/sun/star/lang/XServiceInfo.hpp> 28 #include <com/sun/star/layout/XLayoutContainer.hpp> 29 30 #include "ServiceMacros.hxx" 31 32 #include <vector> 33 #include <map> 34 35 namespace chart 36 { 37 38 class LayoutContainer : public 39 ::cppu::WeakImplHelper2< 40 ::com::sun::star::lang::XServiceInfo, 41 ::com::sun::star::layout::XLayoutContainer > 42 { 43 public: 44 LayoutContainer(); 45 virtual ~LayoutContainer(); 46 47 /// XServiceInfo declarations 48 APPHELPER_XSERVICEINFO_DECL() 49 50 protected: 51 // ____ XLayoutContainer ____ 52 virtual void SAL_CALL addConstrainedElementByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint ) 53 throw (::com::sun::star::layout::IllegalConstraintException, 54 ::com::sun::star::lang::IllegalArgumentException, 55 ::com::sun::star::uno::RuntimeException); 56 virtual void SAL_CALL addElementByIdentifier( const ::rtl::OUString& aIdentifier ) 57 throw (::com::sun::star::lang::IllegalArgumentException, 58 ::com::sun::star::uno::RuntimeException); 59 virtual void SAL_CALL removeElementByIdentifier( const ::rtl::OUString& aIdentifier ) 60 throw (::com::sun::star::container::NoSuchElementException, 61 ::com::sun::star::uno::RuntimeException); 62 virtual void SAL_CALL setConstraintByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint ) 63 throw (::com::sun::star::container::NoSuchElementException, 64 ::com::sun::star::uno::RuntimeException); 65 virtual ::com::sun::star::layout::Constraint SAL_CALL getConstraintByIdentifier( const ::rtl::OUString& aIdentifier ) 66 throw (::com::sun::star::container::NoSuchElementException, 67 ::com::sun::star::uno::RuntimeException); 68 virtual ::com::sun::star::uno::Sequence< 69 ::rtl::OUString > SAL_CALL getElementIdentifiers() 70 throw (::com::sun::star::uno::RuntimeException); 71 72 private: 73 typedef ::std::vector< ::rtl::OUString > tLayoutElements; 74 75 typedef ::std::map< 76 ::rtl::OUString, 77 ::com::sun::star::layout::Constraint > tConstraintsMap; 78 79 tLayoutElements m_aLayoutElements; 80 tConstraintsMap m_aConstraints; 81 }; 82 83 } // namespace chart 84 85 // CHART_LAYOUTCONTAINER_HXX 86 #endif 87