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