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

Represents a NOTE record containing the relevant data of a cell note. More...

#include <xeescher.hxx>

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

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 XclExpStringGetAuthor () 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 &&)
 
XclExpRecordBaseoperator= (XclExpRecordBase const &)
 
XclExpRecordBaseoperator= (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 XclExpRootmrRoot
 
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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ XclExpNote()

XclExpNote::XclExpNote ( const XclExpRoot rRoot,
const ScAddress rScPos,
const ScPostIt pScNote,
std::u16string_view  rAddText 
)
explicit

Member Function Documentation

◆ GetAuthor()

const XclExpString & XclExpNote::GetAuthor ( ) const
inline

Definition at line 363 of file xeescher.hxx.

References maAuthor.

Referenced by XclExpComments::SaveXml().

◆ Save()

void XclExpNote::Save ( XclExpStream rStrm)
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().

◆ WriteBody()

void XclExpNote::WriteBody ( XclExpStream rStrm)
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().

◆ WriteXml()

void XclExpNote::WriteXml ( sal_Int32  nAuthorId,
XclExpXmlStream rStrm 
)

Member Data Documentation

◆ maAuthor

XclExpString XclExpNote::maAuthor
private

Definition at line 370 of file xeescher.hxx.

Referenced by GetAuthor(), WriteBody(), and XclExpNote().

◆ maCommentFrom

tools::Rectangle XclExpNote::maCommentFrom
private

Row containing the comment is hidden.

Definition at line 383 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ maCommentTo

tools::Rectangle XclExpNote::maCommentTo
private

From and From Offset.

Definition at line 384 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ maNoteText

OString XclExpNote::maNoteText
private

Name of the author.

Definition at line 371 of file xeescher.hxx.

Referenced by Save(), and XclExpNote().

◆ maScPos

ScAddress XclExpNote::maScPos
private

Text and formatting data (OOXML)

Definition at line 373 of file xeescher.hxx.

Referenced by Save(), WriteBody(), WriteXml(), and XclExpNote().

◆ mbAutoFill

bool XclExpNote::mbAutoFill
private

Position & Size locked.

Definition at line 380 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mbAutoScale

bool XclExpNote::mbAutoScale
private

text vertical adjust

Definition at line 378 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mbColHidden

bool XclExpNote::mbColHidden
private

Auto Fill Style.

Definition at line 381 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mbLocked

bool XclExpNote::mbLocked
private

Auto scale text.

Definition at line 379 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mbRowHidden

bool XclExpNote::mbRowHidden
private

Column containing the comment is hidden.

Definition at line 382 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mbVisible

bool XclExpNote::mbVisible
private

Escher object ID (BIFF8).

Definition at line 375 of file xeescher.hxx.

Referenced by WriteBody(), and XclExpNote().

◆ meTHA

SdrTextHorzAdjust XclExpNote::meTHA
private

true = permanently visible.

Definition at line 376 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ meTVA

SdrTextVertAdjust XclExpNote::meTVA
private

text horizontal adjust

Definition at line 377 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mnObjId

sal_uInt16 XclExpNote::mnObjId
private

Calc cell address of the note.

Definition at line 374 of file xeescher.hxx.

Referenced by Save(), WriteBody(), and XclExpNote().

◆ mpNoteContents

XclExpStringRef XclExpNote::mpNoteContents
private

Main text of the note (<=BIFF7).

Definition at line 372 of file xeescher.hxx.

Referenced by WriteXml(), and XclExpNote().

◆ mrRoot

const XclExpRoot& XclExpNote::mrRoot
private

Definition at line 369 of file xeescher.hxx.

Referenced by WriteXml().


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