summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.hxx
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2021-06-14 15:24:06 +0200
committerLászló Németh <nemeth@numbertext.org>2021-07-01 16:06:34 +0200
commit68688b4ca2288ac815d1dff137177e632bbb5f9f (patch)
tree71a59066f7548d4c5442e72471cd9d7a91668edf /sw/source/filter/ww8/docxattributeoutput.hxx
parent89e19634a775d53ea855db8767113f3ab08a3479 (diff)
tdf#121509 DOCX export: fix corrupt shape anchoring in textbox
MSO doesn't support shapes anchored to character in a textbox. Convert these shapes by re-anchoring them to the anchor point of the textbox (also recalculating their positions in simple cases), so Word can now open the exported document. Change-Id: I28b244975981d69c50e5d4a46249918af089bae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117163 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 35732c84b05e4f6e50349796636beb01f2a09907) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118179 Tested-by: Jenkins
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.hxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index b0688183ab69..7f880cc506c4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -718,6 +718,7 @@ private:
void WritePostponedOLE();
void WritePostponedDMLDrawing();
void WritePostponedCustomShape();
+ void WriteFlyFrame(const ww8::Frame& rFrame);
void WriteSdtBlock(sal_Int32& nSdtPrToken,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
@@ -802,6 +803,14 @@ private:
OUString m_sRawText;
+ /// The first frame (anchored to the main text) is 0.
+ /// The second frame what is anchored to the previous in, is 1
+ /// The third anchored inside the second is the 2 etc.
+ sal_uInt32 m_nEmbedFlyLevel;
+
+ /// Stores the flys what are anchored inside a fly
+ std::vector<ww8::Frame> m_vPostponedFlys;
+
/// Bookmarks to output
std::vector<OUString> m_rBookmarksStart;
std::vector<OUString> m_rBookmarksEnd;