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)
 
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
 
virtual void startRendering () override
 
virtual void endRendering () override
 
- Public Member Functions inherited from ScFormatEntry
 ScFormatEntry (ScDocument *pDoc)
 
virtual ~ScFormatEntry ()
 
bool operator== (const ScFormatEntry &) const
 
virtual bool IsEqual (const ScFormatEntry &, bool bIgnoreSrcPos) const
 

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  Type {
  Type::Condition,
  Type::ExtCondition,
  Type::Colorscale,
  Type::Databar,
  Type::Iconset,
  Type::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 253 of file colorscale.hxx.

Constructor & Destructor Documentation

ScColorScaleFormat::ScColorScaleFormat ( ScDocument pDoc)

Definition at line 369 of file colorscale.cxx.

Referenced by Clone().

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

Definition at line 374 of file colorscale.cxx.

References maColorScales.

ScColorScaleFormat::~ScColorScaleFormat ( )
overridevirtual

Definition at line 388 of file colorscale.cxx.

Member Function Documentation

void ScColorScaleFormat::AddEntry ( ScColorScaleEntry pEntry)
ScColorScaleEntries::iterator ScColorScaleFormat::begin ( )
ScColorScaleEntries::const_iterator ScColorScaleFormat::begin ( ) const

Definition at line 664 of file colorscale.cxx.

References maColorScales.

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

Definition at line 431 of file colorscale.cxx.

References GetMaxValue(), and GetMinValue().

Referenced by GetColor().

double ScColorScaleFormat::CalcValue ( double  nMin,
double  nMax,
const ScColorScaleEntries::const_iterator &  rItr 
) const
private
ScColorFormat * ScColorScaleFormat::Clone ( ScDocument pDoc) const
overridevirtual

Implements ScFormatEntry.

Definition at line 383 of file colorscale.cxx.

References ScColorScaleFormat().

ScColorScaleEntries::iterator ScColorScaleFormat::end ( )
ScColorScaleEntries::const_iterator ScColorScaleFormat::end ( ) const

Definition at line 674 of file colorscale.cxx.

References maColorScales.

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 700 of file colorscale.cxx.

References maColorScales.

std::optional< Color > ScColorScaleFormat::GetColor ( const ScAddress rAddr) const
ScColorScaleEntry * ScColorScaleFormat::GetEntry ( size_t  nPos)

Definition at line 679 of file colorscale.cxx.

References maColorScales.

Referenced by ScColorScaleEntryObj::getCoreObject().

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

Definition at line 687 of file colorscale.cxx.

References maColorScales.

double ScColorScaleFormat::GetMaxValue ( ) const
private

Definition at line 419 of file colorscale.cxx.

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

Referenced by calcMinMax().

double ScColorScaleFormat::GetMinValue ( ) const
private

Definition at line 407 of file colorscale.cxx.

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

Referenced by calcMinMax().

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

Implements ScFormatEntry.

Definition at line 654 of file colorscale.cxx.

References ScFormatEntry::Colorscale.

void ScColorScaleFormat::SetParent ( ScConditionalFormat pParent)
overridevirtual

Reimplemented from ScColorFormat.

Definition at line 392 of file colorscale.cxx.

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

size_t ScColorScaleFormat::size ( ) const
void ScColorScaleFormat::UpdateDeleteTab ( sc::RefUpdateDeleteTabContext rCxt)
overridevirtual

Implements ScFormatEntry.

Definition at line 642 of file colorscale.cxx.

References begin(), and end().

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

Implements ScFormatEntry.

Definition at line 636 of file colorscale.cxx.

References begin(), and end().

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

Implements ScFormatEntry.

Definition at line 648 of file colorscale.cxx.

References begin(), and end().

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

Implements ScFormatEntry.

Definition at line 630 of file colorscale.cxx.

References begin(), and end().

Member Data Documentation

ScColorScaleEntries ScColorScaleFormat::maColorScales
private

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