diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-04-20 23:31:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-21 08:06:43 +0200 |
commit | 4354f0e9ef4a5538729a2a6f2d1745e247f6c5cd (patch) | |
tree | 8de356fecff69ac1017a563342bf04d2c995557b | |
parent | d862741423cdf0ef228d34b2a25b09c9401be584 (diff) |
tdf#68604: Commit the data from the postit to the model before docx save.
Change-Id: I74f4adad5f142b35ff8819577b1dbd6e5c45db96
Reviewed-on: https://gerrit.libreoffice.org/36757
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/inc/PostItMgr.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexportfilter.cxx | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 6f25c4cb72bd..319a83c1cac2 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -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(); diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index c3859af0844a..9cfba638a7f6 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -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 |