sw/Library_msword.mk | 1 + sw/inc/viewsh.hxx | 4 ++-- sw/source/filter/ww8/docxexportfilter.cxx | 4 ++++ sw/source/uibase/inc/wrtsh.hxx | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit d6fe9aedf82c818a158056d6c0889ff2a8763c29 Author: Jim Raykowski <[email protected]> AuthorDate: Sat Jan 3 15:40:11 2026 -0900 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Thu Jan 15 23:02:24 2026 +0100 tdf#169964 Fix folded OLE objects are not saved in docx Examining DocxAttributeOutput::WriteFlyFrame case ww8::Frame::eOle, it seems that OLE objects need to have their frames visible in the document for them to be saved. This patch makes all folded outline content visible during execution of the DocxExportFilter:exportDocument function. SW_DLLPUBLIC's are added to make linking succeed with clang. Change-Id: I8fcaa98402ebd9a7a6135f65467a82bbca8731f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196516 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> (cherry picked from commit 9cdb58822849805ca939e1079b01262e75a96bf2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197316 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk index 7d9d0c7f80f8..ba5ec835d642 100644 --- a/sw/Library_msword.mk +++ b/sw/Library_msword.mk @@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_include,msword,\ -I$(SRCDIR)/sw/source/core/inc \ -I$(SRCDIR)/sw/source/filter/inc \ -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/source/uibase/inc \ $$(INCLUDE) \ )) diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index cece0d0dfdfc..8da56ee9b75b 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -523,9 +523,9 @@ public: void LockView( bool b ) { mbViewLocked = b; } inline void LockPaint(LockPaintReason eReason); - void ImplLockPaint(); + SW_DLLPUBLIC void ImplLockPaint(); inline void UnlockPaint(bool bVirDev = false ); - void ImplUnlockPaint( std::vector<LockPaintReason>& rReasons, bool bVirDev ); + SW_DLLPUBLIC void ImplUnlockPaint(std::vector<LockPaintReason>& rReasons, bool bVirDev); bool IsPaintLocked() const { return mnLockPaint != 0; } // Get/set DrawView and PageView. diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 8ea56f2f3661..258461dd0565 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -30,6 +30,8 @@ #include <unotools/mediadescriptor.hxx> +#include <wrtsh.hxx> + using namespace ::comphelper; using namespace ::com::sun::star; @@ -50,6 +52,8 @@ bool DocxExportFilter::exportDocument() if ( !pDoc ) return false; + MakeAllOutlineContentTemporarilyVisible a(pDoc); + // update layout (if present), for SwWriteTable SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); if (pViewShell != nullptr) diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 5e387dd30171..956a962f7ca3 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -522,7 +522,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)(); bool IsOutlineContentVisible(const size_t nPos); void MakeOutlineContentVisible(const size_t nPos, bool bMakeVisible = true, bool bSetAttrOutlineVisibility = true); - void MakeAllFoldedOutlineContentVisible(bool bMakeVisible = true); + SW_DLLPUBLIC void MakeAllFoldedOutlineContentVisible(bool bMakeVisible = true); void InvalidateOutlineContentVisibility(); bool GetAttrOutlineContentVisible(const size_t nPos) const; @@ -700,7 +700,7 @@ inline bool SwWrtShell::Is_FnDragEQBeginDrag() const #endif } -class MakeAllOutlineContentTemporarilyVisible +class SW_DLLPUBLIC MakeAllOutlineContentTemporarilyVisible { private: SwWrtShell* m_pWrtSh = nullptr;
