summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)AuthorFilesLines
2016-08-18cppcheck: passedByValueCaolán McNamara2-8/+7
Change-Id: I3ffcfe1294a1cbb06aadd3a1a79e9259876e38cc
2016-08-17writerfilter: fix Android buildMiklos Vajna1-0/+11
lround() is missing in the std namespace on the broken Android toolchain, work it around. Change-Id: Ib53ace52c3a7c345de1326e3566a279f2a3f1bce
2016-08-17tdf#86087: Convert relative URLs to absolute upon import of docx etc.Stephan Bergmann2-0/+23
...to fix the import part of tdf#86087. Apparently, "fragment-only" relative same-document URLs (like <#anchor>) are supposed to remain relative; otherwise, various tests like testFdo69548::Import in CppunitTest_sw_ooxmlimport fail. Change-Id: I2dbba2f2f1e225f85e21600e68a3c4cffdb023b2
2016-08-17sw: use std::lround() instead of manual rounding in RTFSdrImportMiklos Vajna1-3/+4
Change-Id: If869c3f987996918904dca76de92d3e35789efa5
2016-08-16tdf#100507 RTF import: don't set default para style to the 0th char styleMiklos Vajna3-2/+24
Regression from commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17), the problem was that the RTF_PARD handler wanted to set a default paragraph style, but it didn't check if the 0th style is actually a paragraph one. This resulted in using a character style name as a paragraph one, throwing in SwUnoCursorHelper::SetTextFormatColl() -> all paragraph properties were lost, including the left indent. Fix this by tracking the style type, and filtering out character styles when looking up a default paragraph style. Change-Id: I41faab0e72667b89ec9a507014b395a675847abf
2016-08-15tdf#97090 writerfilter - don't fill_SOLID with auto colorJustin Luth2-1/+9
fixes a regression from 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e <w:shd w:val="clear" w:color="auto" w:fill="auto"> seems to be the default "fill disabled" state, so don't force a solid white fill in that case. Change-Id: Ia421e52e228bbf0d3a2cd9af72e0a580042e5dcd Reviewed-on: https://gerrit.libreoffice.org/27915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-08-12loplugin:countusersofdefaultparams in vcl..xmlsecurityNoel Grandin1-1/+1
Change-Id: I538596a99e632178d928ff7e66ad45c71b73c6fd Reviewed-on: https://gerrit.libreoffice.org/28018 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-11loplugin:constantparamNoel Grandin1-7/+5
Change-Id: Ia06b9b189033b9409d7a59a211866f66a0614886 Reviewed-on: https://gerrit.libreoffice.org/28016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-07fftester: guard against empty table manager stackCaolán McNamara2-3/+1
Change-Id: Ibb4cadb58aa17eacfc9741f7f13c780be347cd8b
2016-08-04tdf#78506 RTF import: fix handling of invalid \levelnumbersMiklos Vajna3-2/+23
In case ';' is written in \u form in \levelnumbers, then Word ignores the whole \levelnumbers contents, do the same. Change-Id: I93ce5810af2b5ed703e804199c0b236d2c4c36b5 Reviewed-on: https://gerrit.libreoffice.org/27869 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-02fftester: guard against no drawing object property setCaolán McNamara2-1/+1
Change-Id: I51736459f9f098d9d793bff3b9a1a403962e099d
2016-08-01sw, writerfilter: fix indentationMiklos Vajna1-1/+1
These files had a consistent style before, keep it that way. Change-Id: I325e13e402abb01c347d1185b85468f23a18bba3 Reviewed-on: https://gerrit.libreoffice.org/27773 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-31fftester: another table manager stack checksCaolán McNamara2-2/+2
and a m_xTextFactory check too Change-Id: I9352410c42048b4dd7d6dbc3514351ab8f16790b
2016-07-30fftester: context stack checkCaolán McNamara2-3/+4
Change-Id: I4a135a9f9ac2f16f9dab096f5c234ff1d6e5e853
2016-07-30docx - inherit FollowPage before FirstPageJustin Luth1-10/+11
GetPageStyle(bTitlePage == true) will check if the follow exists. If not, it will create a new style - which defeats the purpose of inheriting from the previous section if this section didn't define a new follow. Change-Id: I235bc9b7bc35c9875295733313a6452ba8896c4f Reviewed-on: https://gerrit.libreoffice.org/27700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-07-29fftester: some more table manager stack checksCaolán McNamara2-3/+3
Change-Id: Ic8dd72da175fee656889910b55d31ea161b944cc
2016-07-29fftester: another empty table manager stackCaolán McNamara3-3/+7
Change-Id: If3148cb6e16cff4aad28c4f86467c66ed04bcd05
2016-07-29fftester: another null DestinationTextCaolán McNamara3-19/+20
Change-Id: I84bf3788ac092c491d7c5a9f86421f1cf9f3e814
2016-07-29fftester: null DestinationTextCaolán McNamara3-3/+9
Change-Id: Icdd71733c4e9f4b36e6e957e4dea772087890faa
2016-07-28fftester: throw on empty stack accessCaolán McNamara5-2/+9
rather than spend the rest of my life protecting each one Change-Id: I181df33b052a0303f072ce0252d98562231569e2
2016-07-28Related: tdf#75757 remove inheritance from std::dequeCaolán McNamara1-4/+23
Change-Id: Ia50ea146052c2014ea16474186e2d15ce93581c1
2016-07-28fftester: empty states stackCaolán McNamara2-0/+2
Change-Id: I05dfffced9a8677650a46b43f65a29e9b21c5524
2016-07-28fftester: empty table manager stackCaolán McNamara2-0/+3
Change-Id: Ia7f7ace8130d5dfe290207e0cd3d2e6a43b8ab46
2016-07-28tdf#99434 docx enable docprotection only when enforcedJustin Luth1-2/+5
Change-Id: I9454a34d7b386acffc50e74d5ef6eed1966d572a Reviewed-on: https://gerrit.libreoffice.org/27456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-27tdf#75573 - docx don't remove frame anchor paragraphJustin Luth3-1/+18
frames anchor to the following paragraph. Don't remove an empty paragraph if it follows a frame or else the frame will jump to the next page. This gets a bit complicated because headers/footers contain paragraphs that aren't really "following" the frame paragraph, and so wouldn't be used as anchor paragraphs. There may be similar sub-paragraphs for comments etc, but exceptions for those can be added when proof documents are found. Change-Id: I46988b40abe65e23a5c407dde38a951937978005 Reviewed-on: https://gerrit.libreoffice.org/27455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-27improve passstuffbyref return analysisNoel Grandin10-27/+27
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-26tdf#75573 allow style to define vAnchorJustin Luth1-2/+2
If the default property value is valid, a style is never able to override. oddball default caused by commit 20c1a485774c7586401f6c1821c52f0bc39cb84a Rüdiger Timm <rt@openoffice.org> 2008-04-18 11:36:12 (GMT) INTEGRATION: CWS xmlfilter04 (1.22.14); FILE MERGED 2008/03/05 11:07:44 os 1.22.14.3: default vAnchor changed Change-Id: I665b52ae75a9282d51c79f3351315cf3fed4776c Reviewed-on: https://gerrit.libreoffice.org/27454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-25tdf#75573 - docx handle frame properties at stylesJustin Luth1-6/+7
A frame with only a style defined doesn't create paragraph properties, so the settings were just being ignored. If the stylesheet is the top context, then the settings belong to the style. If this slightly aggressive approach causes a regression, then just use the style only if the paragraph properties don't exist. Change-Id: I3b14205dc2bc5305f1eeb4cb72a812e877b532c7 Reviewed-on: https://gerrit.libreoffice.org/27453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-18protect against empty m_aTableManagers stackCaolán McNamara3-10/+19
Change-Id: I29fecc5e0efb3b3d907f0c6505d42818fa464ffc
2016-07-15writerfilter: avoid inclusion of deprecated C++ headerMiklos Vajna1-2/+2
Change-Id: I2eb6dd36a51ffc2c48e5f4951fd6250e12e9aad3
2016-07-12tdf75573 docx - complete frames before starting alternate streamsJustin Luth1-0/+4
An unused odd header was set to be discarded. The handling of unregistered frames occurred at the same time, and thus ended up being discarded as well. Since a frame shouldn't encompass both the alternate stream and the current stream, finalize any unfinished frames first. Change-Id: Ie9123769724da461dd265936aa6b97de7f4dfbbc Reviewed-on: https://gerrit.libreoffice.org/26972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-08tdf#64372 docx import: don't ignore continuous section breakJustin Luth1-10/+2
If the previous break was also a continuous section break, this break was simply ignored ever since commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131. Thus, the default handler took over and assigned PROP_PAGE_DESC if there was some kind of page style known (either the first page/Standard defaults or any "converted" styles that had been created) which effectively became a new page break. Change-Id: I839570b0330ba274552cc671014e997c42765f4b Reviewed-on: https://gerrit.libreoffice.org/26567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann9-16/+16
Change-Id: I0add8faa004c14226ef76125a55dc9e82b37a488
2016-07-07loplugin:passstuffbyrefStephan Bergmann1-1/+1
Change-Id: I2793583f70057df36045505e318be7fc379aedaa
2016-07-07tdf#95367 inherit page style if no new one importedJustin Luth2-35/+95
CopyLastHeaderFooter doesn't do much good if the previous section has blank stylenames. (usually because of continuous section breaks). Change-Id: Ida1e42ab0b650c7c43f06539b3cc058fe5c27919 Reviewed-on: https://gerrit.libreoffice.org/26911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-05Resolves: tdf#100770 crash on loading specific docxCaolán McNamara1-2/+9
use same safeguards as RemoveLastParagraph does Change-Id: I43ed4eb28f44654054fd266bc464840af7014fea
2016-07-04tdf#96750 docx - ensure all styles are initializedJustin Luth2-6/+12
Change-Id: I50467cb2798ef81dd89006768c66aa7e93cb411c Reviewed-on: https://gerrit.libreoffice.org/26892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-06-29tdf#90697 docx - don't change continuous break into page breakJustin Luth1-1/+3
As soon as you set PROP_PAGE_DESC_NAME, you are inserting that style as a page break. Setting a pagebreak via a continous break was first introduced in commit 50cb1667020494906afaacb68d4163d1eda527cf but the unittest for that commit no longer uses this code. I'm suggesting it be reverted. It really messes up round-tripping when continuous breaks are removed/replaced with hard page breaks. There are a few odd cases where the very first section needs to set the page break via the continuous break, so it hasn't been eliminated completely. Change-Id: I5b0e4bb7612ee9df47e5c49b8c2316dc001b5238 Reviewed-on: https://gerrit.libreoffice.org/26662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-27loplugin:singlevalfields in writerfilter and xmlsecNoel Grandin12-67/+13
Change-Id: I51305ce4a6929b36f41eb7c7c83606ca8c5c89b8 Reviewed-on: https://gerrit.libreoffice.org/26691 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu1-1/+2
Change-Id: Id3b9abd557f2b8dfc942589362452cbdb0232da9 Reviewed-on: https://gerrit.libreoffice.org/26546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-16tdf#91684 RTF import: handle fFlipH and fFlipV shape propsMiklos Vajna1-0/+17
Change-Id: I930f99647de00c2e43ef94b1ac0320daa440eae9 Reviewed-on: https://gerrit.libreoffice.org/26349 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-15tdf#42949: clean up includes in include/filter with iwyuJorenz Paragas2-0/+3
Change-Id: Id08a999764bfeeff3bb3409b46f48b278009ccbe Reviewed-on: https://gerrit.libreoffice.org/26238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-15writerfilter: clean up virtual keywords where override already implies thatMiklos Vajna3-23/+23
Change-Id: I04938ceba4e4740535caee396ca8e13ca50a003c Reviewed-on: https://gerrit.libreoffice.org/26288 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-14Related: tdf#91684 RTF import: fix scaling of group shape childrenMiklos Vajna1-1/+6
It was assumed that the child size is in twips, but it's in relative coordinates. Change-Id: I51352180c2e61a70b1a34faad5d73f96121168a8 Reviewed-on: https://gerrit.libreoffice.org/26240 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko2-8/+2
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-07tdf#50821 RTF import: fix handling of \trpaddf{b,l,r,t}Miklos Vajna1-2/+2
The width type is an attribute, not an sprm; this resulted in zero cell margin in the table -> the text overlapped with the border shape. Change-Id: I611feb084a16c76faf281d376e1a4a31e162f53d Reviewed-on: https://gerrit.libreoffice.org/25997 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-06writerfilter: fix excessive whitespaceMiklos Vajna2-3/+3
Change-Id: I87eee678fb3d50adb0a51143f1779d64a780eab0
2016-06-06Convert RunType to scoped enumNoel Grandin4-17/+21
Change-Id: I81732f2db5711109e021838da997c0f25b2ea879 Reviewed-on: https://gerrit.libreoffice.org/25925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31tdf#77349 RTF import: automatically generate names for images if neededMiklos Vajna5-5/+51
The DOC/ODT import can call SwDoc::SetAllUniqueFlyNames() at the end of the process to assign unique names to fly frames which lack a name. Add a similar (but much simpler) feature to the domain mapper to avoid empty image names in the DOCX/RTF import result, so it's easier to click on the items in Writer's navigator. Change-Id: I432fc741f8d75d735e1dfe88daba50ba0797042d Reviewed-on: https://gerrit.libreoffice.org/25705 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin3-5/+9
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>