xref: /AOO41X/main/sc/inc/cursuno.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
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 
24 #ifndef SC_CURSUNO_HXX
25 #define SC_CURSUNO_HXX
26 
27 #include "cellsuno.hxx"
28 #include <com/sun/star/table/XCellCursor.hpp>
29 #include <com/sun/star/sheet/XSheetCellCursor.hpp>
30 #include <com/sun/star/sheet/XUsedAreaCursor.hpp>
31 
32 class ScCellCursorObj : public ScCellRangeObj,
33                         public com::sun::star::sheet::XSheetCellCursor,
34                         public com::sun::star::sheet::XUsedAreaCursor,
35                         public com::sun::star::table::XCellCursor
36 {
37 public:
38                             ScCellCursorObj(ScDocShell* pDocSh, const ScRange& rR);
39     virtual                 ~ScCellCursorObj();
40 
41     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
42                                 const ::com::sun::star::uno::Type & rType )
43                                     throw(::com::sun::star::uno::RuntimeException);
44     virtual void SAL_CALL   acquire() throw();
45     virtual void SAL_CALL   release() throw();
46 
47                             // XSheetCellCursor
48     virtual void SAL_CALL   collapseToCurrentRegion() throw(::com::sun::star::uno::RuntimeException);
49     virtual void SAL_CALL   collapseToCurrentArray() throw(::com::sun::star::uno::RuntimeException);
50     virtual void SAL_CALL   collapseToMergedArea() throw(::com::sun::star::uno::RuntimeException);
51     virtual void SAL_CALL   expandToEntireColumns() throw(::com::sun::star::uno::RuntimeException);
52     virtual void SAL_CALL   expandToEntireRows() throw(::com::sun::star::uno::RuntimeException);
53     virtual void SAL_CALL   collapseToSize( sal_Int32 nColumns, sal_Int32 nRows )
54                                 throw(::com::sun::star::uno::RuntimeException);
55 
56                             // XUsedAreaCursor
57     virtual void SAL_CALL   gotoStartOfUsedArea( sal_Bool bExpand )
58                                 throw(::com::sun::star::uno::RuntimeException);
59     virtual void SAL_CALL   gotoEndOfUsedArea( sal_Bool bExpand )
60                                 throw(::com::sun::star::uno::RuntimeException);
61 
62                             // XCellCursor
63     virtual void SAL_CALL   gotoStart() throw(::com::sun::star::uno::RuntimeException);
64     virtual void SAL_CALL   gotoEnd() throw(::com::sun::star::uno::RuntimeException);
65     virtual void SAL_CALL   gotoNext() throw(::com::sun::star::uno::RuntimeException);
66     virtual void SAL_CALL   gotoPrevious() throw(::com::sun::star::uno::RuntimeException);
67     virtual void SAL_CALL   gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nRowOffset )
68                                 throw(::com::sun::star::uno::RuntimeException);
69 
70                             // XSheetCellRange
71     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
72                             getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
73 
74                             // XCellRange
75     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
76                             getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
77                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
78                                     ::com::sun::star::uno::RuntimeException);
79     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
80                             getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
81                                 sal_Int32 nRight, sal_Int32 nBottom )
82                                     throw(::com::sun::star::lang::IndexOutOfBoundsException,
83                                         ::com::sun::star::uno::RuntimeException);
84     using ScCellRangeObj::getCellRangeByName;
85     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
86                             getCellRangeByName( const ::rtl::OUString& aRange )
87                                 throw(::com::sun::star::uno::RuntimeException);
88 
89                             // XServiceInfo
90     virtual ::rtl::OUString SAL_CALL getImplementationName()
91                                 throw(::com::sun::star::uno::RuntimeException);
92     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
93                                 throw(::com::sun::star::uno::RuntimeException);
94     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
95                                 throw(::com::sun::star::uno::RuntimeException);
96 
97                             // XTypeProvider
98     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
99                                 throw(::com::sun::star::uno::RuntimeException);
100     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
101                                 throw(::com::sun::star::uno::RuntimeException);
102 };
103 
104 
105 #endif
106 
107