LibreOffice Module sc (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ScDetectiveFunc Class Reference

#include <detfunc.hxx>

Collaboration diagram for ScDetectiveFunc:
[legend]

Public Member Functions

 ScDetectiveFunc (ScDocument &rDocument, SCTAB nTable)
 
bool ShowSucc (SCCOL nCol, SCROW nRow)
 
bool ShowPred (SCCOL nCol, SCROW nRow)
 
bool ShowError (SCCOL nCol, SCROW nRow)
 
bool DeleteSucc (SCCOL nCol, SCROW nRow)
 
bool DeletePred (SCCOL nCol, SCROW nRow)
 
bool DeleteAll (ScDetectiveDelete eWhat)
 
bool DeleteCirclesAt (SCCOL nCol, SCROW nRow)
 
bool MarkInvalid (bool &rOverflow)
 
void GetAllPreds (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector< ScTokenRef > &rRefTokens)
 
void GetAllSuccs (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector< ScTokenRef > &rRefTokens)
 
void UpdateAllArrowColors ()
 on all tables More...
 
ScDetectiveObjType GetDetectiveObjectType (SdrObject *pObject, SCTAB nObjTab, ScAddress &rPosition, ScRange &rSource, bool &rRedLine)
 
void InsertObject (ScDetectiveObjType eType, const ScAddress &rPosition, const ScRange &rSource, bool bRedLine)
 

Static Public Member Functions

static void UpdateAllComments (ScDocument &rDoc)
 on all tables More...
 
static bool IsNonAlienArrow (const SdrObject *pObject)
 
static Color GetArrowColor ()
 
static Color GetErrorColor ()
 
static Color GetCommentColor ()
 
static void InitializeColors ()
 
static bool IsColorsInitialized ()
 
static void AppendChangTrackNoteSeparator (OUString &str)
 

Private Types

enum class  DrawPosMode {
  TopLeft ,
  BottomRight ,
  DetectiveArrow
}
 

Private Member Functions

Point GetDrawPos (SCCOL nCol, SCROW nRow, DrawPosMode eMode) const
 
tools::Rectangle GetDrawRect (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
 
tools::Rectangle GetDrawRect (SCCOL nCol, SCROW nRow) const
 
bool HasArrow (const ScAddress &rStart, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab)
 
void DeleteArrowsAt (SCCOL nCol, SCROW nRow, bool bDestPnt)
 
void DeleteBox (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
 
bool HasError (const ScRange &rRange, ScAddress &rErrPos)
 
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 More...
 
void InsertToOtherTab (SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bRed, ScDetectiveData &rData)
 
bool DrawEntry (SCCOL nCol, SCROW nRow, const ScRange &rRef, ScDetectiveData &rData)
 DrawEntry / DrawAlienEntry check for existing arrows and errors. More...
 
bool DrawAlienEntry (const ScRange &rRef, ScDetectiveData &rData)
 
void DrawCircle (SCCOL nCol, SCROW nRow, ScDetectiveData &rData)
 
sal_uInt16 InsertPredLevel (SCCOL nCol, SCROW nRow, ScDetectiveData &rData, sal_uInt16 nLevel)
 
sal_uInt16 InsertPredLevelArea (const ScRange &rRef, ScDetectiveData &rData, sal_uInt16 nLevel)
 
sal_uInt16 FindPredLevel (SCCOL nCol, SCROW nRow, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
 
sal_uInt16 FindPredLevelArea (const ScRange &rRef, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
 
sal_uInt16 InsertErrorLevel (SCCOL nCol, SCROW nRow, ScDetectiveData &rData, sal_uInt16 nLevel)
 
sal_uInt16 InsertSuccLevel (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScDetectiveData &rData, sal_uInt16 nLevel)
 
sal_uInt16 FindSuccLevel (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel)
 
void FindFrameForObject (const SdrObject *pObject, ScRange &rRange)
 
void Modified ()
 

Private Attributes

ScDocumentrDoc
 
SCTAB nTab
 

Static Private Attributes

static Color nArrowColor = Color(0)
 
static Color nErrorColor = Color(0)
 
static Color nCommentColor = Color(0)
 
static bool bColorsInitialized = false
 

Detailed Description

Definition at line 48 of file detfunc.hxx.

Member Enumeration Documentation

◆ DrawPosMode

enum class ScDetectiveFunc::DrawPosMode
strongprivate
Enumerator
TopLeft 

Top-left edge of the cell.

BottomRight 

Bottom-right edge of the cell.

DetectiveArrow 

Position inside cell for detective arrows.

Definition at line 58 of file detfunc.hxx.

Constructor & Destructor Documentation

◆ ScDetectiveFunc()

ScDetectiveFunc::ScDetectiveFunc ( ScDocument rDocument,
SCTAB  nTable 
)
inline

Definition at line 119 of file detfunc.hxx.

Member Function Documentation

◆ AppendChangTrackNoteSeparator()

void ScDetectiveFunc::AppendChangTrackNoteSeparator ( OUString &  str)
static

Definition at line 1748 of file detfunc.cxx.

Referenced by ScAccessibleCellBase::GetAllDisplayNote().

◆ DeleteAll()

bool ScDetectiveFunc::DeleteAll ( ScDetectiveDelete  eWhat)

◆ DeleteArrowsAt()

void ScDetectiveFunc::DeleteArrowsAt ( SCCOL  nCol,
SCROW  nRow,
bool  bDestPnt 
)
private

◆ DeleteBox()

void ScDetectiveFunc::DeleteBox ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2 
)
private

◆ DeleteCirclesAt()

bool ScDetectiveFunc::DeleteCirclesAt ( SCCOL  nCol,
SCROW  nRow 
)

◆ DeletePred()

bool ScDetectiveFunc::DeletePred ( SCCOL  nCol,
SCROW  nRow 
)

◆ DeleteSucc()

bool ScDetectiveFunc::DeleteSucc ( SCCOL  nCol,
SCROW  nRow 
)

◆ DrawAlienEntry()

bool ScDetectiveFunc::DrawAlienEntry ( const ScRange rRef,
ScDetectiveData rData 
)
private

◆ DrawCircle()

void ScDetectiveFunc::DrawCircle ( SCCOL  nCol,
SCROW  nRow,
ScDetectiveData rData 
)
private

◆ DrawEntry()

bool ScDetectiveFunc::DrawEntry ( SCCOL  nCol,
SCROW  nRow,
const ScRange rRef,
ScDetectiveData rData 
)
private

DrawEntry / DrawAlienEntry check for existing arrows and errors.

Definition at line 593 of file detfunc.cxx.

References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), HasArrow(), HasError(), InsertArrow(), nTab, ScAddress::Row(), and ScAddress::Tab().

Referenced by InsertErrorLevel(), InsertPredLevel(), and InsertSuccLevel().

◆ FindFrameForObject()

void ScDetectiveFunc::FindFrameForObject ( const SdrObject pObject,
ScRange rRange 
)
private

◆ FindPredLevel()

sal_uInt16 ScDetectiveFunc::FindPredLevel ( SCCOL  nCol,
SCROW  nRow,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private

◆ FindPredLevelArea()

sal_uInt16 ScDetectiveFunc::FindPredLevelArea ( const ScRange rRef,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private

◆ FindSuccLevel()

sal_uInt16 ScDetectiveFunc::FindSuccLevel ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private

◆ GetAllPreds()

void ScDetectiveFunc::GetAllPreds ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
::std::vector< ScTokenRef > &  rRefTokens 
)

◆ GetAllSuccs()

void ScDetectiveFunc::GetAllSuccs ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
::std::vector< ScTokenRef > &  rRefTokens 
)

◆ GetArrowColor()

Color ScDetectiveFunc::GetArrowColor ( )
static

◆ GetCommentColor()

Color ScDetectiveFunc::GetCommentColor ( )
static

◆ GetDetectiveObjectType()

ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType ( SdrObject pObject,
SCTAB  nObjTab,
ScAddress rPosition,
ScRange rSource,
bool &  rRedLine 
)

◆ GetDrawPos()

Point ScDetectiveFunc::GetDrawPos ( SCCOL  nCol,
SCROW  nRow,
DrawPosMode  eMode 
) const
private

◆ GetDrawRect() [1/2]

tools::Rectangle ScDetectiveFunc::GetDrawRect ( SCCOL  nCol,
SCROW  nRow 
) const
private
Returns
the drawing layer rectangle for the passed cell address.

Definition at line 345 of file detfunc.cxx.

References GetDrawRect().

◆ GetDrawRect() [2/2]

tools::Rectangle ScDetectiveFunc::GetDrawRect ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2 
) const
private
Returns
the drawing layer rectangle for the passed cell range.

Definition at line 336 of file detfunc.cxx.

References BottomRight, GetDrawPos(), tools::Rectangle::Normalize(), and TopLeft.

Referenced by DeleteArrowsAt(), DeleteBox(), GetDrawRect(), HasArrow(), InsertArrow(), and InsertToOtherTab().

◆ GetErrorColor()

Color ScDetectiveFunc::GetErrorColor ( )
static

◆ HasArrow()

bool ScDetectiveFunc::HasArrow ( const ScAddress rStart,
SCCOL  nEndCol,
SCROW  nEndRow,
SCTAB  nEndTab 
)
private

◆ HasError()

bool ScDetectiveFunc::HasError ( const ScRange rRange,
ScAddress rErrPos 
)
private

◆ InitializeColors()

void ScDetectiveFunc::InitializeColors ( )
static

◆ InsertArrow()

void ScDetectiveFunc::InsertArrow ( SCCOL  nCol,
SCROW  nRow,
SCCOL  nRefStartCol,
SCROW  nRefStartRow,
SCCOL  nRefEndCol,
SCROW  nRefEndRow,
bool  bFromOtherTab,
bool  bRed,
ScDetectiveData rData 
)
private

◆ InsertErrorLevel()

sal_uInt16 ScDetectiveFunc::InsertErrorLevel ( SCCOL  nCol,
SCROW  nRow,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private

◆ InsertObject()

void ScDetectiveFunc::InsertObject ( ScDetectiveObjType  eType,
const ScAddress rPosition,
const ScRange rSource,
bool  bRedLine 
)

◆ InsertPredLevel()

sal_uInt16 ScDetectiveFunc::InsertPredLevel ( SCCOL  nCol,
SCROW  nRow,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private

◆ InsertPredLevelArea()

sal_uInt16 ScDetectiveFunc::InsertPredLevelArea ( const ScRange rRef,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private

◆ InsertSuccLevel()

sal_uInt16 ScDetectiveFunc::InsertSuccLevel ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private

◆ InsertToOtherTab()

void ScDetectiveFunc::InsertToOtherTab ( SCCOL  nStartCol,
SCROW  nStartRow,
SCCOL  nEndCol,
SCROW  nEndRow,
bool  bRed,
ScDetectiveData rData 
)
private

◆ IsColorsInitialized()

bool ScDetectiveFunc::IsColorsInitialized ( )
static

Definition at line 1743 of file detfunc.cxx.

References bColorsInitialized.

Referenced by ScModule::ConfigurationChanged().

◆ IsNonAlienArrow()

bool ScDetectiveFunc::IsNonAlienArrow ( const SdrObject pObject)
static

◆ MarkInvalid()

bool ScDetectiveFunc::MarkInvalid ( bool &  rOverflow)

◆ Modified()

void ScDetectiveFunc::Modified ( )
private

◆ ShowError()

bool ScDetectiveFunc::ShowError ( SCCOL  nCol,
SCROW  nRow 
)

◆ ShowPred()

bool ScDetectiveFunc::ShowPred ( SCCOL  nCol,
SCROW  nRow 
)

◆ ShowSucc()

bool ScDetectiveFunc::ShowSucc ( SCCOL  nCol,
SCROW  nRow 
)

◆ UpdateAllArrowColors()

void ScDetectiveFunc::UpdateAllArrowColors ( )

◆ UpdateAllComments()

void ScDetectiveFunc::UpdateAllComments ( ScDocument rDoc)
static

Member Data Documentation

◆ bColorsInitialized

bool ScDetectiveFunc::bColorsInitialized = false
staticprivate

◆ nArrowColor

Color ScDetectiveFunc::nArrowColor = Color(0)
staticprivate

Definition at line 50 of file detfunc.hxx.

Referenced by GetArrowColor(), and InitializeColors().

◆ nCommentColor

Color ScDetectiveFunc::nCommentColor = Color(0)
staticprivate

Definition at line 52 of file detfunc.hxx.

Referenced by GetCommentColor(), and InitializeColors().

◆ nErrorColor

Color ScDetectiveFunc::nErrorColor = Color(0)
staticprivate

Definition at line 51 of file detfunc.hxx.

Referenced by GetErrorColor(), and InitializeColors().

◆ nTab

SCTAB ScDetectiveFunc::nTab
private

◆ rDoc

ScDocument& ScDetectiveFunc::rDoc
private

The documentation for this class was generated from the following files: