fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / uiitems.hxx
blob8bd28c67a3da05327d2a71fc510c478b8fe14179
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_UIITEMS_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_UIITEMS_HXX
23 #include "scdllapi.h"
24 #include "conditio.hxx"
25 #include "sortparam.hxx"
26 #include "subtotalparam.hxx"
27 #include "paramisc.hxx"
28 #include <svl/poolitem.hxx>
30 #include <vector>
31 #include <boost/scoped_ptr.hpp>
33 namespace editeng {
34 struct MisspellRanges;
37 class ScEditEngineDefaulter;
38 class EditTextObject;
39 class ScViewData;
40 class ScDPSaveData;
41 struct ScQueryParam;
43 // Items
45 class ScInputStatusItem : public SfxPoolItem
47 ScAddress aCursorPos;
48 ScAddress aStartPos;
49 ScAddress aEndPos;
50 OUString aString;
51 EditTextObject* pEditData;
52 const std::vector<editeng::MisspellRanges>* mpMisspellRanges;
54 public:
55 TYPEINFO_OVERRIDE();
57 ScInputStatusItem( sal_uInt16 nWhich,
58 const ScAddress& rCurPos,
59 const ScAddress& rStartPos,
60 const ScAddress& rEndPos,
61 const OUString& rString,
62 const EditTextObject* pData );
63 ScInputStatusItem( const ScInputStatusItem& rItem );
64 virtual ~ScInputStatusItem();
66 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
67 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
69 const ScAddress& GetPos() const { return aCursorPos; }
70 const ScAddress& GetStartPos() const { return aStartPos; }
71 const ScAddress& GetEndPos() const { return aEndPos; }
72 SCTAB GetTab() const { return aCursorPos.Tab(); }
73 SCCOL GetCol() const { return aCursorPos.Col(); }
74 SCROW GetRow() const { return aCursorPos.Row(); }
75 SCCOL GetStartCol() const { return aStartPos.Col(); }
76 SCROW GetStartRow() const { return aStartPos.Row(); }
77 SCCOL GetEndCol() const { return aEndPos.Col(); }
78 SCROW GetEndRow() const { return aEndPos.Row(); }
80 const OUString& GetString() const { return aString; }
81 const EditTextObject* GetEditData() const { return pEditData; }
83 void SetMisspellRanges( const std::vector<editeng::MisspellRanges>* pRanges );
84 const std::vector<editeng::MisspellRanges>* GetMisspellRanges() const { return mpMisspellRanges;}
87 #define SC_TAB_INSERTED 1
88 #define SC_TAB_DELETED 2
89 #define SC_TAB_MOVED 3
90 #define SC_TAB_COPIED 4
91 #define SC_TAB_HIDDEN 5
92 #define SC_TABS_INSERTED 6
93 #define SC_TABS_DELETED 7
95 class ScTablesHint : public SfxHint
97 sal_uInt16 nId;
98 SCTAB nTab1;
99 SCTAB nTab2;
101 public:
102 ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2=0);
103 virtual ~ScTablesHint();
105 sal_uInt16 GetId() const { return nId; }
106 SCTAB GetTab1() const { return nTab1; }
107 SCTAB GetTab2() const { return nTab2; }
110 class ScEditViewHint : public SfxHint
112 ScEditEngineDefaulter* pEditEngine;
113 ScAddress aCursorPos;
115 public:
116 ScEditViewHint( ScEditEngineDefaulter* pEngine, const ScAddress& rCurPos );
117 virtual ~ScEditViewHint();
119 SCCOL GetCol() const { return aCursorPos.Col(); }
120 SCROW GetRow() const { return aCursorPos.Row(); }
121 SCTAB GetTab() const { return aCursorPos.Tab(); }
122 ScEditEngineDefaulter* GetEngine() const { return pEditEngine; }
124 private:
125 ScEditViewHint(); // disabled
128 class ScIndexHint : public SfxHint
130 sal_uInt16 nId;
131 sal_uInt16 nIndex;
133 public:
134 ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx);
135 virtual ~ScIndexHint();
137 sal_uInt16 GetId() const { return nId; }
138 sal_uInt16 GetIndex() const { return nIndex; }
141 // Parameter item for the sort dialog:
143 class SC_DLLPUBLIC ScSortItem : public SfxPoolItem
145 public:
146 TYPEINFO_OVERRIDE();
147 ScSortItem( sal_uInt16 nWhich,
148 ScViewData* ptrViewData,
149 const ScSortParam* pSortData );
150 ScSortItem( sal_uInt16 nWhich,
151 const ScSortParam* pSortData );
152 ScSortItem( const ScSortItem& rItem );
153 virtual ~ScSortItem();
155 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
156 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
157 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const SAL_OVERRIDE;
159 ScViewData* GetViewData () const { return pViewData; }
160 const ScSortParam& GetSortData () const { return theSortData; }
162 private:
163 ScViewData* pViewData;
164 ScSortParam theSortData;
167 class SC_DLLPUBLIC ScQueryItem : public SfxPoolItem
169 public:
170 TYPEINFO_OVERRIDE();
171 ScQueryItem( sal_uInt16 nWhich,
172 ScViewData* ptrViewData,
173 const ScQueryParam* pQueryData );
174 ScQueryItem( sal_uInt16 nWhich,
175 const ScQueryParam* pQueryData );
176 ScQueryItem( const ScQueryItem& rItem );
177 virtual ~ScQueryItem();
179 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
180 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
182 ScViewData* GetViewData () const { return pViewData; }
183 const ScQueryParam& GetQueryData() const;
185 bool GetAdvancedQuerySource(ScRange& rSource) const;
186 void SetAdvancedQuerySource(const ScRange* pSource);
188 private:
189 boost::scoped_ptr<ScQueryParam> mpQueryData;
190 ScViewData* pViewData;
191 ScRange aAdvSource;
192 bool bIsAdvanced;
195 class SC_DLLPUBLIC ScSubTotalItem : public SfxPoolItem
197 public:
198 TYPEINFO_OVERRIDE();
199 ScSubTotalItem( sal_uInt16 nWhich,
200 ScViewData* ptrViewData,
201 const ScSubTotalParam* pSubTotalData );
202 ScSubTotalItem( sal_uInt16 nWhich,
203 const ScSubTotalParam* pSubTotalData );
204 ScSubTotalItem( const ScSubTotalItem& rItem );
205 virtual ~ScSubTotalItem();
207 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
208 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
209 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const SAL_OVERRIDE;
211 ScViewData* GetViewData () const { return pViewData; }
212 const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; }
214 private:
215 ScViewData* pViewData;
216 ScSubTotalParam theSubTotalData;
219 class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem
221 public:
222 TYPEINFO_OVERRIDE();
223 ScUserListItem( sal_uInt16 nWhich );
224 ScUserListItem( const ScUserListItem& rItem );
225 virtual ~ScUserListItem();
227 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
228 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
230 void SetUserList ( const ScUserList& rUserList );
231 ScUserList* GetUserList () const { return pUserList; }
233 private:
234 ScUserList* pUserList;
237 class ScConsolidateItem : public SfxPoolItem
239 public:
240 TYPEINFO_OVERRIDE();
241 ScConsolidateItem( sal_uInt16 nWhich,
242 const ScConsolidateParam* pParam );
243 ScConsolidateItem( const ScConsolidateItem& rItem );
244 virtual ~ScConsolidateItem();
246 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
247 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
249 const ScConsolidateParam& GetData() const { return theConsData; }
251 private:
252 ScConsolidateParam theConsData;
255 class ScPivotItem : public SfxPoolItem
257 public:
258 TYPEINFO_OVERRIDE();
259 ScPivotItem( sal_uInt16 nWhich, const ScDPSaveData* pData,
260 const ScRange* pRange, bool bNew );
261 ScPivotItem( const ScPivotItem& rItem );
262 virtual ~ScPivotItem();
264 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
265 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
267 const ScDPSaveData& GetData() const { return *pSaveData; }
268 const ScRange& GetDestRange() const { return aDestRange; }
269 bool IsNewSheet() const { return bNewSheet; }
271 private:
272 ScDPSaveData* pSaveData;
273 ScRange aDestRange;
274 bool bNewSheet;
277 class ScSolveItem : public SfxPoolItem
279 public:
280 TYPEINFO_OVERRIDE();
281 ScSolveItem( sal_uInt16 nWhich,
282 const ScSolveParam* pParam );
283 ScSolveItem( const ScSolveItem& rItem );
284 virtual ~ScSolveItem();
286 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
287 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
289 const ScSolveParam& GetData() const { return theSolveData; }
291 private:
292 ScSolveParam theSolveData;
295 class ScTabOpItem : public SfxPoolItem
297 public:
298 TYPEINFO_OVERRIDE();
299 ScTabOpItem( sal_uInt16 nWhich,
300 const ScTabOpParam* pParam );
301 ScTabOpItem( const ScTabOpItem& rItem );
302 virtual ~ScTabOpItem();
304 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
305 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
307 const ScTabOpParam& GetData() const { return theTabOpData; }
309 private:
310 ScTabOpParam theTabOpData;
313 #endif
315 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */