xref: /trunk/main/sw/source/ui/vba/vbawrapformat.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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();
42     float getDistance( const rtl::OUString& sName );
43     void setDistance( const rtl::OUString& sName, float _distance );
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();
49     virtual void SAL_CALL setType( ::sal_Int32 _type );
50     virtual ::sal_Int32 SAL_CALL getSide();
51     virtual void SAL_CALL setSide( ::sal_Int32 _side );
52     virtual float SAL_CALL getDistanceTop();
53     virtual void SAL_CALL setDistanceTop( float _distancetop );
54     virtual float SAL_CALL getDistanceBottom();
55     virtual void SAL_CALL setDistanceBottom( float _distancebottom );
56     virtual float SAL_CALL getDistanceLeft();
57     virtual void SAL_CALL setDistanceLeft( float _distanceleft );
58     virtual float SAL_CALL getDistanceRight();
59     virtual void SAL_CALL setDistanceRight( float _distanceright );
60 
61     virtual rtl::OUString& getServiceImplName();
62     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
63 };
64 
65 #endif//SW_VBA_XWRAPFORMAT_HXX
66