LibreOffice Module sc (master) 1
|
Represents a text cell record. More...
#include <xetable.hxx>
Public Member Functions | |
XclExpLabelCell (const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, const OUString &rStr) | |
Constructs the record from an unformatted Calc string cell. More... | |
XclExpLabelCell (const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, const EditTextObject *pEditText, XclExpHyperlinkHelper &rHlinkHelper) | |
Constructs the record from a formatted Calc edit cell. More... | |
virtual bool | IsMultiLineText () const override |
Returns true if the cell contains multi-line text. More... | |
virtual void | SaveXml (XclExpXmlStream &rStrm) override |
Public Member Functions inherited from XclExpSingleCellBase | |
virtual sal_uInt16 | GetLastXclCol () const override |
Returns the last column, which is equal to the first column for single cells. More... | |
virtual sal_uInt32 | GetFirstXFId () const override |
Return the XF identifier of the cell. More... | |
virtual bool | IsEmpty () const override |
Returns true, if this record does not contain at least one valid cell. More... | |
virtual void | ConvertXFIndexes (const XclExpRoot &rRoot) override |
Converts the XF identifier into the Excel XF index. More... | |
virtual void | Save (XclExpStream &rStrm) override |
Writes cell address, XF index, and calls WriteContents() for each cell. More... | |
Public Member Functions inherited from XclExpCellBase | |
const XclAddress & | GetXclPos () const |
Returns the (first) address of the cell(s). More... | |
sal_uInt16 | GetXclCol () const |
Returns the (first) Excel column index of the cell(s). More... | |
sal_uInt32 | GetXclRow () const |
Returns the Excel row index of the cell. More... | |
virtual sal_uInt16 | GetLastXclCol () const =0 |
Derived classes return the column index of the last contained cell. More... | |
virtual sal_uInt32 | GetFirstXFId () const =0 |
Derived classes return the XF identifier of the first contained cell. More... | |
virtual bool | IsEmpty () const =0 |
Derived classes return true, if this record does not contain at least one valid cell. More... | |
virtual bool | IsMultiLineText () const |
Derived classes return whether the cell contains multi-line text. More... | |
virtual bool | TryMerge (const XclExpCellBase &rCell) |
Derived classes try to merge the contents of the passed cell to own data. More... | |
virtual void | ConvertXFIndexes (const XclExpRoot &rRoot)=0 |
Derived classes convert the XF identifier(s) into the Excel XF index(es). More... | |
virtual void | GetBlankXFIndexes (ScfUInt16Vec &rXFIndexes) const |
Derived classes for blank cells insert the Excel XF index(es) into the passed vector. More... | |
virtual void | RemoveUnusedBlankCells (const ScfUInt16Vec &rXFIndexes, size_t nStartAllNotFound) |
Derived classes for blank cells remove unused Excel XF index(es). More... | |
Public Member Functions inherited from XclExpRecord | |
XclExpRecord (sal_uInt16 nRecId=EXC_ID_UNKNOWN, std::size_t nRecSize=0) | |
XclExpRecord (XclExpRecord const &)=default | |
virtual | ~XclExpRecord () override |
sal_uInt16 | GetRecId () const |
Returns the current record ID. More... | |
std::size_t | GetRecSize () const |
Returns the current record size prediction. More... | |
void | SetRecId (sal_uInt16 nRecId) |
Sets a new record ID. More... | |
void | SetRecSize (std::size_t nRecSize) |
Sets a new record size prediction. More... | |
void | AddRecSize (std::size_t nRecSize) |
Adds a size value to the record size prediction. More... | |
void | SetRecHeader (sal_uInt16 nRecId, std::size_t nRecSize) |
Sets record ID and size with one call. More... | |
virtual void | Save (XclExpStream &rStrm) override |
Writes the record header and calls WriteBody(). More... | |
Public Member Functions inherited from XclExpRecordBase | |
XclExpRecordBase () | |
XclExpRecordBase (XclExpRecordBase const &) | |
XclExpRecordBase (XclExpRecordBase &&) | |
XclExpRecordBase & | operator= (XclExpRecordBase const &) |
XclExpRecordBase & | operator= (XclExpRecordBase &&) noexcept |
virtual | ~XclExpRecordBase () |
virtual void | Save (XclExpStream &rStrm) |
Overwrite this method to do any operation while saving the record. More... | |
virtual void | SaveXml (XclExpXmlStream &rStrm) |
Public Member Functions inherited from salhelper::SimpleReferenceObject | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Private Member Functions | |
void | Init (const XclExpRoot &rRoot, const ScPatternAttr *pPattern, XclExpStringRef const &xText) |
Initializes the record contents. More... | |
virtual void | WriteContents (XclExpStream &rStrm) override |
Derived classes write the contents of the specified cell (without XF index). More... | |
Private Attributes | |
XclExpStringRef | mxText |
sal_uInt32 | mnSstIndex |
The cell text. More... | |
bool | mbLineBreak |
Index into Shared String Table (only used for BIFF8). More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from salhelper::SimpleReferenceObject | |
static void * | operator new (std::size_t nSize) |
static void * | operator new (std::size_t nSize, std::nothrow_t const &rNothrow) |
static void | operator delete (void *pPtr) |
static void | operator delete (void *pPtr, std::nothrow_t const &rNothrow) |
Protected Member Functions inherited from XclExpSingleCellBase | |
XclExpSingleCellBase (sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, sal_uInt32 nXFId) | |
XclExpSingleCellBase (const XclExpRoot &rRoot, sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId) | |
void | SetContSize (std::size_t nContSize) |
std::size_t | GetContSize () const |
void | SetXFId (sal_uInt32 nXFId) |
sal_uInt32 | GetXFId () const |
Protected Member Functions inherited from XclExpCellBase | |
XclExpCellBase (sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos) | |
void | SetXclCol (sal_uInt16 nXclCol) |
Sets this record to a new column position. More... | |
virtual void | WriteBody (XclExpStream &rStrm) |
Writes the body of the record (without record header). More... | |
Protected Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
Represents a text cell record.
May contain a BIFF2-BIFF7 LABEL record for a simple string, or a BIFF2-BIFF7 RSTRING record for a formatted string, or a BIFF8 LABELSST string for any string (simply stores a reference to the Shared String Table).
Definition at line 398 of file xetable.hxx.
|
explicit |
Constructs the record from an unformatted Calc string cell.
Definition at line 693 of file xetable.cxx.
References XclExpStringHelper::CreateCellString(), EXC_BIFF8, EXC_LABEL_MAXLEN, EXC_STR_MAXLEN, XclRoot::GetBiff(), Init(), and NONE.
|
explicit |
Constructs the record from a formatted Calc edit cell.
Definition at line 704 of file xetable.cxx.
References XclExpStringHelper::CreateCellString(), EXC_BIFF8, EXC_LABEL_MAXLEN, EXC_STR_MAXLEN, XclRoot::GetBiff(), Init(), and NONE.
|
private |
Initializes the record contents.
Called from constructors.
Definition at line 728 of file xetable.cxx.
References DBG_ERROR_BIFF, EXC_BIFF5, EXC_BIFF8, EXC_FONT_NOTFOUND, EXC_ID_LABELSST, EXC_ID_RSTRING, EXC_LABEL_MAXLEN, EXC_XFID_NOTFOUND, XclExpXF::GetAlignmentData(), XclRoot::GetBiff(), XclExpSingleCellBase::GetContSize(), XclExpRoot::GetSst(), XclExpRoot::GetXFBuffer(), XclExpXFBuffer::GetXFById(), XclExpSingleCellBase::GetXFId(), XclExpSst::Insert(), XclExpXFBuffer::InsertWithFont(), mbLineBreak, XclCellAlign::mbLineBreak, mnSstIndex, mxText, XclExpSingleCellBase::SetContSize(), XclExpRecord::SetRecId(), and XclExpSingleCellBase::SetXFId().
Referenced by XclExpLabelCell().
|
overridevirtual |
Returns true if the cell contains multi-line text.
Reimplemented from XclExpCellBase.
Definition at line 723 of file xetable.cxx.
References mbLineBreak, and mxText.
|
overridevirtual |
Reimplemented from XclExpRecordBase.
Definition at line 782 of file xetable.cxx.
References XclExpCellBase::GetXclPos(), lcl_GetStyleId(), mnSstIndex, rStrm, and XclXmlUtils::ToOString().
|
overrideprivatevirtual |
Derived classes write the contents of the specified cell (without XF index).
Implements XclExpSingleCellBase.
Definition at line 797 of file xetable.cxx.
References DBG_ERROR_BIFF, EXC_BIFF5, EXC_BIFF8, mnSstIndex, mxText, and rStrm.
|
private |
Index into Shared String Table (only used for BIFF8).
Definition at line 425 of file xetable.hxx.
Referenced by Init(), and IsMultiLineText().
|
private |
The cell text.
Definition at line 424 of file xetable.hxx.
Referenced by Init(), SaveXml(), and WriteContents().
|
private |
Definition at line 423 of file xetable.hxx.
Referenced by Init(), IsMultiLineText(), and WriteContents().