sd/source/ui/unoidl/unomodel.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
New commits: commit 706902351a79ece4b8dcea0ad4f0554fbc8998a9 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Mon Oct 7 11:56:26 2024 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Thu Oct 24 12:05:04 2024 +0200 sd: lokit: add notes to presentation info Signed-off-by: Henry Castro <hcas...@collabora.com> Change-Id: I1293a392749b6cff75be02236fb570f8faeb2446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174613 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 597b388eb5de..f02b697dfccb 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4333,6 +4333,27 @@ OString SdXImpressDocument::getPresentationInfo() const aJsonWriter.put("name", aName); } + // Notes + SdPage* pNotesPage = mpDoc->GetSdPage((pPage->GetPageNum() - 1) >> 1, PageKind::Notes); + if (pNotesPage) + { + SdrObject* pNotes = pNotesPage->GetPresObj(PresObjKind::Notes); + if (pNotes) + { + OUStringBuffer strNotes; + OutlinerParaObject* pPara = pNotes->GetOutlinerParaObject(); + if (pPara) + { + const EditTextObject& rText = pPara->GetTextObject(); + for (sal_Int32 nNote = 0; nNote < rText.GetParagraphCount(); nNote++) + { + strNotes.append(rText.GetText(nNote)); + } + aJsonWriter.put("notes", strNotes.makeStringAndClear()); + } + } + } + uno::Reference<drawing::XShapes> xSlideShapes(xSlide, uno::UNO_QUERY_THROW); bool bIsDrawPageEmpty = true; if (xSlideShapes.is()) {