// FillInfo() computes some info for all cells starting from column 0, // but most of the info is needed only for cells in the given columns. // Keeping all the info in ScCellInfo could lead to allocation and initialization // of MiB's of memory, so split the info needed for all cells to a smaller structure. struct ScBasicCellInfo
{
ScBasicCellInfo()
: nWidth(0)
, bEmptyCellText(true)
, bEditEngine(false) // view-internal
{}
sal_uInt16 nWidth; bool bEmptyCellText : 1; bool bEditEngine : 1; // output-internal
};
const SvxBoxItem* pLinesAttr; /// original item from document. const SvxLineItem* mpTLBRLine; /// original item from document. const SvxLineItem* mpBLTRLine; /// original item from document.
const SvxShadowItem* pShadowAttr; // original item (internal)
sal_uInt16 nHeight;
SCROW nRowNo;
SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
bool bEmptyBack:1; bool bAutoFilter:1; bool bPivotButton:1; bool bChanged:1; // TRUE, if not tested bool bPivotToggle:1;
private: // This class allocates ScCellInfo with also one item extra before and after. // To make handling easier, this is private and access functions take care of adjusting // the array indexes and error-checking. ScCellInfo is allocated only for a given // range of columns plus one on each side, ScBasicCellInfo is allocated for columns // starting from column 0 until the last column given, again plus one on each side.
ScCellInfo* pCellInfo;
ScBasicCellInfo* pBasicCellInfo;
SCCOL nStartCol; #ifdef DBG_UTIL
SCCOL nEndCol; #endif
};
void addDataBarInfo(std::unique_ptr<const ScDataBarInfo> info)
{
mDataBarInfos.push_back(std::move(info));
} void addIconSetInfo(std::unique_ptr<const ScIconSetInfo> info)
{
mIconSetInfos.push_back(std::move(info));
} private: // These are owned here and not in ScCellInfo to avoid freeing // memory for every pointer in ScCellInfo, most of which are nullptr.
std::vector<std::unique_ptr<const ScDataBarInfo>> mDataBarInfos;
std::vector<std::unique_ptr<const ScIconSetInfo>> mIconSetInfos;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.