summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
AgeCommit message (Collapse)AuthorFilesLines
2013-10-16fdo#69548 do not remove last space from hyperlink targetAndras Timar2-0/+8
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I7efd68fe21dddd7d9262d3e0b7400db67504e6bc
2013-10-16sw: Smart-Art related UTs updated to new optionAndres Gomez2-2/+34
The "ooxmlexport" unit test for Smart-Art has been updated to just check for the new rendered bitmap that substitutes the generated basic shapes. The "ooxmlimport" has been updated with a new "testSmartart" unit tests which checks that the importing has been done to just basic shapes. For this, the "run" method has been customized so we can set the proper filter option. Slightly modified the expected results in the "testChartProp" unit test since linking it to additional libraries has modified the dimmensions of the imported chart in few units. Made the "ooxmlimport" C++ unit tests in the "sw" module to depend on the "drawinglayer" and "svx" components and the "utl" library. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I0900a50cfee07999511d071bc9932477ad9430c5
2013-10-16Code changes & unit tests for fixing multicolumn section separator line issueYogeshBharate2-0/+16
Problem Description: In case of multicolumn sections, separator line was getting added during export to docx. Unit test cases added to verify the code changes. Change-Id: Id65ac4d3878eed298882c85082cec9575f914d83 Reviewed-on: https://gerrit.libreoffice.org/6211 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-15sw: enable (most of) CppunitTest_sw_ooxmlimport/export on MacMiklos Vajna1-1/+3
This used to be problematic due to the flashing windows, but it was stated recently that we already have those anyway due to e.g. gengal. It turns out all our DOCX filter tests pass just fine on Mac, except one checksum test -- make *that* an exception instead. Change-Id: Id5e620a33b9b05f154e4072a8a49f335837079ea
2013-10-07DOCX:fdo#43093 fix wrong direction and alignment for RTLFaisal M. Al-Otaibi2-3/+42
Change-Id: If362d80a86a7493f2d43e6d661b94fc03942711f
2013-10-01bnc#779620 DOCX import: try harder to convert floating tables to text framesMiklos Vajna2-0/+10
Since 78d1f1c2835b9fae0f91ed771fc1d594c7817502, we convert floating tables to text frames only in case it's possible that there will be wrapping, to give better results for multi-page tables, which are multi-page, and technically floating ones, but that has no effect on the layout. The problem was that we try to do this decision too early, effectively the page width and margins were counted from the default letter size, instead of the actual values, which did not arrive at the time of the decision. Fix this by moving this logic at the section end. Change-Id: Ic1fbceb54c8ec223ed01836fafe6220bb3b2410a
2013-10-01Unit test case added to verify chart rendering in Writer for docxTushar Bende2-0/+14
Unit Test case to verify Width & Height of Chart rendered Change-Id: I2899b9bdaf251f82400ebee273b23d09add4b468 Reviewed-on: https://gerrit.libreoffice.org/6056 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-26fdo#69636 VML import: handle mso-layout-flow-alt shape prop for sw framesMiklos Vajna2-0/+11
Writer core doesn't support this, and this has been a problem for table cells as well. There the workaround we're using for quite a while is to do the rotation at a text portion level instead, which results in reasonable layout for simple cases. Do the same here. One additional complexity is that the API between oox and writerfilter is a single UNO shape, we get this property in oox, and we have to handle it in writerfilter, when the text frame is already attached to some text. Kill this problem by adding a FrameInteropGrabBag for sw text frames: it's useful anyway, and then we can pass around this property inside the grab bag. Change-Id: Idb5ec83b5cbdde8f29d15b2cebfad24226bb6507
2013-09-20fdo#64491: Move SmartArt test from import to exportMiguel Gomez2-90/+0
Now that loading and saving SmartArt components is fully working, move the unit test from the import section to the export one, where both import and export will be tested. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I5e0d182ee941180ba80c2b310d85528ff75ef296 Reviewed-on: https://gerrit.libreoffice.org/6006 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-20writerfilter: OOXML theme saved in InteropGrabBagAndres Gomez1-1/+19
The XDocuments representing the DOM of an OOXML's theme document is now stored as the PropertyValue "OOXTheme" into the "InteropGraBag" property of the SwXTextDocument. Added the importSubStream() method to the writerfilter::ooxml::OOXMLDocumentImpl class in order to create the XDocument for the theme XML fragment stream and invoked it during the resolve() method. Modified the writerfilter::ooxml::OOXMLDocument abstract class to be able to hold the OOXML's theme XDocument. Added the set/getTheme() methods to store and obtain the XDocument directly. Modified the WriterFilter::filter() method to store the OOXML's theme XDocument in the "InteropGrabBag" property of the TextDocument service SwXTextDocument implementation. Updated the UTs accordingly. Change-Id: I3960590fcf4856caf770908b983ffb6898f061c0 Reviewed-on: https://gerrit.libreoffice.org/6002 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-12WaE: C4701: potentially uninitialized local variablesTor Lillqvist1-1/+1
Change-Id: I323fa5f1c9b94166d32b0457905ccb1ec06ecd5c
2013-09-11DOCX import: fix default section break type inside multiple columnsMiklos Vajna2-0/+17
Change-Id: I7c44a2bdb69563953d3257b435aeed5bae50f7b2
2013-09-11oox: Smart-Art DOMs stored in the InteropGrabBagAndres Gomez1-0/+47
The XDocuments representing the DOM documents of a DrawingML diagram (Smart-Art) are now stored as the PropertyValues "OOXData", "OOXLayout", "OOXStyle", "OOXColor" and "OOXDrawing" into the "InteropGraBag" property of the parent SvxGroupShape created from such diagram. Modified the oox::drawingml::dgm::Diagram class to be able to hold the map storing the XDocuments and its names. Added the getDomMap() method to obtain the map directly and the getDomsAsPropertyValues method to get the map as a sequence of Property Values. Modified the methods for importing and loading the Smart-Art into the Diagram so they add automatically the DOM documents to it. Modified the oox::drawingml::Shape class to be able to hold the sequence of PropertyValues storing the XDocuments and its names coming from the oox::drawingml::dgm::Diagram class. Added the getDiagramDoms() and setDiagramDoms() methods. Enhanced the oox::shape::ShapeContextHandler::getShape() method to add the extended drawing document to the oox::drawingml::Shape class. Modified the oox::drawingml::Shape::createAndInsert() method to store the sequence of XDocuments in the "InteropGrabBag" property of the GroupShape service SvxGroupShape implementation representing a Smart-Art. Change-Id: I7d0b9dfbfc9d5299ddd25fab394e5e9a422d1dd1 Reviewed-on: https://gerrit.libreoffice.org/5849 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-06bnc#779642 VML import: handle drawinglayer rectangle char spacingMiklos Vajna2-0/+16
Change-Id: I79fa72c9235682030d23a03fdb0c7c40370c4a8a
2013-09-05bnc#779642 VML import: fix TextHorizontalAdjust when layout-flow is verticalMiklos Vajna2-0/+11
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
2013-09-04fdo#68787 DOCX export: handle zero width footnote separatorMiklos Vajna2-9/+0
Change-Id: Ieb1d8d1f8609558b4af06630b603a51da3e665f4
2013-09-04fdo#68787 DOCX import: handle when w:separator is missing for footnotesMiklos Vajna2-0/+9
There were two problems here: 1) OOXML has no way to explicitly disable the footnote separator, what is does is that it omits the <w:separator/> element in that case. We didn't parse that previously -- now we do, and if it's missing, the separator is disabled. 2) The footnote stream isn't read by the importer, only when the main stream references the footnote one, the relevant part of it is parsed. At the moment we always parse the first (special, "separator") entry in the footnote stream, that may be optimized later if it becomes a bottleneck. Change-Id: Ie588270a212fc90fc41095029a362cfd832b24f8
2013-09-03fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frameMiklos Vajna2-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) Change-Id: If1bb4a8a3786aacd618585cf859b57ce9be85c51
2013-09-02bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna2-0/+11
Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf
2013-08-29bnc#816593 DOCX filter: import paragraph spacing from table styleMiklos Vajna2-0/+11
Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774
2013-08-28bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna2-0/+13
The bugdoc has a table with a single cell, and also a nested table in that cell. Both tables have auto width. The problem was that the width of the outer table was too large. There is a trick in DomainMapperTableManager::startLevel() to get the cell widths at the correct level: do the same in DomainMapperTableManager::endLevel(), and that'll fix the table width problem. (Because with that, the outer table will correctly have access to its cell width.) Change-Id: Ib750f0475364fd7e47c445cb54f2df34f3af085d
2013-08-27Reduce copy&paste by adding SwModelTestBase::getShape()Miklos Vajna1-84/+28
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
2013-08-22fdo#67737 : fix for flip not being imported & rendered correctlyRi GangHu1-2/+3
Signed-off-by: Adam Co <rattles2013@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/5272 Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I5c8440edad0381e33b64f64bb54aa8f1bc304007
2013-08-22DOCX tests: move testTableFloatingMargins to the export suiteMiklos Vajna2-14/+0
This was added to the import suite temporarily, to be sure the import part does not regress till the export part passes, which is now the case. Change-Id: Ib9291ab3ef0beaa407f025c6f81bda9cdf9f75e9
2013-08-22oox::drawingml::convertEmuToHmm: fix rounding for negative valuesMiklos Vajna2-19/+0
This commit also moves the floating table DOCX import testcase to the export suite. That test now passes fine, though previously it failed with: - Expected: -199 - Actual : -198 Due to the rounding error. Change-Id: I9bdc9295f68b6bd3e5f5bee868aae15194b30804
2013-08-15DOCX import: handle custom left cell margin for float table positionMiklos Vajna2-0/+14
Change-Id: I5bc51b739c663d3e123c9d7fb4c2a70f01f8c841
2013-08-15DOCX import: handle w:leftFromText and w:rightFromText for floating tablesMiklos Vajna1-1/+1
Left margin wasn't implemented, that's simple. Right margin of the table was set to the cell margin in commit 53d27a30ce5f2c9f7d37a4089286116854c16215, which turns out to be wrong: it's true that the right margin should be >0, but not because of the cell margin but because of the table margin. The new behavior matches what the binary import always did. Change-Id: Ifc24e4f086c49d5d575defdfca1d27e497fa03dc
2013-08-14DOCX import: fixed horizontal position of floating tablesMiklos Vajna2-0/+19
In Word, just like normal tables, floating tables should be positioned in a way that the start of the cell text has the same horizontal position as normal paragraph text. To emulate this, first the table should be moved left by the table border distance, then also by the border with / 2; as done for non-floating tables already. Change-Id: I581311fbb08009e6c1839106e8f615d078a4a705
2013-08-14w:spacing in a paragraph should also apply to as-char objects (bnc#780044)Luboš Luňák2-0/+13
Otherwise global w:spacing will be used even if overriden locally. Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
2013-08-12VML import: handle rotation on groupshapesMiklos Vajna2-0/+10
Change-Id: I37f0081ae0a8af838c9f5bf158b340d726d7d1a3
2013-07-31Convert utf-8 bytes to \xNN hex representationTor Lillqvist1-1/+1
Change-Id: I5d1cc0331278f09a6e32345980c660d877d606fa
2013-07-31Revert "fdo#66246 fdo#66395 BOM for MSVC with UTF-8 unfriendly codepage"Fridrich Štrba1-1/+1
This breaks tinderbox builds. Better fix on the way. This reverts commit ded871e9c1a69f640d6283ae6f79820689f0d612.
2013-07-31fdo#66246 fdo#66395 BOM for MSVC with UTF-8 unfriendly codepageIsamu Mogi1-1/+1
MSVC misinterprets UTF-8 source code without BOM as ANSI/OEM codepage. For that reason if local codepage is unfriendly to UTF-8, it sometimes causes compilation error. Change-Id: I8acd5500e581e020fd60b5a2ec20629f92fdf87c
2013-07-26fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widthsMiklos Vajna2-0/+11
Instead of checking if any cells have fixed width, check if all calls have fixed with. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
2013-07-17Related: fdo#65632 DOCX filter: fix import of non-redlined footnoteMiklos Vajna2-0/+13
Change-Id: Ie1a86e6b59c43c3ee54076d5d68aa3fca0d6a515
2013-07-04bnc#820504 VML import: don't anchor shapes TO_PAGEMiklos Vajna2-1/+7
In theory, this is a problem because Word formats only support AT_CHAR and AS_CHAR, so importing something as AT_PAGE is buggy. In practice, this also leads to unvisible shapes, since f0d001a378c64ea457e722266e60c96522c72e9b. Change-Id: Ie730d67a789ef12734cede1f9b6c27764a66f237
2013-07-02fdo#46361 testcaseMiklos Vajna2-0/+23
Change-Id: Ie7ce4fb5c32ff4b3c1f3d7ee92d8358ae67fc6c1
2013-07-02fdo#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
2013-06-28DOCX import fix for table with auto sizeAdam Co2-0/+12
Change-Id: Ic86f4f142e579bdef3e954492e1c1e382a545739 Reviewed-on: https://gerrit.libreoffice.org/4496
2013-06-21fdo#43641 testcaseMiklos Vajna2-0/+13
Change-Id: I3426c7c23eb23fa7f91320ac036b0eb565bbc330
2013-06-18added unit test for n#820504Cédric Bosdonnat2-0/+12
Change-Id: I804e081a564d24d3896160f817051b19da884c34
2013-06-15fdo#58819 testcaseMiklos Vajna2-26/+0
Change-Id: I94c5a92db38c929a0c8b15e7906a941e39594017
2013-06-07bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style propertyMiklos Vajna2-0/+12
Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a
2013-06-05bnc#820509 testcaseMiklos Vajna2-0/+19
Change-Id: Iee9909e9c42014ab10ceaa2f8f8e554c25e89157
2013-06-05sw: drop redundant page-background test from ooxmlimportMiklos Vajna2-9/+0
Commit 515701a1ff18d04ede235bef862c465adf41062f copy&pasted the test to the ooxmlexport suite, which tests the import already. Change-Id: I5f60b7c8f8b80189f66ac562f2c338344d91394f
2013-05-31n#816593: docx consecutive tables with different tblpPr needs to be splitCédric Bosdonnat2-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. Change-Id: I2e3e70dfe7386090fe356575ee9d0e81aa031dc4
2013-05-30bnc#817956 page border shadow testcaseMiklos Vajna2-0/+12
Change-Id: I1ded79d89dcceb3bae5926a2f217cde8bf6aa830
2013-05-29bnc#817956 v:textpath VML import testcaseMiklos Vajna2-0/+26
Change-Id: I4c4c3a84e8d9d048262e6570a8bed0106e8d184f
2013-05-28n#816593: Floating table width import fix: adjust the frame widthCédric Bosdonnat2-0/+4
Change-Id: I8212bc5981418f6cbd514bf5002e6a5dbdf53152
2013-05-27bnc#817956 DOCX import of document background colorMiklos Vajna2-0/+9
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to every page style. Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237