xref: /aoo4110/main/sw/source/ui/vba/vbaview.hxx (revision b1cdbd2c)
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_VIEW_HXX
24 #define SW_VBA_VIEW_HXX
25 
26 #include <ooo/vba/word/XView.hpp>
27 #include <vbahelper/vbahelperinterface.hxx>
28 #include <com/sun/star/text/XTextViewCursor.hpp>
29 #include <com/sun/star/text/XTextRange.hpp>
30 #include <com/sun/star/text/XText.hpp>
31 #include <com/sun/star/beans/XPropertySet.hpp>
32 
33 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XView > SwVbaView_BASE;
34 
35 class SwVbaView : public SwVbaView_BASE
36 {
37 private:
38     css::uno::Reference< css::frame::XModel > mxModel;
39     css::uno::Reference< css::text::XTextViewCursor > mxViewCursor;
40     css::uno::Reference< css::beans::XPropertySet > mxViewSettings;
41 
42     css::uno::Reference< css::text::XTextRange > getHFTextRange( sal_Int32 nType ) throw (css::uno::RuntimeException);
43     css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException);
44 
45 public:
46 	SwVbaView( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
47         const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException );
48 	virtual ~SwVbaView();
49 
50    // XView
51     virtual ::sal_Int32 SAL_CALL getSeekView() throw (css::uno::RuntimeException);
52     virtual void SAL_CALL setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException);
53     virtual ::sal_Int32 SAL_CALL getSplitSpecial() throw (css::uno::RuntimeException);
54     virtual void SAL_CALL setSplitSpecial( ::sal_Int32 _splitspecial ) throw (css::uno::RuntimeException);
55     virtual ::sal_Bool SAL_CALL getTableGridLines() throw (css::uno::RuntimeException);
56     virtual void SAL_CALL setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException);
57     virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
58     virtual void SAL_CALL setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException);
59 
60 	// XHelperInterface
61 	virtual rtl::OUString& getServiceImplName();
62 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
63 };
64 #endif /* SW_VBA_VIEW_HXX */
65