path: root/sw/qa/extras/odfimport/odfimport.cxx
AgeCommit message (Collapse)AuthorFilesLines
2015-12-18tdf#96113 sw: don't overwrite fo:background-color on ODT frame importMiklos Vajna1-0/+6
The situation is similar to commit 79fb61efb847405fa47235002b52ee8efad5e339 (tdf#92379: svx: don't overwrite fo:background-color on ODF import, 2015-08-21), except that here text frames had the problem of loosing colors when transparency is set. Fix the problem by informing getSvxBrushItemFromSourceSet() about if we're in XML import or not. (cherry picked from commit 3a0c0af7309e1f5ba3811bbe8a73e506cf5cd069) Conflicts: sw/qa/extras/odfimport/odfimport.cxx Change-Id: Id1adf60b14a3762f0a2a43c49caeed9f6ea039be Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Andras Timar <>
2015-09-15tdf#92586 xmloff: fix import of stretched background imageMiklos Vajna1-0/+7
The bug document has: <style:page-layout-properties ... style:repeat="no-repeat"> <style:background-image ... style:repeat="stretch"/> </style:page-layout-properties> When a stretched background image is set on a page style using the Writer UI, then these two style:repeat attributes always match, but not in the bugdoc. The later used to have priority, till commit 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: #i124638# Second step of DrawingLayer FillAttributes..., 2014-06-02). Fix the problem by extending XMLBackgroundImageContext::EndElement(): if we know that the <style:page-layout-properties> sets the FillBitmapMode property, then don't blindly set BackGraphicLocation, but try to overwrite the exiting FillBitmapMode one. Change-Id: I64ab4363b20cc95003d35acd63ea421472b1c071 (cherry picked from commit 6621da38b3cd217314c2d2295fd1e71be7e1875e) Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-37/+37
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-15tdf#91140: ODF import: try to ignore invalid draw:fill="solid"Michael Stahl1-1/+1
... which was apparently written by LO >= 4.1 on a frame with image background, under unknown circumstances. Change-Id: Ie86643ab67f58bfe5c19d6a1f80a7af8f793edf2
2015-04-14tdf#89478: svx: ODF import: SvxBrushItem Graphics should override ColorMichael Stahl1-0/+6
The bugdoc has: <style:page-layout-properties fo:background-color="#007f7f" > <style:background-image xlink:href="Pictures/2000003900002FA3000055F455EC9F63.svm"/> </style:page-layout-properties> In this case it's clearly better to prefer the Graphics. The old code could actually store both in the model but the UI only allows setting either Color or Graphic, so this should be good enough. (regression from 7d9bb549d498d6beed2c4050c402d09643febdfa) Change-Id: Id33231ad90815d9791f90289fb0b55455d334c14
2015-04-14tdf#88337 tdf#89193: sw: add missing SwXPageStyle propertiesMichael Stahl1-0/+11
Add the fill style properties so background images etc. are not lost. (regression from 7d9bb549d498d6beed2c4050c402d09643febdfa) Change-Id: I517350eec2f32e4b4bb80427666aad23a31d666a
2015-04-14Related: tdf#90130 gradient transparency goes missingCaolán McNamara1-1/+11
Change-Id: I0af8eb24dab7bb9f5831bec68f9a22ba88c2be19
2015-04-13Resolves: tdf#90130 don't clobber new solid-color on seeing old transparencyCaolán McNamara1-0/+10
Change-Id: I1ea86dca37cbce416564c5e198779dd132125b02
2015-04-07tdf#89802: xmloff: fix ODF import of frame with empty style name refMichael Stahl1-0/+12
draw:fill-gradient-name="" in the graphic properties now causes BaseFrameProperties_Impl::FillBaseProperties() to fail and prevent insertion of the SwXTextFrame. (regression from 6e61ecd09679a66060f932835622821d39e92f01) Change-Id: I9b4f3ddb0f0e1b3a80e86bbdc1af2dade1c8edf7
2015-03-21avoid crash on layout of ooo77837-1.odtCaolán McNamara1-0/+5
by attempting to set the parent as un-joinable for the duration of the Cut/Paste in order to ensure it survives the process ==14185== Invalid read of size 8 ==14185== at 0x27AB1CF4: SwLayoutFrm::Lower() (layfrm.hxx:108) ==14185== by 0x27FE3FD4: SwFlowFrm::PasteTree(SwFrm*, SwLayoutFrm*, SwFrm*, SwFrm*) (flowfrm.cxx:455) ==14185== by 0x27FE4597: SwFlowFrm::MoveSubTree(SwLayoutFrm*, SwFrm*) (flowfrm.cxx:584) ==14185== by 0x2801CF8B: SwCntntFrm::MoveFtnCntFwd(bool, SwFtnBossFrm*) (ftnfrm.cxx:2753) ==14185== by 0x27FE7C29: SwFlowFrm::MoveFwd(bool, bool, bool) (flowfrm.cxx:1795) ==14185== Address 0x11a74da8 is 168 bytes inside a block of size 288 free'd ==14185== by 0x2808CAC8: SwSectionFrm::~SwSectionFrm() (sectfrm.cxx:153) ==14185== by 0x2808DCC5: SwSectionFrm::MergeNext(SwSectionFrm*) (sectfrm.cxx:453) ==14185== by 0x2808EC4B: SwSectionFrm::MakeAll() (sectfrm.cxx:713) ==14185== by 0x27FCD000: SwFrm::PrepareMake() (calcmove.cxx:306) ==14185== by 0x27DCAAC1: SwFrm::Calc() const (frame.hxx:996) ==14185== by 0x27FE3EB9: SwFlowFrm::CutTree(SwFrm*) (flowfrm.cxx:418) ==14185== by 0x27FE4577: SwFlowFrm::MoveSubTree(SwLayoutFrm*, SwFrm*) (flowfrm.cxx:583) ==14185== by 0x2801CF8B: SwCntntFrm::MoveFtnCntFwd(bool, SwFtnBossFrm*) (ftnfrm.cxx:2753) ==14185== by 0x27FE7C29: SwFlowFrm::MoveFwd(bool, bool, bool) (flowfrm.cxx:1795) Change-Id: If96d845fdf22726df513b0dabd2764ad60c85987
2015-03-20fix a bunch of crashtest import failuresCaolán McNamara1-0/+5
as far as I can tell this has been broken since commit 118dfcf180d2d5a2d015ebb5f0082962773b7d24 Date: Thu Apr 17 15:07:52 2003 +0000 <SwSectionFrm::CalcFtnCntnt()> - consider that footnote/endnote can move with a private bug id so not currently possible to find out what the original problem to be solved was, so revert that and lock this down with an import test and maybe we will flush out the original problem eventually. Change-Id: I2af13b9b5875928aa157d47be0aaff2836ba38e1
2015-02-07Fixup --without-x buildRiccardo Magliocchetti1-1/+1
Accept gl linkage in hope of future offscreen mesa support. Avoid linking with GLX though. Change-Id: I4e666f60e74fe34075a8da9eeba95807cf8fe38c Signed-off-by: Riccardo Magliocchetti <> Reviewed-on: Reviewed-by: Michael Stahl <> Tested-by: Michael Stahl <>
2015-01-03fdo#72486 SwWrtShell::SelAll: if in table, then call extended select all ...Miklos Vajna1-4/+16
... only in case the whole table is already selected Change-Id: If7626954460e16945af6b21402a84e90c71ae138
2014-12-02add mode linesTakeshi Abe1-0/+1
Change-Id: Id7825ecd076a5d8cbe926a26bc74fc7d0da1d621
2014-11-10sw: disable failing c&p test on headless buildRiccardo Magliocchetti1-1/+1
Change-Id: If9c3aad600332ae289e05e3b046f8b15292dee57 Reviewed-on: Reviewed-by: Riccardo Magliocchetti <> Tested-by: Riccardo Magliocchetti <>
2014-10-18CppunitTest_sw_odfimport: enable all but one asserts on OS XMiklos Vajna1-1/+3
Change-Id: I95421d51a2750507aec5a576e161efe578fef812 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-10-14bnc#800714 SwTxtFrm::FormatAdjust: still call SplitFrm if we have columnsMiklos Vajna1-0/+11
Regression from c5a8a2c3cbcee0175127a0662e3d820ea4deea22 (sw34bf05: i#84870 - method <SwTxtFrm::FormatAdjust(..)> - do not split text frame which only contains on as-character anchored object, 2011-03-11), the i#84870 fix was for a document which didn't have columns, and didn't consider that this causes a layout loop in case: 1) There are two paragraphs in a section, having multiple columns. 2) The second paragraph has fo:keep-together="always". In this case originally we tried to call SplitFrm(), realized that it didn't help, and then gave up. But after the change, we kept trying to satisfy the two conflicting requirements (balance content in the 3 columns vs keep the second paragraph with the first one). Fix the problem by not calling SplitFrm() only in case we're not inside columns. Change-Id: I64e969ef5e8f519314f5613f8e6fae626ae085ce
2014-10-14CppunitTest_sw_odfimport: allow running a single test onlyMiklos Vajna1-2/+0
Change-Id: I6dac6c98cd60955cf54e9e8554691566d29a34f1
2014-09-30fdo#79269: add a unit test for first-page header tooMichael Stahl1-0/+17
Change-Id: I787c72cd219e16ca89a00dd9073448d8264e7bd8
2014-09-29fdo#79269: fix ODF import of style:footer-firstMichael Stahl1-0/+18
The implementation of SwXStyle's FirstIsShared property is busted, and that causes xmloff to write the footer-first content into the master footer. Change-Id: I520a4929d9d7313da65bcdcf4094f8244382377d
2014-09-29Resolves: fdo#80468 and fdo#81223 image/frame backgrounds wrongCaolán McNamara1-0/+10
writer has code to fill in missing new properties from the old properties if they exist. But xmloff is stripping them out before they get there. Don't strip them out, and add in a missing check for one of the archaic bg colors and add a regression test for fdo#81223 Change-Id: I9a541a9bee0a01c90f2c33383f1144ecd8b0bfff
2014-08-12fdo#82165: ODF import: clear all shapes when removing header contentMichael Stahl1-0/+10
Shapes anchored to the first or last paragraph survive setString("") so need to be deleted with some ruse. (regression from b8499fc3dcf474050f026b8d5cd1d9037bbe42b7) Change-Id: I00a8132583c45d1953c207932cc7f02f3065ae77
2014-03-12fdo#75872: ODF import: fix up graphics defaults stroke/fill colorsMichael Stahl1-0/+20
These have changed a few times, notably in LO 4.0 with commit 895890563cb0cc5fa872bdfd06918a46cdda172d and AOO 4.0 with commit c0eb5e7772c848806db8ab461f77f9549c1d8b2b; unfortunately historic OOo and current AOO do not write the values into ODF files, whereas LO 4.x does (probably by accident, since 45d3577bc5726eee44f491fd30a7f11dc428431a by design). Try to set the defaults depending on the generator; since the defaults are not specified by ODF they are implementation defined anyway so this should be OK. Change-Id: I1270d6e0cdeea5cb493724a0998f661a0cf644f1
2014-02-19CppunitTest_sw_odfimport: add annotation formatting testcaseMiklos Vajna1-0/+11
Most probably this was fixed by 0761f81643a6890457e9ef7d913ab5c88c2593a4 (123792: complete annotations on text ranges feature, 2013-12-19). Change-Id: Ic712c1a33271081205901ddbf5d629d6f2198126
2014-02-10coverity#1130362 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: I58d9c7e933152e0d8ca69125572c820b8dbe7405
2014-02-10coverity#1130363 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: Ibc1e6f5e7c7f2a0546847194de5f77ab51b2d578
2014-02-10coverity#1130364 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: Ic8eab1630b79b49b67646eea52b26e0f24fd2d49
2014-02-10coverity#1130365 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: I1298d220c42aa7282cdc6c256727620ee1a6f749
2014-02-10coverity#1130366 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: Icf7576b12fe3c876193fd87ce07c18e57a3dfad7
2014-01-28bool improvementsStephan Bergmann1-1/+1
Change-Id: Ibeb658e73b588f90242c95d23149f2ef45a7a815
2013-11-15CppunitTest_sw_{odfexport,odfimport,ooxmlexport}: consistent macro namingMiklos Vajna1-15/+17
Change-Id: I4dfcdc851fce49de25b3bd21f733f819a3d02eb3
2013-10-31sw/qa: 1 individual unit test per filter (import/export) testPierre-Eric Pelloux-Prayer1-72/+22
The goal is to have clearer failure message by distinguishing failures (only import, import and export, only export). Change-Id: Ic4fc5f7bfd7c9ddb0705597c3fb994e41d04b5ba Reviewed-on: Tested-by: LibreOffice gerrit bot <> Reviewed-by: Norbert Thiebaud <> Tested-by: Norbert Thiebaud <>
2013-10-12sw: add missing testcase for spellmenu-redline.odtMiklos Vajna1-0/+18
There are various cases here, as a start just test that any spellcheck popup menu in a redlined document should at least contain the "go to prev/next change" menu items. Change-Id: Ic70b6dae4cac8fd970ad54e5015a61d50b024b2b
2013-10-02WaE: unused variableTor Lillqvist1-1/+0
Change-Id: I3c5d542ef57afba0d6e308e033bf179af4216975
2013-10-02fdo#69979 SwCrsrShell::ExtendedSelectAll: exclude headers, tooMiklos Vajna1-0/+17
It turns out, normal Ctrl-A doesn't select headers, footers and fly content, either (just like not selecting footnotes). So do the same when in the "doc starts with table" special mode. Change-Id: Ib9bc397944a4d07ea03bc326f1536733c57f42e6
2013-09-30fdo#69862 SwCrsrShell::ExtendedSelectAll: don't always select footnotesMiklos Vajna1-0/+19
ExtendedSelectAll() was originally invented to e.g. select the whole document, change the language of the selection and then inmediately (before the layout is updated) undo the selection. When using it for "select all and doc starts with a table" purposes, then footnotes shouldn't be selected, just like those are not selected either, when the doc starts with a normal paragraph. Their anchor is still selected, and that's enough to have correct delete and copy&paste. Change-Id: I4fc49db628054a4b8a46effc2d0328eaabcaa9f8
2013-09-20fdo#37606 testcaseMiklos Vajna1-0/+71
Change-Id: I60d34906a90a5143163e516f618648cf7178430e
2013-09-04fdo#68839: add unit testMichael Stahl1-0/+35
Change-Id: Ic47bfdeb1466a3772c95008dbf035f294cc3ece4
2013-08-27Reduce copy&paste by adding SwModelTestBase::getShape()Miklos Vajna1-3/+1
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
2013-04-22Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks1-23/+4
2013-03-22testcase for 62344016de056965a58ea2016d912a68eac0d6b0Miklos Vajna1-0/+16
Change-Id: I5d7544f38c5d48826cad18a655ffd3b621eb0ca2
2013-03-15fdo#61952: add unit testMichael Stahl1-0/+11
Change-Id: Idef40ea4ad615fa5d09d2a5ed6eb3fe861f1b5ea
2013-03-04fdo#56272 SwAnchoredDrawObject::_SetPositioningAttr: fix positionMiklos Vajna1-0/+11
This reverts a part of 51cfbf0cfaec395a99a00f2c20fcba96de9a4427, that is no longer needed, but causes incorrect drawing objects position. The problem was that a non-zero position doesn't mean the layout in a later iteration doesn't change the position, but the referred commit didn't allow later iterations to fine-tune the position. Change-Id: Id91a4c6952d1b58e0c5bc0b1a60991a284c29ddc
2013-02-18fdo#60842: add a unit testMichael Stahl1-0/+12
Change-Id: Ie91fe22f2baf0a280e5cf21c2416228ab414f285
2012-12-21sw: add csv output for extra filter testsMiklos Vajna1-1/+3
Like the minimal filter tests, these tests are invoked from a single cppunit method since commit 0a30cb22a141c26b4eab43a478d32df0769596ec, so some info about exactly what file failed is necessary. If we are at it, also print the (re)loading time as well.
2012-12-19fdo#57881 sw: make UseOnPage independent from SvxPageUsageMiklos Vajna1-0/+9
UseOnPage got changed in commit fa0f42bafbf24e9141ddee728b160b5ab47077f2, but SvxPageUsage got unchanged. Given that right now other applications don't support first page headers / footers, leave SvxPageUsage unchanged and provide conversion methods between the two types.
2012-12-18fdo#58376 testcaseMiklos Vajna1-0/+10
2012-11-18sw: move swmodeltestbase.hxx to qa/extras/inc/Miklos Vajna1-1/+1
If we already have such an include dir, let's have all headers there. Change-Id: I2100b5308e7fdad9d98cfde76434ff485aca20c7
2012-10-21sw: rework import tests to match the syntax of export testsMiklos Vajna1-10/+14
As a side-effect, this reduces the length of the code as well. Change-Id: I83da39968ab7629548dd3c469ea8e648c4574653
2012-09-26sw: remove unneeded using statements in qa/extrasMiklos Vajna1-5/+3
Change-Id: I23b77b9c8d245d84a045bdedda1584419f4fddda