1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
23 #include <sortparam.hxx>
24 #include <subtotalparam.hxx>
25 #include <paramisc.hxx>
26 #include <svl/poolitem.hxx>
32 struct MisspellRanges
;
35 class ScEditEngineDefaulter
;
43 class ScInputStatusItem
: public SfxPoolItem
49 std::unique_ptr
<EditTextObject
> pEditData
;
50 const std::vector
<editeng::MisspellRanges
>* mpMisspellRanges
;
54 ScInputStatusItem( sal_uInt16 nWhich
,
55 const ScAddress
& rCurPos
,
56 const ScAddress
& rStartPos
,
57 const ScAddress
& rEndPos
,
59 const EditTextObject
* pData
);
60 ScInputStatusItem( const ScInputStatusItem
& rItem
);
61 virtual ~ScInputStatusItem() override
;
63 virtual bool operator==( const SfxPoolItem
& ) const override
;
64 virtual ScInputStatusItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
66 const ScAddress
& GetPos() const { return aCursorPos
; }
68 const OUString
& GetString() const { return aString
; }
69 const EditTextObject
* GetEditData() const { return pEditData
.get(); }
71 void SetMisspellRanges( const std::vector
<editeng::MisspellRanges
>* pRanges
);
72 const std::vector
<editeng::MisspellRanges
>* GetMisspellRanges() const { return mpMisspellRanges
;}
75 #define SC_TAB_INSERTED 1
76 #define SC_TAB_DELETED 2
77 #define SC_TAB_MOVED 3
78 #define SC_TAB_COPIED 4
79 #define SC_TAB_HIDDEN 5
80 #define SC_TABS_INSERTED 6
81 #define SC_TABS_DELETED 7
83 class ScTablesHint final
: public SfxHint
90 ScTablesHint(sal_uInt16 nNewId
, SCTAB nTable1
, SCTAB nTable2
=0);
91 virtual ~ScTablesHint() override
;
93 sal_uInt16
GetTablesHintId() const { return nId
; }
94 SCTAB
GetTab1() const { return nTab1
; }
95 SCTAB
GetTab2() const { return nTab2
; }
98 class ScEditViewHint final
: public SfxHint
100 ScEditEngineDefaulter
* pEditEngine
;
101 ScAddress aCursorPos
;
104 ScEditViewHint() = delete;
105 ScEditViewHint( ScEditEngineDefaulter
* pEngine
, const ScAddress
& rCurPos
);
106 virtual ~ScEditViewHint() override
;
108 SCCOL
GetCol() const { return aCursorPos
.Col(); }
109 SCROW
GetRow() const { return aCursorPos
.Row(); }
110 SCTAB
GetTab() const { return aCursorPos
.Tab(); }
111 ScEditEngineDefaulter
* GetEngine() const { return pEditEngine
; }
114 class ScIndexHint
: public SfxHint
119 ScIndexHint(SfxHintId nNewId
, sal_uInt16 nIdx
);
120 virtual ~ScIndexHint() override
;
122 sal_uInt16
GetIndex() const { return nIndex
; }
125 // Parameter item for the sort dialog:
127 class SC_DLLPUBLIC ScSortItem
: public SfxPoolItem
130 ScSortItem( sal_uInt16 nWhich
,
131 ScViewData
* ptrViewData
,
132 const ScSortParam
* pSortData
);
133 ScSortItem( sal_uInt16 nWhich
,
134 const ScSortParam
* pSortData
);
136 virtual bool operator==( const SfxPoolItem
& ) const override
;
137 virtual ScSortItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
138 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
140 ScViewData
* GetViewData () const { return pViewData
; }
141 const ScSortParam
& GetSortData () const { return theSortData
; }
144 ScViewData
* pViewData
;
145 ScSortParam theSortData
;
148 class SC_DLLPUBLIC ScQueryItem
: public SfxPoolItem
151 ScQueryItem( sal_uInt16 nWhich
,
152 ScViewData
* ptrViewData
,
153 const ScQueryParam
* pQueryData
);
154 ScQueryItem( sal_uInt16 nWhich
,
155 const ScQueryParam
* pQueryData
);
156 ScQueryItem( const ScQueryItem
& rItem
);
157 virtual ~ScQueryItem() override
;
159 virtual bool operator==( const SfxPoolItem
& ) const override
;
160 virtual ScQueryItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
162 ScViewData
* GetViewData () const { return pViewData
; }
163 const ScQueryParam
& GetQueryData() const;
165 bool GetAdvancedQuerySource(ScRange
& rSource
) const;
166 void SetAdvancedQuerySource(const ScRange
* pSource
);
169 std::unique_ptr
<ScQueryParam
> mpQueryData
;
170 ScViewData
* pViewData
;
175 class SC_DLLPUBLIC ScSubTotalItem
: public SfxPoolItem
178 ScSubTotalItem( sal_uInt16 nWhich
,
179 ScViewData
* ptrViewData
,
180 const ScSubTotalParam
* pSubTotalData
);
182 virtual bool operator==( const SfxPoolItem
& ) const override
;
183 virtual ScSubTotalItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
184 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
186 ScViewData
* GetViewData () const { return pViewData
; }
187 const ScSubTotalParam
& GetSubTotalData() const { return theSubTotalData
; }
190 ScViewData
* pViewData
;
191 ScSubTotalParam theSubTotalData
;
194 class SC_DLLPUBLIC ScUserListItem
: public SfxPoolItem
197 ScUserListItem( sal_uInt16 nWhich
);
198 ScUserListItem( const ScUserListItem
& rItem
);
199 virtual ~ScUserListItem() override
;
201 virtual bool operator==( const SfxPoolItem
& ) const override
;
202 virtual ScUserListItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
204 void SetUserList ( const ScUserList
& rUserList
);
205 ScUserList
* GetUserList () const { return pUserList
.get(); }
208 std::unique_ptr
<ScUserList
> pUserList
;
211 class ScConsolidateItem
: public SfxPoolItem
214 ScConsolidateItem( sal_uInt16 nWhich
,
215 const ScConsolidateParam
* pParam
);
217 virtual bool operator==( const SfxPoolItem
& ) const override
;
218 virtual ScConsolidateItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
220 const ScConsolidateParam
& GetData() const { return theConsData
; }
223 ScConsolidateParam theConsData
;
226 class ScPivotItem
: public SfxPoolItem
229 ScPivotItem( sal_uInt16 nWhich
, const ScDPSaveData
* pData
,
230 const ScRange
* pRange
, bool bNew
);
231 ScPivotItem( const ScPivotItem
& rItem
);
232 virtual ~ScPivotItem() override
;
234 virtual bool operator==( const SfxPoolItem
& ) const override
;
235 virtual ScPivotItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
237 const ScDPSaveData
& GetData() const { return *pSaveData
; }
238 const ScRange
& GetDestRange() const { return aDestRange
; }
239 bool IsNewSheet() const { return bNewSheet
; }
242 std::unique_ptr
<ScDPSaveData
> pSaveData
;
247 class ScSolveItem
: public SfxPoolItem
250 ScSolveItem( sal_uInt16 nWhich
,
251 const ScSolveParam
* pParam
);
253 virtual bool operator==( const SfxPoolItem
& ) const override
;
254 virtual ScSolveItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
256 const ScSolveParam
& GetData() const { return theSolveData
; }
259 ScSolveParam theSolveData
;
262 class ScTabOpItem
: public SfxPoolItem
265 ScTabOpItem( sal_uInt16 nWhich
,
266 const ScTabOpParam
* pParam
);
268 virtual bool operator==( const SfxPoolItem
& ) const override
;
269 virtual ScTabOpItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
271 const ScTabOpParam
& GetData() const { return theTabOpData
; }
274 ScTabOpParam theTabOpData
;
277 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */