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  xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeAttr"));
119  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("col-merge"), BAD_CAST(OString::number(GetColMerge()).getStr()));
120  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("row-merge"), BAD_CAST(OString::number(GetRowMerge()).getStr()));
121  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("merged"), BAD_CAST(OString::boolean(IsMerged()).getStr()));
122  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  xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeFlagAttr"));
160  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("overlapped"), BAD_CAST(OString::boolean(IsOverlapped()).getStr()));
161  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("hor_overlapped"), BAD_CAST(OString::boolean(IsHorOverlapped()).getStr()));
162  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("ver_overlapped"), BAD_CAST(OString::boolean(IsVerOverlapped()).getStr()));
163  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("autofilter"), BAD_CAST(OString::boolean(HasAutoFilter()).getStr()));
164  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("scenario"), BAD_CAST(OString::boolean(IsScenario()).getStr()));
165  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-button"), BAD_CAST(OString::boolean(HasPivotButton()).getStr()));
166  xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-popup-button"), BAD_CAST(OString::boolean(HasPivotPopupButton()).getStr()));
167  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.get());
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  break;
543 
544  default: break;
545  // added to avoid warnings
546  }
547 
548  return false;
549 }
550 
552 {
553  return 2;
554 }
555 
557 {
558  return new ScViewObjectModeItem( *this );
559 }
560 
563  mnWidth( 0 ),
564  mnHeight( 0 )
565 {
566 }
567 
568 ScPageScaleToItem::ScPageScaleToItem( sal_uInt16 nWidth, sal_uInt16 nHeight ) :
570  mnWidth( nWidth ),
571  mnHeight( nHeight )
572 {
573 }
574 
576 {
577 }
578 
580 {
581  return new ScPageScaleToItem( *this );
582 }
583 
585 {
586  assert(SfxPoolItem::operator==(rCmp));
587  const ScPageScaleToItem& rPageCmp = static_cast< const ScPageScaleToItem& >( rCmp );
588  return (mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight);
589 }
590 
591 namespace {
592 void lclAppendScalePageCount( OUString& rText, sal_uInt16 nPages )
593 {
594  rText += ": ";
595  if( nPages )
596  {
597  OUString aPages(ScResId(STR_SCATTR_PAGE_SCALE_PAGES, nPages));
598  rText += aPages.replaceFirst( "%1", OUString::number( nPages ) );
599  }
600  else
601  rText += ScResId( STR_SCATTR_PAGE_SCALE_AUTO );
602 }
603 } // namespace
604 
606  SfxItemPresentation ePres, MapUnit, MapUnit, OUString& rText, const IntlWrapper& ) const
607 {
608  rText.clear();
609  if( !IsValid())
610  return false;
611 
612  OUString aName( ScResId( STR_SCATTR_PAGE_SCALETO ) );
613  OUString aValue( ScResId( STR_SCATTR_PAGE_SCALE_WIDTH ) );
614  lclAppendScalePageCount( aValue, mnWidth );
615  aValue += ", " + ScResId( STR_SCATTR_PAGE_SCALE_HEIGHT );
616  lclAppendScalePageCount( aValue, mnHeight );
617 
618  switch( ePres )
619  {
620  case SfxItemPresentation::Nameless:
621  rText = aValue;
622  return true;
623  break;
624 
625  case SfxItemPresentation::Complete:
626  rText = aName + " (" + aValue + ")";
627  return true;
628  break;
629 
630  default:
631  OSL_FAIL( "ScPageScaleToItem::GetPresentation - unknown presentation mode" );
632  }
633  return false;
634 }
635 
636 bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
637 {
638  bool bRet = true;
639  switch( nMemberId )
640  {
641  case SC_MID_PAGE_SCALETO_WIDTH: rAny <<= mnWidth; break;
642  case SC_MID_PAGE_SCALETO_HEIGHT: rAny <<= mnHeight; break;
643  default:
644  OSL_FAIL( "ScPageScaleToItem::QueryValue - unknown member ID" );
645  bRet = false;
646  }
647  return bRet;
648 }
649 
650 bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
651 {
652  bool bRet = false;
653  switch( nMemberId )
654  {
655  case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
656  case SC_MID_PAGE_SCALETO_HEIGHT: bRet = rAny >>= mnHeight; break;
657  default:
658  OSL_FAIL( "ScPageScaleToItem::PutValue - unknown member ID" );
659  }
660  return bRet;
661 }
662 
665 {
666 }
667 
670 {
671  maIndex.insert(nIndex);
672 }
673 
676  maIndex( rIndex )
677 {
678 }
679 
682  maIndex( std::move(aIndex) )
683 {
684 }
685 
687 {
688 }
689 
690 bool ScCondFormatItem::operator==( const SfxPoolItem& rCmp ) const
691 {
692  if (!SfxPoolItem::operator==(rCmp))
693  return false;
694  auto const & other = static_cast<const ScCondFormatItem&>(rCmp);
695  if (maIndex.empty() && other.maIndex.empty())
696  return true;
697  // memcmp is faster than operator< on std::vector
698  return maIndex.size() == other.maIndex.size()
699  && memcmp(&maIndex.front(), &other.maIndex.front(), maIndex.size() * sizeof(sal_uInt32)) == 0;
700 }
701 
702 bool ScCondFormatItem::operator<( const SfxPoolItem& rCmp ) const
703 {
704  auto const & other = static_cast<const ScCondFormatItem&>(rCmp);
705  if ( maIndex.size() < other.maIndex.size() )
706  return true;
707  if ( maIndex.size() > other.maIndex.size() )
708  return false;
709  if (maIndex.empty() && other.maIndex.empty())
710  return false;
711  // memcmp is faster than operator< on std::vector
712  return memcmp(&maIndex.front(), &other.maIndex.front(), maIndex.size() * sizeof(sal_uInt32)) < 0;
713 }
714 
716 {
717  return new ScCondFormatItem(maIndex);
718 }
719 
721 {
722  xmlTextWriterStartElement(pWriter, BAD_CAST("ScCondFormatItem"));
723  for (const auto& nItem : maIndex)
724  {
725  std::string aStrVal = std::to_string(nItem);
726  xmlTextWriterStartElement(pWriter, BAD_CAST(aStrVal.c_str()));
727  xmlTextWriterEndElement(pWriter);
728  }
729  xmlTextWriterEndElement(pWriter);
730 }
731 
734 {
735 }
736 
738 {
739  return new ScRotateValueItem(GetValue());
740 }
741 
743  MapUnit eCoreMetric, MapUnit ePresMetric,
744  OUString& rText,
745  const IntlWrapper& rWrapper) const
746 {
747  bool bRet = SdrAngleItem::GetPresentation(SfxItemPresentation::Nameless, eCoreMetric, ePresMetric, rText, rWrapper);
748  if (bRet && ePresentation == SfxItemPresentation::Complete)
749  rText = ScResId(STR_TEXTORIENTANGLE) + " " + rText;
750  return bRet;
751 }
752 
754  : SfxBoolItem(ATTR_SHRINKTOFIT, bShrink)
755 {
756 }
757 
759 {
760  return new ScShrinkToFitCell(GetValue());
761 }
762 
764  MapUnit, MapUnit,
765  OUString& rText,
766  const IntlWrapper&) const
767 {
768  const char* pId = GetValue() ? STR_SHRINKTOFITCELL_ON : STR_SHRINKTOFITCELL_OFF;
769  rText = ScResId(pId);
770  return true;
771 }
772 
774  : SfxBoolItem(ATTR_STACKED, bStack)
775 {
776 }
777 
779 {
780  return new ScVerticalStackCell(GetValue());
781 }
782 
784  MapUnit, MapUnit,
785  OUString& rText,
786  const IntlWrapper&) const
787 {
788  const char* pId = GetValue() ? STR_VERTICALSTACKCELL_ON : STR_VERTICALSTACKCELL_OFF;
789  rText = ScResId(pId);
790  return true;
791 }
792 
794  : SfxBoolItem(ATTR_LINEBREAK, bStack)
795 {
796 }
797 
799 {
800  return new ScLineBreakCell(GetValue());
801 }
802 
804  MapUnit, MapUnit,
805  OUString& rText,
806  const IntlWrapper&) const
807 {
808  const char* pId = GetValue() ? STR_LINEBREAKCELL_ON : STR_LINEBREAKCELL_OFF;
809  rText = ScResId(pId);
810  return true;
811 }
812 
814  : SfxBoolItem(ATTR_HYPHENATE, bHyphenate)
815 {
816 }
817 
819 {
820  return new ScHyphenateCell(GetValue());
821 }
822 
824  MapUnit, MapUnit,
825  OUString& rText,
826  const IntlWrapper&) const
827 {
828  const char* pId = GetValue() ? STR_HYPHENATECELL_ON : STR_HYPHENATECELL_OFF;
829  rText = ScResId(pId);
830  return true;
831 }
832 
833 ScIndentItem::ScIndentItem(sal_uInt16 nIndent)
834  : SfxUInt16Item(ATTR_INDENT, nIndent)
835 {
836 }
837 
839 {
840  return new ScIndentItem(GetValue());
841 }
842 
844  MapUnit eCoreUnit, MapUnit,
845  OUString& rText,
846  const IntlWrapper& rIntl) const
847 {
848  auto nValue = GetValue();
849 
850  switch (ePres)
851  {
852  case SfxItemPresentation::Complete:
853  rText = ScResId(STR_INDENTCELL);
854  [[fallthrough]];
855  case SfxItemPresentation::Nameless:
856  rText += GetMetricText( nValue, eCoreUnit, MapUnit::MapPoint, &rIntl ) +
857  " " + EditResId(GetMetricId(MapUnit::MapPoint));
858  return true;
859  default: ; //prevent warning
860  }
861  return false;
862 }
863 
864 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool GetValue() const
virtual ~ScCondFormatItem() override
Definition: attrib.cxx:686
virtual bool operator==(const SfxPoolItem &) const override
Definition: attrib.cxx:104
double mnHeight
SCCOL GetColMerge() const
Definition: attrib.hxx:69
std::unique_ptr< EditTextObject > pLeftArea
Definition: attrib.hxx:170
virtual ~ScPageHFItem() override
Definition: attrib.cxx:388
bool bHideFormula
hide formula
Definition: attrib.hxx:117
virtual ~ScMergeFlagAttr() override
Definition: attrib.cxx:138
ScPageScaleToItem()
Default c'tor sets the width and height to 0.
Definition: attrib.cxx:561
static bool EETextObjEqual(const EditTextObject *pObj1, const EditTextObject *pObj2)
Definition: global.cxx:748
struct _xmlTextWriter * xmlTextWriterPtr
bool HasPivotPopupButton() const
Definition: attrib.cxx:152
#define MID_2
Definition: mid.h:24
ScVerticalStackCell(bool bStack=false)
Definition: attrib.cxx:773
virtual bool operator==(const SfxPoolItem &) const =0
std::string GetValue
bool bHideCell
hide cell
Definition: attrib.hxx:118
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:793
virtual bool QueryValue(css::uno::Any &rAny, sal_uInt8 nMemberId=0) const override
Definition: attrib.cxx:636
ScMF GetValue() const
Definition: attrib.hxx:98
const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH
Member ID for "page scale to width" value in QueryValue() and PutValue().
Definition: attrib.hxx:218
bool IsOverlapped() const
Definition: attrib.hxx:102
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:783
sal_uInt16 GetValue() const
#define MID_4
Definition: mid.h:26
virtual ScShrinkToFitCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:758
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:220
void SetProtection(bool bProtect)
Definition: attrib.cxx:349
ScShrinkToFitCell(bool bShrink=false)
Definition: attrib.cxx:753
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:59
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrib.cxx:157
sal_uInt16 mnWidth
Definition: attrib.hxx:259
bool IsValid() const
Definition: attrib.hxx:243
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:803
ScCondFormatIndexes maIndex
Definition: attrib.hxx:285
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:778
#define SID_SCATTR_PAGE_OBJECTS
Definition: scitems.hxx:213
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:157
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:798
bool IsVerOverlapped() const
Definition: attrib.hxx:101
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:116
virtual ~ScProtectionAttr() override
Definition: attrib.cxx:201
virtual bool operator<(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:702
virtual bool PutValue(const css::uno::Any &rAny, sal_uInt8 nMemberId) override
Definition: attrib.cxx:650
sal_Int16 SCCOL
Definition: types.hxx:22
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:838
autofilter arrow
#define MID_3
Definition: mid.h:25
std::unique_ptr< EditTextObject > CreateTextObject()
ScHyphenateCell(bool bHyphenate=false)
Definition: attrib.cxx:813
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
virtual ~ScViewObjectModeItem() override
Definition: attrib.cxx:500
virtual ScHyphenateCell * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:818
void SetRightArea(const EditTextObject &rNew)
Definition: attrib.cxx:482
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
bool empty() const
const char * GetMetricId(MapUnit eUnit)
OUString GetMetricText(long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper *pIntl)
std::unique_ptr< EditTextObject > pRightArea
Definition: attrib.hxx:172
std::unique_ptr< EditTextObject > pCenterArea
Definition: attrib.hxx:171
sal_uInt16 mnHeight
Definition: attrib.hxx:260
constexpr TypedWhichId< ScHyphenateCell > ATTR_HYPHENATE(125)
static SfxItemPool * CreatePool()
bool IsMerged() const
Definition: attrib.hxx:72
bool IsHorOverlapped() const
Definition: attrib.hxx:100
ScIndentItem(sal_uInt16 nIndent=0)
Definition: attrib.cxx:833
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:18
#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:35
virtual ScRotateValueItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:737
void SetHideCell(bool bHCell)
Definition: attrib.cxx:359
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:223
unsigned char sal_uInt8
virtual bool operator==(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:690
OUString EditResId(const char *pId)
#define SID_SCATTR_PAGE_DRAWINGS
Definition: scitems.hxx:214
void SetHideFormula(bool bHFormula)
Definition: attrib.cxx:354
OUString aName
double mnWidth
virtual ~ScPageScaleToItem() override
Definition: attrib.cxx:575
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:58
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:742
virtual ScCondFormatItem * Clone(SfxItemPool *=nullptr) const override
Definition: attrib.cxx:715
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:119
MapUnit
SCROW GetRowMerge() const
Definition: attrib.hxx:70
virtual bool operator==(const SfxPoolItem &rCmp) const override
Definition: attrib.cxx:584
bool IsScenario() const
Definition: attrib.hxx:106
bool HasAutoFilter() const
Definition: attrib.hxx:104
ScMergeAttr()
Item - Implementations.
Definition: attrib.cxx:81
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:843
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:823
std::unique_ptr< EditTextObject > Clone() const
#define SID_SCATTR_PAGE_CHARTS
Definition: scitems.hxx:212
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrib.cxx:720
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrib.cxx:763
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
Definition: attrib.cxx:605
virtual ScViewObjectModeItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: attrib.cxx:556
virtual ScPageScaleToItem * Clone(SfxItemPool *=nullptr) const override
Definition: attrib.cxx:579
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
ScRotateValueItem(sal_Int32 nAngle)
Definition: attrib.cxx:732
sal_Int16 nValue
virtual sal_uInt16 GetValueCount() const override
Definition: attrib.cxx:551
#define CONVERT_TWIPS