Kaydet (Commit) 4354f0e9 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Miklos Vajna

tdf#68604: Commit the data from the postit to the model before docx save.

Change-Id: I74f4adad5f142b35ff8819577b1dbd6e5c45db96
Reviewed-on: https://gerrit.libreoffice.org/36757Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d8627414
......@@ -21,6 +21,7 @@
#define INCLUDED_SW_INC_POSTITMGR_HXX
#include <sal/config.h>
#include "swdllapi.h"
#include <cstddef>
#include <list>
......@@ -249,10 +250,10 @@ class SwPostItMgr: public SfxListener
sw::annotation::SwAnnotationWin* GetActiveSidebarWin() { return mpActivePostIt; }
void SetActiveSidebarWin( sw::annotation::SwAnnotationWin* p);
bool HasActiveSidebarWin() const;
SW_DLLPUBLIC bool HasActiveSidebarWin() const;
bool HasActiveAnnotationWin() const;
void GrabFocusOnActiveSidebarWin();
void UpdateDataOnActiveSidebarWin();
SW_DLLPUBLIC void UpdateDataOnActiveSidebarWin();
void DeleteActiveSidebarWin();
void HideActiveSidebarWin();
void ToggleInsModeOnActiveSidebarWin();
......
......@@ -24,6 +24,7 @@
#include <docsh.hxx>
#include <editsh.hxx>
#include <pam.hxx>
#include <PostItMgr.hxx>
#include <unotxdoc.hxx>
#include <IDocumentLayoutAccess.hxx>
......@@ -54,6 +55,14 @@ bool DocxExportFilter::exportDocument()
if (pViewShell != nullptr)
pViewShell->CalcLayout();
// if we have an active postit window, update the document model
if (pViewShell &&
pViewShell->GetPostItMgr() &&
pViewShell->GetPostItMgr()->HasActiveSidebarWin())
{
pViewShell->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
// get SwPaM*
// FIXME so far we get SwPaM for the entire document; probably we should
// be able to output just the selection as well - though no idea how to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment