summaryrefslogtreecommitdiff
path: root/sw/source/filter
AgeCommit message (Collapse)AuthorFilesLines
2012-11-20fdo#51550 fix DOCX export dataloss on non-math/chart OLE exportMiklos Vajna2-21/+33
This is still not complete, but having the replacement graphic only is far better than having nothing. (cherry picked from commit bd6ae389008e110be62a335dfcd82c655d512e63) Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: I141a3de1a449f4261c7086e10f2c141b3f6cdb10 Reviewed-on: https://gerrit.libreoffice.org/1017 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-11-15n#789482 DOCX: export track change data after w:hyperlinkMiklos Vajna2-6/+9
(cherry picked from commit eac3e6e746300df379226941ba75c4e0ce1feb7a) Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: If204523d7da544b11b2d809993ada180476104ef
2012-11-05Resolves: fdo#35991 rowspan is of size sal_Int32, not size longCaolán McNamara1-1/+1
Change-Id: I347672a2175cf7a0304cf5d6c0f8f3f6afa92cd4 (cherry picked from commit 8bd3bf0ff20fc18a0a6358e36b3f8a7e3b34a2bb) Reviewed-on: https://gerrit.libreoffice.org/919 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2012-11-05Resolves: fdo#50285 merging props unsafe with intermediate charstyle propCaolán McNamara1-2/+4
Its a nice idea to merge properties of the same type and value if one starts and the same place the last one ended. But character styles are properties as well, so if we have character-style+superscript on range a, and character-style+superscript on range b and merge these so that we end up as... character-style on range a, superscript on range a+b, and character-style on range b then that clearly gives the wrong result if applied in that order. So its only safe to merge if there are no intermediate properties that can affect the merge candidates. A regression from b3cee382f449aa69213dc21f7b1ba6a5356d2865 Change-Id: I541563d11265426736b840de068922eef8d45573 (cherry picked from commit 08ffb7bc5ec4472126762f4cb9677349b61122f6) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2012-11-05fdo#55939 fix RTF export of footnotesMiklos Vajna1-1/+4
Regression from d4069372484f18b242a42a1996767f57b031fff6. Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I58e8d48ac3222b795f7edfd0e74ecd86ea36f380 Reviewed-on: https://gerrit.libreoffice.org/913 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2012-11-05Resolves: fdo#48569 crash on export to .docx of inline anchored frameCaolán McNamara2-7/+11
we're currently deferring to the end of the text node to export the contents of frames. If its anchored as character then the sw::Frame (which is allocated on stack) has gone out of scope so this pointer points to junk. Copy it instead. Sill need to export frames property at some stage. Change-Id: Ib9f8c6857ce1afe6acba84986b692139e44a7aad (cherry picked from commit 60a93729c95d31edab50a905236faa9e38a81556) Signed-off-by: Eike Rathke <erack@redhat.com>
2012-11-05Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6Petr Mladek5-83/+15
Conflicts: desktop/source/app/sofficemain.cxx instsetoo_native/util/openoffice.lst solenv/inc/minor.mk Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
2012-10-30n#780645 docx export: export default table cell margins, based on 1st cellPierre-Eric Pelloux-Prayer2-34/+115
Reviewed-on: https://gerrit.libreoffice.org/716 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz> (cherry picked from commit 9751056ba806ba9614392f3c70ada3cbd1251814) Change-Id: I1a697c2a60c7979774242fb6c9b0f66baa3bb72e
2012-10-22Fix fdo#47669: also check if we started the tag before ending itKorrawit Pruegsanusak1-1/+5
The problem is we created imbalance end tag </w:hyperlink> which shouldn't be there. So, place a check before inserting end tag should help. Inspired by (read: copied from) c1c2688912e769dfd7654e11e87dae380a8ce1eb ;) (cherry picked from commit 3b042335208cb2c995f4860bf8ba3bd1e2f2e859) Change-Id: Ic933f6da44c788cba48bb2fe6fa29658985310b6 Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Michael Stahl <mstahl@redhat.com> Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-10-10add editeng::ConvertBorderWidthFromWord:Michael Stahl1-73/+3
Replace the 2 duplicate implementations of this in ww8 and writerfilter with a common one. Differences were: 2) ww8 doubles the with, writerfilter does not 13) unsupported, mapped to THINTHICK_SMALLGAP vs. THICKTHIN_SMALLGAP 22) unsupported, mapped to DASHED vs. SOLID 26) INSET not supported in writerfilter 27) OUTSET not supported in writerfilter Change-Id: I533b77394388e736f38d70284a6a11061d81e813 (cherry picked from commit ecd70a727d7f559ebda1dd726cea1be472948270) Reviewed-on: https://gerrit.libreoffice.org/846 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-10-10fdo#54648: WW8 export: test that FlyFrm actually has layout frmMichael Stahl1-0/+4
The bugdoc has 2 "hidden" drawing objects that are invisible. Change-Id: I58179f2e620348db5357b38f834e1edca1f20ae2 (cherry picked from commit c1d2eed375293d7c27bb885f344cc24ec0cd40ca) Reviewed-on: https://gerrit.libreoffice.org/845 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-10-02n#775270: clip pictures instead of scaling they don't fitCédric Bosdonnat2-0/+10
Word clips pictures that are bigger than a page instead of scaling them down. This patch introduces a new compatibility option to allow clipping a picture in Writer instead of scaling it down. Conflicts: sw/inc/IDocumentSettingAccess.hxx sw/inc/doc.hxx sw/source/core/doc/doc.cxx sw/source/core/doc/docnew.cxx sw/source/filter/xml/xmlimp.cxx sw/source/ui/uno/SwXDocumentSettings.cxx writerfilter/source/filter/ImportFilter.cxx Change-Id: I4defbee05be81e23ec28a2ed272eaf4e4cc6faf5
2012-10-02Resolves: fdo#54862 extra ++n causing merged cells to be skippedCaolán McNamara1-1/+0
commit 567c1db25bd705faac44203e4a3d01d0f5e1385c reverted a pile of other commits, including 858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f but didn't revert the ++n of that commit, leading to merge groups getting skipped Change-Id: Ie2b46ebc433df636ebe0092f4a992631b7f06a3f (cherry picked from commit b966a09c2da9441961c93c44be556399575db849) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2012-09-28n#778133 sw: add BackgroundParaOverDrawings compat flagMiklos Vajna1-0/+7
In Word, the layer that contains a background image is behind the layer that contains the paragraph background. In Writer, the paragraph background is painted before the hell layer. Add a compat flag to change the order, so the DOCX importer can trigger that. To reproduce, create an XShape, send it to the background, set some color for a paragraph background, and notice that the background color is missing where the shape is behind the text. (cherry picked from commit 741132e8a60891684d40726a3d34ef784268a21e) Conflicts: sw/inc/IDocumentSettingAccess.hxx sw/inc/doc.hxx sw/source/core/doc/doc.cxx sw/source/core/doc/docnew.cxx sw/source/filter/xml/xmlimp.cxx sw/source/ui/uno/SwXDocumentSettings.cxx writerfilter/source/filter/ImportFilter.cxx Change-Id: I94aa58fcfe47e4a2fd27d411d7e04ccce92824fa
2012-09-28n#774681 SwFltControlStack::NewAttr don't extend font name / size attributesMiklos Vajna1-1/+1
Regression from commit b3cee382, the bugdoc is an example of why those can't be optimized with the current method. (Yes, it is somewhat special, after a resave in Word, the bug is no longer there.) Change-Id: I4b5e82b13242726d6df47c447642ca8916aa6f31 (cherry picked from commit 9eb05aa6883ea41fb1d1dad2f7f1870e8e63ce32)
2012-09-17fdo#45700: sw ODF export: workaround corrupted table model:Michael Stahl1-8/+3
do not export invalid table:number-columns-spanned="0" (cherry picked from commit c45c64e3de51d9f56c9d9789729b6f7952547a61) Conflicts: sw/source/filter/xml/xmltble.cxx Change-Id: I7e286a9fcb6ed3df7222c83fe73e870e69561649 Reviewed-on: https://gerrit.libreoffice.org/611 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-09-11fdo#53113 various docx shape export fixesMiklos Vajna3-3/+57
- docx export: initial shape text support - vml export: handle custom segment types - docx: export fillBlip shape property Change-Id: I8453d76cfb91386c8beaedc874e09a291234babb Reviewed-on: https://gerrit.libreoffice.org/411 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2012-08-24fix math export/import in docx/rtfLuboš Luňák1-4/+7
For some reason older gcc versions don't manage to dynamic_cast to the necessary cast. I'm not quite sure why, forcing sal/osl/unx/module.cxx to always use RTLD_GLOBAL does not seem to help. Most probably compiler bug. Changing the cast to two simpler ones helps. Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-08-22fdo#51777: add a hack for 1 twip DOUBLE borders:Michael Stahl1-2/+1
Arguably such annoyingly thin double borders don't make much sense anyway, because they're essentially 2 hairlines with ~no space between, but unfortunately older LO versions are able to create them; since the refactoring in 2d045cdb69176b280812dda0b813371cf1ac72e2, which changed the BorderWidthImpl::Get* methods to return 0 due to rounding, they were ignored at least in the HTML import, which is a regression. So add a special purpose hack that essentially rounds up the first line to 1 but not the other lines so the visual result is a hairline single border. Change-Id: I20ac4675bcf67ea58a6931a40bff3605390e9c0d (cherry picked from commit 601bfe2ce3113719b2f8edaba2ccb6b630051a9a) Reviewed-on: https://gerrit.libreoffice.org/451 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-08-21fdo#53175: Fixed the end of hyperlinksCédric Bosdonnat2-5/+13
This fixes the end of hyperlinks appearing after field ends (while the start of hyperlink is after field start too). Change-Id: If21b8973baaca183e0103e3a70ed98b99aa59392 (cherry picked from commit c1c2688912e769dfd7654e11e87dae380a8ce1eb) Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-08-03fdo#46020: fixed missing footnote docx/doc/rtf exportCédric Bosdonnat1-1/+3
Don't skip a next position when parsing a paragraph into runs to export. Change-Id: If7e887ea84ad24256b37aa96187bc30ea154632b Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-08-02sw: fix some warningsMichael Stahl4-4/+10
Signed-off-by: Petr Mladek <pmladek@suse.cz>
2012-08-02some tweaks in RTF filterMichael Stahl5-24/+35
Signed-off-by: Petr Mladek <pmladek@suse.cz>
2012-08-02fdo#52610: Fixed several docx export bugsCédric Bosdonnat2-12/+15
+ hyperlink starting before a field and ending in its results isn't valid. + when footnotes have hyperlinks we need to add the proper XML namespace and output the relations to a different file. Change-Id: I1c6cb8acba21c35e10bb0497eeaf96bbd73730d1 (cherry picked from commit 0e4846ec20c1aefc554037e8f08255019c08da47) Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-08-01fdo#45724 fix WW8 export of textbox default background colorMiklos Vajna1-0/+2
regression from 5609c512cd4d2899300b432d88d93cff05a05c87 Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
2012-07-24better page descriptor handling in RTFMichael Stahl1-7/+10
Change-Id: I9f80d5be700c94cf5993243903a70295d2545868 Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2012-07-13do not write default tab stop into the default style in .docxLuboš Luňák3-3/+15
Use w:defaultTabStop in w:settings instead. Change-Id: I7056ff0ee8574fd942e2f330a1f76bae657a825e (cherry picked from commit 15af925c254f27046427de70a59011e2ac3d6bdb) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
2012-07-04refactor handling of double border widths:Michael Stahl6-14/+17
Word uses a completely different definition of "width" of a double border than OOo and ODF: for Word the width is apparently the largest of the 3 component widths, while OOo and ODF define the width as the total with of all 3 components. The new border implementation in LO 3.4 was apparently inspired by Word's double border definition, which resulted in various import filter regressions, see the previous fixes: 36e43b52992735c622833e923faa63774b9e2f76 e2ffb71305c5f085eec6d396651c76d6daee3406 70a6a4d425558340bb49507975343a3e0a1bdde8 These fixes set the ScaleMetrics, which actually seems sub-optimal as there is a ScaleItemSet function somewhere that apparently re-scales all items in an itemset, which could undo the fixes. Also, one of the fixes actually managed to break RTF/DOCX import of double borders, as that ended up in the same code via the API. This commit now reverses the change, so that the width of a border is now always the total with of all components, which is (imho) much more intutitive, and also leads to a consistent UI where selecting say 3pt width has predictable results, no matter what the border style. The border widths are now converted in the Word format import/export filters (writerfilter and sw/source/filter/ww8), and various tests were adapted to the new handling. (cherry picked from commit 2d045cdb69176b280812dda0b813371cf1ac72e2) Conflicts: sw/qa/extras/ooxmltok/ooxmltok.cxx Change-Id: I50456c49b1a298569607e6c88f19f18441348ac3
2012-07-04replace enum SvxBorderStyle with css::table::BorderLineSyleMichael Stahl13-145/+156
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67 (cherry picked from commit 8b4593948582c3b5b3d013bd751bb19ffd37a31b)
2012-07-04rename SvxBorderLine::SetStyle to something unambiguousMichael Stahl13-30/+34
Change-Id: Iec70985319a64cdc3630e15499ac304a7f1aabae (cherry picked from commit 463e59d680467a7b0d30ae956935a444c513de9e)
2012-06-27fdo#48335 RTF export: avoid fake page breaks on page style changesMiklos Vajna3-2/+10
The problem was that a page break has been always exported when the page style changed -- but in case the page style changes just because of "first page"-like styles, we don't need that. Change-Id: I15527c8d3a2d1c441b4817cf94d61ea68dc5f92c
2012-06-27fdo#48335 don't export zoom factor when zoom type is not percentMiklos Vajna1-1/+1
Change-Id: I1fb7e3d9d65f2f3388bb4851f5ad517ed1681f04
2012-06-27fdo#48335 RTF export: don't try to end not started runsMiklos Vajna2-2/+7
Change-Id: I022556acd0891cf24963d667d34f366496453630
2012-06-22fdo#50831 fix RTF export of direct run formatting for empty paragraphsMiklos Vajna8-13/+21
Change-Id: I5f0e7aefdea80bbb9cf61b991c5b706bd2023dfa
2012-06-15n#325936 fix ww8 export of fly frames with transparent background in headersMiklos Vajna1-5/+14
Regression from commit ed8b5f2d -- to be safe, reverted only for fly frames in headers. Change-Id: Ia538b69bb913567c7d087d40afc7f0a141b7a0ed
2012-06-15n#325936 fix ww8 export of not-in-background anchored images in headerMiklos Vajna1-1/+28
Regression from commit 2ad707b3, which only updated the import, but forgot to remove the fake "in background" property on export. Change-Id: I2b42c5fa7873d946b10d311800049586bc214071
2012-06-12fdo#43249: WW8: fix double border import:Michael Stahl1-0/+4
The border widths are tripled on import, because that is effectively what SetWidth does for DOUBLE borders; set a divisor of 3 similar to e2ffb71305c5f085eec6d396651c76d6daee3406 70a6a4d425558340bb49507975343a3e0a1bdde8 Change-Id: I40b175bedc1ed2d564be126bf9e6870b43474aba (cherry picked from commit 36e43b52992735c622833e923faa63774b9e2f76) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2012-06-05Unify ODF extended vs. ODF1.2 handlingThorsten Behrens1-1/+1
Make "export extended ODF" consistently mean "version > ODF1.2". Future ODF versions need manual review anyway, of the various changes/additions we ship. Change-Id: I0f6c1646b306e18f0abcdd1a1802fece821b2e93
2012-06-01targeted string re-workNorbert Thiebaud3-79/+79
Change-Id: Ieb2e362853f146f58370a60511cc75ab64fe439e
2012-05-31targetted SAL_N_ELEMENTS revert.Michael Meeks6-14/+13
Change-Id: Idd43d44dd7fc4bb33be2de5b855a7741de88ec51
2012-05-31targetted minor cppcheck reversionMichael Meeks1-2/+2
Change-Id: I897739c4623123c32433d0e10fd301e073bb496e
2012-05-30stray ;Caolán McNamara1-1/+1
Change-Id: I36e577c86de4d6adf3b54376ca9a0544e2c1d863
2012-05-28fix horizontal rule width in .doc documents (bnc#757118)Luboš Luňák2-9/+33
MSO uses undocumented properties that seem to map to o:hr and o:hrpct from .docx (including differences between .docx spec and implementation), so treat horizontal rule width the same way in .doc too. Also remove the guesswork for #i17200# that is not quite correct and no longer needed. Change-Id: Ibec543fa1679ca0b20e86ef6b4f77147b18dff7e
2012-05-29removed dead codeTakeshi Abe2-40/+0
Change-Id: Ic70d66befc90450aeb276d53f6da7e81aef85478
2012-05-28OSL_LITTLEENDIAN->OSL_LITENDIANCaolán McNamara1-1/+1
thanks Norbert :-) Change-Id: I03942dd80bff39f4cc9a19117a4c5c5e4dfcd325
2012-05-25SwFlySaveArr: Apple GCC complains about constructorsMichael Stahl1-2/+4
2012-05-25Convert V_DECL_PTRARR_DEL(SwFlySaveArr) to std::vectorNoel Grandin3-28/+37
I can't use boost::ptr_vector here because the code moves objects around with free'ing them. Change-Id: I42b8f347e2bac51bd63e2c42d6ebab2e7ad4b61c
2012-05-25Convert SV_DECL_PTRARR_DEL(SwNumRuleTbl) to std::vectorNoel Grandin5-29/+31
Could not use boost::ptr_vector here because the code manually moves objects around. Change-Id: I708270a967ee6663ab1f1ba8d7998c63fa698b8f
2012-05-25Convert SV_DECL_PTRARR_SORT_VISIBILITY(SwPosFlyFrms) to std::setNoel Grandin2-11/+9
Change-Id: Iba19e13b4402594023d9ce7c4d4fa3a9cdc9899e
2012-05-24column break without columns seems to be a page break (bnc#750255)Luboš Luňák1-2/+4
That at least seems to be my conclusion after testing the doc and bnc#652364 in MSO2k7. Change-Id: Iec172dad32ba47c1f843df49a4eaff688c094373