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  DrawPosMode {
  DrawPosMode::TopLeft,
  DrawPosMode::BottomRight,
  DrawPosMode::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 49 of file detfunc.hxx.

Member Enumeration Documentation

enum 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 59 of file detfunc.hxx.

Constructor & Destructor Documentation

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

Definition at line 120 of file detfunc.hxx.

Member Function Documentation

void ScDetectiveFunc::AppendChangTrackNoteSeparator ( OUString &  str)
static

Definition at line 1757 of file detfunc.cxx.

Referenced by ScAccessibleCellBase::GetAllDisplayNote().

bool ScDetectiveFunc::DeleteAll ( ScDetectiveDelete  eWhat)
void ScDetectiveFunc::DeleteArrowsAt ( SCCOL  nCol,
SCROW  nRow,
bool  bDestPnt 
)
private
void ScDetectiveFunc::DeleteBox ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2 
)
private
bool ScDetectiveFunc::DeleteCirclesAt ( SCCOL  nCol,
SCROW  nRow 
)
bool ScDetectiveFunc::DeletePred ( SCCOL  nCol,
SCROW  nRow 
)

Definition at line 1228 of file detfunc.cxx.

References FindPredLevel(), ScDocument::GetDrawLayer(), and rDoc.

Referenced by ScDocFunc::DetectiveDelPred().

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

Definition at line 1215 of file detfunc.cxx.

References FindSuccLevel(), ScDocument::GetDrawLayer(), and rDoc.

Referenced by ScDocFunc::DetectiveDelSucc().

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

DrawEntry / DrawAlienEntry check for existing arrows and errors.

Definition at line 603 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().

void ScDetectiveFunc::FindFrameForObject ( const SdrObject pObject,
ScRange rRange 
)
private
sal_uInt16 ScDetectiveFunc::FindPredLevel ( SCCOL  nCol,
SCROW  nRow,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private
sal_uInt16 ScDetectiveFunc::FindPredLevelArea ( const ScRange rRef,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private
sal_uInt16 ScDetectiveFunc::FindSuccLevel ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
sal_uInt16  nLevel,
sal_uInt16  nDeleteLevel 
)
private
void ScDetectiveFunc::GetAllPreds ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
::std::vector< ScTokenRef > &  rRefTokens 
)
void ScDetectiveFunc::GetAllSuccs ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
::std::vector< ScTokenRef > &  rRefTokens 
)
Color ScDetectiveFunc::GetArrowColor ( )
static
Color ScDetectiveFunc::GetCommentColor ( )
static
ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType ( SdrObject pObject,
SCTAB  nObjTab,
ScAddress rPosition,
ScRange rSource,
bool &  rRedLine 
)
Point ScDetectiveFunc::GetDrawPos ( SCCOL  nCol,
SCROW  nRow,
DrawPosMode  eMode 
) const
private
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 346 of file detfunc.cxx.

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

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

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

Definition at line 355 of file detfunc.cxx.

References GetDrawRect().

Color ScDetectiveFunc::GetErrorColor ( )
static
bool ScDetectiveFunc::HasArrow ( const ScAddress rStart,
SCCOL  nEndCol,
SCROW  nEndRow,
SCTAB  nEndTab 
)
private
bool ScDetectiveFunc::HasError ( const ScRange rRange,
ScAddress rErrPos 
)
private
void ScDetectiveFunc::InitializeColors ( )
static
void ScDetectiveFunc::InsertArrow ( SCCOL  nCol,
SCROW  nRow,
SCCOL  nRefStartCol,
SCROW  nRefStartRow,
SCCOL  nRefEndCol,
SCROW  nRefEndRow,
bool  bFromOtherTab,
bool  bRed,
ScDetectiveData rData 
)
private
sal_uInt16 ScDetectiveFunc::InsertErrorLevel ( SCCOL  nCol,
SCROW  nRow,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private
void ScDetectiveFunc::InsertObject ( ScDetectiveObjType  eType,
const ScAddress rPosition,
const ScRange rSource,
bool  bRedLine 
)
sal_uInt16 ScDetectiveFunc::InsertPredLevel ( SCCOL  nCol,
SCROW  nRow,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private
sal_uInt16 ScDetectiveFunc::InsertPredLevelArea ( const ScRange rRef,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private
sal_uInt16 ScDetectiveFunc::InsertSuccLevel ( SCCOL  nCol1,
SCROW  nRow1,
SCCOL  nCol2,
SCROW  nRow2,
ScDetectiveData rData,
sal_uInt16  nLevel 
)
private
void ScDetectiveFunc::InsertToOtherTab ( SCCOL  nStartCol,
SCROW  nStartRow,
SCCOL  nEndCol,
SCROW  nEndRow,
bool  bRed,
ScDetectiveData rData 
)
private
bool ScDetectiveFunc::IsColorsInitialized ( )
static

Definition at line 1752 of file detfunc.cxx.

References bColorsInitialized.

Referenced by ScModule::ConfigurationChanged().

bool ScDetectiveFunc::IsNonAlienArrow ( const SdrObject pObject)
static
bool ScDetectiveFunc::MarkInvalid ( bool &  rOverflow)
void ScDetectiveFunc::Modified ( )
private
bool ScDetectiveFunc::ShowError ( SCCOL  nCol,
SCROW  nRow 
)
bool ScDetectiveFunc::ShowPred ( SCCOL  nCol,
SCROW  nRow 
)
bool ScDetectiveFunc::ShowSucc ( SCCOL  nCol,
SCROW  nRow 
)
void ScDetectiveFunc::UpdateAllArrowColors ( )
void ScDetectiveFunc::UpdateAllComments ( ScDocument rDoc)
static

Member Data Documentation

bool ScDetectiveFunc::bColorsInitialized = false
staticprivate
Color ScDetectiveFunc::nArrowColor = Color(0)
staticprivate

Definition at line 51 of file detfunc.hxx.

Referenced by GetArrowColor(), and InitializeColors().

Color ScDetectiveFunc::nCommentColor = Color(0)
staticprivate

Definition at line 53 of file detfunc.hxx.

Referenced by GetCommentColor(), and InitializeColors().

Color ScDetectiveFunc::nErrorColor = Color(0)
staticprivate

Definition at line 52 of file detfunc.hxx.

Referenced by GetErrorColor(), and InitializeColors().

SCTAB ScDetectiveFunc::nTab
private
ScDocument& ScDetectiveFunc::rDoc
private

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