summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
AgeCommit message (Collapse)AuthorFilesLines
2013-09-06bnc#779642 VML import: handle drawinglayer rectangle char spacingMiklos Vajna1-0/+16
Change-Id: I79fa72c9235682030d23a03fdb0c7c40370c4a8a (cherry picked from commit 4cbc41bc4eaa822829e68c1ee11eafe834bb7da7)
2013-09-06bnc#779642 fdo#46361 oox: handle multiple w:p for groupshape textboxesMiklos Vajna1-1/+1
One testcase had to be adjusted, as it seems previously we stripped all newlines at the end (I consider that as a bug), and now we only strip the last one (so the resulting number of paragraphs on the shape and in the source document equal). Change-Id: Ic22b96c2992b53c72e2609e2286622173b86065c (cherry picked from commit f24e4c74d7d6a7d95090c6fa6a584fed7787706c)
2013-09-06bnc#779642 VML import: fix TextHorizontalAdjust when layout-flow is verticalMiklos Vajna1-0/+12
The shape had no special properties about hori/vert text adjustment, so it should be hori left / vert top. Then it has vertical layout-flow, so vert should be top and hori should be right (vert was center). Change-Id: Ia89d8587b6a822ead45198dc5d1ba23907cc3567 (cherry picked from commit b10afb26296e33c77e94a6eda3f2c36c4d34c2aa)
2013-09-03fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frameMiklos Vajna1-0/+10
This is a port of commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de "Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame" from the WW8 filter to the DOCX one. (regression from edc4861a68e0269b83b17e0ec57912a1ce4220ad) (cherry picked from commit 78d1f1c2835b9fae0f91ed771fc1d594c7817502) Change-Id: If1bb4a8a3786aacd618585cf859b57ce9be85c51
2013-09-03bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna1-0/+11
(cherry picked from commit 7d3778e0ef9f54f3c8988f1b84d58e7002d6c625) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx
2013-09-03bnc#816593 DOCX filter: import paragraph spacing from table styleMiklos Vajna1-0/+11
(cherry picked from commit 17e904ed66c3caf87e658b9d3a18d7b13f4a0b52) Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774
2013-09-03bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna1-0/+32
This is a backport of the fix + 3 other commits from master, which were needed to make the testcase pass on -4-1 as well. (cherry picked from commits 74c5ed19f430327988194cdcd6bdff09591a93fa, 824cc4bf4ae9035d4108e8da8e81eb57284f0b54, 53d27a30ce5f2c9f7d37a4089286116854c16215 and 76d1ca523ddcf89cc269fe51c70e66066943ef5a) Change-Id: I62a1f526cf1d4e4056daa1495d61f1b9f5c0b1b2 Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapperTableManager.cxx
2013-08-14w:spacing in a paragraph should also apply to as-char objects (bnc#780044)Luboš Luňák1-0/+13
Otherwise global w:spacing will be used even if overriden locally. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
2013-08-09n#816593: docx consecutive tables with different tblpPr needs to be splitCédric Bosdonnat1-0/+11
When importing docx with 2 <w:tbl> following each other, we have 2 possible behaviors: either merge them as one table as we did before or split them into two tables. The tables need to be split if they have different floating position properties. This required the ooxml tokenizer to repeat the table properties for each row of the table: or how would we know we don't need to split the table? The basic idea behind this hack is to temporarily store the table position and table properties before saving them. Thus we can compare them at the end of the row and decide to split the table or not. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I2e3e70dfe7386090fe356575ee9d0e81aa031dc4
2013-08-05fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widthsMiklos Vajna1-0/+11
Instead of checking if any cells have fixed width, check if all calls have fixed with. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
2013-08-01DOCX import fix for table with auto sizeAdam Co1-0/+12
Reviewed-on: https://gerrit.libreoffice.org/4496 Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ic86f4f142e579bdef3e954492e1c1e382a545739
2013-06-07bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style propertyMiklos Vajna1-0/+13
Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a (cherry picked from commit a22ef599bd3fdcf0bd5c3616aa566a5922624ff3)
2013-06-05bnc#820509 testcaseMiklos Vajna1-0/+20
Change-Id: Iee9909e9c42014ab10ceaa2f8f8e554c25e89157 (cherry picked from commit a9e0ec2b87a99c93b77a210a916b4df44ece454a) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx
2013-05-30bnc#817956 page border shadow testcaseMiklos Vajna1-0/+12
Change-Id: I1ded79d89dcceb3bae5926a2f217cde8bf6aa830 (cherry picked from commit 300ba1a171a37da08d72e278cf38988f1225cc83)
2013-05-30bnc#817956 v:textpath VML import testcaseMiklos Vajna1-0/+26
Change-Id: I4c4c3a84e8d9d048262e6570a8bed0106e8d184f (cherry picked from commit 8931c8f3c58afe35b5b7c98e136825aff04291e3)
2013-05-30bnc#817956 DOCX import of document background colorMiklos Vajna1-0/+9
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to every page style. Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237 (cherry picked from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx
2013-05-23bnc#819882 DOCX import: backport table-related fixes from libreoffice-4-1Miklos Vajna1-1/+1
6718482c072defe5d885030826fef5ef833732e9 2013-03-28 fixed table width, supporting rel table width, fixed grid handling 84f1fa190fc2b91d21b685f4d0ea99aaeea26fe0 2013-03-28 WaE: -Wsign-compare 584322cbbd063e0a8d2c18a5e6a12f213af56057 2013-03-28 fix failing testcases
2013-05-02bnc#779630 initial DOCX import of w:sdt's w:dateMiklos Vajna1-1/+4
Also factor out the w:sdt-related methods to a helper class to avoid DomainMapper_Impl become a God object. Change-Id: Ic1a388940bce89688e8558818f92ce9ac997609c (cherry picked from commit 3ec2d26dc2017ac4a27483febfc63328632f352d) Conflicts: sw/CppunitTest_sw_ooxmlimport.mk writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx
2013-05-01Merge tag 'libreoffice-4.0.3.2' into suse-4.0Petr Mladek1-0/+20
Tag libreoffice-4.0.3.2 Conflicts: basic/qa/cppunit/test_vba.cxx basic/source/runtime/step2.cxx dictionaries helpcontent2 instsetoo_native/util/openoffice.lst libvisio/UnpackedTarball_visio.mk sc/source/ui/vba/vbaapplication.cxx sc/source/ui/vba/vbavalidation.cxx solenv/inc/minor.mk sw/qa/extras/ooxmlimport/ooxmlimport.cxx translations Change-Id: Ic1f06489175f3db92d6bbcebb9732fadc1c61fed
2013-04-29n#592908: docx import, fixed handling of w10:wrapCédric Bosdonnat1-0/+24
commit f837c4288cdae4921b3fb6747ba2e2cd5ce2dcd2 moved the handling of w10:wrap tag in oox, but thus no wrapping was imported any more. The fix consists in letting the w10:wrap element be handled by writerfilter's dmapper if the shape has already been retrieved from oox (which is the case for textboxes). In other cases, make sure that we don't set the Surround property once again in writerfilter as that would override what has been done in oox. Change-Id: I8ab158641afcf6b9945c52238e7f5adb9e8b3adf
2013-03-26fdo#59273 import w:tblLayout of DOCX tablesMiklos Vajna1-0/+12
Also add missing <w:tblLayout w:type=fixed/> to the bnc#780645 testcase to avoid breaking the build. (cherry picked from commits 7329df74df134a77d078f47d5c8b70d54c5d1edb and 4821d894f849a4939bbe6fb0a9a5ddd9e10b0467) Conflicts: writerfilter/source/dmapper/DomainMapperTableManager.cxx writerfilter/source/dmapper/DomainMapperTableManager.hxx Change-Id: I9af50a4c176168e2794eaa9b0e8eaeb6b9d06b13 Reviewed-on: https://gerrit.libreoffice.org/3058 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-03-25fdo#60922 ignore DOCX import of w:position w:val="0"Miklos Vajna1-0/+8
(cherry picked from commit cadb3433b395b53a9eda584ed5fee79ca74e7483) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I10e9c0f1078e36710335a9a48f7f02292c764795 Reviewed-on: https://gerrit.libreoffice.org/2981 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-08fdo#61343 fix DOCX import of OLE object after groupshapeMiklos Vajna1-0/+11
Change-Id: I88d5e49cc3fb915d25c1b2576cdda1fffc9e2f23 (cherry picked from commit 344e4a25eac6505678f4ce8a6c1c8cef83c68276) Reviewed-on: https://gerrit.libreoffice.org/2587 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-07fdo#59638 import of DOCX w:lvlOverride / RTF_LFOLEVELMiklos Vajna1-0/+25
Also handle RTF_F inside RTF_LISTLEVEL. Word typically uses the Symbol font to describe bullet characters instead of using a sane Unicode value, the previous can only be handled if we parse the custom font set for the list. (cherry picked from commits 521586b328305c4466603438a9931993b92873c6, 2f82a08d3565239c2bfe8d21fbebd89bd4657708 and 58c30a3545a5725d704eabd79071db02f1f2cb23) Change-Id: I1491f07c40953949e381a035c1596c207cdc4c35 Reviewed-on: https://gerrit.libreoffice.org/2503 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-02-28fdo#53985 DOCX import: don't try to set empty PageDescNameMiklos Vajna1-0/+11
Regression from 50cb1667020494906afaacb68d4163d1eda527cf. Change-Id: Ie04d5ad37555ed4cfeb34ccb8dc021675fbd25ea Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Signed-off-by: Jan Holesovsky <kendy@suse.cz>
2013-02-25n#779642: Fixed floating tables import in writerfilterCédric Bosdonnat1-1/+16
(cherry picked from commit d0cde9640b52ccfbb28ed1f65bba0927afd7b69b) Change-Id: Id60a08811f238db505d51b0e1381427a8f5df9cf Reviewed-on: https://gerrit.libreoffice.org/2307 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-02-25n#779642: ignore framePr inside table or the table import won't workCédric Bosdonnat1-1/+10
(cherry picked from commit 874f0a1be443b8027d5aba2285866f31cf4169e5) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I72996da79ca22a09fb490d06bcd34f741d7093ac Reviewed-on: https://gerrit.libreoffice.org/2306 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-22n#792778 DOCX import: parse group shapes in oox onlyMiklos Vajna1-12/+15
Previously textframes inside groupshapes were tried to be imported as TextFrames, but then their addition to a GroupShape failed, so the text simply ended up as a normal paragraph. Fix this by importing members of groupshapes as drawinglayer objects, just like how the WW8 import does. Also fix two testcases, which implicitely tested that the groupshape VML element is ignored on import. Change-Id: I1a9fba8a5fd532203a825e55b1d5996277ea12fa Signed-off-by: Andras Timar <atimar@suse.com>
2012-12-04docx fine dashed table border import test case.Eilidh McAdam1-0/+15
Change-Id: I27ee8e360b8fd530f8cfefc58c8a0f96d706b979 Reviewed-on: https://gerrit.libreoffice.org/1125 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-11-26sw/qa/extras: default style change name changedMiklos Vajna1-4/+4
Regression from 2e4f4171d6a29858108922619d680606b633d8f2. Change-Id: Iaaf1cf180458e9b745875aae457e1e3355566385
2012-11-19n#780645 DOCX import: add support for fixed column widthMiklos Vajna1-0/+13
In general, DOCX tables provide a grid for the table, then use spans in case different number of cells are used in different rows. In this case, the cell width is ignored, as the wished width can be counted from the grid and span values. However, it's also valid to simply provide more cells then the amount defined by the grid, and in this case the cell width should decide the final width of the cells. This commit adds support for this later case. Change-Id: I0dd6c1f0c06f81c2afa00489b7ad1f33ff300a7c
2012-11-18sw: move swmodeltestbase.hxx to qa/extras/inc/Miklos Vajna1-4/+3
If we already have such an include dir, let's have all headers there. Change-Id: I2100b5308e7fdad9d98cfde76434ff485aca20c7
2012-11-08missing braceCaolán McNamara1-0/+1
Change-Id: Ib54dd8fe55f7c527e4f163e7ae559e9c3483407b
2012-11-08testcase for a recent bnc#773061 fixLuboš Luňák1-0/+13
Change-Id: I60874c6ad8ccb9767961ed0064b9a15bfc1b07d5
2012-11-06docx import: round float value to int when computing cells widthPierre-Eric Pelloux-Prayer1-2/+2
Previously, truncating float to int was introducing accumulating rounding errors, which lead to visible change in column widths. Change-Id: I4557c716fba48dfd9a6c1c4d2cd0d0aa7aeae865
2012-10-31NS_ooxml::LN_CT_TrPrBase_gridBefore/After testcaseMiklos Vajna1-0/+14
Change-Id: Id488ffa6a6b01937fe32e4c80af45c40ebf673ec
2012-10-22sw: remove duplicated testMiklos Vajna1-42/+0
Now that the import/export tests are reworked, this duplication can be dropped. Also rename the test file, n<number>.docx is for test files from bugzilla.novell.com. Change-Id: I48cf5619fc44341c2e468f756939dc676564da53
2012-10-21sw: rework import tests to match the syntax of export testsMiklos Vajna1-114/+56
As a side-effect, this reduces the length of the code as well. Change-Id: I83da39968ab7629548dd3c469ea8e648c4574653
2012-10-15fdo#52208 DOCX import: don't always ignore cont sect break at the doc endMiklos Vajna1-0/+13
Regression from commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131, continuous section break does make sense at the end of the doc, if the previous type was a non-continuous. Change-Id: I6d82c67e068d8dc3ce1edb1a5fe6ad293afd805d
2012-10-11fix sw_subsequent_ooxmlimport after df99bb3Miklos Vajna1-1/+1
Change-Id: Iffe97b25ad8714342a55bbe54909dd1a3d47bdec
2012-10-11n#783638 testcaseMiklos Vajna1-0/+13
Change-Id: I6b6093ba1e6961e421ac9754fdbdea9ba63eeda0
2012-10-03testShadow: test shadow width to be non-0 to avoid precision errorsCédric Bosdonnat1-1/+1
Change-Id: I956f2c7f55d7e4966971bc310858967298d2933d
2012-10-02docx import: add table position unit testPierre-Eric Pelloux-Prayer1-0/+46
Change-Id: I21aa721e20be4b7f9984bf6910a94a7b7bf09c7a Reviewed-on: https://gerrit.libreoffice.org/715 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-10-02docx import: set table above/bottom spacing to 0Pierre-Eric Pelloux-Prayer1-0/+25
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I3e0397dd3d5d14f1e584ac7bc3d22d4638393b06
2012-10-01n#782345 testcaseMiklos Vajna1-0/+13
Change-Id: Id5204572ab9fddf3f15b5fd1b96d8f25e7166878
2012-09-28n#782061 testcaseMiklos Vajna1-0/+12
Change-Id: I6aa95063ac8fe825b47decc68b08a35d81e4d59d
2012-09-27n#781825 fix DOCX import of bottom para margin autospacingMiklos Vajna1-1/+1
If w:doNotUseHTMLParagraphAutoSpacing is enabled, it should be 100, not 200, see SwWW8ImplReader::GetParagraphAutoSpace(). Change-Id: I29c5e97c828f0f55b655410198bfa03dc42a196d
2012-09-27n#779627: VML: import mso-position-vertical:center and friendsCédric Bosdonnat1-1/+21
This allows to properly position objects that are vertically and/or horizontally centered relatively to the page. Change-Id: I1f7e78c5b828679817cdfc72e4d90a0850b242fa
2012-09-26DOCX image drop shadow testcase.Eilidh McAdam1-1/+19
Change-Id: Ibbbb27fdf0abff997d31ae8814812f7af1ec15af Reviewed-on: https://gerrit.libreoffice.org/704 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2012-09-26sw: remove unneeded using statements in qa/extrasMiklos Vajna1-2/+0
Change-Id: I23b77b9c8d245d84a045bdedda1584419f4fddda