path: root/sw/qa
AgeCommit message (Collapse)AuthorFilesLines
2015-03-26fix bugdoc that wasn't cherry-picked properlyChristian Lohmaier1-0/+0
copy from 9ac4e1b0b5b3c2eab2405f6403ea9cf84252b41a, as git fails to cherry-pick/merge itself. Change-Id: Ie6b85546f327b92d7ea36b88eed6e5b7b068fa23 (cherry picked from commit 4ffd96036440545a24312f170cd1c5ce79154640)
2015-03-10tdf#89520 Make TOX creation more robustTobias Lippert1-0/+14
The code is now more robust and will accept illegal arguments. Change-Id: I43ae82b953cea845fb170aa7b6e8d42470ad4e5e Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 4bdbea5447f36beb9cc33df173a89a49a9918290) Signed-off-by: Michael Stahl <>
2015-03-03cp#1000115 SwTxtFrm: don't join follow just because it has no contentMiklos Vajna3-0/+232
The problem was that the bugdoc had a table, and inside the table there was a long paragraph that flows to the next page, but only the paragraph mark of it does so. We first split the frame to have space for the paragraph mark, but later decided that all the content would fit the first frame, and this way the last hard line break and the paragraph mark was painted on each other. This is normally not a problem without tables, because SwTxtFrm::FormatAdjust() just calls SplitFrm(), sets its nNew flag to non-zero make sure that later SwTxtFrm::_AdjustFollow() doesn't try to join it, and we're ready. However, when the paragraph is inside a table, then the paragraph was formatted multiple times, and next time when we already had a follow nNew was not set, so even if there was a correct split first, the new frame was joined later. Fix the problem by explicitly setting nNew for the "in a table and paragraph ends with a hard line break" case, that way we don't blindly join the frame, only in case there is enough space for the follow in the master. (cherry picked from commit 7e33cce05b2df3f1761bcc66606c4d3b2b2671e9) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Iede654740dcb0d8aa768d742ee330208291a383a Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-02-22tdf#88811 SwXText::convertToTextFrame: handle shapes anchored to usMiklos Vajna2-0/+34
(cherry picked from commit 38f2b8b3b16aab19a2564ec699d253d3dccecc3c) Change-Id: Iedf8eacd37b8ed8e307a10e8ade32f53c7417c4a Reviewed-on: Reviewed-by: Zolnai Tamás <> Tested-by: Zolnai Tamás <>
2015-02-11Related: tdf#88583 RTF export: need to take care of fill attributes when ...Miklos Vajna2-0/+7
.. building the color table (cherry picked from commit 87a5cf7db1f070cbc4a674a1c12c805a2c950856) Change-Id: I8a74640e0d51d76b910394be5210c18d89818edd Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
2015-02-09Related: tdf#88583 writerfilter: import paragraph color as fill attributesMiklos Vajna1-3/+3
In theory this is to be in sync with the ODF import. In practice the old UNO property seems not to have a proper fallback to populate the doc model with the fillattributes, so without this even if the import result is visible, it would be lost on ODF export. Additionally, this detected a bug in SwUnoCursorHelper::makeRedline(), where paragraph format redline tried to use the map of a text portion instead of a paragraph. (cherry picked from commit 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e) Change-Id: I026e38e1990ed2a460624a8d967a16ae3fb6c512 Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
2015-02-07tdf#76291 adapt unit test to libreoffice-4-4Andras Timar1-2/+3
Change-Id: I12c74380b65e463be352825c7f1459393883283b
2015-02-07tdf#76291 unit test for html export href encodingVasily Melenchuk2-0/+9
Change-Id: I273af8b570adfcb7bfb784495bc31d2f4f1ee00b Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <> (cherry picked from commit 675e1fe198298702ced8eab02a7df5164d66a8f0) Signed-off-by: Andras Timar <>
2015-02-05tdf#88583 MSWordExportBase: fix handling of paragraph background colorMiklos Vajna2-0/+7
Regression from 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: i#124638 Second step of DrawingLayer FillAttributes..., 2014-06-02), the problem was that exporters still expect an SvxBrushItem for the para background color, while doc model was changed to have an XFillStyleItem / XFillColorItem pair instead. (cherry picked from commit 60cdeb2d441a6bf5c55f511f574b2b9dd598fbb8) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: Ib94fda103ec35a6f087307aafdd890183d9d935f Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-30tdf#75996: sw: correct bookmark positions when deleting textMichael Stahl1-0/+43
The problem is that SwUndoDelete will move the fully selected nodes to the UndoNodes but it leaves bookmarks with their SwIndex pointing to the deleted nodes. The SwNodeIndex are corrected by SwNodes::_MoveNodes() so they point to a different node than the SwIndex. This only happens if only one position of the bookmark is inside the deletion range; if both are, the bookmark will be deleted by SwUndoSaveCntnt::DelCntntIndex(). Also joining the 2 start/end nodes of the selection will accidentally correct the bookmarks but only if it happens to delete the end node. (and apparently there is also a DeleteRange method that doesn't join) Change-Id: I91ec362bb833328f8d681fd9458cb915c4efb267 (cherry picked from commit 370febbf19a5f362394d1c9e69b12dcb218f6501) Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-24fdo#72486 SwWrtShell::SelAll: if in table, then call extended select all ...Miklos Vajna2-5/+18
... only in case the whole table is already selected Change-Id: If7626954460e16945af6b21402a84e90c71ae138 (cherry picked from commit fa39e7970496537258eaad1f5351db2d675225b6) Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-23fdo#68963 recognize __RefHeading__ bookmarks as TOCJustin Luth2-0/+7
LibreOffice recognizes MS Office TOC, but LO files saved as .doc format had no text showing. Now bookmarks using the LO naming convention are also imported as TOC bookmarks. testcase included Change-Id: I9b2855e9d00f4d103c3be22b1b1185c557865d87 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-22Resolves: fdo#87601 specific html doc hangs on loadCaolán McNamara1-0/+100
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349 (cherry picked from commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3) Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
2015-01-19fdo#84714 ODT export: write <loext:table> inside <draw:custom-shape>Miklos Vajna2-0/+10
(cherry picked from commit e4de5b40eb7220da2d337eb98d7905a98dc12c72) (cherry picked from commit 80eb001e6a861c68f2915d4eebded5e36e1875f6) Change-Id: I543ec24f8825bcc7c35acc106402f4fc6b4b5d79 Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
2015-01-16rhbz#1180114: writerfilter: don't crash on w:customXmlDelRangeStart etc.Michael Stahl2-0/+5
We can't do anything sensible with these CustomXML elements but now we have to handle them because. (regression from 9dbf817fe5c5253fba0831aefa17575ae0ba3af1) Change-Id: If4247890ff9961a77434587802670d28608a7922 (cherry picked from commit f22964e0e622af1168e241f933e5cf98e093ec2b) Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-07fdo#86963 SwXShape: don't ask SwTextBoxHelper for ZOrder of child shapesMiklos Vajna2-0/+8
Regression from commit 01fc08c0b5c57fef8ad3755672f4266d85e849a5 (fdo#85554 SwXShape: fix getting ZOrder property when doc contains TextBoxes, 2014-11-20), the problem was that we returned wrong ZOrder of shapes inside group shapes. In SwXShape::getPropertyValue(), pObj points to the Writer-interfacing outermost group shape in case of shapes contained by group shapes, while GetSvxShape() gives access to the real shape. Given that TextBoxes are only possible at the highest level (and not inside group shapes), just check if the two pointers are the same: when not, then no need to convert anything. With this, child shapes get back their original ZOrder -- before in case the group shape had ZOrder=0, all its child shapes had ZOrder=0 as well. (cherry picked from commit 97952280f0adbe195e6a2e0bab8a21a7e352a721) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: I9c4097154130cd04f6ab2f2082abafc1d4333872 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-06CppunitTest_sw_ww8export: use SAL_NEWLINE_STRINGMiklos Vajna1-1/+1
This makes CppunitTest_sw_ww8export pass on Windows again. Change-Id: I16fed4eabbe7b9ccdcc0c71361b85b0e13f2245a (cherry picked from commit 4d3b725000e537ce6199f0abd1c80580c9bf95c8)
2015-01-05i#93570 DOC import: handle commented text ranges via RES_FLTR_ANNOTATIONMARKMiklos Vajna2-0/+12
And add a minimal reproducer that shows how the old way was broken. (cherry picked from commit 0ec0ec267986644084baaa5bda5ba917dc5744df) Conflicts: sw/source/filter/ww8/ww8par.cxx Change-Id: Ic2dadf9905d603b0fd0573651b235ecd5dd70e71
2014-12-18Build fix for gcc 4.7.Kohei Yoshida1-3/+3
Change-Id: Ib2a477319f843c9da4f9fa4cb9e491bef8b3f03b
2014-12-16(related fdo#84685): writerfilter: RTF import: support \tc TOC entryMichael Stahl2-0/+10
Change-Id: Icda252e1f092707728d3a24df50fba7080e759bb (cherry picked from commit 1dd1dfc152c7cbeb374fe4f38b08c6af9cef2c06)
2014-12-16fdo#84685: writerfilter: RTF import: support \xe index entryMichael Stahl2-0/+17
Change-Id: Ia957541a5997961aa86b2eb8537ebd29d3092691 (cherry picked from commit f14e6e06b9e3c82c267649d63512a3538e5ee2f5)
2014-12-16fdo#86857: sw: fix HTML export of page style background colorMichael Stahl2-0/+44
SwPageDesc no longer contains RES_BACKGROUND but XATTR_FOO. Change-Id: Ie722b0279f9d9831338f6613a4722010afd1543e (cherry picked from commit 298e144f8235bb4fe48e204764ec0ba936f3b0c0)
2014-12-14fdo#86761 RTF import: positive border width and fLine=0 means no borderMiklos Vajna4-2/+54
Regression from 01a32b7d074511bed24044dc94e1159aea62722b (fdo#85179 RTF filter: import image border, 2014-10-23), there were a number of problems here: - CppunitTest_sw_htmlexport: revert back to the old behavior, where in case there is no border, we don't set the color of it. - The testcase of the above commit omitted fLine=1 shape property, which is present in the original bugdoc, and only with that should we put a border around the shape. - Let fLine=1 explicitly change the line style from NONE. - dmapper: if line style is NONE, then don't bother setting the border color and width. Change-Id: Iffee41066d42822b699c478821645b9742df3f58 (cherry picked from commit 4568d1d298bf4fc98dcd86384743a04587a2fe6f)
2014-12-11Add undo operation for deleting a bookmark + unit test, related fdo#51741Matúš Kukan1-0/+36
(cherry picked from commit 9338bea6e8dfab8d360fe8ab19dd5d75071bfc2a) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/core/undo/unbkmk.cxx Change-Id: I79d8d3c30b6b0b2cc253963fdd50019aec033e12
2014-12-08fdo#86750 RTF import: fix table of contents linksMiklos Vajna2-0/+10
Change-Id: I0f3d35a0e64c9ce5646fa63eda317bee42de5540 (cherry picked from commit 4517c94000153eab6c034ea548698953dd93f794)
2014-12-07Fix buildZolnai Tamás1-2/+2
Change-Id: Ibc6553c8f529eb7bcd3d97ebd2219c5047c5f9c0
2014-12-07Test for linked graphic export / import of WriterZolnai Tamás3-0/+63
Change-Id: Ib41921e9ceed30a05e16ace298d9c5dc87cc5458 (cherry picked from commit 3f28f67084f12fd806e05020ed8bac8d5a05c025)
2014-11-30fdo#72031 RTF import: bogus call to getBestTextEncodingFromLocale()Miklos Vajna2-2/+8
There were two problems here. First, commit bbe3627eece0c3486e7ea11f2f13377aaa3a8fed (rtftok: stop sending sprm:CRgFtc{0,1,2} tokens, 2014-03-05) broke the use-case when the font encoding is 0, but it's present. Before that commit, we parsed the font encoding instantly; after that commit we parse it once we have a font name. If we do that, then we have to have an idea if we have a font encoding. Given that 0 is a valid encoding, use -1 for the "have no encoding" case instead. Second, commit 7839633fb356285652ed96f4bf3f85bcd5b561a4 (fdo#85889 handle pc, pca and mac rtf keywords in writerfilter, 2014-11-24) abused m_nCurrentEncoding, which is meant to be used within the font table only. The problem with this is that this way only the first font will get the encoding, while the spec says it should be used in every context where there is no other explicit encoding. Fix this by setting the default encoding for those 3 control words instead -- and consider the default encoding in getEncoding(). Change-Id: Ia1d71f8ce70f2a53a3770b4840e21362d082e71f (cherry picked from commit fa15d039e3a553da8500c17190d27169a9477cf2)
2014-11-26always pass bookmark name through to domainmapperCaolán McNamara1-0/+43
the rtf doc has three bookmark starts but only two matching bookmark ends. The tokenizer has three starts 0, 1, 2, but 0 is missing an end. Without the end of 0, the mapper never inserts an entry for it, so later inserts the start of rtftok index 1 as mapper index 0, and passing the end for a bare "1" cannot be found by index. If we pass the name then it finds it by name as mapper index 0 and all is well. Change-Id: I344db84e4f1c7d55fca59cdfe692080c7d0b8033 (cherry picked from commit 2b54caceab9d975bffa7e24bf732cb877b16632f) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-11-24fdo#85889 handle pc, pca and mac rtf keywords in writerfilterAndras Timar4-0/+35
Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342 (cherry picked from commit 7839633fb356285652ed96f4bf3f85bcd5b561a4)
2014-11-22fdo#82006 RTF filter: import \sbauto and \saautoMiklos Vajna2-0/+12
Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd (cherry picked from commit bb77fd64f9219f1b8f990f5041d81cfddd021213)
2014-11-22RTF import: fix handling of multiple \lfolevel control wordsMiklos Vajna2-0/+36
Change-Id: I242853d491c2ef83f192486fa6fe5a3407700047 (cherry picked from commit 74249cb6f4f52b7c10ebaa92f943920f6f94aaf4)
2014-11-21WaE: ‘isNumber’ [-Werror=maybe-uninitialized]Eike Rathke1-1/+1
Change-Id: I307af9b8619db00afaef378df60352c06eb1e4c9 (cherry picked from commit 04b3a3c801bc452f659048a816829300d6b2a16f)
2014-11-21WaE: ‘isNumber’ [-Werror=maybe-uninitialized]Eike Rathke1-1/+1
Change-Id: I5a46eb90749965193d2965740d85a1a2eb1ce641 (cherry picked from commit 7171f7920ee2e8d31f51d27eab86305ecf14626e)
2014-11-21WaE: ‘isNumber’ [-Werror=maybe-uninitialized]Eike Rathke1-1/+1
Change-Id: I17ea9518e862b8c97c4c3f4564caedf9d045b7b3 (cherry picked from commit 82e5f287cc278781cdedee0d92fb4ce17cbc42bc)
2014-11-20make FastSaxParser provide the whole content in one characters() callLuboš Luňák1-1/+0
SAX interface is not required to provide the whole node content in one characters() call (e.g. if there's an entity that needs decoding). However it's easier to consumers to assume this (e.g. writerfilter's DomainMapper::lcl_utext() handles datecontrol that way), and expat apparently never used this. However this can happen with libxml2, so ensure such consumers still work. Change-Id: Ib564f372fbea8451f84553a6d49a07d091a950e9
2014-11-20DOCX filter: import <w:startOverride>Miklos Vajna2-0/+7
Change-Id: Id95518c7ea38a974593a1880b4ef581ff49bcb90
2014-11-20fdo#85554 SwXShape: fix getting ZOrder property when doc contains TextBoxesMiklos Vajna2-0/+25
Change-Id: I9b6b83f0f6d627bb14a880a19769ee70564cf52b least, that's the value for me on Mac with retinaStephan Bergmann1-3/+1
Change-Id: I041b497bab9415b2b33d6b4b91f3c58ea9dbc05f
2014-11-20SwTxtNode::IsIgnoredCharFmtForNumbering: ignore RES_CHRATR_COLORMiklos Vajna2-0/+3
And also in SwTxtFormatter::NewNumberPortion(), use SwTxtNode::IsIgnoredCharFmtForNumbering(), via checkApplyParagraphMarkFormatToNumbering(). Otherwise the color of the paragraph mark is inherited by the numbering portion, which is not what IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING (mirroring Word's behavior) is supposed to do. Change-Id: I5d8df9b404916cc4a4405bf796d971ede59e6111
2014-11-19fdo#85872: sw: fix crash in insert index dialogMichael Stahl1-1/+3
Looks like the old code would create a link starting at the beginning in this case, so let's do the same. (regression from 94b296d5416dd71d721ad16216b50bce79e3dc04) Change-Id: Idcd17ae51c478aa5c2a000c7b33a8244f06bd166
2014-11-19Fix rtf outline importing issue.Mark Hung2-0/+229
When importing RTF files, the outline is treated as normal numbering list. Open the tools>chapter, outline doesn't correspond to heading styles correctly. This patch is to handle RTF keyword \s in a \listlevel. The patch use style name as its id so that is consistent with the one already used by StyleSheetEntry. Change-Id: I5ab6602b5ce64ca65ec08e0adb34d60ae7293650 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-11-19DOCX import: handle <w:lvlOverride> without <w:lvlText>Miklos Vajna2-0/+7
Change-Id: I0b941bd7a733408655db192b8608ed3987b9c1fc
2014-11-19add EDB-35279 test-caseCaolán McNamara1-0/+0
Change-Id: I9fb6e1e33f6b67342c8b407eafc9882ee44f4b46
2014-11-19Use SwNode::GetTxtNode()Miklos Vajna1-2/+2
Change-Id: Icf3e1013d5eba5702badf19aa6c1f5e6708ed154
2014-11-19remove nonsense comment clutterBjoern Michaelsen1-1/+0
Change-Id: I9ab33513ffb927b02c27fbd6c115b41702751d18
2014-11-18DOCX export: put either hints or the para attr set into the para marker propsMiklos Vajna2-0/+20
Commit d72237741ed1d8f976032ff2ee5d2a8702d3380e (abi#9930 DocxAttributeOutput::AddToAttrList: avoid duplicated attributes, 2014-11-02) added a quick fix to avoid writing duplicated attributes, but the validation problem of duplicated elements remained. Make sure that when writing paragraph marker properties, then we write either the hints at the end of the paragraph or the character attributes range of the paragraph properties, but not both. The only exception is the character style that's always set as a hint, as explained in commit 4bb872b1924453f22e90bdd14e2898a3e66d5551 (DOCX export: fix handling of paragraph mark on empty paragraphs, 2014-10-17). Change-Id: I494e5bb9871aa535532fef32bd344d8093e9f762
2014-11-18java: make fields final where possibleNoel Grandin2-27/+27
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18Fix outline numbering for ooxml import filter.Mark Hung2-0/+24
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: Change-Id: Ifd8a562bcee4f57cc99ed3215e6d8d6dd95216b0
2014-11-18sw: no matching function for call to assertEquals(sal_Int32, int, ...)Miklos Vajna1-1/+1
Change-Id: I3fc87b89c85bf800bfafccf1c379bc379ebba058