LibreOffice Module sc (master)  1
attrib.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <com/sun/star/util/CellProtection.hpp>
21 
22 #include <scitems.hxx>
23 
24 #include <editeng/editeng.hxx>
25 #include <editeng/editobj.hxx>
26 #include <editeng/eerdll.hxx>
27 #include <editeng/borderline.hxx>
28 #include <editeng/itemtype.hxx>
29 
30 #include <libxml/xmlwriter.h>
31 
32 #include <attrib.hxx>
33 #include <global.hxx>
34 #include <editutil.hxx>
35 #include <mid.h>
36 #include <globstr.hrc>
37 #include <scresid.hxx>
38 #include <textuno.hxx>
39 
40 using namespace com::sun::star;
41 
42 
44 
48 bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther )
49 {
50 
51  if (!pThis)
52  return false;
53  if (!pOther)
54  return true;
55 
56  sal_uInt16 nThisSize = pThis->GetScaledWidth();
57  sal_uInt16 nOtherSize = pOther->GetScaledWidth();
58 
59  if (nThisSize > nOtherSize)
60  return true;
61  else if (nThisSize < nOtherSize)
62  return false;
63  else
64  {
65  if ( pOther->GetInWidth() && !pThis->GetInWidth() )
66  return true;
67  else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
68  return false;
69  else
70  {
71  return true; // FIXME: What is this?
72  }
73  }
74 }
75 
83  nColMerge(0),
84  nRowMerge(0)
85 {}
86 
89  nColMerge(nCol),
90  nRowMerge(nRow)
91 {}
92 
95 {
96  nColMerge = rItem.nColMerge;
97  nRowMerge = rItem.nRowMerge;
98 }
99 
101 {
102 }
103 
104 bool ScMergeAttr::operator==( const SfxPoolItem& rItem ) const
105 {
106  return SfxPoolItem::operator==(rItem)
107  && (nColMerge == static_cast<const ScMergeAttr&>(rItem).nColMerge)
108  && (nRowMerge == static_cast<const ScMergeAttr&>(rItem).nRowMerge);
109 }
110 
112 {
113  return new ScMergeAttr(*this);
114 }
115 
117 {
118  (void)xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeAttr"));
119  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("col-merge"), BAD_CAST(OString::number(GetColMerge()).getStr()));
120  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("row-merge"), BAD_CAST(OString::number(GetRowMerge()).getStr()));
121  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("merged"), BAD_CAST(OString::boolean(IsMerged()).getStr()));
122  (void)xmlTextWriterEndElement(pWriter);
123 }
124 
130 {
131 }
132 
134  SfxInt16Item(ATTR_MERGE_FLAG, static_cast<sal_Int16>(nFlags))
135 {
136 }
137 
139 {
140 }
141 
143 {
144  return new ScMergeFlagAttr(*this);
145 }
146 
148 {
149  return bool(GetValue() & ScMF::Button);
150 }
151 
153 {
154  return bool(GetValue() & ScMF::ButtonPopup);
155 }
156 
158 {
159  (void)xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeFlagAttr"));
160  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("overlapped"), BAD_CAST(OString::boolean(IsOverlapped()).getStr()));
161  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("hor_overlapped"), BAD_CAST(OString::boolean(IsHorOverlapped()).getStr()));
162  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("ver_overlapped"), BAD_CAST(OString::boolean(IsVerOverlapped()).getStr()));
163  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("autofilter"), BAD_CAST(OString::boolean(HasAutoFilter()).getStr()));
164  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("scenario"), BAD_CAST(OString::boolean(IsScenario()).getStr()));
165  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-button"), BAD_CAST(OString::boolean(HasPivotButton()).getStr()));
166  (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-popup-button"), BAD_CAST(OString::boolean(HasPivotPopupButton()).getStr()));
167  (void)xmlTextWriterEndElement(pWriter);
168 }
169 
175  bProtection(true),
176  bHideFormula(false),
177  bHideCell(false),
178  bHidePrint(false)
179 {
180 }
181 
182 ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula,
183  bool bHCell, bool bHPrint):
185  bProtection(bProtect),
186  bHideFormula(bHFormula),
187  bHideCell(bHCell),
188  bHidePrint(bHPrint)
189 {
190 }
191 
194 {
195  bProtection = rItem.bProtection;
196  bHideFormula = rItem.bHideFormula;
197  bHideCell = rItem.bHideCell;
198  bHidePrint = rItem.bHidePrint;
199 }
200 
202 {
203 }
204 
205 bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
206 {
207  nMemberId &= ~CONVERT_TWIPS;
208  switch ( nMemberId )
209  {
210  case 0 :
211  {
212  util::CellProtection aProtection;
213  aProtection.IsLocked = bProtection;
214  aProtection.IsFormulaHidden = bHideFormula;
215  aProtection.IsHidden = bHideCell;
216  aProtection.IsPrintHidden = bHidePrint;
217  rVal <<= aProtection;
218  break;
219  }
220  case MID_1 :
221  rVal <<= bProtection; break;
222  case MID_2 :
223  rVal <<= bHideFormula; break;
224  case MID_3 :
225  rVal <<= bHideCell; break;
226  case MID_4 :
227  rVal <<= bHidePrint; break;
228  default:
229  OSL_FAIL("Wrong MemberID!");
230  return false;
231  }
232 
233  return true;
234 }
235 
236 bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
237 {
238  bool bRet = false;
239  bool bVal = false;
240  nMemberId &= ~CONVERT_TWIPS;
241  switch ( nMemberId )
242  {
243  case 0 :
244  {
245  util::CellProtection aProtection;
246  if ( rVal >>= aProtection )
247  {
248  bProtection = aProtection.IsLocked;
249  bHideFormula = aProtection.IsFormulaHidden;
250  bHideCell = aProtection.IsHidden;
251  bHidePrint = aProtection.IsPrintHidden;
252  bRet = true;
253  }
254  else
255  {
256  OSL_FAIL("exception - wrong argument");
257  }
258  break;
259  }
260  case MID_1 :
261  bRet = (rVal >>= bVal); if (bRet) bProtection=bVal; break;
262  case MID_2 :
263  bRet = (rVal >>= bVal); if (bRet) bHideFormula=bVal; break;
264  case MID_3 :
265  bRet = (rVal >>= bVal); if (bRet) bHideCell=bVal; break;
266  case MID_4 :
267  bRet = (rVal >>= bVal); if (bRet) bHidePrint=bVal; break;
268  default:
269  OSL_FAIL("Wrong MemberID!");
270  }
271 
272  return bRet;
273 }
274 
276 {
277  const OUString aStrYes ( ScResId(STR_YES) );
278  const OUString aStrNo ( ScResId(STR_NO) );
279 
280  const OUString aValue = "("
281  + (bProtection ? aStrYes : aStrNo)
282  + ","
283  + (bHideFormula ? aStrYes : aStrNo)
284  + ","
285  + (bHideCell ? aStrYes : aStrNo)
286  + ","
287  + (bHidePrint ? aStrYes : aStrNo)
288  + ")";
289 
290  return aValue;
291 }
292 
294  (
295  SfxItemPresentation ePres,
296  MapUnit /* eCoreMetric */,
297  MapUnit /* ePresMetric */,
298  OUString& rText,
299  const IntlWrapper& /* rIntl */
300  ) const
301 {
302  const OUString aStrYes ( ScResId(STR_YES) );
303  const OUString aStrNo ( ScResId(STR_NO) );
304 
305  switch ( ePres )
306  {
307  case SfxItemPresentation::Nameless:
308  rText = GetValueText();
309  break;
310 
311  case SfxItemPresentation::Complete:
312  rText = ScResId(STR_PROTECTION)
313  + ": "
314  + (bProtection ? aStrYes : aStrNo)
315  + ", "
316  + ScResId(STR_FORMULAS)
317  + ": "
318  + (!bHideFormula ? aStrYes : aStrNo)
319  + ", "
320  + ScResId(STR_HIDE)
321  + ": "
322  + (bHideCell ? aStrYes : aStrNo)
323  + ", "
324  + ScResId(STR_PRINT)
325  + ": "
326  + (!bHidePrint ? aStrYes : aStrNo);
327  break;
328 
329  default: break;
330  }
331 
332  return true;
333 }
334 
335 bool ScProtectionAttr::operator==( const SfxPoolItem& rItem ) const
336 {
337  return SfxPoolItem::operator==(rItem)
338  && (bProtection == static_cast<const ScProtectionAttr&>(rItem).bProtection)
339  && (bHideFormula == static_cast<const ScProtectionAttr&>(rItem).bHideFormula)
340  && (bHideCell == static_cast<const ScProtectionAttr&>(rItem).bHideCell)
341  && (bHidePrint == static_cast<const ScProtectionAttr&>(rItem).bHidePrint);
342 }
343 
345 {
346  return new ScProtectionAttr(*this);
347 }
348 
350 {
351  bProtection = bProtect;
352 }
353 
354 void ScProtectionAttr::SetHideFormula( bool bHFormula)
355 {
356  bHideFormula = bHFormula;
357 }
358 
360 {
361  bHideCell = bHCell;
362 }
363 
365 {
366  bHidePrint = bHPrint;
367 }
368 
372 ScPageHFItem::ScPageHFItem( sal_uInt16 nWhichP )
373  : SfxPoolItem ( nWhichP )
374 {
375 }
376 
378  : SfxPoolItem ( rItem )
379 {
380  if ( rItem.pLeftArea )
381  pLeftArea = rItem.pLeftArea->Clone();
382  if ( rItem.pCenterArea )
383  pCenterArea = rItem.pCenterArea->Clone();
384  if ( rItem.pRightArea )
385  pRightArea = rItem.pRightArea->Clone();
386 }
387 
389 {
390 }
391 
392 bool ScPageHFItem::QueryValue( uno::Any& rVal, sal_uInt8 /* nMemberId */ ) const
393 {
396  xContent->Init(pLeftArea.get(), pCenterArea.get(), pRightArea.get());
397 
398  uno::Reference<sheet::XHeaderFooterContent> xCont(xContent);
399 
400  rVal <<= xCont;
401  return true;
402 }
403 
404 bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
405 {
406  bool bRet = false;
407  uno::Reference<sheet::XHeaderFooterContent> xContent;
408  if ( rVal >>= xContent )
409  {
410  if ( xContent.is() )
411  {
414  if (pImp.is())
415  {
416  const EditTextObject* pImpLeft = pImp->GetLeftEditObject();
417  pLeftArea.reset();
418  if (pImpLeft)
419  pLeftArea = pImpLeft->Clone();
420 
421  const EditTextObject* pImpCenter = pImp->GetCenterEditObject();
422  pCenterArea.reset();
423  if (pImpCenter)
424  pCenterArea = pImpCenter->Clone();
425 
426  const EditTextObject* pImpRight = pImp->GetRightEditObject();
427  pRightArea.reset();
428  if (pImpRight)
429  pRightArea = pImpRight->Clone();
430 
431  if ( !pLeftArea || !pCenterArea || !pRightArea )
432  {
433  // no Text with Null are left
435  if (!pLeftArea)
436  pLeftArea = aEngine.CreateTextObject();
437  if (!pCenterArea)
438  pCenterArea = aEngine.CreateTextObject();
439  if (!pRightArea)
440  pRightArea = aEngine.CreateTextObject();
441  }
442 
443  bRet = true;
444  }
445  }
446  }
447 
448  if (!bRet)
449  {
450  OSL_FAIL("exception - wrong argument");
451  }
452 
453  return true;
454 }
455 
456 bool ScPageHFItem::operator==( const SfxPoolItem& rItem ) const
457 {
458  assert(SfxPoolItem::operator==(rItem));
459 
460  const ScPageHFItem& r = static_cast<const ScPageHFItem&>(rItem);
461 
462  return ScGlobal::EETextObjEqual(pLeftArea.get(), r.pLeftArea.get())
465 }
466 
468 {
469  return new ScPageHFItem( *this );
470 }
471 
473 {
474  pLeftArea = rNew.Clone();
475 }
476 
478 {
479  pCenterArea = rNew.Clone();
480 }
481 
483 {
484  pRightArea = rNew.Clone();
485 }
486 
491  : SfxEnumItem( nWhichP, VOBJ_MODE_SHOW )
492 {
493 }
494 
496  : SfxEnumItem( nWhichP, eMode )
497 {
498 }
499 
501 {
502 }
503 
505 (
506  SfxItemPresentation ePres,
507  MapUnit /* eCoreUnit */,
508  MapUnit /* ePresUnit */,
509  OUString& rText,
510  const IntlWrapper& /* rIntl */
511 ) const
512 {
513  OUString aDel(": ");
514  rText.clear();
515 
516  switch ( ePres )
517  {
518  case SfxItemPresentation::Complete:
519  switch( Which() )
520  {
522  rText = ScResId(STR_VOBJ_CHART) + aDel;
523  break;
524 
526  rText = ScResId(STR_VOBJ_OBJECT) + aDel;
527  break;
528 
530  rText = ScResId(STR_VOBJ_DRAWINGS) + aDel;
531  break;
532 
533  default: break;
534  }
535  [[fallthrough]];
536  case SfxItemPresentation::Nameless:
537  if (GetValue() == VOBJ_MODE_SHOW)
538  rText += ScResId(STR_VOBJ_MODE_SHOW);
539  else
540  rText += ScResId(STR_VOBJ_MODE_HIDE);
541  return true;
542 
543  default: break;
544  // added to avoid warnings
545  }
546 
547  return false;
548 }
549 
551 {
552  return 2;
553 }
554 
556 {
557  return new ScViewObjectModeItem( *this );
558 }
559 
562  mnWidth( 0 ),
563  mnHeight( 0 )
564 {
565 }
566 
567 ScPageScaleToItem::ScPageScaleToItem( sal_uInt16 nWidth, sal_uInt16 nHeight ) :
569  mnWidth( nWidth ),
570  mnHeight( nHeight )
571 {
572 }
573 
575 {
576 }
577 
579 {
580  return new ScPageScaleToItem( *this );
581 }
582 
584 {
585  assert(SfxPoolItem::operator==(rCmp));
586  const ScPageScaleToItem& rPageCmp = static_cast< const ScPageScaleToItem& >( rCmp );
587  return (mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight);
588 }
589 
590 namespace {
591 void lclAppendScalePageCount( OUString& rText, sal_uInt16 nPages )
592 {
593  rText += ": ";
594  if( nPages )
595  {
596  OUString aPages(ScResId(STR_SCATTR_PAGE_SCALE_PAGES, nPages));
597  rText += aPages.replaceFirst( "%1", OUString::number( nPages ) );
598  }
599  else
600  rText += ScResId( STR_SCATTR_PAGE_SCALE_AUTO );
601 }
602 } // namespace
603 
605  SfxItemPresentation ePres, MapUnit, MapUnit, OUString& rText, const IntlWrapper& ) const
606 {
607  rText.clear();
608  if( !IsValid())
609  return false;
610 
611  OUString aName( ScResId( STR_SCATTR_PAGE_SCALETO ) );
612  OUString aValue( ScResId( STR_SCATTR_PAGE_SCALE_WIDTH ) );
613  lclAppendScalePageCount( aValue, mnWidth );
614  aValue += ", " + ScResId( STR_SCATTR_PAGE_SCALE_HEIGHT );
615  lclAppendScalePageCount( aValue, mnHeight );
616 
617  switch( ePres )
618  {
619  case SfxItemPresentation::Nameless:
620  rText = aValue;
621  return true;
622 
623  case SfxItemPresentation::Complete:
624  rText = aName + " (" + aValue + ")";
625  return true;
626 
627  default:
628  OSL_FAIL( "ScPageScaleToItem::GetPresentation - unknown presentation mode" );
629  }
630  return false;
631 }
632 
633 bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
634 {
635  bool bRet = true;
636  switch( nMemberId )
637  {
638  case SC_MID_PAGE_SCALETO_WIDTH: rAny <<= mnWidth; break;
639  case SC_MID_PAGE_SCALETO_HEIGHT: rAny <<= mnHeight; break;
640  default:
641  OSL_FAIL( "ScPageScaleToItem::QueryValue - unknown member ID" );
642  bRet = false;
643  }
644  return bRet;
645 }
646 
647 bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
648 {
649  bool bRet = false;
650  switch( nMemberId )
651  {
652  case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
653  case SC_MID_PAGE_SCALETO_HEIGHT: bRet = rAny >>= mnHeight; break;
654  default:
655  OSL_FAIL( "ScPageScaleToItem::PutValue - unknown member ID" );
656  }
657  return bRet;
658 }
659 
662 {
663 }
664 
667 {
668  maIndex.insert(nIndex);
669 }
670 
673  maIndex( rIndex )
674 {
675 }
676 
679  maIndex( std::move(aIndex) )
680 {
681 }
682 
684 {
685 }
686 
687 bool ScCondFormatItem::operator==( const SfxPoolItem& rCmp ) const
688 {
689  if (!SfxPoolItem::operator==(rCmp))
690  return false;
691  auto const & other = static_cast<const ScCondFormatItem&>(rCmp);
692  if (maIndex.empty() && other.maIndex.empty())
693  return true;
694  // memcmp is faster than operator< on std::vector
695  return maIndex.size() == other.maIndex.size()
696  && memcmp(&maIndex.front(), &other.maIndex.front(), maIndex.size() * sizeof(sal_uInt32)) == 0;
697 }
698 
699 bool ScCondFormatItem::operator<( const SfxPoolItem& rCmp ) const
700 {
701  auto const & other = static_cast<const ScCondFormatItem&>(rCmp);
702  if ( maIndex.size() < other.maIndex.size() )
703  return true;
704  if ( maIndex.size() > other.maIndex.size() )
705  return false;
706  if (maIndex.empty() && other.maIndex.empty())
707  return false;
708  // memcmp is faster than operator< on std::vector
709  return memcmp(&maIndex.front(), &other.maIndex.front(), maIndex.size() * sizeof(sal_uInt32)) < 0;
710 }
711 
713 {
714  return new ScCondFormatItem(maIndex);
715 }
716 
718 {
719  (void)xmlTextWriterStartElement(pWriter, BAD_CAST("ScCondFormatItem"));
720  for (const auto& nItem : maIndex)
721  {
722  std::string aStrVal = std::to_string(nItem);
723  (void)xmlTextWriterStartElement(pWriter, BAD_CAST(aStrVal.c_str()));
724  (void)xmlTextWriterEndElement(pWriter);
725  }
726  (void)xmlTextWriterEndElement(pWriter);
727 }
728 
731 {
732 }
733 
735 {
736  return new ScRotateValueItem(GetValue());
737 }
738 
740  MapUnit eCoreMetric, MapUnit ePresMetric,
741  OUString& rText,
742  const IntlWrapper& rWrapper) const
743 {
744  bool bRet = SdrAngleItem::GetPresentation(SfxItemPresentation::Nameless, eCoreMetric, ePresMetric, rText, rWrapper);
745  if (bRet && ePresentation == SfxItemPresentation::Complete)
746  rText = ScResId(STR_TEXTORIENTANGLE) + " " + rText;
747  return bRet;
748 }
749 
751  : SfxBoolItem(ATTR_SHRINKTOFIT, bShrink)
752 {
753 }
754 
756 {
757  return new ScShrinkToFitCell(GetValue());
758 }
759 
761  MapUnit, MapUnit,
762  OUString& rText,
763  const IntlWrapper&) const
764 {
765  const char* pId = GetValue() ? STR_SHRINKTOFITCELL_ON : STR_SHRINKTOFITCELL_OFF;
766  rText = ScResId(pId);
767  return true;
768 }
769 
771  : SfxBoolItem(ATTR_STACKED, bStack)
772 {
773 }
774 
776 {
777  return new ScVerticalStackCell(GetValue());
778 }
779 
781  MapUnit, MapUnit,
782  OUString& rText,
783  const IntlWrapper&) const
784 {
785  const char* pId = GetValue() ? STR_VERTICALSTACKCELL_ON : STR_VERTICALSTACKCELL_OFF;
786  rText = ScResId(pId);
787  return true;
788 }
789 
791  : SfxBoolItem(ATTR_LINEBREAK, bStack)
792 {
793 }
794 
796 {
797  return new ScLineBreakCell(GetValue());
798 }
799 
801  MapUnit, MapUnit,
802  OUString& rText,
803  const IntlWrapper&) const
804 {
805  const char* pId = GetValue() ? STR_LINEBREAKCELL_ON : STR_LINEBREAKCELL_OFF;
806  rText = ScResId(pId);
807  return true;
808 }
809 
811  : SfxBoolItem(ATTR_HYPHENATE, bHyphenate)
812 {
813 }
814 
816 {
817  return new ScHyphenateCell(GetValue());
818 }
819 
821  MapUnit, MapUnit,
822  OUString& rText,
823  const IntlWrapper&) const
824 {
825  const char* pId = GetValue() ? STR_HYPHENATECELL_ON : STR_HYPHENATECELL_OFF;
826  rText = ScResId(pId);
827  return true;
828 }
829 
830 ScIndentItem::ScIndentItem(sal_uInt16 nIndent)
831  : SfxUInt16Item(ATTR_INDENT, nIndent)
832 {
833 }
834 
836 {
837  return new ScIndentItem(GetValue());
838 }
839 
841  MapUnit eCoreUnit, MapUnit,
842  OUString& rText,
843  const IntlWrapper& rIntl) const
844 {
845  auto nValue = GetValue();
846 
847  switch (ePres)
848  {
849  case SfxItemPresentation::Complete:
850  rText = ScResId(STR_INDENTCELL);
851  [[fallthrough]];
852  case SfxItemPresentation::Nameless:
853  rText += GetMetricText( nValue, eCoreUnit, MapUnit::MapPoint, &rIntl ) +
854  " " + EditResId(GetMetricId(MapUnit::MapPoint));
855  return true;
856  default: ; //prevent warning
857  }
858  return false;
859 }
860 
861 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool GetValue() const
virtual ~ScCondFormatItem() override
Definition: attrib.cxx:683
virtual bool operator==(const SfxPoolItem &) const override
Definition: attrib.cxx:104
double mnHeight
SCCOL GetColMerge() const
Definition: attrib.hxx:68
std::unique_ptr< EditTextObject > pLeftArea
Definition: attrib.hxx:169
virtual ~ScPageHFItem() override
Definition: attrib.cxx:388
bool bHideFormula
hide formula
Definition: attrib.hxx:116
virtual ~ScMergeFlagAttr() override
Definition: attrib.cxx:138
ScPageScaleToItem()
Default c'tor sets the width and height to 0.
Definition: attrib.cxx:560
static bool EETextObjEqual(const EditTextObject *pObj1, const EditTextObject *pObj2)
Definition: global.cxx:747
struct _xmlTextWriter * xmlTextWriterPtr
bool HasPivotPopupButton() const
Definition: attrib.cxx:152
#define MID_2
Definition: mid.h:24
ScVerticalStackCell(bool bStack=false)
Definition: attrib.cxx:770
virtual bool operator==(const SfxPoolItem &) const =0
std::string GetValue
bool bHideCell
hide cell
Definition: attrib.hxx:117
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const override
ScMergeFlagAttr * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:142
ScLineBreakCell(bool bLineBreak=false)
Definition: attrib.cxx:790
virtual bool QueryValue(css::uno::Any &rAny, sal_uInt8 nMemberId=0) const override
Definition: attrib.cxx:633
ScMF GetValue() const
Definition: attrib.hxx:97
const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH
Member ID for "page scale to width" value in QueryValue() and PutValue().
Definition: attrib.hxx:217
bool IsOverlapped() const
Definition: attrib.hxx:101
bool HasPivotButton() const
Definition: attrib.cxx:147
ScProtectionAttr()
Protection.
Definition: attrib.cxx:173
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:780
sal_uInt16 GetValue() const
#define MID_4
Definition: mid.h:26
virtual ScShrinkToFitCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:755
void SetHidePrint(bool bHPrint)
Definition: attrib.cxx:364
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrib.cxx:116
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
const sal_uInt8 SC_MID_PAGE_SCALETO_HEIGHT
Member ID for "page scale to height" value in QueryValue() and PutValue().
Definition: attrib.hxx:219
void SetProtection(bool bProtect)
Definition: attrib.cxx:349
ScShrinkToFitCell(bool bShrink=false)
Definition: attrib.cxx:750
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< ScPageScaleToItem > ATTR_PAGE_SCALETO(185)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
const Value & front() const
void SetLeftArea(const EditTextObject &rNew)
Definition: attrib.cxx:472
OUString GetValueText() const
Definition: attrib.cxx:275
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
SCROW nRowMerge
Definition: attrib.hxx:58
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrib.cxx:157
sal_uInt16 mnWidth
Definition: attrib.hxx:258
bool IsValid() const
Definition: attrib.hxx:242
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void SetCenterArea(const EditTextObject &rNew)
Definition: attrib.cxx:477
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:800
ScCondFormatIndexes maIndex
Definition: attrib.hxx:284
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: attrib.cxx:392
constexpr TypedWhichId< ScShrinkToFitCell > ATTR_SHRINKTOFIT(140)
virtual ScVerticalStackCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:775
#define SID_SCATTR_PAGE_OBJECTS
Definition: scitems.hxx:212
virtual ScPageHFItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:467
static SfxPoolItem * CreateDefault()
Definition: attrib.cxx:43
size_type size() const
static rtl::Reference< ScHeaderFooterContentObj > getImplementation(const css::uno::Reference< css::sheet::XHeaderFooterContent > &rObj)
Definition: textuno.cxx:151
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:294
virtual ScLineBreakCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:795
bool IsVerOverlapped() const
Definition: attrib.hxx:100
SfxItemPresentation
ScMergeFlagAttr()
MergeFlag.
Definition: attrib.cxx:128
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: attrib.cxx:205
virtual ScProtectionAttr * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:344
bool bProtection
protect cell
Definition: attrib.hxx:115
ScRotateValueItem(Degree100 nAngle)
Definition: attrib.cxx:729
virtual ~ScProtectionAttr() override
Definition: attrib.cxx:201
virtual bool operator<(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:699
virtual bool PutValue(const css::uno::Any &rAny, sal_uInt8 nMemberId) override
Definition: attrib.cxx:647
sal_Int16 SCCOL
Definition: types.hxx:21
bool ScHasPriority(const ::editeng::SvxBorderLine *pThis, const ::editeng::SvxBorderLine *pOther)
General Help Function.
Definition: attrib.cxx:48
virtual ScIndentItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:835
autofilter arrow
#define MID_3
Definition: mid.h:25
OUString GetMetricText(tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper *pIntl)
std::unique_ptr< EditTextObject > CreateTextObject()
ScHyphenateCell(bool bHyphenate=false)
Definition: attrib.cxx:810
OUString ScResId(const char *pId)
Definition: scdll.cxx:89
virtual ~ScViewObjectModeItem() override
Definition: attrib.cxx:500
virtual ScHyphenateCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:815
void SetRightArea(const EditTextObject &rNew)
Definition: attrib.cxx:482
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
bool empty() const
const char * GetMetricId(MapUnit eUnit)
std::unique_ptr< EditTextObject > pRightArea
Definition: attrib.hxx:171
std::unique_ptr< EditTextObject > pCenterArea
Definition: attrib.hxx:170
sal_uInt16 mnHeight
Definition: attrib.hxx:259
constexpr TypedWhichId< ScHyphenateCell > ATTR_HYPHENATE(125)
static SfxItemPool * CreatePool()
bool IsMerged() const
Definition: attrib.hxx:71
bool IsHorOverlapped() const
Definition: attrib.hxx:99
ScIndentItem(sal_uInt16 nIndent=0)
Definition: attrib.cxx:830
ScPageHFItem(sal_uInt16 nWhich)
ScPageHFItem - Dates from the Head and Foot lines.
Definition: attrib.cxx:372
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
sal_Int32 SCROW
Definition: types.hxx:17
#define MID_1
Definition: mid.h:23
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: attrib.cxx:404
ScMF
Definition: attrib.hxx:34
virtual ScRotateValueItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:734
void SetHideCell(bool bHCell)
Definition: attrib.cxx:359
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:222
unsigned char sal_uInt8
virtual bool operator==(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:687
OUString EditResId(const char *pId)
#define SID_SCATTR_PAGE_DRAWINGS
Definition: scitems.hxx:213
void SetHideFormula(bool bHFormula)
Definition: attrib.cxx:354
OUString aName
double mnWidth
virtual ~ScPageScaleToItem() override
Definition: attrib.cxx:574
Degree100 GetValue() const
constexpr TypedWhichId< ScCondFormatItem > ATTR_CONDITIONAL(154)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: attrib.cxx:236
SCCOL nColMerge
Definition: attrib.hxx:57
virtual ~ScMergeAttr() override
Definition: attrib.cxx:100
virtual bool operator==(const SfxPoolItem &) const override
Definition: attrib.cxx:456
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:739
virtual ScCondFormatItem * Clone(SfxItemPool *=nullptr) const override
Definition: attrib.cxx:712
uno::Reference< ucb::XContent > xContent
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:505
ScVObjMode
Definition: global.hxx:376
virtual bool operator==(const SfxPoolItem &) const override
Definition: attrib.cxx:335
bool bHidePrint
don't print cell
Definition: attrib.hxx:118
MapUnit
SCROW GetRowMerge() const
Definition: attrib.hxx:69
virtual bool operator==(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:583
bool IsScenario() const
Definition: attrib.hxx:105
bool HasAutoFilter() const
Definition: attrib.hxx:103
ScMergeAttr()
Item - Implementations.
Definition: attrib.cxx:81
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:840
std::pair< const_iterator, bool > insert(Value &&x)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:820
std::unique_ptr< EditTextObject > Clone() const
#define SID_SCATTR_PAGE_CHARTS
Definition: scitems.hxx:211
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrib.cxx:717
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:760
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
Definition: attrib.cxx:604
virtual ScViewObjectModeItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:555
virtual ScPageScaleToItem * Clone(SfxItemPool *=nullptr) const override
Definition: attrib.cxx:578
virtual ScMergeAttr * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:111
ScViewObjectModeItem(sal_uInt16 nWhich)
ScViewObjectModeItem - Display Mode of View Objects.
Definition: attrib.cxx:490
sal_Int16 nValue
virtual sal_uInt16 GetValueCount() const override
Definition: attrib.cxx:550
#define CONVERT_TWIPS
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo