summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)AuthorFilesLines
2014-09-04We only need to map oox URL's to aliasesMiklos Vajna1-26/+3
Change-Id: I130a057f9d5925b9648f7f39223bb5f4ed8f33ea
2014-09-03Require all namespace aliases to be defined on the root elementMiklos Vajna2-16/+14
Change-Id: I8aa53f4aacd86a331b42a9bb3575015e6857c07b
2014-09-03Clean up remaining duplicated xmlns namespace alias definitionsMiklos Vajna1-6/+8
Change-Id: I0a8550f8f80d017c6c7578f14382d2704d800c46
2014-09-03Clean up duplicated xmlns:wp14 definitionsMiklos Vajna1-3/+4
Change-Id: I4fb7dfb3a8c401aa34ded7d5d93a1b7b88e7278e
2014-09-03Clean up duplicated xmlns:w14 definitionsMiklos Vajna1-3/+4
Change-Id: I9283da66c5b88ea73062b7f5bd5ca3f695e12732
2014-09-03Clean up duplicated xmlns:v namespace aliasesMiklos Vajna1-4/+5
Change-Id: Idc3b19b0d52f46ab74e7061bb81939ae5ca5eca4
2014-09-03Clean up duplicated xmlns:lc definitionsMiklos Vajna1-2/+3
Change-Id: I173b69d61f9b0677ee178a32e18910343f216b71
2014-09-03Remove unused xmlns:xs namespace aliasesMiklos Vajna1-23/+23
Change-Id: I3f58f9d59ef635883e734aaa91cab0716f49abf3
2014-09-03Clean up duplicated xmlns:dgm definitionsMiklos Vajna1-2/+3
Change-Id: If0ada5e202a136b37f998ef13f8edc4f953d73e1
2014-09-02Remove unused xmlns:fn namespace aliasesMiklos Vajna1-21/+21
Change-Id: I634fdfd2b206fbb91e8032fe2fbf4ec66c8623a2
2014-09-02Clean up duplicated xmlns:c definitionsMiklos Vajna1-2/+3
Change-Id: Ibd8fdfeeac89da8c8c259bae3de22f87a0d59b2a
2014-09-01Clean up 6 times duplicated xmlns:a definitionMiklos Vajna1-6/+7
Change-Id: I935856965bcb1f710059801621124685aeb65a03
2014-09-01fdo#83048: DOCX: Corrupt: LO exports wrong SDT properties of DatePallavi Jadhav1-0/+1
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>
2014-08-31Unused arguments / variablesMiklos Vajna1-3/+3
Change-Id: I5903b2f72314f8518beb1821c218fca6a3550d7f
2014-08-31Remove not needed xmlns:xsd attributesMiklos Vajna1-22/+22
Change-Id: I3ed897a7d5a3182d9ae9f64269e3eb6851eeab73
2014-08-31writerfilter: fix namespace of CT_PictureLayer's r:embedMiklos Vajna2-27/+26
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
2014-08-30writerfilter: fix namespace of CT_SaveThroughXslt's r:idMiklos Vajna1-6/+1
We only tried to read "id", not "r:id". Change-Id: I35580fda05841d8c8a11b961016ec4be5059c5f8
2014-08-29Remove unused prefix attribute of namespace elementsMiklos Vajna1-25/+1
Change-Id: I6fd33f9050eb3f7394315bbd0c617513767adce6
2014-08-29fdo#79959 RTF import: trim whitespace around style namesMiklos Vajna1-2/+3
Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
2014-08-29Remove unused url attributeMiklos Vajna3-5/+2
And also make sure that the model is re-checked when the schema changes. Change-Id: I348d11aa770255329cd47535dff4b15a95e4bd8e
2014-08-29coverity#705090 Unchecked dynamic_castMiklos Vajna1-8/+15
Change-Id: I4cd2dcd457c8f41c1c7fd82e2c99d056cf2a8c37
2014-08-28writerfilter: respect WinWordToWriter config settingMiklos Vajna3-4/+5
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
2014-08-28fdo#74229 import RTF_TRGAPHMiklos Vajna1-0/+11
Regression from commit c4b91ae3178011c66c76c711c1a6469ba658872e (fdo#55525 import RTF_TRLEFT, 2012-11-13). Change-Id: I90f2c6399cfaf8399de0cf3488a23af6cc84710d
2014-08-28Remove pointless WriterFilter::initialize()Miklos Vajna3-44/+9
Change-Id: I2341f9665835b4591d0e7c26f32a0fa120b6e7b9
2014-08-28Use comphelper::SequenceAsHashMapMiklos Vajna1-33/+11
Change-Id: I21302361e89b9f01af04cf1a1ed78627097b9d8c
2014-08-27DOCX import: fix handling of embedded DOCX filesMiklos Vajna3-4/+93
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
2014-08-25writerfilter: remove unused application attributeMiklos Vajna1-6/+0
Change-Id: Ic4e16f8303611197e7d2a149e85c7b73dc30bcc8
2014-08-24Indentation fixesMiklos Vajna1-8792/+8792
This makes model.xml about 20kb smaller. Most inconsistencies were introduced when unused tags were removed, like <optional>. Change-Id: I5e77860cf09bad4cad3e9dd7383371a10386c260
2014-08-23writerfilter: remove mce token generatorMiklos Vajna2-28/+0
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
2014-08-22Use comphelper::SequenceAsVectorMiklos Vajna2-8/+4
Change-Id: I115b17da8cc246bf1b2502ed53ef00edad70a21d
2014-08-22DOCX import: list styles don't support automatic updatesMiklos Vajna1-1/+2
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
2014-08-22writerfilter: unused namespacealias attributeMiklos Vajna1-4/+0
Change-Id: I12f59c6d06323d3d9ebcd55ee5fe7e43597a11b4
2014-08-21writerfilter: remove unused qname attributeMiklos Vajna1-5/+0
Change-Id: I412390fba4caa4579dec0dab68f4a1c276284118
2014-08-21Simplify ((A && B) || !A) to (!A || B)Stephan Bergmann1-1/+1
Change-Id: Iae4f45f1e64effa1369e9aba13b6b972a5ba76a0
2014-08-21Avoid invalid downcastsStephan Bergmann1-1/+1
Change-Id: I8550da2c6afb4e7de394879ef75312a0c9c2df25
2014-08-21Avoid invalid downcastsStephan Bergmann1-4/+2
Change-Id: I1666321916d08b326bb0c1c1f21273d568523691
2014-08-21NS_ooxml::LN_CT_LevelText_val might be missingCaolán McNamara2-14/+74
Change-Id: I2683dd30d521b91cf026b3553ed4f75ee4172b3a
2014-08-20empty ReferenceCaolán McNamara2-1/+69
valgrind + bff Change-Id: Id3c039a46dec5d2d4a4642dfb53d23a76972dde2
2014-08-20empty m_aStatesCaolán McNamara2-6/+69
valgrind + bff Change-Id: I3bd526b7ebf0f4fce5d0c7054809e0dc2908e73f
2014-08-19writerfilter: remove now unused namespace-alias elementsMiklos Vajna2-47/+0
Change-Id: If58b3a9f5b1d79d164bb1c2a7c18aa4f99f00ca8
2014-08-19writerfilter: stop reading namespace-alias elementsMiklos Vajna1-13/+9
The same info is already available from oox. Change-Id: I0725799e1f3ffebf6140ad38a0ce376e5417265d
2014-08-19writerfilter: stop reading namespace-alias elements in factoryimplMiklos Vajna2-9/+18
Change-Id: I52c2298c9583617481069040e118520cf8935c6d
2014-08-19empty m_aStatesCaolán McNamara2-10/+13
valgrind + bff Change-Id: I7b45e10471de77bd0481adf0bccdbf852c36d815
2014-08-19writerfilter: fail on mistyped namespace URL'sMiklos Vajna1-4/+1
And also fix one typo detected by this new check. Change-Id: Iaa7a4bb0b6dc3f81e5dd0b352584029cfed4ffbb
2014-08-18writerfilter: sort namespaces in OOXMLStreamImpl::getFastParser()Miklos Vajna1-2/+5
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
2014-08-18Fix -Werror=sign-compareMiklos Vajna1-2/+2
Change-Id: I5c5f31a4970c1c5f2930dd3ae99a46c568101ac4
2014-08-18fdo#82492 : DOCX: Corruption: File was getting corrupt fafter RTPallavi Jadhav2-34/+60
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
2014-08-18check for empty m_aStatesCaolán McNamara2-0/+4
valgrind + bff Change-Id: Ib818d508e10877a845b733c4aa223d1e2cbbc05e
2014-08-17fix reading even/odd page breaks from .docx (bnc#519228)Luboš Luňák2-75/+107
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
2014-08-17fix dbglevel=2 buildMiklos Vajna1-3/+3
Change-Id: Ie570a84bfca530c6763c6aa7b0ca12ae1a16f0f3