Avoid potential negative array index access to cached text.
[LibreOffice.git] / sc / inc / cursuno.hxx
blob5ba9403e8237e137773efb04ecccd875b81636a4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include "cellsuno.hxx"
23 #include <com/sun/star/table/XCellCursor.hpp>
24 #include <com/sun/star/sheet/XSheetCellCursor.hpp>
25 #include <com/sun/star/sheet/XUsedAreaCursor.hpp>
27 class ScCellCursorObj final : public ScCellRangeObj,
28 public css::sheet::XSheetCellCursor,
29 public css::sheet::XUsedAreaCursor,
30 public css::table::XCellCursor
32 public:
33 ScCellCursorObj(ScDocShell* pDocSh, const ScRange& rR);
34 virtual ~ScCellCursorObj() override;
36 virtual css::uno::Any SAL_CALL queryInterface(
37 const css::uno::Type & rType ) override;
38 virtual void SAL_CALL acquire() noexcept override;
39 virtual void SAL_CALL release() noexcept override;
41 // XSheetCellCursor
42 virtual void SAL_CALL collapseToCurrentRegion() override;
43 virtual void SAL_CALL collapseToCurrentArray() override;
44 virtual void SAL_CALL collapseToMergedArea() override;
45 virtual void SAL_CALL expandToEntireColumns() override;
46 virtual void SAL_CALL expandToEntireRows() override;
47 virtual void SAL_CALL collapseToSize( sal_Int32 nColumns, sal_Int32 nRows ) override;
49 // XUsedAreaCursor
50 virtual void SAL_CALL gotoStartOfUsedArea( sal_Bool bExpand ) override;
51 virtual void SAL_CALL gotoEndOfUsedArea( sal_Bool bExpand ) override;
53 // XCellCursor
54 virtual void SAL_CALL gotoStart() override;
55 virtual void SAL_CALL gotoEnd() override;
56 virtual void SAL_CALL gotoNext() override;
57 virtual void SAL_CALL gotoPrevious() override;
58 virtual void SAL_CALL gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nRowOffset ) override;
60 // XSheetCellRange
61 virtual css::uno::Reference< css::sheet::XSpreadsheet > SAL_CALL
62 getSpreadsheet() override;
64 // XCellRange
65 virtual css::uno::Reference< css::table::XCell > SAL_CALL
66 getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) override;
67 virtual css::uno::Reference< css::table::XCellRange > SAL_CALL
68 getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
69 sal_Int32 nRight, sal_Int32 nBottom ) override;
70 using ScCellRangeObj::getCellRangeByName;
71 virtual css::uno::Reference< css::table::XCellRange > SAL_CALL
72 getCellRangeByName( const OUString& aRange ) override;
74 // XServiceInfo
75 virtual OUString SAL_CALL getImplementationName() override;
76 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
77 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
79 // XTypeProvider
80 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
81 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */