svx/sdi/svx.sdi | 2 +- sw/source/uibase/app/docsh2.cxx | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit fb8d94e77f16e0f9d3af42d64756bd771de9d17c Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Oct 18 17:02:41 2022 -0400 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Nov 4 08:33:18 2022 +0100 sw: add FN_PARA_1 to MAILPREPAREEXPORT slot Reuse the code to use the functionality without the UpdateFields calls, otherwise it will reset the data source on the first record and export to pdf will have wrong data. Signed-off-by: Henry Castro <hcas...@collabora.com> Change-Id: Iec3b44b91c06861cb22d0a7a7234bee6f6f817a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141519 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index c53fefd67d39..0be42759ae94 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -11770,7 +11770,7 @@ SfxVoidItem InsertRowsAfter SID_TABLE_INSERT_ROW_AFTER ] SfxBoolItem PrepareMailExport SID_MAIL_PREPAREEXPORT -() +(SfxBoolItem On FN_PARAM_1) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index a5e79881e342..99eaf2249423 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -881,11 +881,18 @@ void SwDocShell::Execute(SfxRequest& rReq) case SID_MAIL_PREPAREEXPORT: { + const SfxPoolItem* pNoUpdate; + //pWrtShell is not set in page preview if (m_pWrtShell) m_pWrtShell->StartAllAction(); - m_xDoc->getIDocumentFieldsAccess().UpdateFields( false ); - m_xDoc->getIDocumentLinksAdministration().EmbedAllLinks(); + + if (!pArgs || (pArgs && !pArgs->HasItem(FN_PARAM_1, &pNoUpdate))) + { + m_xDoc->getIDocumentFieldsAccess().UpdateFields( false ); + m_xDoc->getIDocumentLinksAdministration().EmbedAllLinks(); + } + m_IsRemovedInvisibleContent = officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get(); if (m_IsRemovedInvisibleContent)