sd/source/ui/unoidl/unomodel.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
New commits: commit 6668f6e34860b7f42a1ee06a062496a0cb63ce8e Author: Henry Castro <hcas...@collabora.com> AuthorDate: Mon Oct 7 11:56:26 2024 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Oct 29 20:24:18 2024 +0100 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175757 Tested-by: Jenkins diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 0186b53f1b61..22b12ceefd24 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4274,6 +4274,27 @@ OString SdXImpressDocument::getPresentationInfo() const bool bIsDrawPageEmpty = pSlide->getCount() == 0; aJsonWriter.put("empty", bIsDrawPageEmpty); + // 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()); + } + } + } + SdMasterPage* pMasterPage = nullptr; SdDrawPage* pMasterPageTarget(dynamic_cast<SdDrawPage*>(pSlide)); if (pMasterPageTarget)