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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26
27
28
29 #include <editeng/editobj.hxx>
30
31 #include "userlist.hxx"
32 #include "uiitems.hxx"
33 #include "dpsave.hxx"
34
35 // STATIC DATA -----------------------------------------------------------
36
37 TYPEINIT1(ScInputStatusItem, SfxPoolItem);
38 TYPEINIT1(ScSortItem, SfxPoolItem);
39 TYPEINIT1(ScQueryItem, SfxPoolItem);
40 TYPEINIT1(ScSubTotalItem, SfxPoolItem);
41 TYPEINIT1(ScUserListItem, SfxPoolItem);
42 TYPEINIT1(ScConsolidateItem, SfxPoolItem);
43 TYPEINIT1(ScPivotItem, SfxPoolItem);
44 TYPEINIT1(ScSolveItem, SfxPoolItem);
45 TYPEINIT1(ScTabOpItem, SfxPoolItem);
46 TYPEINIT1(ScCondFrmtItem, SfxPoolItem);
47
48 TYPEINIT1(ScTablesHint, SfxHint);
49 TYPEINIT1(ScEditViewHint, SfxHint);
50 TYPEINIT1(ScIndexHint, SfxHint);
51
52 // -----------------------------------------------------------------------
53 // ScInputStatusItem - Status-Update fuer Eingabezeile
54 // -----------------------------------------------------------------------
55
56 //UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
57 //UNUSED2008-05 SCTAB nTab,
58 //UNUSED2008-05 SCCOL nCol, SCROW nRow,
59 //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow,
60 //UNUSED2008-05 SCCOL nEndCol, SCROW nEndRow,
61 //UNUSED2008-05 const String& rString, const EditTextObject* pData )
62 //UNUSED2008-05
63 //UNUSED2008-05 : SfxPoolItem ( nWhichP ),
64 //UNUSED2008-05 aCursorPos ( nCol, nRow, nTab ),
65 //UNUSED2008-05 aStartPos ( nStartCol, nStartRow, nTab ),
66 //UNUSED2008-05 aEndPos ( nEndCol, nEndRow, nTab ),
67 //UNUSED2008-05 aString ( rString ),
68 //UNUSED2008-05 pEditData ( pData ? pData->Clone() : NULL )
69 //UNUSED2008-05 {
70 //UNUSED2008-05 }
71
ScInputStatusItem(sal_uInt16 nWhichP,const ScAddress & rCurPos,const ScAddress & rStartPos,const ScAddress & rEndPos,const String & rString,const EditTextObject * pData)72 ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
73 const ScAddress& rCurPos,
74 const ScAddress& rStartPos,
75 const ScAddress& rEndPos,
76 const String& rString,
77 const EditTextObject* pData )
78 : SfxPoolItem ( nWhichP ),
79 aCursorPos ( rCurPos ),
80 aStartPos ( rStartPos ),
81 aEndPos ( rEndPos ),
82 aString ( rString ),
83 pEditData ( pData ? pData->Clone() : NULL )
84 {
85 }
86
ScInputStatusItem(const ScInputStatusItem & rItem)87 ScInputStatusItem::ScInputStatusItem( const ScInputStatusItem& rItem )
88 : SfxPoolItem ( rItem ),
89 aCursorPos ( rItem.aCursorPos ),
90 aStartPos ( rItem.aStartPos ),
91 aEndPos ( rItem.aEndPos ),
92 aString ( rItem.aString ),
93 pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : NULL )
94 {
95 }
96
~ScInputStatusItem()97 __EXPORT ScInputStatusItem::~ScInputStatusItem()
98 {
99 delete pEditData;
100 }
101
GetValueText() const102 String __EXPORT ScInputStatusItem::GetValueText() const
103 {
104 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("InputStatus"));
105 }
106
operator ==(const SfxPoolItem & rItem) const107 int __EXPORT ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const
108 {
109 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
110
111 return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos)
112 && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos)
113 && (aCursorPos == ((ScInputStatusItem&)rItem).aCursorPos)
114 && (aString == ((ScInputStatusItem&)rItem).aString) );
115 //! Edit-Daten vergleichen!
116 }
117
Clone(SfxItemPool *) const118 SfxPoolItem* __EXPORT ScInputStatusItem::Clone( SfxItemPool * ) const
119 {
120 return new ScInputStatusItem( *this );
121 }
122
123 //
124 // ScPaintHint ist nach schints.cxx verschoben
125 //
126
127 // -----------------------------------------------------------------------
128 // ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht
129 // -----------------------------------------------------------------------
130
ScTablesHint(sal_uInt16 nNewId,SCTAB nTable1,SCTAB nTable2)131 ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) :
132 nId( nNewId ),
133 nTab1( nTable1 ),
134 nTab2( nTable2 )
135 {
136 }
137
~ScTablesHint()138 ScTablesHint::~ScTablesHint()
139 {
140 }
141
142
143 // -----------------------------------------------------------------------
144 // ScIndexHint
145 // -----------------------------------------------------------------------
146
ScIndexHint(sal_uInt16 nNewId,sal_uInt16 nIdx)147 ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) :
148 nId( nNewId ),
149 nIndex( nIdx )
150 {
151 }
152
~ScIndexHint()153 ScIndexHint::~ScIndexHint()
154 {
155 }
156
157
158 // -----------------------------------------------------------------------
159 // ScEditViewHint - neue EditView fuer Cursorposition anlegen
160 // -----------------------------------------------------------------------
161
ScEditViewHint(ScEditEngineDefaulter * pEngine,const ScAddress & rCurPos)162 ScEditViewHint::ScEditViewHint( ScEditEngineDefaulter* pEngine, const ScAddress& rCurPos ) :
163 pEditEngine( pEngine ),
164 aCursorPos( rCurPos )
165 {
166 }
167
~ScEditViewHint()168 ScEditViewHint::~ScEditViewHint()
169 {
170 }
171
172 // -----------------------------------------------------------------------
173 // ScSortItem - Daten fuer den Sortierdialog
174 // -----------------------------------------------------------------------
175
ScSortItem(sal_uInt16 nWhichP,ScViewData * ptrViewData,const ScSortParam * pSortData)176 ScSortItem::ScSortItem( sal_uInt16 nWhichP,
177 ScViewData* ptrViewData,
178 const ScSortParam* pSortData ) :
179 SfxPoolItem ( nWhichP ),
180 pViewData ( ptrViewData )
181 {
182 if ( pSortData ) theSortData = *pSortData;
183 }
184
185 //------------------------------------------------------------------------
186
ScSortItem(sal_uInt16 nWhichP,const ScSortParam * pSortData)187 ScSortItem::ScSortItem( sal_uInt16 nWhichP,
188 const ScSortParam* pSortData ) :
189 SfxPoolItem ( nWhichP ),
190 pViewData ( NULL )
191 {
192 if ( pSortData ) theSortData = *pSortData;
193 }
194
195 //------------------------------------------------------------------------
196
ScSortItem(const ScSortItem & rItem)197 ScSortItem::ScSortItem( const ScSortItem& rItem ) :
198 SfxPoolItem ( rItem ),
199 pViewData ( rItem.pViewData ),
200 theSortData ( rItem.theSortData )
201 {
202 }
203
~ScSortItem()204 __EXPORT ScSortItem::~ScSortItem()
205 {
206 }
207
208 //------------------------------------------------------------------------
209
GetValueText() const210 String __EXPORT ScSortItem::GetValueText() const
211 {
212 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("SortItem"));
213 }
214
215 //------------------------------------------------------------------------
216
operator ==(const SfxPoolItem & rItem) const217 int __EXPORT ScSortItem::operator==( const SfxPoolItem& rItem ) const
218 {
219 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
220
221 const ScSortItem& rOther = (const ScSortItem&)rItem;
222
223 return ( (pViewData == rOther.pViewData)
224 && (theSortData == rOther.theSortData) );
225 }
226
227 //------------------------------------------------------------------------
228
Clone(SfxItemPool *) const229 SfxPoolItem* __EXPORT ScSortItem::Clone( SfxItemPool * ) const
230 {
231 return new ScSortItem( *this );
232 }
233
234 //------------------------------------------------------------------------
235
QueryValue(com::sun::star::uno::Any & rVal,sal_uInt8) const236 sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
237 {
238 // Return empty value as there is no useful conversion
239 rVal = com::sun::star::uno::Any();
240 return sal_True;
241 }
242
243 // -----------------------------------------------------------------------
244 // ScQueryItem - Daten fuer den Filterdialog
245 // -----------------------------------------------------------------------
246
ScQueryItem(sal_uInt16 nWhichP,ScViewData * ptrViewData,const ScQueryParam * pQueryData)247 ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
248 ScViewData* ptrViewData,
249 const ScQueryParam* pQueryData ) :
250 SfxPoolItem ( nWhichP ),
251 pViewData ( ptrViewData ),
252 bIsAdvanced ( sal_False )
253 {
254 if ( pQueryData ) theQueryData = *pQueryData;
255 }
256
257 //------------------------------------------------------------------------
258
ScQueryItem(sal_uInt16 nWhichP,const ScQueryParam * pQueryData)259 ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
260 const ScQueryParam* pQueryData ) :
261 SfxPoolItem ( nWhichP ),
262 pViewData ( NULL ),
263 bIsAdvanced ( sal_False )
264 {
265 if ( pQueryData ) theQueryData = *pQueryData;
266 }
267
268 //------------------------------------------------------------------------
269
ScQueryItem(const ScQueryItem & rItem)270 ScQueryItem::ScQueryItem( const ScQueryItem& rItem ) :
271 SfxPoolItem ( rItem ),
272 pViewData ( rItem.pViewData ),
273 theQueryData( rItem.theQueryData ),
274 bIsAdvanced ( rItem.bIsAdvanced ),
275 aAdvSource ( rItem.aAdvSource )
276 {
277 }
278
~ScQueryItem()279 __EXPORT ScQueryItem::~ScQueryItem()
280 {
281 }
282
283 //------------------------------------------------------------------------
284
SetAdvancedQuerySource(const ScRange * pSource)285 void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource)
286 {
287 if (pSource)
288 {
289 aAdvSource = *pSource;
290 bIsAdvanced = sal_True;
291 }
292 else
293 bIsAdvanced = sal_False;
294 }
295
GetAdvancedQuerySource(ScRange & rSource) const296 sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
297 {
298 rSource = aAdvSource;
299 return bIsAdvanced;
300 }
301
302 //------------------------------------------------------------------------
303
GetValueText() const304 String __EXPORT ScQueryItem::GetValueText() const
305 {
306 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("QueryItem"));
307 }
308
309 //------------------------------------------------------------------------
310
operator ==(const SfxPoolItem & rItem) const311 int __EXPORT ScQueryItem::operator==( const SfxPoolItem& rItem ) const
312 {
313 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
314
315 const ScQueryItem& rQueryItem = (const ScQueryItem&)rItem;
316
317 return ( (pViewData == rQueryItem.pViewData)
318 && (bIsAdvanced == rQueryItem.bIsAdvanced)
319 && (aAdvSource == rQueryItem.aAdvSource)
320 && (theQueryData == rQueryItem.theQueryData) );
321 }
322
323 //------------------------------------------------------------------------
324
Clone(SfxItemPool *) const325 SfxPoolItem* __EXPORT ScQueryItem::Clone( SfxItemPool * ) const
326 {
327 return new ScQueryItem( *this );
328 }
329
330 // -----------------------------------------------------------------------
331 // ScSubTotalItem - Daten fuer den Zwischenergebnisdialog
332 // -----------------------------------------------------------------------
333
ScSubTotalItem(sal_uInt16 nWhichP,ScViewData * ptrViewData,const ScSubTotalParam * pSubTotalData)334 ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
335 ScViewData* ptrViewData,
336 const ScSubTotalParam* pSubTotalData ) :
337 SfxPoolItem ( nWhichP ),
338 pViewData ( ptrViewData )
339 {
340 if ( pSubTotalData ) theSubTotalData = *pSubTotalData;
341 }
342
343 //------------------------------------------------------------------------
344
ScSubTotalItem(sal_uInt16 nWhichP,const ScSubTotalParam * pSubTotalData)345 ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
346 const ScSubTotalParam* pSubTotalData ) :
347 SfxPoolItem ( nWhichP ),
348 pViewData ( NULL )
349 {
350 if ( pSubTotalData ) theSubTotalData = *pSubTotalData;
351 }
352
353 //------------------------------------------------------------------------
354
ScSubTotalItem(const ScSubTotalItem & rItem)355 ScSubTotalItem::ScSubTotalItem( const ScSubTotalItem& rItem ) :
356 SfxPoolItem ( rItem ),
357 pViewData ( rItem.pViewData ),
358 theSubTotalData ( rItem.theSubTotalData )
359 {
360 }
361
~ScSubTotalItem()362 __EXPORT ScSubTotalItem::~ScSubTotalItem()
363 {
364 }
365
366 //------------------------------------------------------------------------
367
GetValueText() const368 String __EXPORT ScSubTotalItem::GetValueText() const
369 {
370 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("SubTotalItem"));
371 }
372
373 //------------------------------------------------------------------------
374
operator ==(const SfxPoolItem & rItem) const375 int __EXPORT ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const
376 {
377 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
378
379 const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem;
380
381 return ( (pViewData == rSTItem.pViewData)
382 && (theSubTotalData == rSTItem.theSubTotalData) );
383 }
384
385 //------------------------------------------------------------------------
386
Clone(SfxItemPool *) const387 SfxPoolItem* __EXPORT ScSubTotalItem::Clone( SfxItemPool * ) const
388 {
389 return new ScSubTotalItem( *this );
390 }
391
392 //------------------------------------------------------------------------
393
QueryValue(com::sun::star::uno::Any & rVal,sal_uInt8) const394 sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
395 {
396 // Return empty value as there is no useful conversion
397 rVal = com::sun::star::uno::Any();
398 return sal_True;
399 }
400
401 // -----------------------------------------------------------------------
402 // ScUserListItem - Transporter fuer den Benutzerlisten-TabPage
403 // -----------------------------------------------------------------------
404
ScUserListItem(sal_uInt16 nWhichP)405 ScUserListItem::ScUserListItem( sal_uInt16 nWhichP )
406 : SfxPoolItem ( nWhichP ),
407 pUserList ( NULL )
408 {
409 }
410
411 //------------------------------------------------------------------------
412
ScUserListItem(const ScUserListItem & rItem)413 ScUserListItem::ScUserListItem( const ScUserListItem& rItem )
414 : SfxPoolItem ( rItem )
415 {
416 if ( rItem.pUserList )
417 pUserList = new ScUserList( *(rItem.pUserList) );
418 else
419 pUserList = NULL;
420 }
421
~ScUserListItem()422 __EXPORT ScUserListItem::~ScUserListItem()
423 {
424 delete pUserList;
425 }
426
427 //------------------------------------------------------------------------
428
GetValueText() const429 String __EXPORT ScUserListItem::GetValueText() const
430 {
431 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScUserListItem"));
432 }
433
434 //------------------------------------------------------------------------
435
operator ==(const SfxPoolItem & rItem) const436 int __EXPORT ScUserListItem::operator==( const SfxPoolItem& rItem ) const
437 {
438 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
439
440 const ScUserListItem& r = (const ScUserListItem&)rItem;
441 sal_Bool bEqual = sal_False;
442
443 if ( !pUserList || !(r.pUserList) )
444 bEqual = ( !pUserList && !(r.pUserList) );
445 else
446 bEqual = ( *pUserList == *(r.pUserList) );
447
448 return bEqual;
449 }
450
451
452 //------------------------------------------------------------------------
453
Clone(SfxItemPool *) const454 SfxPoolItem* __EXPORT ScUserListItem::Clone( SfxItemPool * ) const
455 {
456 return new ScUserListItem( *this );
457 }
458
459 //------------------------------------------------------------------------
460
SetUserList(const ScUserList & rUserList)461 void ScUserListItem::SetUserList( const ScUserList& rUserList )
462 {
463 delete pUserList;
464 pUserList = new ScUserList( rUserList );
465 }
466
467 // -----------------------------------------------------------------------
468 // ScConsolidateItem - Daten fuer den Konsolidieren-Dialog
469 // -----------------------------------------------------------------------
470
ScConsolidateItem(sal_uInt16 nWhichP,const ScConsolidateParam * pConsolidateData)471 ScConsolidateItem::ScConsolidateItem(
472 sal_uInt16 nWhichP,
473 const ScConsolidateParam* pConsolidateData ) :
474 SfxPoolItem ( nWhichP )
475 {
476 if ( pConsolidateData ) theConsData = *pConsolidateData;
477 }
478
479 //------------------------------------------------------------------------
480
ScConsolidateItem(const ScConsolidateItem & rItem)481 ScConsolidateItem::ScConsolidateItem( const ScConsolidateItem& rItem ) :
482 SfxPoolItem ( rItem ),
483 theConsData ( rItem.theConsData )
484 {
485 }
486
487 //------------------------------------------------------------------------
488
~ScConsolidateItem()489 __EXPORT ScConsolidateItem::~ScConsolidateItem()
490 {
491 }
492
493 //------------------------------------------------------------------------
494
GetValueText() const495 String __EXPORT ScConsolidateItem::GetValueText() const
496 {
497 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScConsolidateItem"));
498 }
499
500 //------------------------------------------------------------------------
501
operator ==(const SfxPoolItem & rItem) const502 int __EXPORT ScConsolidateItem::operator==( const SfxPoolItem& rItem ) const
503 {
504 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
505
506 const ScConsolidateItem& rCItem = (const ScConsolidateItem&)rItem;
507
508 return ( theConsData == rCItem.theConsData);
509 }
510
511 //------------------------------------------------------------------------
512
Clone(SfxItemPool *) const513 SfxPoolItem* __EXPORT ScConsolidateItem::Clone( SfxItemPool * ) const
514 {
515 return new ScConsolidateItem( *this );
516 }
517
518
519 // -----------------------------------------------------------------------
520 // ScPivotItem - Daten fuer den Pivot-Dialog
521 // -----------------------------------------------------------------------
522
ScPivotItem(sal_uInt16 nWhichP,const ScDPSaveData * pData,const ScRange * pRange,sal_Bool bNew)523 ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData,
524 const ScRange* pRange, sal_Bool bNew ) :
525 SfxPoolItem ( nWhichP )
526 {
527 // pSaveData must always exist
528 if ( pData )
529 pSaveData = new ScDPSaveData(*pData);
530 else
531 pSaveData = new ScDPSaveData;
532 if ( pRange ) aDestRange = *pRange;
533 bNewSheet = bNew;
534 }
535
536 //------------------------------------------------------------------------
537
ScPivotItem(const ScPivotItem & rItem)538 ScPivotItem::ScPivotItem( const ScPivotItem& rItem ) :
539 SfxPoolItem ( rItem ),
540 aDestRange ( rItem.aDestRange ),
541 bNewSheet ( rItem.bNewSheet )
542 {
543 DBG_ASSERT(rItem.pSaveData, "pSaveData");
544 pSaveData = new ScDPSaveData(*rItem.pSaveData);
545 }
546
547 //------------------------------------------------------------------------
548
~ScPivotItem()549 __EXPORT ScPivotItem::~ScPivotItem()
550 {
551 delete pSaveData;
552 }
553
554 //------------------------------------------------------------------------
555
GetValueText() const556 String __EXPORT ScPivotItem::GetValueText() const
557 {
558 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScPivotItem"));
559 }
560
561 //------------------------------------------------------------------------
562
operator ==(const SfxPoolItem & rItem) const563 int __EXPORT ScPivotItem::operator==( const SfxPoolItem& rItem ) const
564 {
565 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
566
567 const ScPivotItem& rPItem = (const ScPivotItem&)rItem;
568 DBG_ASSERT( pSaveData && rPItem.pSaveData, "pSaveData" );
569 return ( *pSaveData == *rPItem.pSaveData &&
570 aDestRange == rPItem.aDestRange &&
571 bNewSheet == rPItem.bNewSheet );
572 }
573
574 //------------------------------------------------------------------------
575
Clone(SfxItemPool *) const576 SfxPoolItem* __EXPORT ScPivotItem::Clone( SfxItemPool * ) const
577 {
578 return new ScPivotItem( *this );
579 }
580
581
582 // -----------------------------------------------------------------------
583 // ScSolveItem - Daten fuer den Solver-Dialog
584 // -----------------------------------------------------------------------
585
ScSolveItem(sal_uInt16 nWhichP,const ScSolveParam * pSolveData)586 ScSolveItem::ScSolveItem( sal_uInt16 nWhichP,
587 const ScSolveParam* pSolveData )
588 : SfxPoolItem ( nWhichP )
589 {
590 if ( pSolveData ) theSolveData = *pSolveData;
591 }
592
593 //------------------------------------------------------------------------
594
ScSolveItem(const ScSolveItem & rItem)595 ScSolveItem::ScSolveItem( const ScSolveItem& rItem )
596 : SfxPoolItem ( rItem ),
597 theSolveData ( rItem.theSolveData )
598 {
599 }
600
601 //------------------------------------------------------------------------
602
~ScSolveItem()603 __EXPORT ScSolveItem::~ScSolveItem()
604 {
605 }
606
607 //------------------------------------------------------------------------
608
GetValueText() const609 String __EXPORT ScSolveItem::GetValueText() const
610 {
611 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScSolveItem"));
612 }
613
614 //------------------------------------------------------------------------
615
operator ==(const SfxPoolItem & rItem) const616 int __EXPORT ScSolveItem::operator==( const SfxPoolItem& rItem ) const
617 {
618 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
619
620 const ScSolveItem& rPItem = (const ScSolveItem&)rItem;
621
622 return ( theSolveData == rPItem.theSolveData );
623 }
624
625 //------------------------------------------------------------------------
626
Clone(SfxItemPool *) const627 SfxPoolItem* __EXPORT ScSolveItem::Clone( SfxItemPool * ) const
628 {
629 return new ScSolveItem( *this );
630 }
631
632 // -----------------------------------------------------------------------
633 // ScTabOpItem - Daten fuer den TabOp-Dialog
634 // -----------------------------------------------------------------------
635
ScTabOpItem(sal_uInt16 nWhichP,const ScTabOpParam * pTabOpData)636 ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP,
637 const ScTabOpParam* pTabOpData )
638 : SfxPoolItem ( nWhichP )
639 {
640 if ( pTabOpData ) theTabOpData = *pTabOpData;
641 }
642
643 //------------------------------------------------------------------------
644
ScTabOpItem(const ScTabOpItem & rItem)645 ScTabOpItem::ScTabOpItem( const ScTabOpItem& rItem )
646 : SfxPoolItem ( rItem ),
647 theTabOpData ( rItem.theTabOpData )
648 {
649 }
650
651 //------------------------------------------------------------------------
652
~ScTabOpItem()653 __EXPORT ScTabOpItem::~ScTabOpItem()
654 {
655 }
656
657 //------------------------------------------------------------------------
658
GetValueText() const659 String __EXPORT ScTabOpItem::GetValueText() const
660 {
661 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScTabOpItem"));
662 }
663
664 //------------------------------------------------------------------------
665
operator ==(const SfxPoolItem & rItem) const666 int __EXPORT ScTabOpItem::operator==( const SfxPoolItem& rItem ) const
667 {
668 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
669
670 const ScTabOpItem& rPItem = (const ScTabOpItem&)rItem;
671
672 return ( theTabOpData == rPItem.theTabOpData );
673 }
674
675 //------------------------------------------------------------------------
676
Clone(SfxItemPool *) const677 SfxPoolItem* __EXPORT ScTabOpItem::Clone( SfxItemPool * ) const
678 {
679 return new ScTabOpItem( *this );
680 }
681
682
683 // -----------------------------------------------------------------------
684 // ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung
685 // -----------------------------------------------------------------------
686
ScCondFrmtItem(sal_uInt16 nWhichP,const ScConditionalFormat & rCondFrmt)687 ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP,
688 //! const ScConditionalFormat* pCondFrmt )
689 const ScConditionalFormat& rCondFrmt )
690 : SfxPoolItem ( nWhichP ),
691 theCondFrmtData ( rCondFrmt ) //!
692 {
693 //! if ( pCondFrmt ) theCondFrmtData = *pCondFrmt;
694 }
695
696 //------------------------------------------------------------------------
697
ScCondFrmtItem(const ScCondFrmtItem & rItem)698 ScCondFrmtItem::ScCondFrmtItem( const ScCondFrmtItem& rItem )
699 : SfxPoolItem ( rItem ),
700 theCondFrmtData ( rItem.theCondFrmtData )
701 {
702 }
703
704 //------------------------------------------------------------------------
705
~ScCondFrmtItem()706 __EXPORT ScCondFrmtItem::~ScCondFrmtItem()
707 {
708 }
709
710 //------------------------------------------------------------------------
711
GetValueText() const712 String __EXPORT ScCondFrmtItem::GetValueText() const
713 {
714 return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScCondFrmtItem"));
715 }
716
717 //------------------------------------------------------------------------
718
operator ==(const SfxPoolItem & rItem) const719 int __EXPORT ScCondFrmtItem::operator==( const SfxPoolItem& rItem ) const
720 {
721 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
722
723 const ScCondFrmtItem& rPItem = (const ScCondFrmtItem&)rItem;
724
725 return ( theCondFrmtData == rPItem.theCondFrmtData );
726 }
727
728 //------------------------------------------------------------------------
729
Clone(SfxItemPool *) const730 SfxPoolItem* __EXPORT ScCondFrmtItem::Clone( SfxItemPool * ) const
731 {
732 return new ScCondFrmtItem( *this );
733 }
734