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 <raykowj@gmail.com>
This commit is contained in:
Jim Raykowski
2026-01-14 23:55:22 +01:00
parent 599c2092c5
commit 9cdb588228
4 changed files with 9 additions and 4 deletions
+1
View File
@@ -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) \
))
+2 -2
View File
@@ -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.
@@ -31,6 +31,8 @@
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/mediadescriptor.hxx>
#include <wrtsh.hxx>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -51,6 +53,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)
+2 -2
View File
@@ -524,7 +524,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;
@@ -704,7 +704,7 @@ inline bool SwWrtShell::Is_FnDragEQBeginDrag() const
#endif
}
class MakeAllOutlineContentTemporarilyVisible
class SW_DLLPUBLIC MakeAllOutlineContentTemporarilyVisible
{
private:
SwWrtShell* m_pWrtSh = nullptr;