xref: /trunk/main/sc/inc/cursuno.hxx (revision 9d37da743abb7db0a497688391f6e55a19f27c44)
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     virtual void SAL_CALL   acquire() throw();
44     virtual void SAL_CALL   release() throw();
45 
46                             // XSheetCellCursor
47     virtual void SAL_CALL   collapseToCurrentRegion();
48     virtual void SAL_CALL   collapseToCurrentArray();
49     virtual void SAL_CALL   collapseToMergedArea();
50     virtual void SAL_CALL   expandToEntireColumns();
51     virtual void SAL_CALL   expandToEntireRows();
52     virtual void SAL_CALL   collapseToSize( sal_Int32 nColumns, sal_Int32 nRows );
53 
54                             // XUsedAreaCursor
55     virtual void SAL_CALL   gotoStartOfUsedArea( sal_Bool bExpand );
56     virtual void SAL_CALL   gotoEndOfUsedArea( sal_Bool bExpand );
57 
58                             // XCellCursor
59     virtual void SAL_CALL   gotoStart();
60     virtual void SAL_CALL   gotoEnd();
61     virtual void SAL_CALL   gotoNext();
62     virtual void SAL_CALL   gotoPrevious();
63     virtual void SAL_CALL   gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nRowOffset );
64 
65                             // XSheetCellRange
66     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
67                             getSpreadsheet();
68 
69                             // XCellRange
70     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
71                             getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow );
72     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
73                             getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
74                                 sal_Int32 nRight, sal_Int32 nBottom );
75     using ScCellRangeObj::getCellRangeByName;
76     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
77                             getCellRangeByName( const ::rtl::OUString& aRange );
78 
79                             // XServiceInfo
80     virtual ::rtl::OUString SAL_CALL getImplementationName();
81     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName );
82     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
83 
84                             // XTypeProvider
85     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes();
86     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId();
87 };
88 
89 
90 #endif
91