diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2024-08-13 05:58:51 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-13 15:41:13 +0200 |
commit | 8f591839b9715e186708f661c95a2cf60d63cc73 (patch) | |
tree | 7f5b04833c5b7d4b4515085743678d5c33680c3a /sc/inc/postit.hxx | |
parent | 65f311e22509b37e14e2429f9f15dd9ed6c07f67 (diff) |
Resolves: tdf#157851 sc comments loaded incorrectly in xlsx
problem:
1. when loading xlsx files, comments in that format does not store date,
there for libreoffice loaded comments with current date and time.
2. Author names were not loaded at all in xlsx, and by default
name of user was used as author instead
Change-Id: I7b1f7fcda01565a6ba131fbae72e7d86e5eaaf15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171805
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171809
Tested-by: Jenkins
Diffstat (limited to 'sc/inc/postit.hxx')
-rw-r--r-- | sc/inc/postit.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index 922a1ebae748..407ee0d3ce09 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -113,7 +113,7 @@ public: SC_DLLPUBLIC void SetAuthor( const OUString& rAuthor ); /** Sets date and author from system settings. */ - void AutoStamp(); + void AutoStamp(bool bCreate = true); /** Returns the pointer to the current outliner object, or null. */ const OutlinerParaObject* GetOutlinerObject() const; @@ -179,13 +179,15 @@ class GenerateNoteCaption public: virtual void Generate(SdrCaptionObj& rCaptionObj) = 0; virtual OUString GetSimpleText() const = 0; + virtual OUString GetAuthorName() const = 0; virtual ~GenerateNoteCaption() {}; }; class SC_DLLPUBLIC ScNoteUtil { static ScPostIt* InsertNote(ScDocument& rDoc, const ScAddress& rPos, ScNoteData&& rNoteData, - bool bAlwaysCreateCaption, sal_uInt32 nPostItId); + bool bAlwaysCreateCaption, sal_uInt32 nPostItId, + bool bShouldAutoStamp = true); static ScNoteData CreateNoteData(ScDocument& rDoc, const ScAddress& rPos, const tools::Rectangle& rCaptionRect, bool bShown); |