summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)AuthorFilesLines
2014-06-04compareTo -> equalsNoel Grandin3-33/+33
convert OUString::compareTo usage to equals to startsWith where it is more appropriate Change-Id: I6f5b5b7942429c0099ad082ba4984fd18e422121
2014-06-04RTFDocumentImpl::dispatchValue: fix indentationMiklos Vajna1-6/+4
Change-Id: I521462315ebe8b69b65e05df98042e7a33d60dbb
2014-06-04DeInitVCL at end of testsStephan Bergmann1-0/+1
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 Stahl1-1/+1
Change-Id: Iddedd58dbcdd122ec4177bfdd5e97b9ceca18435
2014-06-03(related: bnc#823675) RTF import: get rid of hacks for \f in LISTLEVELMichael Stahl1-6/+3
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 Stahl2-5/+20
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 Stahl1-7/+7
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 Stahl2-5/+31
This is a variable-length encoding, and the second byte may be a RTF syntax character like \, {, }. Change-Id: I813ccafda18388af3bf05eb7ce9a0253c627b1c4
2014-06-03writerfilter: remove unused todo.xslMiklos Vajna1-46/+0
Change-Id: Icd0ab345619fea029a63bafae9077a72cccc9852
2014-06-02writerfilter: unused FFData.xmlMiklos Vajna1-75/+0
Change-Id: Id30f35b8a357276c215b71e548ba46e86c51ad48
2014-06-02fdo#79384 RTF import: allow { without } in style namesMiklos Vajna1-1/+6
This is not valid, but LO 3.4 supported it, so add a workaround... Change-Id: Ib8eefdf41fe9801db6f7e5873eaa1436518912fb
2014-06-02fix debug=2 buildCaolán McNamara1-1/+1
Change-Id: I46b7bdfe4c467d52c9304ee880d74c7d88779b43
2014-06-02fdo#68849: Add header guards to all include filesJens Carl1-0/+5
added header guards for directories basebmp/, chart2/, cppuhelper/, include/test/, io/test/, sax/test, shell/, writerfilter/, and xmlhelp/ Change-Id: I0e29a9b75c26d71f58aa98986b52f6d3b46015a6 Reviewed-on: https://gerrit.libreoffice.org/9615 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-02fdo#76934 : DOCX: Preservation: AutoSpacing property not getting preserved.Pallavi Jadhav1-2/+1
Issue : - In styles.xml, beforeAutospacing property was set to true. - In code LO grab bags AustoSpacing property using "ParaInteropGrabBag". - But ParaInteropGrabBag had only an entry for direct paragraph properties, not paragraph styles. - Hence while importing AustoSpacing property from styles.xml, LO was throwing exception as "Some style properties could not be set: Unknown property: ParaInteropGrabBag". Implementation : - Added "ParaInteropGarbBag" entry for Paragraph styles in sw/source/core/unocore/unomap.cxx - Removed code from StyleSheetTable::ApplyStyleSheets() as it was previously added to "Ignore" the AutoSpacing property. The code was previously added beacuse due to AutpSpacing in styles.xml, LO was throwing an exception and this was causing unhandling of properties after AutoSpacing. So to prevent unhandling of other properties due to AutoSpacing property, a check was added to "Ignore" AutoSpacing, thus enabling handling of properties after AutoSpacing. Please refer to : https://gerrit.libreoffice.org/#/c/8902/ But as now we have to "Preserve AutoSpacing" this check needs to be removed in order to set it in StyelSheetTable.cxx. - Added Export Unit test case Change-Id: I6748f97befcdf40643e75388766e05740290306b Reviewed-on: https://gerrit.libreoffice.org/9561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-31writerfilter: unused checkmodel.xslMiklos Vajna1-155/+0
This could be useful actually, except that it raises so many warnings for ~any version of model.xml (and we assume the current version is more or less working), that I think in its current form it's useless. Change-Id: Ia9923256f1db0fd15930833fc843a7348613821d
2014-05-30fdo#78883: Writer getting Hang while opening documentTushar Bende4-3/+30
Description: Writer getting Hang while opening document because of loop in layout. Root cause: For Documents containing table with direct formatting for Para line spacing along with style w:type="table" in style.xml LO was erasing PROP_PARA_LINE_SPACING Prop from pAllCellProps in DomainMapperTableHandler::endTableGetCellProperties(). But for Documents without direct formatting for Para line spacing this deletion was causing problem, as after deletion there is no formatting available to apply. To fix this checking whether there is a Direct formatting available for table, if Yes then proceed with this deletion logic. Change-Id: Ibaf51ebd1aca93eff44a9edfbe8fa13832ab2b70 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-05-30writerfilter: clean up 'using namespace ::rtl'Miklos Vajna4-14/+3
Most probably this is just a leftover when one had to spell out rtl::OString and friends, and not using it ensures that rtl::Reference vs css::uno::Reference is written out. Change-Id: I13e20e6566a56a93b2a1a3f980c301d3bfc41d89
2014-05-29writerfilter: unused analyzestage2.xslMiklos Vajna1-49/+0
Change-Id: Ie9442ef37c044de686249379aa1463d3384cb2ba
2014-05-29cppcheck: unused variableJulien Nabet1-1/+0
Change-Id: If497a2bbcc13702a960f510b3daf3bf7dc12d4c7
2014-05-29handle direct formatting for numbering in .docx (bnc#875717)Luboš Luňák3-0/+5
Change-Id: I3ed0f926e79f3878c5702c2becae97d99d00e201
2014-05-28writerfilter: remove unused analyzestage3.xslMiklos Vajna1-56/+0
Change-Id: I2e6b04f32bd0aca6da41e04e26f33bd894c53d7e
2014-05-28writerfilter: remove unused AddingTable.cxxThomas Arnhold1-77/+0
Change-Id: I546e520a6b6d0e0177af87d21150b71c1011cc63
2014-05-27writerfilter: remove unused attrsprm.xslMiklos Vajna1-160/+0
Change-Id: I71e7e1fbab6ec2ecc525f7d637199f6f7a69f8ea
2014-05-27css already means ::com::sun::starThomas Arnhold1-1/+1
Change-Id: I48d7b746d7cc49246743c62480b0d225d2519342
2014-05-27fdo#78348 DOCX import: end progressbar after parsing is doneMiklos Vajna1-0/+3
Change-Id: Id3db99a7ea341bcfc9bf2cd2b718e70a17d41f76
2014-05-26writerfilter: remove unused dummyannotate.xslMiklos Vajna1-833/+0
Change-Id: Ie922a7114040ad7a1e3a96d57beb36e48bdf2e34
2014-05-26fdo#78900 RTF import: allow \dpxsize inside \dptxbxtextMiklos Vajna1-0/+11
Previously we assumed that they always appear under \do directly. Change-Id: Ie3a978da856986f604a3815d6127abb4191323c0
2014-05-25writerfilter: remove unused rngtocxxMiklos Vajna1-50/+0
Change-Id: I780aff48f55bdc4f903404472f22f3fb4bb6968c
2014-05-25writerfilter: remove unused effort.xslMiklos Vajna1-63/+0
Change-Id: I8e05b2d8e62acaab651f8db4098a8877713e81e0
2014-05-24writerfilter: unused efforts.shMiklos Vajna1-20/+0
Change-Id: Ide86e29584faeff1d4b8a7d6d8a9a59acc725bd4
2014-05-24discard more header/footer stuff when discarding headers/footers (bnc#875718)Luboš Luňák1-4/+10
782adba4d436c65cdf85d48f28486321873b15ed discards unneeded headers/footers, but only the text, not e.g. frames or fields. The test document therefore ends up with a frame with a page number inside the body text, because the text in the footer it should be anchored to was discarded. This commit fixes this by discarding more (although probably the whole header/footer shouldn't even be parsed to begin with). The test from b349d2483e1fe64316d87b55d0b3b4c8f2293e2e actually checked for this incorrect frame, so change that (the whole test is suspicious, as the end result is quite far away from what the original doc looks like). Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b
2014-05-23DOCX import: tokenize <w:ptab>Miklos Vajna2-1/+5
By changing the resource to Properties, the defined attribute tokens actually show up, and the \t characters still arrive. Change-Id: I37b32c4fc049b74d3bebada455b2acf47b66fc5f
2014-05-23remove boilerplate in UNO Exception constructor callsNoel Grandin1-3/+3
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23DOCX import: detect document signatureMiklos Vajna3-1/+13
Change-Id: Ic84b1f1446d6ab1a1529de4e0a435afbf62915a7
2014-05-23ooxml: preserve artistic effects on shapes.Jacobo Aragunde Pérez1-1/+2
Bitmaps can define artistic effects like in the following example: <a:blip r:embed="rId5"> <a:extLst> <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"> <a14:imgProps xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main"> <a14:imgLayer r:embed="rId6"> <a14:imgEffect> <a14:artisticMarker trans="14000" size="80" /> </a14:imgEffect> </a14:imgLayer> </a14:imgProps> </a:ext> </a:extLst> </a:blip> LO core doesn't support them, but I'm preserving them using the shape grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject so the grab bag of the XShape is not discarded. Added several Context and Properties objects on the import side to traverse and save the relevant tags, and added the corresponding code on the export side to extract the grab bag and output the effect back. Also added a unit test for a selection of artistic effects. TODO: Word saves the original bitmap as an embedded wdp file so the effect can be undone. We must preserve it too and add the reference to the a14:imgLayer tag. Change-Id: I61d427f83e4c8f353eb073da0114cd73ba50ba4b
2014-05-23oox, writerfilter: add a14 namespace and tokensJacobo Aragunde Pérez2-0/+413
Added the artistic effects defined in the MS-ODRAWXML extension. Ref: http://msdn.microsoft.com/en-us/library/dd905216(v=office.12).aspx Change-Id: I24c5e5bbe569f160d300a7a7293ca047cb7a1b88.
2014-05-20enhance pass-by-ref plugin to detect large argumentsNoel Grandin2-4/+4
Detect arguments larger than 64 chars passed by value. Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-19writerfilter: remove using namespace from headersThomas Arnhold9-73/+76
Change-Id: Ibbb234a15de9ddb71552ef083ade72d2ac724ee0
2014-05-19DOCX import: tokenize v:background (VML description of page background)Miklos Vajna2-2/+24
Change-Id: I4ee2f01e714265b2684a9eb379e56654d34e2441
2014-05-18writerfilter: drop last 'using' statement from headersMiklos Vajna11-136/+122
Change-Id: I08a13793c40bec0b9a657e01f4c973cc0e393d4d
2014-05-18writerfilter: drop remaining non-css global 'using' from headersMiklos Vajna7-76/+64
Change-Id: I70e5e276a084d951d73879aa2aa4f19e9d2d32f8
2014-05-18writerfilter: drop remaining 'using' statements from headers in dmapperMiklos Vajna3-13/+9
Change-Id: I4c84388b4fae7fe27bcc6266e9978fe9d230435d
2014-05-18writerfilter: drop global 'using css' from WrapPolygonHandler.hxxMiklos Vajna3-8/+6
Change-Id: Ibecc12f74e55360ee03baf7d170ab5589d3ed3ab
2014-05-18writerfilter: drop global 'using' from XPathLoggerMiklos Vajna2-12/+9
Change-Id: I8686a0aa3786284ab946d3c58b458ad211eb347d
2014-05-18writerfilter: drop global 'using css' from WW8ResourceModel.hxxMiklos Vajna38-206/+213
Change-Id: I2196a1df09a6f35e4de3ab3cc84bc1e149cd8f61
2014-05-18writerfilter: clean up two 'using' statement from header filesMiklos Vajna2-8/+5
Change-Id: I47f3d0c68668d03db3c5f3187414833aa3097424
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante2-3/+3
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-16DOCX import: make sure inline shapes are not in the backgroundMiklos Vajna1-0/+4
Change-Id: I80d684662ac3f94bff4448fcdae94f9e69fd1590
2014-05-16ooxml: Preserve effects on picturesJacobo Aragunde Pérez1-1/+12
If a picture contains some 2D (glow, shadow...) or 3D effect (rotation, extrusion...), we prevent the importer from transforming it into a XTextContent so the XShape grab bag is not removed and the effects are preserved using the existing mechanisms. Added a unit test for this issue, and modified some existing unit tests to match the new behaviour. Change-Id: I3b87069ea208604383a592d34d0a4ceb6b0f9fc7
2014-05-15DOCX import: fix chart size when it's inside a TextFrameMiklos Vajna1-0/+4
Change-Id: I3edb253238db182054b7688061916a2432b687b5