sw/inc/PostItMgr.hxx                      |    6 ++++--
 sw/source/filter/ww8/docxexportfilter.cxx |    9 +++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit bdba116f3c6c61af564edb603fa8ec72cab22920
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Thu Apr 20 23:31:27 2017 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Reviewed-on: https://gerrit.libreoffice.org/36784
    Tested-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index b15e23dcae6e..0d6628921a12 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -20,6 +20,8 @@
 #ifndef INCLUDED_SW_INC_POSTITMGR_HXX
 #define INCLUDED_SW_INC_POSTITMGR_HXX
 
+#include "swdllapi.h"
+
 #include <list>
 #include <vector>
 #include <editeng/outlobj.hxx>
@@ -247,10 +249,10 @@ class SwPostItMgr: public SfxListener
 
         sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return 
mpActivePostIt; }
         void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* 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 6072cc57d724..2917da1e374a 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>
 
@@ -56,6 +57,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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to