RTF originally didn't support anchored pictures: they were always
inline. Then it was invented that pictures can be exported anchored, if
they are in fact shapes, but their "pib" property is set to the hexdump
of the picture contents.
The RTF importer handled this situation for quite some time, but not the
exporter -- this commit implements that.
Change-Id: I173ad9f4f2e24620508ca63c0b892b7d5da4e5b2
When an sw document is embedded inside an sw one, then the inner sw HTML export
should just write what's inside the <body>. Add a filter option for that in sw,
similar to the one already existing in sc.
Change-Id: Id2cef966c1022ba45a3540bff234029c1d396778
When the sc document is embedded inside an sw one, then the sc HTML
export should just write what's inside the <body>. Add a filter option
for that in sc and use it from sw.
Change-Id: I3a9605bd62f0628b78cd782c11661f12bc2c3ae4
E.g. Word doesn't do anything if you hit return in the middle of a
title; if that's so, then we should handle this situation on export as
well.
Change-Id: Ib5b52a59250b09c97023b53906b8046f530d0e31
The exporter already handled TextFrames inside TextFrames, a feature
supported by Writer, and not by Word.
Similarly, if DocxSdrExport::writeDMLAndVMLDrawing() starts a shape,
then anchored TextFrames should be posponed till the end of that shape.
Change-Id: I597a8a46b1cf2348a8ccb9af668ea5afab27541b
Replace SwXFrames::GetObject() with factory functions that use the
WeakReference SwFrmFmt::m_wXObject to cache the instance in a thread-safe
way.
Change-Id: If56e4d7f95cb4f2e112139f228fb832ae9bf7d76
If the position is the same as the body text anchor position, don't
delete the node. Probably something should have inserted more nodes
between StartApo() and StopApo().
Change-Id: I41110a47d840e764f6d2a24e43bf6938b1282972
In SwWW8ImplReader::StopApo() the JoinNext() may delete the node that
pPaM points to. It is probably a bad idea to use a non-correctable
SwPaM in an import filter; sadly this filter uses the core API directly,
let's use a SwUnoCrsr which should avoid the problem.
Change-Id: I120a481883b7ecbfa59cc998153fec0e6b9bafe5
Removed its output paramater as GetCurrentViewShell should be
used instead and added a const version.
Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I7ecf827a0713efaecb4b0eb49f9f8c06f8c59091
A usual problem with SDT is that in case it should end after the last
paragrah of a container, there is no "next" paragraph that could have
the relevant "EndSdtBefore" property. This is usually handled by closing
the SDT tag before the container is closed.
The problem here was that DocxAttributeOutput::WriteSdtBlock() did not
notify DocxSdrExport about opening the SDT, as it thought there is no
draw export in progress. This is because in case of "shape with a
TextBox", the common writeDMLAndVMLDrawing() method is not called,
instead the separate writeDMLTextFrame() and writeVMLTextFrame() methods
are invoked.
Fix the problem by adjusting these methods to writeDMLAndVMLDrawing(),
so that they also set m_bDMLAndVMLDrawingOpen to true during the TextBox
export.
Change-Id: Ie08b0b955cd2d6a645970da3d485e447abfd6495
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: Ib461b5d3702e00a9d7cef3229c44e3328c776e1d
Issue :
- In issue file there were two runs(first run=SDT, second run=Shape).
- These two runs were consecutive(no text/space/tab was there in between two runs).
- Due to such scenario, "SdtEndBefore" was not getting set on Shape.
- Hence at Export EndSdtBlock() was getting called from EndParagraph().
Due to this SDT was not getting end after first run.
In order to end SDT after run, EndSdtBlock() should get called from EndRun()
(as in Original file)
Implementation :
- Set "SdtEndBefore" on Shape in DomainMapper_Impl::PushShapeContext()
- Retrieved same property at export.
- Added export unit test case.
Note :
Added common functions at Import and Export with reference to
https://gerrit.libreoffice.org/#/c/10827/
Conflicts:
sw/source/filter/ww8/docxattributeoutput.cxx
Reviewed on:
https://gerrit.libreoffice.org/10912
Change-Id: I357d77cd179c83b8ae976db331ee46c8993b6cb8
The old rule was: write qFormat for everything that's not a custom
style.
The new rule: write qFormat for everything that's a custom style + have
a whitelist of non-custom, but qFormat styles.
This matches better what Word does (whitelist is from the latent style
section of an empty document, created by Word).
Change-Id: Ie7a0802e886c41b8d26ca9aa154913aa2f3ff87a
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I3734cb14b6ed8f556af85b234968682a55ac8a4c
MSWord, unlike Writer, can anchor even to a page break (i.e. after the last
paragraph). When this document was read, what happended was:
- the last paragraph was read and the current position PaM was set to point
after it
- frame was read and anchored to the PaM
- page break was read, making everything following be moved to the next page;
including whatever ended up at the PaM position
Handle this by checking for this case and inserting an extra empty paragraph
before the break. This shouldn't affect layout of the page itself anyway,
since the break should leave room for it (and MSWord shows a page break
there if control characters are enabled, so there is room).
Change-Id: Ia2a13bf5cf1c959b5aa228254365019a00a22679