summaryrefslogtreecommitdiff
path: root/sw/qa
AgeCommit message (Collapse)AuthorFilesLines
2015-01-27Resolves: fdo#87601 specific html doc hangs on loadCaolán McNamara1-0/+100
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349 (cherry picked from commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3) Reviewed-on: https://gerrit.libreoffice.org/14081 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-01-08fdo#79269: fix ODF import of style:footer-firstMichael Stahl3-0/+35
The implementation of SwXStyle's FirstIsShared property is busted, and that causes xmloff to write the footer-first content into the master footer. This is a re-implementation of 0f21f932081471b2a5eda820fa1a194fbf3ab85c because unostyle.cxx is very different on master... Reviewed-on: https://gerrit.libreoffice.org/11722 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 902de8a1cbdb86c1eb1a05c8307b109fd75f493c) Conflicts: sw/source/core/unocore/unostyle.cxx Change-Id: I485d8089c1fb5ba3ca369fbfe8f3115bf700ba13 Reviewed-on: https://gerrit.libreoffice.org/11752 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-16Related fdo#82953: Forget package URL of image after it is loadedZolnai Tamás2-0/+50
It causes problems if we handle those imported images differently which are identified by a package URL, so after the first load remove this URL and handle images on the same way as inserted images. Some related bugs: * #i44367# * #i124946# * #i114361# * fdo#73270 The image in the test document has a special ID which is different from that one which is generated by LO internally so after ODF export the new generated image URL is different from the imported one. (cherry picked from commit 286e2f5c6ec829bc0987b1be7016699f7ef03e5e) Change-Id: I4e7d3490674c5f86bec5c7c6e1c975dcafd7c265
2014-11-10buildfix: sw ww8 export unit testcp-4.2-19Andras Timar1-2/+2
Change-Id: I011bea4f6da37e180446447dee1b79eee7bbd918
2014-11-04bnc#636128 DOC export: handle FFData.cchMiklos Vajna2-0/+10
Change-Id: Ia1a3a4ef5e61d8ed2a3bde689f3d2101525efc46 (cherry picked from commit 2ad1f195b875f2c1052c8ffab79602b9f6871ccb)
2014-10-14bnc#800714 SwTxtFrm::FormatAdjust: still call SplitFrm if we have columnsMiklos Vajna2-0/+46
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. (cherry picked from commit 2d35baed5e87ffe7ca371986391cdb3983cdd2b1) Conflicts: sw/CppunitTest_sw_odfimport.mk sw/qa/extras/odfimport/odfimport.cxx Change-Id: I64e969ef5e8f519314f5613f8e6fae626ae085ce
2014-10-03Related: fdo#73608 don't crash on missing table stylesCaolán McNamara2-0/+0
(cherry picked from commit 5fd7382651d64f77e8ad1d9a5c053f52f3641f9f) Conflicts: writerfilter/source/dmapper/DomainMapperTableHandler.cxx Change-Id: I340b43b7afc4c5c4d6dc8e4ed182279240306540 Resolves: fdo#73608 bail out on loop in style sheet hierarchy Change-Id: I03975d1ce8eaceceb4d5c263eb11c1521bcd57eb (cherry picked from commit be18133e84120625734a09380594ee89b23c4322) Reviewed-on: https://gerrit.libreoffice.org/11680 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-10-03Resolves: fdo#79131 crash in EnhancedCustomShapeTypeNames::GetCaolán McNamara1-0/+0
Change-Id: Ib21a4a1574119120f09d4ecac73b93a0f2f6739f (cherry picked from commit 65277f994ae25d930c15aebba0ed19f8de0abba1) Reviewed-on: https://gerrit.libreoffice.org/11704 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-10-03Resolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShapeCaolán McNamara1-0/+0
Change-Id: I0bafd2c43d29806eea0ff0cb165e67aece53488f (cherry picked from commit c84ce79132c674b4c2d31da8997ed77671323dfe) Reviewed-on: https://gerrit.libreoffice.org/11727 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-09-23handle docx's w:anchor layoutInCell attribute (bnc#891663)Luboš Luňák2-0/+9
(cherry picked from commit 3891ba42a886fa85eb43da24d1badf44e765d54c) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/PropertyIds.cxx writerfilter/source/dmapper/PropertyIds.hxx Change-Id: I8268567b84aa0f6e42624bfd0f79c8c49c153edd
2014-09-11Resolves: fdo#82114 RTF import: fix handling of first page in non-first sectionMiklos Vajna2-0/+23
Change-Id: If06c6bcdda97447e6014223d997c7ff8abd64b48 (cherry picked from commit 04fe5e6a31c9701177a744bbc8a53b2f664fe71c) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx
2014-09-11Related: fdo#82114 Copy first-header-footer test from ww8 to ooxmlLuke Deller2-2/+8
The test document was converted from doc to docx using MS Word 2010. Several fixes were required to make this test pass: - Do not clear the "FirstIsShared" property on page styles, as the code instead uses the old fashioned method of translating a Word section with "different first page header/footer": two page styles linked together, the first page style and the follow page style. (Also remove a wrong test case which checks the FirstIsShared property) - Do not clear the "HeaderIsShared"/"FooterIsShared" properties on the first page style, only on the follow page style. - Actually set the "FollowStyle" property on the first page style to link it to the follow page style. This didn't matter for the very first Word section because it was mapped to the default page styles "First Page" and "Standard" which are already linked, but it does matter for subsequent Word sections. - For some reason setting a new page style at a section break was excluded in the case where the following section had a title page. Remove this exclusion. - The exclusion mentioned in the last point was masking that bnc#751077 was not entirely fixed. To resolve that issue: When checking if the last paragraph of the section is empty, consider not just text content but also shapes. - Remove a workaround for bnc#780843 involving copying of headers and footers from the "Standard" (first section) page style in the case where the following section had a title page. This workaround is no longer needed as the test case passes without it. (cherry picked from commit b4ccde72b8e2e45e7276d5b08b182495a1b1a617) Change-Id: Iacc9bba0720c11414da3e852892cff301ebbc4fe
2014-09-08fdo#79959 RTF import: trim whitespace around style namesMiklos Vajna2-0/+10
(cherry picked from commit 305ecd1848a802a6c43ecc6e76f4c6bc36a03418) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
2014-09-08abi#10039 RTF export: support page-anchored framesMiklos Vajna2-0/+6
(cherry picked from commit 845fb7bf6753ec9582d0b1d1c9b4276aa9e6c65e) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I71c961799f76446cdf24faeba86f881ae02ffe3b
2014-09-08fdo#32613 RTF export: implemented anchored picture exportMiklos Vajna3-3/+20
RTF originally didn't support anchored pictures: they were always inline. Then it was invented that pictures can be exported anchored, if they are in fact shapes, but their "pib" property is set to the hexdump of the picture contents. The RTF importer handled this situation for quite some time, but not the exporter -- this commit implements that. (cherry picked from commit cb01957aa0ac3caea8e87522116086ac256d4ee2) Conflicts: sw/qa/extras/inc/swmodeltestbase.hxx sw/qa/extras/rtfexport/rtfexport.cxx sw/source/filter/ww8/rtfattributeoutput.cxx Change-Id: I173ad9f4f2e24620508ca63c0b892b7d5da4e5b2
2014-09-08fdo#74229 import RTF_TRGAPHMiklos Vajna2-0/+43
Regression from commit c4b91ae3178011c66c76c711c1a6469ba658872e (fdo#55525 import RTF_TRLEFT, 2012-11-13). (cherry picked from commit 54bdfe0a891f2119bc35c5d82ecbc94c8cb13c0b) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I90f2c6399cfaf8399de0cf3488a23af6cc84710d
2014-08-26fdo#39056 fdo#75431 Section Properties if section starts with tableVinaya Mandke2-0/+12
Section properties are not imported if the section starts with a table for DOCX, and also for a few RTF files with combination of tables and section breaks. SwXBodyText::createTextCursorByRange is not able to find the start of section and hence section properties are not applied. As a workaround added an empty paragraph at the beginning of every section which has the the first element as a table. And then removed it when the section ends ( DomainMapper::lcl_endSectionGroup is called). Also handled to add the paragraph earlier, if there is a bookmark so that the bookmark is not attached to the dummy paragraph. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9097 Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I717ba40e22b055d974bc83d4414aeb2945e16d26
2014-08-21misplaced test from 5a454e5ed3f1: should be Linux onlyMatúš Kukan1-2/+2
Change-Id: I32df6241f9b1259f1b563826a0d0b8e468ecf4bc Reviewed-on: https://gerrit.libreoffice.org/10997 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-21fix reading a .doc that has frame anchored to the end of page (bnc#787942)Luboš Luňák2-0/+7
MSWord, unlike Writer, can anchor even to a page break (i.e. after the last paragraph). When this document was read, what happended was: - the last paragraph was read and the current position PaM was set to point after it - frame was read and anchored to the PaM - page break was read, making everything following be moved to the next page; including whatever ended up at the PaM position Handle this by checking for this case and inserting an extra empty paragraph before the break. This shouldn't affect layout of the page itself anyway, since the break should leave room for it (and MSWord shows a page break there if control characters are enabled, so there is room). Change-Id: Ia2a13bf5cf1c959b5aa228254365019a00a22679 (cherry picked from commit 4a1888a97eab4ead2e0bec76cd1cba410a8e7e13) Reviewed-on: https://gerrit.libreoffice.org/10952 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-08-21fdo#82165: ODF import: clear all shapes when removing header contentMichael Stahl2-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 (cherry picked from commit 555c988f3b896e16afc7bdd1bd98e48229599637) Reviewed-on: https://gerrit.libreoffice.org/10895 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-21fdo#80986: disable highlight DOCX importZolnai Tamás1-0/+2
Highlight support is not implemented fully, so it seems better to disable DOCX import of it until it is finished. Highlight can't be modified on the UI and is not saved to ODT/DOC (regression). Regression from: 8b949134441056a1455d67ddfdd7e0bc5f2ee682 (cherry picked from commit b5e60724ac73bb0e62b249145a8931fd6166bb69) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I94891769766ae90017e8afa70e65d080d5270202 Reviewed-on: https://gerrit.libreoffice.org/10721 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-08-21fdo#78904 : LO hangs while saving the document.Umesh Kadam3-0/+11
- In case of framePr attributes being omitted in original xml, LO defaults such attributes to incorrect values. - Correcting these values in this fix. - This fix stops LO from getting hang while saving the document, the actual fix needs to be somewhere in the table layout. We need to restrict the frame from being considered as part of the table as MSO does not allow frame to be part of a table. Reviewed-on: https://gerrit.libreoffice.org/9774 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 75fc9e669f209472ec6a282848166d96d02d84d9) This also fixes fdo#79391, but not compeletely on this branch. Change-Id: I4c35f7eff6ca1122901f5667fc26b849df527f60 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-08-21fdo#78502: writerfilter: RTF import: handle \u keyword inside levelnumbersMichael Stahl2-0/+18
The ";" terminates an entry and shall not be inserted as text, even if some over-engineered producer encodes it as {\uc1 \u59 ?}. Also, remove the special-casing of the \leveltext destination, since the bugdoc does contain \uc inside it and it's not obvious why that should be ignored. (cherry picked from commit e93f0852477b44df986807860c821319a921b199) fdo#78502: actually empty parameter to getParagraph() is not tested (cherry picked from commit b9dca968c6fd0ab5ca140c65b0e54d153cd34986) Change-Id: I1e19c9df39597cb1b22bbda97853c829d7812e29 Reviewed-on: https://gerrit.libreoffice.org/10398 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-07-27fix build of last commitLuboš Luňák1-1/+1
Change-Id: I3c2e4763f25580c3418d476479a81efe65414b40
2014-07-27Fix for Footer is missing if fisrt page different header/footer is setRohit Deshmukh2-0/+8
Reviewed on: https://gerrit.libreoffice.org/7589 Signed-off-by: Luboš Luňák <l.lunak@collabora.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I2a2f2abc0dcf5542b7b950f9a232d7155a055fdd
2014-07-16fdo#80333: .doc has large black rectangles between paragraphsZolnai Tamás2-0/+9
These black rectangles are character border shadows, because checking whether there is a border at all was missing. In Word there is no shadow without a border. Regression from aa2faee4b3954b57a613963b501ecf611b3a14ca (cherry picked from commit c2e708d61746a259888c0e5fb1d3e9a43e3ca696) Change-Id: Ib3cb4e904fdd33f215c81d7c02762a196f484b1b Reviewed-on: https://gerrit.libreoffice.org/10250 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-10fix fdo#77844: header wrongly enabled from .docLuke Deller2-0/+47
The LO page style needs page headers to be turned on if the corresponding .doc file section has a left (=even) page header or a first page header. However this should not be triggered in the case where a first page header is present but hidden due to the "different first page" header option being disabled. This case is fixed by this commit. Change-Id: If3de0df45378587fdbdecc6a091d2f4b60940b43 Reviewed-on: https://gerrit.libreoffice.org/10100 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit f312ef98de57a5926be67421395544bb9d41b809) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-07-06fdo#73241 RTF import: ignore page break in tablesMiklos Vajna2-0/+14
(cherry picked from commit fdc235126d6d73f47a5b56d453e1d3db8ba3e816) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ibee9fec0f421b4c2ff3d45c861bc3fcfc97cbf15 Reviewed-on: https://gerrit.libreoffice.org/10093 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-06error: no matching function for call to 'assertEquals'Matúš Kukan1-1/+1
Change-Id: I0b87c2abeec30e9e4eab3ce488a5828b8a5b475d (cherry picked from commit 4a3b0e544dbc45a3972006a2ead75492d6876f95) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-07-04bnc#884615 VML import: import OLE objects in header with background wrappingMiklos Vajna2-0/+6
We already do this for drawingML shapes since commit 500343105707a9905f5198a4af6ad58fe307b7c2 (DOCX drawingML shape import: always set Opaque, 2013-12-04), make the VML / OLE case behave the same as well. (cherry picked from commit 15c3a08b8b1e8060f9659c7bc98480a39d1802c5) Conflicts: sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx Change-Id: Ic22f1f3cfd325ccbbb9bd6fe9814553683e4de55
2014-07-04fdo#78758: sw: RTF export: don't export multiple \fldrst for one hyperlinkMichael Stahl2-0/+19
Ensure that we export only one \fldresult per hyperlink by doing that in StartURL() and EndURL(); the TextINetFormat() is called once per text portion. This shouldn't cause problems as there can't be anything between the end of the \field group and the start of \fldresult anyway. Replace the annoying call to EndURL() from EndRun() with a special case in EndURL() to store things in the right buffer (hopefully). (somehow this is regression from c4498251cb7181a9f272b0720f398597c0daef09) (cherry picked from commit b8907bf3d3b37c686a414ffbbd2d732348aab5b9) Conflicts: sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/ww8attributeoutput.hxx Change-Id: I209ea7a384fb1cb5d1505a70ecc4a4536bbf26a2 Reviewed-on: https://gerrit.libreoffice.org/10021 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-07-04fdo#69649 RTF import: don't crash on empty TOC resultMiklos Vajna1-0/+39
Regression from commit 9679e9c23216decb5f9f25f85b04cb3f25211111 (fdo#69649 Fix for pre-rendered Table Of Contents, 2013-12-30), the situation that the field doesn't have a result wasn't handled, resulting in a m_aTextAppendStack.pop() call in dmapper, without a matching .push() one. Change-Id: I456d9096d01fb27832a40f6b72802ec555d62647 (cherry picked from commit 018bbe6c538d99c2f14fd4c761048848dc458f4a) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-07-03bnc#865381 DOCX import: handle w:jc=center inside w:textDirection=btLrMiklos Vajna2-0/+9
Change-Id: I102c70429457515b34e74cb8e82e1417e6276d1d (cherry picked from commit 3325e0f206ce864730468c3556ce06760042c157)
2014-06-25fix reading of section margins (bnc#875715)Luboš Luňák2-0/+8
The reason the section ended up with incorrect margins was because that is computed as 'page margin' - 'section offset', and the order of setting these up was backwards: First InsertSection() created the section using the page margin of the old page, and only afterwards SetSwFmtPageDesc() set the page margin that should be used. Conflicts: sw/source/filter/ww8/ww8par.cxx Change-Id: I18ddcb0b5928879a2297b6caca766eab979abd45 Reviewed-on: https://gerrit.libreoffice.org/9879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-24fix broken redlines after undoing column count change (cp#1000071)Luboš Luňák2-0/+45
Changing a document with redlines to two columns and then using undo set some redlines to point to the end of the document (done by the call to RemoveIdxFromSection() in SwUndoInsSection::UndoImpl()). Change-Id: I88b563b88beebcd1c3cb21fe61bb56cdb12cdc41
2014-06-18fdo#76633: writerfilter RTF import: disappear the rectangle shapes on imagesMichael Stahl2-0/+47
If the shape properties are inside \picprop destination, don't set shapeType. (regression from 9f1f7199736e2ae07b34849ba66f61a1ef5782e8) Actually this does not fix the root cause, this is just a work-around, the extra shape is still inserted but it's invisible now. Change-Id: I6cf093de2a5657533f393863ed8010ae083bec16 (cherry picked from commit b7857e5cfe9d5d007785ae93e5505620fc8ed475) Reviewed-on: https://gerrit.libreoffice.org/9773 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-18fdo#77979: sw: RTF export: write non-ASCII font names encodedMichael Stahl2-0/+7
Currently font names like "微软雅黑" (Microsoft YaHei) are written as "????" in the RTF export; to avoid that, set the \fcharset of the font entry to something that at least is able to encode the font name and alternate name. This requires a new function since the existing rtl_TextEncodingToWinCharset was changed in b88fe998ce8c80d7629fe70118311096615d959d to return "default" 0x01 (for OOXML) which is quite unhelpful for RTF. This is not entirely satisfactory, as of course that is no guarantee that the encoding can represent all of the actual text that has the font applied; hence there are some \'3f in the fall-back encoded text of the heading of the bugdoc, which indicates that the detected Shift-JIS is insufficient and GB-2132 would be required; but it's not obvious how to do better here without iterating over all the text twice, and that still leaves the possibility that all text that has a particular font applied cannot be represented by a single non-Unicode encoding. But since we always write text as the \u Unicode + legacy fall-back, this should not be a big problem since modern RTF readers will simply read the Unicode. (cherry picked from commit e47a02b1524061143d8e77a54eb95c77f2e6dae2) fdo#77979: argh forgot to add the test document (cherry picked from commit 90b2b378aecfa1914be0ce9aa7aa4e006e225e96) (cherry picked from commit 276fb59ee66806709382d0eeef20f62a094a5995) error C2361: initialization of 's_fallbacks' is skipped by 'default' (cherry picked from commit f3695bbc17a547b547876dd1175c0b74e5b3e90e) Conflicts: sw/source/filter/ww8/rtfattributeoutput.cxx Spell out UTF-8 (cherry picked from commit 809c8d4c990e77cd8ba52672be7c5e77aae4e90e) Change-Id: Ie6a42294c501d014dd9f0df82638519412ca19bb Reviewed-on: https://gerrit.libreoffice.org/9750 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-16DOCX import: fix additional empty paragraphs around footnote textMiklos Vajna2-0/+11
Regression from commit abe1e852a232e3bdab7b9177d099fe3929f5a4aa (handle properly page breaks even if a page contains only a frame (fdo#55381), 2014-04-21), DomainMapper::lcl_endSectionGroup() inserted an empty paragraph before and after the real footnote text. Disable addition of the dummy paragraph for footnotes. (cherry picked from commit 4d120b6ab181f530d3fedc963b1c6ec777f2608a) Signed-off-by: Luboš Luňák <l.lunak@collabora.com> Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I6e1954c9bd5520ac284d66244ce1c9004e970305
2014-06-10fdo#79384: replace the work-around with a different oneMichael Stahl1-0/+1
Word will reject Shift-JIS following \loch, but apparently OOo could read and (worse) write such documents, so accept Shift-JIS regardless of run charset type. (cherry picked from commit d71387ca81b61416b9a7b82cd6cf67d496b81fc2) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ib181956e9f218548a52037dd76fa1d3ecdc006bd Reviewed-on: https://gerrit.libreoffice.org/9633 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-10fdo#79384: RTF import: fix literal Shift-JIS textMichael Stahl2-0/+17
This is a variable-length encoding, and the second byte may be a RTF syntax character like \, {, }. (cherry picked from commit 061190a62fcdbfb3a0b266d5afffbd257a3e692e) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx writerfilter/source/rtftok/rtfdocumentimpl.hxx Change-Id: I813ccafda18388af3bf05eb7ce9a0253c627b1c4 Reviewed-on: https://gerrit.libreoffice.org/9632 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-10fdo#79547 fdo#69649 Fix for pre-rendered Table Of ContentsVinaya Mandke4-1/+29
Added Import and Export Uts for the same Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7207 (cherry picked from commit 9679e9c23216decb5f9f25f85b04cb3f25211111) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I966b3d268dd407aa05823e29fe1da4d097091265
2014-06-10fdo#79384 RTF import: allow { without } in style namesMiklos Vajna1-0/+5
This is not valid, but LO 3.4 supported it, so add a workaround... (cherry picked from commit 6092e2eba3f74c9632f7862b2368b0fcf7732f85) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ib8eefdf41fe9801db6f7e5873eaa1436518912fb Reviewed-on: https://gerrit.libreoffice.org/9625 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-02discard more header/footer stuff when discarding headers/footers (bnc#875718)Luboš Luňák2-0/+23
782adba4d436c65cdf85d48f28486321873b15ed discards unneeded headers/footers, but only the text, not e.g. frames or fields. The test document therefore ends up with a frame with a page number inside the body text, because the text in the footer it should be anchored to was discarded. This commit fixes this by discarding more (although probably the whole header/footer shouldn't even be parsed to begin with). The test from b349d2483e1fe64316d87b55d0b3b4c8f2293e2e actually checked for this incorrect frame, so change that (the whole test is suspicious, as the end result is quite far away from what the original doc looks like). (cherry picked from commit 5510f563502168defa4ccfc54214d781a7c92868) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b
2014-06-02fix build-break on windowsChristian Lohmaier1-1/+2
ae95cdd2a1708a8e9e114dd9bcf577f57f1f5af3 introduced a check, and did put it outside of a #if !defined(WNT) block... Change-Id: Id200c6f3161d0c6c611e0b1c293adbd060579cd7
2014-06-02bnc#863018 WW8 import: fix upper margin of multi-page floating tableMiklos Vajna2-0/+11
A vert orient position was already handled in case a floating table was imported as a TextFrame, but in case we didn't do that, the vert orient position was simply lost. Fix this by importing it as the upper margin of the table (assuming that the position is relative from the anchor position). (cherry picked from commit 3755c87d0426a499d4755e82d8fbc77caa240764) Conflicts: sw/qa/extras/ww8import/ww8import.cxx Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5 Reviewed-on: https://gerrit.libreoffice.org/9487 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-06-02fdo#78900 RTF import: allow \dpxsize inside \dptxbxtextMiklos Vajna1-0/+11
Previously we assumed that they always appear under \do directly. Change-Id: Ie3a978da856986f604a3815d6127abb4191323c0 (cherry picked from commit 21c11ffe254612ac46aa891addacb0024d5b93f0) Reviewed-on: https://gerrit.libreoffice.org/9488 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-02fdo#79008 Crash: File getting crash while saving in LODinesh Patil2-1/+10
File is getting crashed while saving in LO, as it tries to access the value of vector after erasing that value. Code changed to access the vector value first and then erase that value from vector. Change-Id: I29369b7582fdbd7363d0e6fdae091a30c79a747d Reviewed-on: https://gerrit.libreoffice.org/9433 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit ed3fd76b65b2a281effea55b8a55101a8b740aec) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx
2014-06-02fdo#77454: fix WW8 import/export of negative image cropMichael Stahl2-0/+24
The negative crop values were imported as large positive values, which caused the image to be rendered with 1 pixel width after commit 2e5167528f7566dd9b000e50fc1610b7bf99132a. (cherry picked from commit 6d431ffb682d0e64b75b6267f369822ff0b0617e) Conflicts: sw/qa/extras/ww8export/ww8export.cxx Change-Id: I0e01b9d9a05d90e868699832085a06ba5aab7e54 Reviewed-on: https://gerrit.libreoffice.org/9470 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-02fdo#68983: basic: if the library is not loaded fully, copy source storageMichael Stahl2-0/+48
Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix for fdo#42899 caused the problem with password-protected libraries for which the password is not known: only the binary representation of the BAISC module was stored, not the source code; by simply copying from the source storage the problem can be avoided. It would be possible to ask for the password when storing, but that would not work when non-interactive (called via API). An alternative fix would be to pass in the SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC library's modify flag correctly, but that requires adding a parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage(). (regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 ) (cherry picked from commit 5246fa262450f686674850c53df666422f441c86) Conflicts: basic/source/inc/namecont.hxx basic/source/inc/scriptcont.hxx basic/source/uno/namecont.cxx sw/CppunitTest_sw_macros_test.mk sw: use xsec_xmlsec.windows on WNT (cherry picked from commit 3e69b7bcd3e4a9cb1a29360c905e7fba96365999) Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0 Reviewed-on: https://gerrit.libreoffice.org/9437 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-18fdo#78313 RTF import: retain font colorsMiklos Vajna2-0/+34
This is a cherry-pick of two master commits: RTFValue::equals: consider the number of attributes/sprms as well (cherry picked from commit 4452fa9a2e741834a19c9b322fc8d9c8b06450de) Related: fdo#77600 RTF import: RTFValue::equals: compare attribute content Previously only the number of nested sprms / attributes was compared. With this, the font of the bugdoc is correctly Arial, not Times. (cherry picked from commit 8e8f9388c323ad3c32cef3f91609ad19386b7d56) Conflicts: writerfilter/source/rtftok/rtfsprm.hxx Change-Id: I351de414b6734336b31c1334dbd2349072f16002 Reviewed-on: https://gerrit.libreoffice.org/9316 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>