xref: /aoo4110/main/sc/source/ui/vba/vbapane.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 SC_VBA_PANE_HXX
24 #define SC_VBA_PANE_HXX
25 
26 #include <com/sun/star/sheet/XViewPane.hpp>
27 #include <ooo/vba/excel/XPane.hpp>
28 #include <vbahelper/vbahelperinterface.hxx>
29 #include "excelvbahelper.hxx"
30 
31 typedef InheritedHelperInterfaceImpl1< ov::excel::XPane > ScVbaPane_BASE;
32 
33 class ScVbaPane : public ScVbaPane_BASE
34 {
35 public:
36     ScVbaPane(
37         const css::uno::Reference< ov::XHelperInterface >& xParent,
38         const css::uno::Reference< css::uno::XComponentContext >& xContext,
39         const css::uno::Reference< css::frame::XModel >& xModel,
40         const css::uno::Reference< css::sheet::XViewPane > xViewPane ) throw (css::uno::RuntimeException);
41 
getViewPane()42     css::uno::Reference< css::sheet::XViewPane > getViewPane() { return m_xViewPane; }
43 
44     // XPane attributes
45     virtual sal_Int32 SAL_CALL getScrollColumn() throw (css::uno::RuntimeException);
46     virtual void SAL_CALL setScrollColumn( sal_Int32 _scrollcolumn ) throw (css::uno::RuntimeException);
47     virtual sal_Int32 SAL_CALL getScrollRow() throw (css::uno::RuntimeException);
48     virtual void SAL_CALL setScrollRow( sal_Int32 _scrollrow ) throw (css::uno::RuntimeException);
49  	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getVisibleRange() throw (css::uno::RuntimeException);
50 
51     // XPane methods
52     virtual void SAL_CALL SmallScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException);
53     virtual void SAL_CALL LargeScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException);
54 
55 	// XHelperInterface
56     VBAHELPER_DECL_XHELPERINTERFACE
57 
58 protected:
59 	css::uno::Reference< css::frame::XModel > m_xModel;
60     css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
61 };
62 
63 #endif //SC_VBA_PANE_HXX
64