LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScColorScaleFormat Class Referencefinal

#include <colorscale.hxx>

Inheritance diagram for ScColorScaleFormat:
[legend]
Collaboration diagram for ScColorScaleFormat:
[legend]

Public Member Functions

 ScColorScaleFormat (ScDocument *pDoc)
 
 ScColorScaleFormat (ScDocument *pDoc, const ScColorScaleFormat &rFormat)
 
virtual ~ScColorScaleFormat () override
 
virtual ScColorFormatClone (ScDocument *pDoc) const override
 
virtual void SetParent (ScConditionalFormat *pParent) override
 
std::optional< ColorGetColor (const ScAddress &rAddr) const
 
void AddEntry (ScColorScaleEntry *pEntry)
 
bool IsEqual (const ScFormatEntry &r, bool bIgnoreSrcPos) const override
 
virtual void UpdateReference (sc::RefUpdateContext &rCxt) override
 
virtual void UpdateInsertTab (sc::RefUpdateInsertTabContext &rCxt) override
 
virtual void UpdateDeleteTab (sc::RefUpdateDeleteTabContext &rCxt) override
 
virtual void UpdateMoveTab (sc::RefUpdateMoveTabContext &rCxt) override
 
virtual Type GetType () const override
 
ScColorScaleEntries::iterator begin ()
 
ScColorScaleEntries::const_iterator begin () const
 
ScColorScaleEntries::iterator end ()
 
ScColorScaleEntries::const_iterator end () const
 
ScColorScaleEntryGetEntry (size_t nPos)
 
const ScColorScaleEntryGetEntry (size_t nPos) const
 
size_t size () const
 
void EnsureSize ()
 Makes sure that the maColorScales contain at least 2 entries. More...
 
- Public Member Functions inherited from ScColorFormat
 ScColorFormat (ScDocument *pDoc)
 
virtual ~ScColorFormat () override
 
const ScRangeListGetRange () const
 
void SetCache (const std::vector< double > &aValues)
 
std::vector< double > GetCache () const
 
virtual void SetParent (ScConditionalFormat *pParent) override
 
virtual void startRendering () override
 
virtual void endRendering () override
 
virtual void updateValues () override
 
- Public Member Functions inherited from ScFormatEntry
 ScFormatEntry (ScDocument *pDoc)
 
virtual ~ScFormatEntry ()
 
virtual Type GetType () const =0
 
virtual void UpdateReference (sc::RefUpdateContext &rCxt)=0
 
virtual void UpdateInsertTab (sc::RefUpdateInsertTabContext &rCxt)=0
 
virtual void UpdateDeleteTab (sc::RefUpdateDeleteTabContext &rCxt)=0
 
virtual void UpdateMoveTab (sc::RefUpdateMoveTabContext &rCxt)=0
 
virtual ScFormatEntryClone (ScDocument *pDoc) const =0
 
virtual void SetParent (ScConditionalFormat *pNew)=0
 
bool operator== (const ScFormatEntry &) const
 
virtual bool IsEqual (const ScFormatEntry &, bool bIgnoreSrcPos) const
 
virtual void startRendering ()
 
virtual void endRendering ()
 
virtual void updateValues ()
 

Private Member Functions

double GetMinValue () const
 
double GetMaxValue () const
 
void calcMinMax (double &nMin, double &nMax) const
 
double CalcValue (double nMin, double nMax, const ScColorScaleEntries::const_iterator &rItr) const
 

Private Attributes

ScColorScaleEntries maColorScales
 

Additional Inherited Members

- Public Types inherited from ScFormatEntry
enum class  Type {
  Condition ,
  ExtCondition ,
  Colorscale ,
  Databar ,
  Iconset ,
  Date
}
 
- Protected Member Functions inherited from ScColorFormat
std::vector< double > & getValues () const
 
double getMinValue () const
 
double getMaxValue () const
 
- Protected Attributes inherited from ScColorFormat
ScConditionalFormatmpParent
 
- Protected Attributes inherited from ScFormatEntry
ScDocumentmpDoc
 

Detailed Description

Definition at line 255 of file colorscale.hxx.

Constructor & Destructor Documentation

◆ ScColorScaleFormat() [1/2]

ScColorScaleFormat::ScColorScaleFormat ( ScDocument pDoc)

Definition at line 369 of file colorscale.cxx.

Referenced by Clone().

◆ ScColorScaleFormat() [2/2]

ScColorScaleFormat::ScColorScaleFormat ( ScDocument pDoc,
const ScColorScaleFormat rFormat 
)

◆ ~ScColorScaleFormat()

ScColorScaleFormat::~ScColorScaleFormat ( )
overridevirtual

Definition at line 391 of file colorscale.cxx.

Member Function Documentation

◆ AddEntry()

void ScColorScaleFormat::AddEntry ( ScColorScaleEntry pEntry)

◆ begin() [1/2]

ScColorScaleEntries::iterator ScColorScaleFormat::begin ( )

◆ begin() [2/2]

ScColorScaleEntries::const_iterator ScColorScaleFormat::begin ( ) const

Definition at line 713 of file colorscale.cxx.

References maColorScales.

◆ calcMinMax()

void ScColorScaleFormat::calcMinMax ( double &  nMin,
double &  nMax 
) const
private

Definition at line 452 of file colorscale.cxx.

References GetMaxValue(), and GetMinValue().

Referenced by GetColor().

◆ CalcValue()

double ScColorScaleFormat::CalcValue ( double  nMin,
double  nMax,
const ScColorScaleEntries::const_iterator &  rItr 
) const
private

◆ Clone()

ScColorFormat * ScColorScaleFormat::Clone ( ScDocument pDoc) const
overridevirtual

Implements ScFormatEntry.

Definition at line 386 of file colorscale.cxx.

References ScColorScaleFormat().

◆ end() [1/2]

ScColorScaleEntries::iterator ScColorScaleFormat::end ( )

◆ end() [2/2]

ScColorScaleEntries::const_iterator ScColorScaleFormat::end ( ) const

Definition at line 723 of file colorscale.cxx.

References maColorScales.

◆ EnsureSize()

void ScColorScaleFormat::EnsureSize ( )

Makes sure that the maColorScales contain at least 2 entries.

Should be called when it is not sure that the format is valid.

Definition at line 749 of file colorscale.cxx.

References maColorScales.

◆ GetColor()

std::optional< Color > ScColorScaleFormat::GetColor ( const ScAddress rAddr) const

◆ GetEntry() [1/2]

ScColorScaleEntry * ScColorScaleFormat::GetEntry ( size_t  nPos)

Definition at line 728 of file colorscale.cxx.

References maColorScales, and nPos.

Referenced by ScColorScaleEntryObj::getCoreObject().

◆ GetEntry() [2/2]

const ScColorScaleEntry * ScColorScaleFormat::GetEntry ( size_t  nPos) const

Definition at line 736 of file colorscale.cxx.

References maColorScales, and nPos.

◆ GetMaxValue()

double ScColorScaleFormat::GetMaxValue ( ) const
private

Definition at line 440 of file colorscale.cxx.

References COLORSCALE_FORMULA, COLORSCALE_VALUE, ScColorFormat::getMaxValue(), and maColorScales.

Referenced by calcMinMax().

◆ GetMinValue()

double ScColorScaleFormat::GetMinValue ( ) const
private

Definition at line 428 of file colorscale.cxx.

References COLORSCALE_FORMULA, COLORSCALE_VALUE, ScColorFormat::getMinValue(), and maColorScales.

Referenced by calcMinMax().

◆ GetType()

ScFormatEntry::Type ScColorScaleFormat::GetType ( ) const
overridevirtual

Implements ScFormatEntry.

Definition at line 703 of file colorscale.cxx.

References ScFormatEntry::Colorscale.

Referenced by IsEqual().

◆ IsEqual()

bool ScColorScaleFormat::IsEqual ( const ScFormatEntry r,
bool  bIgnoreSrcPos 
) const
overridevirtual

Reimplemented from ScFormatEntry.

Definition at line 410 of file colorscale.cxx.

References GetColor(), ScFormatEntry::GetType(), GetType(), i, and maColorScales.

◆ SetParent()

void ScColorScaleFormat::SetParent ( ScConditionalFormat pParent)
overridevirtual

Reimplemented from ScColorFormat.

Definition at line 395 of file colorscale.cxx.

References begin(), end(), and ScColorFormat::SetParent().

◆ size()

size_t ScColorScaleFormat::size ( ) const

◆ UpdateDeleteTab()

void ScColorScaleFormat::UpdateDeleteTab ( sc::RefUpdateDeleteTabContext rCxt)
overridevirtual

Implements ScFormatEntry.

Definition at line 691 of file colorscale.cxx.

References begin(), and end().

◆ UpdateInsertTab()

void ScColorScaleFormat::UpdateInsertTab ( sc::RefUpdateInsertTabContext rCxt)
overridevirtual

Implements ScFormatEntry.

Definition at line 685 of file colorscale.cxx.

References begin(), and end().

◆ UpdateMoveTab()

void ScColorScaleFormat::UpdateMoveTab ( sc::RefUpdateMoveTabContext rCxt)
overridevirtual

Implements ScFormatEntry.

Definition at line 697 of file colorscale.cxx.

References begin(), and end().

◆ UpdateReference()

void ScColorScaleFormat::UpdateReference ( sc::RefUpdateContext rCxt)
overridevirtual

Implements ScFormatEntry.

Definition at line 679 of file colorscale.cxx.

References begin(), and end().

Member Data Documentation

◆ maColorScales

ScColorScaleEntries ScColorScaleFormat::maColorScales
private

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