LibreOffice Module sc (master) 1
|
Represents a NOTE record containing the relevant data of a cell note. More...
#include <xeescher.hxx>
Public Member Functions | |
XclExpNote (const XclExpRoot &rRoot, const ScAddress &rScPos, const ScPostIt *pScNote, std::u16string_view rAddText) | |
Constructs a NOTE record from the passed note object and/or the text. More... | |
virtual void | Save (XclExpStream &rStrm) override |
Writes the NOTE record, if the respective Escher object is present. More... | |
void | WriteXml (sal_Int32 nAuthorId, XclExpXmlStream &rStrm) |
const XclExpString & | GetAuthor () const |
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 | |
virtual void | WriteBody (XclExpStream &rStrm) override |
Writes the body of the NOTE record. More... | |
Private Attributes | |
const XclExpRoot & | mrRoot |
XclExpString | maAuthor |
OString | maNoteText |
Name of the author. More... | |
XclExpStringRef | mpNoteContents |
Main text of the note (<=BIFF7). More... | |
ScAddress | maScPos |
Text and formatting data (OOXML) More... | |
sal_uInt16 | mnObjId |
Calc cell address of the note. More... | |
bool | mbVisible |
Escher object ID (BIFF8). More... | |
SdrTextHorzAdjust | meTHA |
true = permanently visible. More... | |
SdrTextVertAdjust | meTVA |
text horizontal adjust More... | |
bool | mbAutoScale |
text vertical adjust More... | |
bool | mbLocked |
Auto scale text. More... | |
bool | mbAutoFill |
Position & Size locked. More... | |
bool | mbColHidden |
Auto Fill Style. More... | |
bool | mbRowHidden |
Column containing the comment is hidden. More... | |
tools::Rectangle | maCommentFrom |
Row containing the comment is hidden. More... | |
tools::Rectangle | maCommentTo |
From and From Offset. 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) |
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 NOTE record containing the relevant data of a cell note.
NOTE records differ significantly in various BIFF versions. This class encapsulates all needed actions for each supported BIFF version. BIFF5/BIFF7: Stores the note text and generates a single or multiple NOTE records on saving. BIFF8: Creates the Escher object containing the drawing information and the note text.
Definition at line 343 of file xeescher.hxx.
|
explicit |
Constructs a NOTE record from the passed note object and/or the text.
@descr The additional text will be separated from the note text with an empty line.
rScPos | The Calc cell address of the note. |
pScNote | The Calc note object. May be 0 to create a note from rAddText only. |
rAddText | Additional text appended to the note text. |
Definition at line 1628 of file xeescher.cxx.
References XclExpObjectManager::AddObj(), ScGlobal::addToken(), ScAddress::Col(), ScDocument::ColHidden(), XclExpStringHelper::CreateString(), DBG_ERROR_BIFF, EXC_BIFF5, EXC_BIFF8, SfxItemSet::Get(), ScPostIt::GetAuthor(), XclRoot::GetBiff(), XclRoot::GetDoc(), ScPostIt::GetEditTextObject(), XclExpRoot::GetObjectManager(), ScPostIt::GetOrCreateCaption(), XclExpString::GetSize(), ScPostIt::GetText(), XclRoot::GetTextEncoding(), maAuthor, maCommentFrom, maCommentTo, maNoteText, maScPos, mbAutoFill, mbAutoScale, mbColHidden, mbLocked, mbRowHidden, mbVisible, mbVisible, meTHA, meTVA, mnObjId, mpNoteContents, NONE, OUStringToOString(), ScAddress::Row(), ScDocument::RowHidden(), SDRTEXTHORZADJUST_LEFT, SDRTEXTVERTADJUST_TOP, XclExpRecord::SetRecSize(), ScAddress::Tab(), XATTR_FILLCOLOR(), and XATTR_FILLSTYLE().
|
inline |
Definition at line 363 of file xeescher.hxx.
References maAuthor.
Referenced by XclExpComments::SaveXml().
|
overridevirtual |
Writes the NOTE record, if the respective Escher object is present.
Reimplemented from XclExpRecord.
Definition at line 1702 of file xeescher.cxx.
References ScAddress::Col(), DBG_ERROR_BIFF, EXC_BIFF5, EXC_BIFF8, EXC_ID_NOTE, EXC_NOTE5_MAXLEN, EXC_OBJ_INVALID_ID, maNoteText, maScPos, mnObjId, ScAddress::Row(), rStrm, and XclExpRecord::Save().
|
overrideprivatevirtual |
Writes the body of the NOTE record.
Reimplemented from XclExpRecord.
Definition at line 1749 of file xeescher.cxx.
References ScAddress::Col(), EXC_BIFF8, EXC_NOTE_VISIBLE, maAuthor, maScPos, mbVisible, mnObjId, OSL_ENSURE_BIFF, ScAddress::Row(), rStrm, and set_flag().
void XclExpNote::WriteXml | ( | sal_Int32 | nAuthorId, |
XclExpXmlStream & | rStrm | ||
) |
Definition at line 1765 of file xeescher.cxx.
References FSNS(), XclRoot::GetDoc(), oox::core::ISOIEC_29500_2008, maCommentFrom, maCommentTo, maScPos, mbAutoFill, mbAutoScale, mbColHidden, mbLocked, mbRowHidden, meTHA, meTVA, mpNoteContents, mrRoot, rStrm, and XclXmlUtils::ToOString().
|
private |
Definition at line 370 of file xeescher.hxx.
Referenced by GetAuthor(), WriteBody(), and XclExpNote().
|
private |
Row containing the comment is hidden.
Definition at line 383 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
From and From Offset.
Definition at line 384 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Name of the author.
Definition at line 371 of file xeescher.hxx.
Referenced by Save(), and XclExpNote().
|
private |
Text and formatting data (OOXML)
Definition at line 373 of file xeescher.hxx.
Referenced by Save(), WriteBody(), WriteXml(), and XclExpNote().
|
private |
Position & Size locked.
Definition at line 380 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
text vertical adjust
Definition at line 378 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Auto Fill Style.
Definition at line 381 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Auto scale text.
Definition at line 379 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Column containing the comment is hidden.
Definition at line 382 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Escher object ID (BIFF8).
Definition at line 375 of file xeescher.hxx.
Referenced by WriteBody(), and XclExpNote().
|
private |
true = permanently visible.
Definition at line 376 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
text horizontal adjust
Definition at line 377 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Calc cell address of the note.
Definition at line 374 of file xeescher.hxx.
Referenced by Save(), WriteBody(), and XclExpNote().
|
private |
Main text of the note (<=BIFF7).
Definition at line 372 of file xeescher.hxx.
Referenced by WriteXml(), and XclExpNote().
|
private |
Definition at line 369 of file xeescher.hxx.
Referenced by WriteXml().