22#include <rtl/ustring.hxx>
81 ScNoteData aNoteData,
bool bAlwaysCreateCaption, sal_uInt32 nPostItId = 0 );
94 std::unique_ptr<ScPostIt>
Clone(
97 bool bCloneCaption )
const;
100 sal_uInt32
GetId()
const {
return mnPostItId; }
106 const OUString&
GetDate()
const {
return maNoteData.maDate;}
108 void SetDate(
const OUString& rDate );
111 const OUString&
GetAuthor()
const {
return maNoteData.maAuthor;}
113 void SetAuthor(
const OUString& rAuthor );
124 OUString GetText()
const;
126 bool HasMultiLineText()
const;
147 void ForgetCaption(
bool bPreserveData =
false );
150 void ShowCaption(
const ScAddress& rPos,
bool bShow );
155 void ShowCaptionTemp(
const ScAddress& rPos,
bool bShow =
true );
158 void UpdateCaptionPos(
const ScAddress& rPos );
165 void CreateCaptionFromInitData(
const ScAddress& rPos )
const;
169 void RemoveCaption();
183 SdrPage& rDrawPage, std::u16string_view rUserText,
202 static ScPostIt* CreateNoteFromCaption(
230 static ScPostIt* CreateNoteFromObjectData(
252 static ScPostIt* CreateNoteFromString(
254 const OUString& rNoteText,
bool bShown,
255 bool bAlwaysCreateCaption, sal_uInt32 nPostItId = 0 );
Additional class containing cell annotation data.
const ScNoteData & GetNoteData() const
Returns the data struct containing all note settings.
sal_uInt32 GetId() const
Returns the note id.
ScNoteData maNoteData
Parent document containing the note.
const OUString & GetDate() const
Returns the creation date of this note.
const OUString & GetAuthor() const
Returns the author date of this note.
ScPostIt(const ScPostIt &)=delete
static sal_uInt32 mnLastPostItId
sal_uInt32 mnPostItId
Note data with pointer to caption object.
ScPostIt & operator=(const ScPostIt &)=delete
bool IsCaptionShown() const
Returns true, if the caption object is visible.
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
virtual void SetText(const OUString &rStr) override
CAUTION! The following defines must be in the same namespace as the respective type.
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
Internal data for a cell annotation.
rtl::Reference< SdrCaptionObj > mxCaption
Initial data for invisible notes without SdrObject.
ScCaptionInitDataRef mxInitData
Author of the note.
OUString maAuthor
Creation date of the note.
bool mbShown
Drawing object representing the cell note.
ScNoteData(bool bShown=false)
True = note is visible.
std::shared_ptr< ScCaptionInitData > ScCaptionInitDataRef
NoteEntry(const ScAddress &rPos, const ScPostIt *pNote)