Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include "uiitems.hxx"
30 : :
31 : : #include "userlist.hxx"
32 : : #include "dpsave.hxx"
33 : : #include "queryparam.hxx"
34 : :
35 : : #include <editeng/editobj.hxx>
36 : :
37 : : // STATIC DATA -----------------------------------------------------------
38 : :
39 [ # # ][ # # ]: 0 : TYPEINIT1(ScInputStatusItem, SfxPoolItem);
40 [ - + ][ - + ]: 54 : TYPEINIT1(ScSortItem, SfxPoolItem);
41 [ - + ][ - + ]: 54 : TYPEINIT1(ScQueryItem, SfxPoolItem);
42 [ - + ][ - + ]: 54 : TYPEINIT1(ScSubTotalItem, SfxPoolItem);
43 [ - + ][ - + ]: 54 : TYPEINIT1(ScUserListItem, SfxPoolItem);
44 [ - + ][ - + ]: 54 : TYPEINIT1(ScConsolidateItem, SfxPoolItem);
45 [ - + ][ - + ]: 54 : TYPEINIT1(ScPivotItem, SfxPoolItem);
46 [ - + ][ - + ]: 54 : TYPEINIT1(ScSolveItem, SfxPoolItem);
47 [ # # ][ # # ]: 0 : TYPEINIT1(ScTabOpItem, SfxPoolItem);
48 : :
49 [ + + ][ - + ]: 9562 : TYPEINIT1(ScTablesHint, SfxHint);
50 [ # # ][ # # ]: 4857 : TYPEINIT1(ScEditViewHint, SfxHint);
51 [ # # ][ # # ]: 4793 : TYPEINIT1(ScIndexHint, SfxHint);
52 : :
53 : : // -----------------------------------------------------------------------
54 : : // ScInputStatusItem - Status-Update fuer Eingabezeile
55 : : // -----------------------------------------------------------------------
56 : :
57 : 0 : ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
58 : : const ScAddress& rCurPos,
59 : : const ScAddress& rStartPos,
60 : : const ScAddress& rEndPos,
61 : : const String& rString,
62 : : const EditTextObject* pData )
63 : : : SfxPoolItem ( nWhichP ),
64 : : aCursorPos ( rCurPos ),
65 : : aStartPos ( rStartPos ),
66 : : aEndPos ( rEndPos ),
67 : : aString ( rString ),
68 [ # # ][ # # ]: 0 : pEditData ( pData ? pData->Clone() : NULL )
[ # # ]
69 : : {
70 : 0 : }
71 : :
72 : 0 : ScInputStatusItem::ScInputStatusItem( const ScInputStatusItem& rItem )
73 : : : SfxPoolItem ( rItem ),
74 : : aCursorPos ( rItem.aCursorPos ),
75 : : aStartPos ( rItem.aStartPos ),
76 : : aEndPos ( rItem.aEndPos ),
77 : : aString ( rItem.aString ),
78 [ # # ][ # # ]: 0 : pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : NULL )
[ # # ]
79 : : {
80 : 0 : }
81 : :
82 [ # # ]: 0 : ScInputStatusItem::~ScInputStatusItem()
83 : : {
84 [ # # ][ # # ]: 0 : delete pEditData;
85 [ # # ]: 0 : }
86 : :
87 : 0 : String ScInputStatusItem::GetValueText() const
88 : : {
89 [ # # ]: 0 : return rtl::OUString("InputStatus");
90 : : }
91 : :
92 : 0 : int ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const
93 : : {
94 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
95 : :
96 : 0 : return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos)
97 : 0 : && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos)
98 : 0 : && (aCursorPos == ((ScInputStatusItem&)rItem).aCursorPos)
99 [ # # ][ # # : 0 : && (aString == ((ScInputStatusItem&)rItem).aString) );
# # # # ]
100 : : //! Edit-Daten vergleichen!
101 : : }
102 : :
103 : 0 : SfxPoolItem* ScInputStatusItem::Clone( SfxItemPool * ) const
104 : : {
105 [ # # ]: 0 : return new ScInputStatusItem( *this );
106 : : }
107 : :
108 : : //
109 : : // ScPaintHint ist nach schints.cxx verschoben
110 : : //
111 : :
112 : : // -----------------------------------------------------------------------
113 : : // ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht
114 : : // -----------------------------------------------------------------------
115 : :
116 : 100 : ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) :
117 : : nId( nNewId ),
118 : : nTab1( nTable1 ),
119 : 100 : nTab2( nTable2 )
120 : : {
121 : 100 : }
122 : :
123 : 100 : ScTablesHint::~ScTablesHint()
124 : : {
125 [ - + ]: 100 : }
126 : :
127 : :
128 : : // -----------------------------------------------------------------------
129 : : // ScIndexHint
130 : : // -----------------------------------------------------------------------
131 : :
132 : 0 : ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) :
133 : : nId( nNewId ),
134 : 0 : nIndex( nIdx )
135 : : {
136 : 0 : }
137 : :
138 : 0 : ScIndexHint::~ScIndexHint()
139 : : {
140 [ # # ]: 0 : }
141 : :
142 : :
143 : : // -----------------------------------------------------------------------
144 : : // ScEditViewHint - neue EditView fuer Cursorposition anlegen
145 : : // -----------------------------------------------------------------------
146 : :
147 : 0 : ScEditViewHint::ScEditViewHint( ScEditEngineDefaulter* pEngine, const ScAddress& rCurPos ) :
148 : : pEditEngine( pEngine ),
149 : 0 : aCursorPos( rCurPos )
150 : : {
151 : 0 : }
152 : :
153 : 0 : ScEditViewHint::~ScEditViewHint()
154 : : {
155 [ # # ]: 0 : }
156 : :
157 : : // -----------------------------------------------------------------------
158 : : // ScSortItem - Daten fuer den Sortierdialog
159 : : // -----------------------------------------------------------------------
160 : :
161 : 0 : ScSortItem::ScSortItem( sal_uInt16 nWhichP,
162 : : ScViewData* ptrViewData,
163 : : const ScSortParam* pSortData ) :
164 : : SfxPoolItem ( nWhichP ),
165 [ # # ]: 0 : pViewData ( ptrViewData )
166 : : {
167 [ # # ][ # # ]: 0 : if ( pSortData ) theSortData = *pSortData;
168 : 0 : }
169 : :
170 : : //------------------------------------------------------------------------
171 : :
172 : 51 : ScSortItem::ScSortItem( sal_uInt16 nWhichP,
173 : : const ScSortParam* pSortData ) :
174 : : SfxPoolItem ( nWhichP ),
175 [ + - ]: 51 : pViewData ( NULL )
176 : : {
177 [ - + ][ # # ]: 51 : if ( pSortData ) theSortData = *pSortData;
178 : 51 : }
179 : :
180 : : //------------------------------------------------------------------------
181 : :
182 : 0 : ScSortItem::ScSortItem( const ScSortItem& rItem ) :
183 : : SfxPoolItem ( rItem ),
184 : : pViewData ( rItem.pViewData ),
185 [ # # ]: 0 : theSortData ( rItem.theSortData )
186 : : {
187 : 0 : }
188 : :
189 [ + - ]: 18 : ScSortItem::~ScSortItem()
190 : : {
191 [ - + ]: 18 : }
192 : :
193 : : //------------------------------------------------------------------------
194 : :
195 : 0 : String ScSortItem::GetValueText() const
196 : : {
197 [ # # ]: 0 : return rtl::OUString("SortItem");
198 : : }
199 : :
200 : : //------------------------------------------------------------------------
201 : :
202 : 0 : int ScSortItem::operator==( const SfxPoolItem& rItem ) const
203 : : {
204 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
205 : :
206 : 0 : const ScSortItem& rOther = (const ScSortItem&)rItem;
207 : :
208 : : return ( (pViewData == rOther.pViewData)
209 [ # # ][ # # ]: 0 : && (theSortData == rOther.theSortData) );
210 : : }
211 : :
212 : : //------------------------------------------------------------------------
213 : :
214 : 0 : SfxPoolItem* ScSortItem::Clone( SfxItemPool * ) const
215 : : {
216 [ # # ]: 0 : return new ScSortItem( *this );
217 : : }
218 : :
219 : : //------------------------------------------------------------------------
220 : :
221 : 0 : bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
222 : : {
223 : : // Return empty value as there is no useful conversion
224 : 0 : rVal = com::sun::star::uno::Any();
225 : 0 : return true;
226 : : }
227 : :
228 : : // -----------------------------------------------------------------------
229 : : // ScQueryItem - Daten fuer den Filterdialog
230 : : // -----------------------------------------------------------------------
231 : :
232 : 51 : ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
233 : : ScViewData* ptrViewData,
234 : : const ScQueryParam* pQueryData ) :
235 : : SfxPoolItem ( nWhichP ),
236 : : mpQueryData(NULL),
237 : : pViewData ( ptrViewData ),
238 : 51 : bIsAdvanced ( false )
239 : : {
240 [ - + ]: 51 : if (pQueryData)
241 [ # # ][ # # ]: 0 : mpQueryData.reset(new ScQueryParam(*pQueryData));
[ # # ]
242 : : else
243 [ + - ][ + - ]: 51 : mpQueryData.reset(new ScQueryParam);
[ + - ]
244 : 51 : }
245 : :
246 : : //------------------------------------------------------------------------
247 : :
248 : 0 : ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
249 : : const ScQueryParam* pQueryData ) :
250 : : SfxPoolItem ( nWhichP ),
251 : : mpQueryData(NULL),
252 : : pViewData ( NULL ),
253 : 0 : bIsAdvanced ( false )
254 : : {
255 [ # # ]: 0 : if (pQueryData)
256 [ # # ][ # # ]: 0 : mpQueryData.reset(new ScQueryParam(*pQueryData));
[ # # ]
257 : : else
258 [ # # ][ # # ]: 0 : mpQueryData.reset(new ScQueryParam);
[ # # ]
259 : 0 : }
260 : :
261 : : //------------------------------------------------------------------------
262 : :
263 : 0 : ScQueryItem::ScQueryItem( const ScQueryItem& rItem ) :
264 : : SfxPoolItem ( rItem ),
265 [ # # ]: 0 : mpQueryData(new ScQueryParam(*rItem.mpQueryData)),
266 : : pViewData ( rItem.pViewData ),
267 : : aAdvSource ( rItem.aAdvSource ),
268 [ # # ]: 0 : bIsAdvanced ( rItem.bIsAdvanced )
269 : : {
270 : 0 : }
271 : :
272 [ + - ]: 18 : ScQueryItem::~ScQueryItem()
273 : : {
274 [ - + ]: 18 : }
275 : :
276 : : //------------------------------------------------------------------------
277 : :
278 : 0 : void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource)
279 : : {
280 [ # # ]: 0 : if (pSource)
281 : : {
282 : 0 : aAdvSource = *pSource;
283 : 0 : bIsAdvanced = true;
284 : : }
285 : : else
286 : 0 : bIsAdvanced = false;
287 : 0 : }
288 : :
289 : 0 : const ScQueryParam& ScQueryItem::GetQueryData() const
290 : : {
291 : 0 : return *mpQueryData;
292 : : }
293 : :
294 : 0 : bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
295 : : {
296 : 0 : rSource = aAdvSource;
297 : 0 : return bIsAdvanced;
298 : : }
299 : :
300 : : //------------------------------------------------------------------------
301 : :
302 : 0 : String ScQueryItem::GetValueText() const
303 : : {
304 [ # # ]: 0 : return rtl::OUString("QueryItem");
305 : : }
306 : :
307 : : //------------------------------------------------------------------------
308 : :
309 : 0 : int ScQueryItem::operator==( const SfxPoolItem& rItem ) const
310 : : {
311 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
312 : :
313 : 0 : const ScQueryItem& rQueryItem = (const ScQueryItem&)rItem;
314 : :
315 : : return ( (pViewData == rQueryItem.pViewData)
316 : : && (bIsAdvanced == rQueryItem.bIsAdvanced)
317 : 0 : && (aAdvSource == rQueryItem.aAdvSource)
318 [ # # ]: 0 : && (*mpQueryData == *rQueryItem.mpQueryData) );
[ # # # # ]
[ # # ]
319 : : }
320 : :
321 : : //------------------------------------------------------------------------
322 : :
323 : 0 : SfxPoolItem* ScQueryItem::Clone( SfxItemPool * ) const
324 : : {
325 [ # # ]: 0 : return new ScQueryItem( *this );
326 : : }
327 : :
328 : : // -----------------------------------------------------------------------
329 : : // ScSubTotalItem - Daten fuer den Zwischenergebnisdialog
330 : : // -----------------------------------------------------------------------
331 : :
332 : 51 : ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
333 : : ScViewData* ptrViewData,
334 : : const ScSubTotalParam* pSubTotalData ) :
335 : : SfxPoolItem ( nWhichP ),
336 [ + - ]: 51 : pViewData ( ptrViewData )
337 : : {
338 [ - + ][ # # ]: 51 : if ( pSubTotalData ) theSubTotalData = *pSubTotalData;
339 : 51 : }
340 : :
341 : : //------------------------------------------------------------------------
342 : :
343 : 0 : ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
344 : : const ScSubTotalParam* pSubTotalData ) :
345 : : SfxPoolItem ( nWhichP ),
346 [ # # ]: 0 : pViewData ( NULL )
347 : : {
348 [ # # ][ # # ]: 0 : if ( pSubTotalData ) theSubTotalData = *pSubTotalData;
349 : 0 : }
350 : :
351 : : //------------------------------------------------------------------------
352 : :
353 : 0 : ScSubTotalItem::ScSubTotalItem( const ScSubTotalItem& rItem ) :
354 : : SfxPoolItem ( rItem ),
355 : : pViewData ( rItem.pViewData ),
356 [ # # ]: 0 : theSubTotalData ( rItem.theSubTotalData )
357 : : {
358 : 0 : }
359 : :
360 : 18 : ScSubTotalItem::~ScSubTotalItem()
361 : : {
362 [ - + ]: 18 : }
363 : :
364 : : //------------------------------------------------------------------------
365 : :
366 : 0 : String ScSubTotalItem::GetValueText() const
367 : : {
368 [ # # ]: 0 : return rtl::OUString("SubTotalItem");
369 : : }
370 : :
371 : : //------------------------------------------------------------------------
372 : :
373 : 0 : int ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const
374 : : {
375 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
376 : :
377 : 0 : const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem;
378 : :
379 : : return ( (pViewData == rSTItem.pViewData)
380 [ # # ][ # # ]: 0 : && (theSubTotalData == rSTItem.theSubTotalData) );
381 : : }
382 : :
383 : : //------------------------------------------------------------------------
384 : :
385 : 0 : SfxPoolItem* ScSubTotalItem::Clone( SfxItemPool * ) const
386 : : {
387 [ # # ]: 0 : return new ScSubTotalItem( *this );
388 : : }
389 : :
390 : : //------------------------------------------------------------------------
391 : :
392 : 0 : bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
393 : : {
394 : : // Return empty value as there is no useful conversion
395 : 0 : rVal = com::sun::star::uno::Any();
396 : 0 : return true;
397 : : }
398 : :
399 : : // -----------------------------------------------------------------------
400 : : // ScUserListItem - Transporter fuer den Benutzerlisten-TabPage
401 : : // -----------------------------------------------------------------------
402 : :
403 : 51 : ScUserListItem::ScUserListItem( sal_uInt16 nWhichP )
404 : : : SfxPoolItem ( nWhichP ),
405 : 51 : pUserList ( NULL )
406 : : {
407 : 51 : }
408 : :
409 : : //------------------------------------------------------------------------
410 : :
411 : 0 : ScUserListItem::ScUserListItem( const ScUserListItem& rItem )
412 : 0 : : SfxPoolItem ( rItem )
413 : : {
414 [ # # ]: 0 : if ( rItem.pUserList )
415 [ # # ][ # # ]: 0 : pUserList = new ScUserList( *(rItem.pUserList) );
416 : : else
417 : 0 : pUserList = NULL;
418 : 0 : }
419 : :
420 : 18 : ScUserListItem::~ScUserListItem()
421 : : {
422 [ - + ][ # # ]: 18 : delete pUserList;
423 [ - + ]: 18 : }
424 : :
425 : : //------------------------------------------------------------------------
426 : :
427 : 0 : String ScUserListItem::GetValueText() const
428 : : {
429 [ # # ]: 0 : return rtl::OUString("ScUserListItem");
430 : : }
431 : :
432 : : //------------------------------------------------------------------------
433 : :
434 : 0 : int ScUserListItem::operator==( const SfxPoolItem& rItem ) const
435 : : {
436 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
437 : :
438 : 0 : const ScUserListItem& r = (const ScUserListItem&)rItem;
439 : 0 : sal_Bool bEqual = false;
440 : :
441 [ # # ][ # # ]: 0 : if ( !pUserList || !(r.pUserList) )
442 [ # # ][ # # ]: 0 : bEqual = ( !pUserList && !(r.pUserList) );
443 : : else
444 : 0 : bEqual = ( *pUserList == *(r.pUserList) );
445 : :
446 : 0 : return bEqual;
447 : : }
448 : :
449 : :
450 : : //------------------------------------------------------------------------
451 : :
452 : 0 : SfxPoolItem* ScUserListItem::Clone( SfxItemPool * ) const
453 : : {
454 [ # # ]: 0 : return new ScUserListItem( *this );
455 : : }
456 : :
457 : : //------------------------------------------------------------------------
458 : :
459 : 0 : void ScUserListItem::SetUserList( const ScUserList& rUserList )
460 : : {
461 [ # # ]: 0 : delete pUserList;
462 [ # # ]: 0 : pUserList = new ScUserList( rUserList );
463 : 0 : }
464 : :
465 : : // -----------------------------------------------------------------------
466 : : // ScConsolidateItem - Daten fuer den Konsolidieren-Dialog
467 : : // -----------------------------------------------------------------------
468 : :
469 : 51 : ScConsolidateItem::ScConsolidateItem(
470 : : sal_uInt16 nWhichP,
471 : : const ScConsolidateParam* pConsolidateData ) :
472 [ + - ]: 51 : SfxPoolItem ( nWhichP )
473 : : {
474 [ - + ][ # # ]: 51 : if ( pConsolidateData ) theConsData = *pConsolidateData;
475 : 51 : }
476 : :
477 : : //------------------------------------------------------------------------
478 : :
479 : 0 : ScConsolidateItem::ScConsolidateItem( const ScConsolidateItem& rItem ) :
480 : : SfxPoolItem ( rItem ),
481 [ # # ]: 0 : theConsData ( rItem.theConsData )
482 : : {
483 : 0 : }
484 : :
485 : : //------------------------------------------------------------------------
486 : :
487 [ + - ]: 18 : ScConsolidateItem::~ScConsolidateItem()
488 : : {
489 [ - + ]: 18 : }
490 : :
491 : : //------------------------------------------------------------------------
492 : :
493 : 0 : String ScConsolidateItem::GetValueText() const
494 : : {
495 [ # # ]: 0 : return rtl::OUString("ScConsolidateItem");
496 : : }
497 : :
498 : : //------------------------------------------------------------------------
499 : :
500 : 0 : int ScConsolidateItem::operator==( const SfxPoolItem& rItem ) const
501 : : {
502 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
503 : :
504 : 0 : const ScConsolidateItem& rCItem = (const ScConsolidateItem&)rItem;
505 : :
506 : 0 : return ( theConsData == rCItem.theConsData);
507 : : }
508 : :
509 : : //------------------------------------------------------------------------
510 : :
511 : 0 : SfxPoolItem* ScConsolidateItem::Clone( SfxItemPool * ) const
512 : : {
513 [ # # ]: 0 : return new ScConsolidateItem( *this );
514 : : }
515 : :
516 : :
517 : : // -----------------------------------------------------------------------
518 : : // ScPivotItem - Daten fuer den Pivot-Dialog
519 : : // -----------------------------------------------------------------------
520 : :
521 : 51 : ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData,
522 : : const ScRange* pRange, sal_Bool bNew ) :
523 : 51 : SfxPoolItem ( nWhichP )
524 : : {
525 : : // pSaveData must always exist
526 [ - + ]: 51 : if ( pData )
527 [ # # ][ # # ]: 0 : pSaveData = new ScDPSaveData(*pData);
528 : : else
529 [ + - ][ + - ]: 51 : pSaveData = new ScDPSaveData;
530 [ - + ]: 51 : if ( pRange ) aDestRange = *pRange;
531 : 51 : bNewSheet = bNew;
532 : 51 : }
533 : :
534 : : //------------------------------------------------------------------------
535 : :
536 : 0 : ScPivotItem::ScPivotItem( const ScPivotItem& rItem ) :
537 : : SfxPoolItem ( rItem ),
538 : : aDestRange ( rItem.aDestRange ),
539 : 0 : bNewSheet ( rItem.bNewSheet )
540 : : {
541 : : OSL_ENSURE(rItem.pSaveData, "pSaveData");
542 [ # # ][ # # ]: 0 : pSaveData = new ScDPSaveData(*rItem.pSaveData);
543 : 0 : }
544 : :
545 : : //------------------------------------------------------------------------
546 : :
547 : 18 : ScPivotItem::~ScPivotItem()
548 : : {
549 [ + - ][ + - ]: 18 : delete pSaveData;
550 [ - + ]: 18 : }
551 : :
552 : : //------------------------------------------------------------------------
553 : :
554 : 0 : String ScPivotItem::GetValueText() const
555 : : {
556 [ # # ]: 0 : return rtl::OUString("ScPivotItem");
557 : : }
558 : :
559 : : //------------------------------------------------------------------------
560 : :
561 : 0 : int ScPivotItem::operator==( const SfxPoolItem& rItem ) const
562 : : {
563 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
564 : :
565 : 0 : const ScPivotItem& rPItem = (const ScPivotItem&)rItem;
566 : : OSL_ENSURE( pSaveData && rPItem.pSaveData, "pSaveData" );
567 : 0 : return ( *pSaveData == *rPItem.pSaveData &&
568 : 0 : aDestRange == rPItem.aDestRange &&
569 [ # # ]: 0 : bNewSheet == rPItem.bNewSheet );
[ # # # # ]
570 : : }
571 : :
572 : : //------------------------------------------------------------------------
573 : :
574 : 0 : SfxPoolItem* ScPivotItem::Clone( SfxItemPool * ) const
575 : : {
576 [ # # ]: 0 : return new ScPivotItem( *this );
577 : : }
578 : :
579 : :
580 : : // -----------------------------------------------------------------------
581 : : // ScSolveItem - Daten fuer den Solver-Dialog
582 : : // -----------------------------------------------------------------------
583 : :
584 : 51 : ScSolveItem::ScSolveItem( sal_uInt16 nWhichP,
585 : : const ScSolveParam* pSolveData )
586 [ + - ]: 51 : : SfxPoolItem ( nWhichP )
587 : : {
588 [ - + ][ # # ]: 51 : if ( pSolveData ) theSolveData = *pSolveData;
589 : 51 : }
590 : :
591 : : //------------------------------------------------------------------------
592 : :
593 : 0 : ScSolveItem::ScSolveItem( const ScSolveItem& rItem )
594 : : : SfxPoolItem ( rItem ),
595 [ # # ]: 0 : theSolveData ( rItem.theSolveData )
596 : : {
597 : 0 : }
598 : :
599 : : //------------------------------------------------------------------------
600 : :
601 [ + - ]: 18 : ScSolveItem::~ScSolveItem()
602 : : {
603 [ - + ]: 18 : }
604 : :
605 : : //------------------------------------------------------------------------
606 : :
607 : 0 : String ScSolveItem::GetValueText() const
608 : : {
609 [ # # ]: 0 : return rtl::OUString("ScSolveItem");
610 : : }
611 : :
612 : : //------------------------------------------------------------------------
613 : :
614 : 0 : int ScSolveItem::operator==( const SfxPoolItem& rItem ) const
615 : : {
616 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
617 : :
618 : 0 : const ScSolveItem& rPItem = (const ScSolveItem&)rItem;
619 : :
620 : 0 : return ( theSolveData == rPItem.theSolveData );
621 : : }
622 : :
623 : : //------------------------------------------------------------------------
624 : :
625 : 0 : SfxPoolItem* ScSolveItem::Clone( SfxItemPool * ) const
626 : : {
627 [ # # ]: 0 : return new ScSolveItem( *this );
628 : : }
629 : :
630 : : // -----------------------------------------------------------------------
631 : : // ScTabOpItem - Daten fuer den TabOp-Dialog
632 : : // -----------------------------------------------------------------------
633 : :
634 : 0 : ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP,
635 : : const ScTabOpParam* pTabOpData )
636 : 0 : : SfxPoolItem ( nWhichP )
637 : : {
638 [ # # ][ # # ]: 0 : if ( pTabOpData ) theTabOpData = *pTabOpData;
639 : 0 : }
640 : :
641 : : //------------------------------------------------------------------------
642 : :
643 : 0 : ScTabOpItem::ScTabOpItem( const ScTabOpItem& rItem )
644 : : : SfxPoolItem ( rItem ),
645 [ # # ]: 0 : theTabOpData ( rItem.theTabOpData )
646 : : {
647 : 0 : }
648 : :
649 : : //------------------------------------------------------------------------
650 : :
651 : 0 : ScTabOpItem::~ScTabOpItem()
652 : : {
653 [ # # ]: 0 : }
654 : :
655 : : //------------------------------------------------------------------------
656 : :
657 : 0 : String ScTabOpItem::GetValueText() const
658 : : {
659 [ # # ]: 0 : return rtl::OUString("ScTabOpItem");
660 : : }
661 : :
662 : : //------------------------------------------------------------------------
663 : :
664 : 0 : int ScTabOpItem::operator==( const SfxPoolItem& rItem ) const
665 : : {
666 : : OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
667 : :
668 : 0 : const ScTabOpItem& rPItem = (const ScTabOpItem&)rItem;
669 : :
670 : 0 : return ( theTabOpData == rPItem.theTabOpData );
671 : : }
672 : :
673 : : //------------------------------------------------------------------------
674 : :
675 : 0 : SfxPoolItem* ScTabOpItem::Clone( SfxItemPool * ) const
676 : : {
677 [ # # ]: 0 : return new ScTabOpItem( *this );
678 : : }
679 : :
680 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|