48#include <osl/diagnose.h>
56#include <document.hxx>
116 SfxItemSet& GetCaptionSet() {
return aCaptionSet; }
117 void UpdateCaptionSet(
const SfxItemSet& rItemSet );
168 const OUString
aName;
238void ScCommentData::UpdateCaptionSet(
const SfxItemSet& rItemSet )
243 for( sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
245 if(aWhichIter.GetItemState(
false, &pPoolItem) == SfxItemState::SET)
264 aCaptionSet.Put(*pPoolItem);
278 return nEndCol1 >= nStartCol2 && nEndCol2 >= nStartCol1 &&
279 nEndRow1 >= nStartRow2 && nEndRow2 >= nStartRow1;
288 for (
bool bHasCell = aIter.
first(); bHasCell; bHasCell = aIter.
next())
294 if (nError != FormulaError::NONE)
298 return (nError != FormulaError::NONE);
303 OSL_ENSURE(
rDoc.
ValidColRow( nCol, nRow ),
"ScDetectiveFunc::GetDrawPos - invalid cell address" );
331 aPos.setX( aPos.X() * -1 );
353 if(1 == rPolyPolygon.
count())
371 bool bStartAlien = ( rStart.
Tab() !=
nTab );
372 bool bEndAlien = ( nEndTab !=
nTab );
374 if (bStartAlien && bEndAlien)
376 OSL_FAIL(
"bStartAlien && bEndAlien");
389 OSL_ENSURE(pPage,
"Page ?");
401 bool bObjStartAlien =
406 bool bStartHit = bStartAlien ? bObjStartAlien :
408 bool bEndHit = bEndAlien ? bObjEndAlien :
411 if ( bStartHit && bEndHit )
427 bool bObjStartAlien =
432 return !bObjStartAlien && !bObjEndAlien;
443 bool bFromOtherTab,
bool bRed,
449 bool bArea = ( nRefStartCol != nRefEndCol || nRefStartRow != nRefEndRow );
450 if (bArea && !bFromOtherTab)
459 pBox->SetMergedItemSetAndBroadcast(rData.
GetBoxSet());
463 pModel->
AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pBox ) );
466 pData->maStart.Set( nRefStartCol, nRefStartRow,
nTab);
467 pData->maEnd.Set( nRefEndCol, nRefEndRow,
nTab);
478 aStartPos =
Point( aEndPos.X() - 1000 * nPageSign, aEndPos.Y() - 1000 );
479 if (aStartPos.X() * nPageSign < 0)
480 aStartPos.AdjustX(2000 * nPageSign );
481 if (aStartPos.Y() < 0)
482 aStartPos.AdjustY(2000 );
487 if (bArea && !bFromOtherTab)
503 pArrow->SetMergedItemSetAndBroadcast(rAttrSet);
507 pModel->
AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pArrow ) );
511 pData->maStart.SetInvalid();
513 pData->maStart.Set( nRefStartCol, nRefStartRow,
nTab);
528 bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow );
536 pBox->SetMergedItemSetAndBroadcast(rData.
GetBoxSet());
540 pModel->
AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pBox ) );
543 pData->maStart.Set( nStartCol, nStartRow,
nTab);
544 pData->maEnd.Set( nEndCol, nEndRow,
nTab);
551 Point aEndPos( aStartPos.X() + 1000 * nPageSign, aStartPos.Y() - 1000 );
553 aEndPos.AdjustY(2000 );
573 pArrow->SetMergedItemSetAndBroadcast(rAttrSet);
577 pModel->
AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pArrow ) );
580 pData->maStart.Set( nStartCol, nStartRow,
nTab);
581 pData->maEnd.SetInvalid();
601 bool bError =
HasError( rRef, aErrorPos );
607 bAlien, bError, rData );
618 bool bError =
HasError( rRef, aErrorPos );
643 pCircle->SetMergedItemSetAndBroadcast(rAttrSet);
647 pModel->
AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pCircle ) );
651 pData->maEnd.SetInvalid();
663 OSL_ENSURE(pPage,
"Page ?");
671 size_t nDelCount = 0;
672 std::unique_ptr<SdrObject*[]> ppObj(
new SdrObject*[nObjCount]);
692 for (
size_t i=1;
i<=nDelCount; ++
i)
693 pModel->
AddCalcUndo(std::make_unique<SdrUndoDelObj>(*ppObj[nDelCount-
i]));
696 for (
size_t i=1;
i<=nDelCount; ++
i)
709#define SC_DET_TOLERANCE 50
723#undef SC_DET_TOLERANCE
734 OSL_ENSURE(pPage,
"Page ?");
742 size_t nDelCount = 0;
743 std::unique_ptr<SdrObject*[]> ppObj(
new SdrObject*[nObjCount]);
752 aObjRect = pSdrRectObj->GetLogicRect();
754 if (
RectIsPoints( aObjRect, aStartCorner, aEndCorner ) )
761 for (
size_t i=1;
i<=nDelCount; ++
i)
762 pModel->
AddCalcUndo( std::make_unique<SdrUndoRemoveObj>( *ppObj[nDelCount-
i] ) );
764 for (
size_t i=1;
i<=nDelCount; ++
i)
775 sal_uInt16 nResult = DET_INS_EMPTY;
778 for (
bool bHasCell = aIter.
first(); bHasCell; bHasCell = aIter.
next())
786 case DET_INS_INSERTED:
787 nResult = DET_INS_INSERTED;
789 case DET_INS_CONTINUE:
790 if (nResult != DET_INS_INSERTED)
791 nResult = DET_INS_CONTINUE;
793 case DET_INS_CIRCULAR:
794 if (nResult == DET_INS_EMPTY)
795 nResult = DET_INS_CIRCULAR;
810 return DET_INS_EMPTY;
814 return DET_INS_CIRCULAR;
820 sal_uInt16 nResult = DET_INS_EMPTY;
826 if (
DrawEntry( nCol, nRow, aRef, rData ))
828 nResult = DET_INS_INSERTED;
836 sal_uInt16 nSubResult;
846 case DET_INS_INSERTED:
847 nResult = DET_INS_INSERTED;
849 case DET_INS_CONTINUE:
850 if (nResult != DET_INS_INSERTED)
851 nResult = DET_INS_CONTINUE;
853 case DET_INS_CIRCULAR:
854 if (nResult == DET_INS_EMPTY)
855 nResult = DET_INS_CIRCULAR;
861 if (nResult != DET_INS_INSERTED)
862 nResult = DET_INS_CONTINUE;
872 sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
874 sal_uInt16 nResult = nLevel;
877 for (
bool bHasCell = aCellIter.
first(); bHasCell; bHasCell = aCellIter.
next())
894 OSL_ENSURE( nLevel<1000,
"Level" );
908 sal_uInt16 nResult = nLevel;
909 bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
938 nLevel+1, nDeleteLevel );
955 return DET_INS_EMPTY;
959 return DET_INS_CIRCULAR;
965 sal_uInt16 nResult = DET_INS_EMPTY;
970 bool bHasError =
false;
977 nResult = DET_INS_INSERTED;
982 rData, nLevel+1 ) == DET_INS_INSERTED)
983 nResult = DET_INS_INSERTED;
993 nResult = DET_INS_INSERTED;
1003 sal_uInt16 nResult = DET_INS_EMPTY;
1005 for (
bool bHas = aCellIter.
first(); bHas; bHas = aCellIter.
next())
1036 nResult = DET_INS_INSERTED;
1042 if (nResult == DET_INS_EMPTY)
1043 nResult = DET_INS_CIRCULAR;
1056 case DET_INS_INSERTED:
1057 nResult = DET_INS_INSERTED;
1059 case DET_INS_CONTINUE:
1060 if (nResult != DET_INS_INSERTED)
1061 nResult = DET_INS_CONTINUE;
1063 case DET_INS_CIRCULAR:
1064 if (nResult == DET_INS_EMPTY)
1065 nResult = DET_INS_CIRCULAR;
1071 if (nResult != DET_INS_INSERTED)
1072 nResult = DET_INS_CONTINUE;
1085 sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
1087 OSL_ENSURE( nLevel<1000,
"Level" );
1089 sal_uInt16 nResult = nLevel;
1090 bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
1093 for (
bool bHas = aCellIter.
first(); bHas; bHas = aCellIter.
next())
1124 else if ( !bRunning &&
1130 nLevel+1, nDeleteLevel );
1131 if (nTemp > nResult)
1152 sal_uInt16 nMaxLevel = 0;
1153 sal_uInt16 nResult = DET_INS_CONTINUE;
1154 while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
1156 aData.SetMaxLevel( nMaxLevel );
1161 return ( nResult == DET_INS_INSERTED );
1172 sal_uInt16 nMaxLevel = 0;
1173 sal_uInt16 nResult = DET_INS_CONTINUE;
1174 while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
1176 aData.SetMaxLevel( nMaxLevel );
1181 return ( nResult == DET_INS_INSERTED );
1197 aData.SetMaxLevel( 1000 );
1200 return ( nResult == DET_INS_INSERTED );
1209 sal_uInt16 nLevelCount =
FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 );
1213 return ( nLevelCount != 0 );
1226 return ( nLevelCount != 0 );
1245 OSL_ENSURE(pPage,
"Page ?");
1250 size_t nDelCount = 0;
1253 std::unique_ptr<SdrObject*[]> ppObj(
new SdrObject*[nObjCount]);
1270 for (
size_t i = 1;
i <= nDelCount; ++
i)
1271 pModel->
AddCalcUndo(std::make_unique<SdrUndoRemoveObj>(*ppObj[nDelCount -
i]));
1273 for (
size_t i = 1;
i <= nDelCount; ++
i)
1281 return (nDelCount != 0);
1291 OSL_ENSURE(pPage,
"Page ?");
1295 size_t nDelCount = 0;
1299 std::unique_ptr<SdrObject*[]> ppObj(
new SdrObject*[nObjCount]);
1307 bool bDoThis =
true;
1311 bDoThis = !bCaption;
1315 bDoThis = !bCaption && !bCircle;
1327 for (
size_t i=1;
i<=nDelCount; ++
i)
1328 pModel->
AddCalcUndo( std::make_unique<SdrUndoRemoveObj>( *ppObj[nDelCount-
i] ) );
1330 for (
size_t i=1;
i<=nDelCount; ++
i)
1338 return ( nDelCount != 0 );
1369 bool bMarkEmpty = !
pData->IsIgnoreBlank();
1370 SCROW nNextRow = nRow1;
1377 for ( nRow = nNextRow; nRow < nCellRow && nInsCount <
SC_DET_MAXCIRCLE; nRow++ )
1384 if (!
pData->IsDataValid(aCell, aCellIter.
GetPos()))
1390 nNextRow = nCellRow + 1;
1393 for ( nRow = nNextRow; nRow <= nRow2 && nInsCount <
SC_DET_MAXCIRCLE; nRow++ )
1402 pPattern = aAttrIter.
GetNext( nCol, nRow1, nRow2 );
1408 return ( bDeleted || nInsCount != 0 );
1412 vector<ScTokenRef>& rRefTokens)
1415 for (
bool bHas = aIter.
first(); bHas; bHas = aIter.
next())
1431 vector<ScTokenRef>& rRefTokens)
1433 vector<ScTokenRef> aSrcRange;
1434 aSrcRange.push_back(
1438 for (
bool bHas = aIter.
first(); bHas; bHas = aIter.
next())
1472 SdrPage* pPage = pModel->
GetPage(
static_cast< sal_uInt16
>( nObjTab ) );
1473 OSL_ENSURE( pPage,
"Page ?" );
1483 OSL_ENSURE( pNote && (pNote->
GetCaption() ==
pObject),
"ScDetectiveFunc::UpdateAllComments - invalid cell note" );
1489 aData.UpdateCaptionSet( aAttrColorSet );
1490 pObject->SetMergedItemSetAndBroadcast(
aData.GetCaptionSet() );
1493 pCaption->SetSpecialTextBoxShadow();
1494 pCaption->SetFixedTail();
1513 SdrPage* pPage = pModel->
GetPage(
static_cast< sal_uInt16
>( nObjTab ) );
1514 OSL_ENSURE( pPage,
"Page ?" );
1522 bool bArrow =
false;
1523 bool bError =
false;
1534 if (
HasError( aSource, aErrPos ) )
1567 if ( bArrow || bError )
1587 if (!pModel)
return;
1590 OSL_ENSURE(pPage,
"Page ?");
1594 if( !(
pObject &&
pObject->getSdrPageFromSdrObject() && (
pObject->getSdrPageFromSdrObject() ==
pObject->getParentSdrObjListFromSdrObject()->getSdrPageFromSdrObjList())) )
1598 const size_t nOrdNum =
pObject->GetOrdNum();
1626 bool bValidStart =
pData->maStart.IsValid();
1627 bool bValidEnd =
pData->maEnd.IsValid();
1635 else if ( bValidEnd )
1639 rSource =
pData->maStart;
1641 rPosition =
pData->maEnd;
1659 rPosition =
pData->maStart;
1668 rPosition =
pData->maStart;
1683 if (!pModel)
return;
1750 rDisplay +=
"\n--------\n";
Walk through all cells in an area.
ScFormulaCell * getFormulaCell()
const ScAddress & GetPos() const
const ScRefCellValue & getRefCellValue() const
ScDetectiveData(SdrModel *pModel)
sal_uInt16 GetMaxLevel() const
SfxItemSet & GetToTabSet()
SfxItemSet & GetCircleSet()
SfxItemSet & GetFromTabSet()
void SetMaxLevel(sal_uInt16 nVal)
SfxItemSet & GetArrowSet()
bool DrawAlienEntry(const ScRange &rRef, ScDetectiveData &rData)
static void InitializeColors()
sal_uInt16 FindPredLevelArea(const ScRange &rRef, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
bool DeleteSucc(SCCOL nCol, SCROW nRow)
bool ShowError(SCCOL nCol, SCROW nRow)
bool ShowPred(SCCOL nCol, SCROW nRow)
void DrawCircle(SCCOL nCol, SCROW nRow, ScDetectiveData &rData)
bool HasError(const ScRange &rRange, ScAddress &rErrPos)
static void UpdateAllComments(ScDocument &rDoc)
on all tables
void DeleteArrowsAt(SCCOL nCol, SCROW nRow, bool bDestPnt)
static Color GetArrowColor()
static bool IsColorsInitialized()
void UpdateAllArrowColors()
on all tables
sal_uInt16 FindSuccLevel(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
tools::Rectangle GetDrawRect(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
sal_uInt16 InsertErrorLevel(SCCOL nCol, SCROW nRow, ScDetectiveData &rData, sal_uInt16 nLevel)
bool DeletePred(SCCOL nCol, SCROW nRow)
bool DeleteAll(ScDetectiveDelete eWhat)
bool HasArrow(const ScAddress &rStart, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab)
void FindFrameForObject(const SdrObject *pObject, ScRange &rRange)
static bool IsNonAlienArrow(const SdrObject *pObject)
static void AppendChangTrackNoteSeparator(OUString &str)
sal_uInt16 FindPredLevel(SCCOL nCol, SCROW nRow, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
bool DrawEntry(SCCOL nCol, SCROW nRow, const ScRange &rRef, ScDetectiveData &rData)
DrawEntry / DrawAlienEntry check for existing arrows and errors.
void InsertArrow(SCCOL nCol, SCROW nRow, SCCOL nRefStartCol, SCROW nRefStartRow, SCCOL nRefEndCol, SCROW nRefEndRow, bool bFromOtherTab, bool bRed, ScDetectiveData &rData)
called from DrawEntry/DrawAlienEntry and InsertObject
void InsertObject(ScDetectiveObjType eType, const ScAddress &rPosition, const ScRange &rSource, bool bRedLine)
void GetAllSuccs(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector< ScTokenRef > &rRefTokens)
bool MarkInvalid(bool &rOverflow)
bool ShowSucc(SCCOL nCol, SCROW nRow)
sal_uInt16 InsertPredLevel(SCCOL nCol, SCROW nRow, ScDetectiveData &rData, sal_uInt16 nLevel)
void GetAllPreds(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector< ScTokenRef > &rRefTokens)
void DeleteBox(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void InsertToOtherTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bRed, ScDetectiveData &rData)
@ BottomRight
Bottom-right edge of the cell.
@ TopLeft
Top-left edge of the cell.
@ DetectiveArrow
Position inside cell for detective arrows.
ScDetectiveObjType GetDetectiveObjectType(SdrObject *pObject, SCTAB nObjTab, ScAddress &rPosition, ScRange &rSource, bool &rRedLine)
static Color GetErrorColor()
static Color nCommentColor
Point GetDrawPos(SCCOL nCol, SCROW nRow, DrawPosMode eMode) const
static bool bColorsInitialized
sal_uInt16 InsertSuccLevel(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScDetectiveData &rData, sal_uInt16 nLevel)
sal_uInt16 InsertPredLevelArea(const ScRange &rRef, ScDetectiveData &rData, sal_uInt16 nLevel)
bool DeleteCirclesAt(SCCOL nCol, SCROW nRow)
static Color GetCommentColor()
Iterator for references in a formula cell.
bool GetNextRef(ScRange &rRange)
formula::FormulaToken * GetNextRefToken()
const ScPatternAttr * GetNext(SCCOL &rCol, SCROW &rRow1, SCROW &rRow2)
SCROW SanitizeRow(SCROW nRow) const
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SCCOL SanitizeCol(SCCOL nCol) const
SC_DLLPUBLIC SCTAB GetTableCount() const
bool ValidColRow(SCCOL nCol, SCROW nRow) const
static ScDrawObjData * GetObjDataTab(SdrObject *pObj, SCTAB nTab)
static tools::Rectangle GetCellRect(const ScDocument &rDoc, const ScAddress &rPos, bool bMergedCell)
Returns the rectangle for the passed cell address in 1/100 mm.
static ScDrawObjData * GetObjData(SdrObject *pObj, bool bCreate=false)
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
static ScDrawObjData * GetNoteCaptionData(SdrObject *pObj, SCTAB nTab)
Returns the object data, if the passed object is a cell note caption.
void AddCalcUndo(std::unique_ptr< SdrUndoAction > pUndo)
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Additional class containing cell annotation data.
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
virtual SdrLayerID GetLayer() const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
bool areControlPointsUsed() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
static bool lcl_HasThickLine(const SdrObject &rObj)
static bool lcl_IsOtherTab(const basegfx::B2DPolyPolygon &rPolyPolygon)
static bool Intersect(SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1, SCCOL nStartCol2, SCROW nStartRow2, SCCOL nEndCol2, SCROW nEndRow2)
static bool RectIsPoints(const tools::Rectangle &rRect, const Point &rStart, const Point &rEnd)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
EmbeddedObjectRef * pObject
constexpr SdrLayerID SC_LAYER_INTERN(2)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
ScTokenRef createRefToken(const ScDocument &rDoc, const ScAddress &rAddr)
bool SC_DLLPUBLIC intersects(const ScDocument *pDoc, const ::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
void SC_DLLPUBLIC join(const ScDocument *pDoc, ::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
B2DPolygon createPolygonFromEllipse(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant=0)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
These need to be in global namespace just like their respective types are.
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
SdrOnOffItem makeSdrShadowItem(bool bShadow)
SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWYDIST(SDRATTR_SHADOW_FIRST+3)
constexpr sal_uInt16 SDRATTR_END(SDRATTR_WRITINGMODE2_LAST)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWXDIST(SDRATTR_SHADOW_FIRST+2)
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)