Issue :
-File was getting corrupt due to wrong SDT Properties were getting export
and only one SDT tag was getting written.
-Issue file contained a Date SDT and a FieldChar SDT(Page numbers)
-Issue was at Import side.
LO GRAB BAGS Properties of SDT using PARA_GRAB_BAG or CHAR_GRAB_BAG
-For Date SDT it should be grab bagged using CHAR_GRAB_BAG in order to get
correct data inside <w:sdtPr>
But LO was handling it with PARA_GRAB_BAG due to which wrong properties were
getting written and
file was getting corrupt.
Implementation :
-Added a check for Date SDT to handle it through CHAR_GRAB_BAG
-Now correct SDT properties are getting exported due to which Date is getting
written inside an SDT tag.
-Added UT at export side.
Change-Id: Ibcfb6dbbec1c23ffd14ba924ab56dc4122b98595
Reviewed-on: https://gerrit.libreoffice.org/11160
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
I just wanted to get rid of the duplicated xmlns:r attributes, but seems
model.xml had some inconsistency as well, that's how this refactoring
fixes a bug as a side effect.
Change-Id: I95d753253f03a001c68dbbac7c86740040a180fa
The binary filter uses this setting to decide if the embedded object is
converted into a native Writer document (so it can be edited) or not (so
it's preserved better), let's do the same.
Change-Id: I47b48867b3d0abf6cd8de2430513587a6776461e
The problem was that SwXTextEmbeddedObject::getEmbeddedObject() returned
an empty reference for those embedded objects, so the HTML filter
couldn't extract their content when it wanted to do so.
It turns out the reason for this was that the DOCX importer only handled
the replacement image + raw native data for the object. Fix this by
creating the embedded object with the correct CLSID and import the
raw data into the empty embedded document model.
This is similar to what is done for XLSX-in-PPTX in
oox::drawingml::ShapeExport::WriteOLE2Shape(), just for the import part.
Change-Id: Ieb1dcb1774d2d4da00117e3a35160053066c78aa
This makes model.xml about 20kb smaller. Most inconsistencies were
introduced when unused tags were removed, like <optional>.
Change-Id: I5e77860cf09bad4cad3e9dd7383371a10386c260
Commit af7d4a5ebf3e6a09cd2079f241dee16aa22e0276 (n#820503: initial MCE
support in writerfilter ooxml tokenizer, 2013-07-03) added these, but in
fact only the namespace-alias part was necessary. Now that oox provides
the list of namespaces to be registered, it can be removed completely.
Change-Id: If8f1b0c07602a0170c63b53d806a5b466d485747
The problem was the following: setPropertyValue("IsAutoUpdate") on the
style failed -> a number of styles was not imported in
StyleSheetTable::ApplyStyleSheets() due to the exception, then when we
tried to use one of the not imported styles, we also got an exception in
DomainMapper_Impl::finishParagraph(), which resulted in not calling
DomainMapperTableManager::handle(), so multiple cells of the same table
wanted the same range for cell contents, and that resulted in a crash.
Regression from cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle
w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit
just made the previously hidden problem visible.
Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
The motivation is that <namespace-alias> elements in model.xml are
redundant, as the same info is available from oox as well. But without
sorting, it's impossible to generate the same output, as the (not
interesting) order isn't the same there.
Change-Id: I634c62e43d1b54100bfa623c6f43dddd34279fb1
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
We map Word's even/odd page breaks to Writer's left/right page styles. And we cannot
just set any page style to be left/right, because that could set e.g. the default
page style as such, which would make all normal pages that way. So instead we need
to make a copy of the relevant page style, as the original page style as its follow,
copy all the properties and headers/footers, and use this copy to get the page break.
Change-Id: Id0d2568de91ac2de4afb0ba3a6eedd9cec46f878
See 656ab07b2924dd2703f31f460c8586c375c7878a (Sync oox -> writerfilter
alias for wordprocessingml, 2014-08-10).
Change-Id: I5179961b683473a502693923422171bb274fc845