summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2014-06-19indentation fixesMiklos Vajna
Change-Id: Ia391ccc9889a135730f0fead11eb0b6c2f748ec4
2014-06-18writerfilter: Fold all the various DEBUG_* macros into DEBUG_DOMAINMAPPER.Jan Holesovsky
They were set either all, or none anyway. Change-Id: I4893ff5fef7c1a472ee8889ad36db2c3d3734be6
2014-06-18writerfilter: Consistent naming of dmapper_logger.Jan Holesovsky
Change-Id: I229c8c9fa08827a15404bf0851b7c27771f35706
2014-06-18writerfilter: RTF import: fix handling of associated char propertiesMichael Stahl
These are all dependent on the active \lrtch \rtlch \loch \hich \dbch. There does not appear to be a SPRM Id for CJK bold / italic / fontsize. Change-Id: I055ac29700ccd3b32b02c3f7685629254a6c3fd6
2014-06-17writerfilter: try to make tinderbox happy againMichael Stahl
Change-Id: I445303e52fbfaa58e68c01970e21941537484506
2014-06-17n#825305: writerfilter RTF import: override style properties like WordMichael Stahl
It would certainly be immediately obvious to any reader of the RTF spec that \sN will apply the style with index N to the current paragraph. But actually, that is not what Word does when it reads \sN... what it really does is to apply the style with index N, and then for every attribute in that style, apply the same attribute with a default value to the paragraph, effectively overriding what's in the style. If that doesn't make any sense to you, well, have you heard the joke about how many Microsoft engineers it takes to change a light bulb? Also, \pard apparently implies \s0. To implement that, change RTFSprms::deduplicate() to recursively look for style SPRMs that are missing in the properties, and put in default ones, currently just for 2 keywords \sa and \sb. This requires changing deduplicate() to be const and return a new value, since it is no longer idempotent, as the erased SPRMs would get defaulted on the next run. While at it, fix RTFValue::equals() which did not compare m_sValue. This fixes the testParaBottomMargin test that was broken by the fix for fdo#70578. Change-Id: I4ced38628d76f6c41b488d608a804883493ff00b
2014-06-17fdo#70578: writerfilter RTF import: by default style is para style 0Michael Stahl
quoth the spec: "For <style>, both <styledef> and <stylename> are optional; the default is paragraph style 0." Of course in order to do that we need to add support for at least recognizing the \dsN and \tsN keywords to override the default, so that table styles don't become paragraph styles. Change-Id: Ic100768581f9e8c327063ff776fbd61ac4242483
2014-06-17DOCX filter: preserve AnchorId on shapes having a textboxMiklos Vajna
CppunitTest_sw_ooxmlsdrexport's testAnchorIdForWP14AndW14 would fail without this, when "shape with text" is imported as "shape with textbox". Change-Id: I8705aee16270aa68416f0c830c429880fc76d85d
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17writerfilter: Kill unused XPathLogger.Jan Holesovsky
Change-Id: I41f3f176316232e63a3f59717beafcb4094fc35a
2014-06-15writerfilter: unused xmlify()Miklos Vajna
Change-Id: I22649e1efa82ddd5fe90be84eee2e41996b3343d
2014-06-15fix debug=2 buildCaolán McNamara
Change-Id: If373905f4fd0ae4889b39b69a5dd089ccc9aff69
2014-06-14writerfilter: avoid unnecessary non-ascii characters in model.xmlMiklos Vajna
Change-Id: I0d9597782a34ad18b2f36b19b69813460e99ccee
2014-06-14sw, writerfilter: identation fixesMiklos Vajna
Change-Id: I1f1db08447006515e7e6842792241aca992984c0
2014-06-13DOCX import: implement linking for shapes having textboxesMiklos Vajna
Change-Id: I90deb68ab6a1029cf5df8170676638bf7e3cb469
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: I697406da402d0b96a5bdcc153e2106d0a26c7d40
2014-06-13fdo#76633: writerfilter: RTF import: do not leak the XShape of imageMichael Stahl
RTFSdrImport::resolve() is called for \picprop and creates an XShape that is stored in RTFSdrImport::m_xShape and also DomainMapper_Impl::m_aPendingShapes; later RTFDocumentImpl::resolvePict() completely ignores that XShape and creates a new one, which is also inserted in the document; the first XShape is effectively leaked. Try to avoid that by re-using the exising m_xShape in resolvePict(). Not sure if there are any problems with doing this, it's all a bit confusing. Change-Id: I98456242acb0766f547eb8f7d877f51d53323f3a
2014-06-13fdo#76633: writerfilter RTF import: disappear the rectangle shapes on imagesMichael Stahl
If the shape properties are inside \picprop destination, don't set shapeType. (regression from 9f1f7199736e2ae07b34849ba66f61a1ef5782e8) Actually this does not fix the root cause, this is just a work-around, the extra shape is still inserted but it's invisible now. Change-Id: I6cf093de2a5657533f393863ed8010ae083bec16
2014-06-12related: fdo#77979: writerfilter RTF import: read encoded font nameMichael Stahl
The font name is encoded in the font's charset given by \fcharset. Change-Id: Id9520649a1eb3b55f4314e140abda7399f23d925
2014-06-12writerfilter: remove unused analyzemodel.xslMiklos Vajna
Change-Id: Ic9e44d0050413c9225b030a4be6f71f5adc654fc
2014-06-11-Werror,-Wunused-parameterStephan Bergmann
Change-Id: Ie93e534b00151bb915940a1030b47b40cbaa339a
2014-06-11writerfilter: Kill debug_logger.Jan Holesovsky
Does not really log interesting stuff; if anybody wants some kind of logging like this, better to use SAL_INFO(), and add it only for really interesting stuff. Change-Id: I11b4caa9660aaf1e70819322b7fc207a544ea3bb
2014-06-11DOCX import: fix additional empty paragraphs around footnote textMiklos Vajna
Regression from commit abe1e852a232e3bdab7b9177d099fe3929f5a4aa (handle properly page breaks even if a page contains only a frame (fdo#55381), 2014-04-21), DomainMapper::lcl_endSectionGroup() inserted an empty paragraph before and after the real footnote text. Disable addition of the dummy paragraph for footnotes. Change-Id: I6e1954c9bd5520ac284d66244ce1c9004e970305
2014-06-11fdo#78885 : File crashed while opening in LOsushil_shinde
- File attached to issue contains footnote between a table and reference of footnote is in field. - In PopFieldContext code was throwing exception due to null value of footnotestartnode. Reviewed on: https://gerrit.libreoffice.org/9697 Change-Id: I467e234a7daa6a5f724087c2cc959e4c9d76f4d2
2014-06-11writerfilter: convert gperffasttokenhandler to PythonMiklos Vajna
Change-Id: I56ae09cb89da7d078f64906e15677de58296c119
2014-06-10coverity#1209547 Unchecked dynamic_castCaolán McNamara
Change-Id: Ibf614156aeafcd74be444cf388e02a9273d38d5f
2014-06-10fdo#78939 [DOCX] Hang while opening due to incorrect modification of StyleVinaya Mandke
http://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unosett.cxx#1884 Modifies the refernced style of the numbering rule to use the current numbering rule. Actually the refernced style is not supposed to be modified. As the numbering level formatonly uses that properties particular style, which may or may not be a numbering style For this Particular document the numbering format refers the "Default Style" (Normal). Almost all of the styles in style.xml are based on it. Normal was modified, and as a result the whole document was bulletized; Which caused the hang while opening Removed the addition of style as a PARA_STYLE, as the properties of the refernced style are already added in ListLevel::AddParaProperties Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/9668 Change-Id: I8cc143805a38613908d2e2cb4827882d4cf40a78
2014-06-10writerfilter: convert fasttokens to PythonMiklos Vajna
It's shorter and f9bf15e19ec823a58ee32bf94da81f3bb1a147bc (writerfilter: initial strict DOCX support, 2014-03-07) shows it's a pain to do anything non-trivial with XSLT 1.0 -- in that case black magic was needed to do a simple unique sort. Change-Id: Icf4e7b580ce1db6826989500dbf4a012d79acdb9
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-07writerfilter: document what RTFParserState's LO/HI/DBCH doesMiklos Vajna
Change-Id: Iee70bfdecafb28a56440e5a4bf6d7ace54ea6436
2014-06-07writerfilter: RTF_LOCH is not a NOP anymoreMiklos Vajna
Change-Id: I06297a0c88c931cbc95e24de472d43339fd5116f
2014-06-07writerfilter: remove unused XSL templatesMiklos Vajna
Change-Id: Ie0f7cbaf2061894bea6589073f619ed15d0201ec
2014-06-06coverity#1209548 Unchecked dynamic_castCaolán McNamara
Change-Id: I0adb2380d6804fef43812be3b9a6f32706fd7a4a
2014-06-05writerfilter: remove unused factory.xslMiklos Vajna
Change-Id: Ib86598c20edd64035766ffb4fe572789f8a4335a
2014-06-05writerfilter: Kill createAndSetParent and createAndSetParentRef.Jan Holesovsky
Change-Id: Id212984b7f525e9aea2c390f181e68b5725aa20d
2014-06-05writerfilter: Posix sed needs just one parameter.Jan Holesovsky
Change-Id: I8685136fcd43cb0ae445a8f19cbd9021737c42d4
2014-06-05writerfilter: Kill RefAndPointer, all it does is one dynamic_cast.Jan Holesovsky
Change-Id: Ie383f7e4ee89770f722d963e09efda9063a68c16
2014-06-05writerfilter: Avoid a temporary file, sed can handle this by itself.Jan Holesovsky
Change-Id: I7fde1b44809b1886730145f16878e0f1045b2555
2014-06-05various: remove SAL_THROW macroNoel Grandin
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-04writerfilter: remove unused nostatus.xslMiklos Vajna
Change-Id: If5953eec3f904ea7009f65a4b0b0c3cd342a4e31
2014-06-04coverity#705337 Missing break in switch, probably not intentionalCaolán McNamara
Change-Id: I9bfb694c4034f01d93f35f0f7e72263909245811
2014-06-04writerfilter: reset properties of reused stylesMiklos Vajna
When we have a style to import and the name is already taken, we reuse the style (we can't use replaceByName(), it only works with user-defined styles). If that happens, reset non-default properties of it, so the result will be what was in the file, not a merge of Writer defaults and what was in the file. Change-Id: Ifb1098f78254a061b11fd6c6d2a2fa8d85a00d60
2014-06-04compareTo -> equalsNoel Grandin
convert OUString::compareTo usage to equals to startsWith where it is more appropriate Change-Id: I6f5b5b7942429c0099ad082ba4984fd18e422121
2014-06-04RTFDocumentImpl::dispatchValue: fix indentationMiklos Vajna
Change-Id: I521462315ebe8b69b65e05df98042e7a33d60dbb
2014-06-04DeInitVCL at end of testsStephan Bergmann
This required some changes to the framework: * Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but once per CppunitTest invocation in a new vclbootstrapprotector (similarly to the exisiting unobootstrapprotector). CppunitTests that need VCL now need to declare gb_CppunitTest_use_vcl. * For things to work properly, the UNO component context needs to be disposed from within DeInitVCL (cf. Desktop's Application::DeInit called from DeInitVCL). The easiest solution was to introduce an Application::setDeInitHook (where the hook is called from DeInitVCL) specifically for vclbootstrapprotector to call. * PythonTests don't (yet) call DeInitVCL; they still hook into BootstrapFixture's original test_init functionality (to call InitVCL), and do not make use of the vclbootstrapprotector. Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-03writerfilter: fix log areaMichael Stahl
Change-Id: Iddedd58dbcdd122ec4177bfdd5e97b9ceca18435
2014-06-03(related: bnc#823675) RTF import: get rid of hacks for \f in LISTLEVELMichael Stahl
These weird hacks are apparently needed only because the \loch \hich \dbch were mapped wrongly; for the list level destination it's only important that the existing fonts are not overwritten. Change-Id: Ie2b9adf332b74c2744e9b1dbc4e878638e5ee078
2014-06-03RTF import: fix handling of \loch \hich \dbch \ltrch \rtlchMichael Stahl
The logic is not immediately obvious from the RTF spec; let's do what the editengine RTF import does, but without the unnecessary complexity. Change-Id: I60e69130e6e5aed1f5d237f64b1656c3141e402a
2014-06-03fdo#79384: replace the work-around with a different oneMichael Stahl
Word will reject Shift-JIS following \loch, but apparently OOo could read and (worse) write such documents, so accept Shift-JIS regardless of run charset type. Change-Id: Ib181956e9f218548a52037dd76fa1d3ecdc006bd
2014-06-03fdo#79384: RTF import: fix literal Shift-JIS textMichael Stahl
This is a variable-length encoding, and the second byte may be a RTF syntax character like \, {, }. Change-Id: I813ccafda18388af3bf05eb7ce9a0253c627b1c4