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 SW_VBA_XWRAPFORMAT_HXX 24 #define SW_VBA_XWRAPFORMAT_HXX 25 26 #include <com/sun/star/drawing/XShape.hpp> 27 #include <ooo/vba/word/XWrapFormat.hpp> 28 #include <vbahelper/vbahelperinterface.hxx> 29 30 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XWrapFormat > SwVbaWrapFormat_BASE; 31 32 class SwVbaWrapFormat : public SwVbaWrapFormat_BASE 33 { 34 private: 35 css::uno::Reference< css::drawing::XShape > m_xShape; 36 css::uno::Reference< css::beans::XPropertySet > m_xPropertySet; 37 sal_Int32 mnWrapFormatType; 38 sal_Int32 mnSide; 39 40 private: 41 void makeWrap() throw (css::uno::RuntimeException); 42 float getDistance( const rtl::OUString& sName ) throw (css::uno::RuntimeException); 43 void setDistance( const rtl::OUString& sName, float _distance ) throw (css::uno::RuntimeException); 44 45 public: 46 SwVbaWrapFormat( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); 47 48 virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException); 49 virtual void SAL_CALL setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException); 50 virtual ::sal_Int32 SAL_CALL getSide() throw (css::uno::RuntimeException); 51 virtual void SAL_CALL setSide( ::sal_Int32 _side ) throw (css::uno::RuntimeException); 52 virtual float SAL_CALL getDistanceTop() throw (css::uno::RuntimeException); 53 virtual void SAL_CALL setDistanceTop( float _distancetop ) throw (css::uno::RuntimeException); 54 virtual float SAL_CALL getDistanceBottom() throw (css::uno::RuntimeException); 55 virtual void SAL_CALL setDistanceBottom( float _distancebottom ) throw (css::uno::RuntimeException); 56 virtual float SAL_CALL getDistanceLeft() throw (css::uno::RuntimeException); 57 virtual void SAL_CALL setDistanceLeft( float _distanceleft ) throw (css::uno::RuntimeException); 58 virtual float SAL_CALL getDistanceRight() throw (css::uno::RuntimeException); 59 virtual void SAL_CALL setDistanceRight( float _distanceright ) throw (css::uno::RuntimeException); 60 61 virtual rtl::OUString& getServiceImplName(); 62 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 63 }; 64 65 #endif//SW_VBA_XWRAPFORMAT_HXX 66