summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport
AgeCommit message (Collapse)AuthorFilesLines
2014-06-19fdo#79599: use \highlightN instead of \chcbpatN in RTF import and exportnrbrtx@gmail.com2-0/+47
Reviewed on: https://gerrit.libreoffice.org/9776 Change-Id: I98ef606fb73368a3c275819cb83b936e2162769d
2014-06-14sw, writerfilter: identation fixesMiklos Vajna1-2/+2
Change-Id: I1f1db08447006515e7e6842792241aca992984c0
2014-06-12Spell out UTF-8Stephan Bergmann1-1/+1
Change-Id: Iea5f79fb12ac86d4348f46f8ad93a13aaf0f7eb6
2014-06-12fdo#77979: argh forgot to add the test documentMichael Stahl1-0/+0
Change-Id: I64cf70cf7f1f77c38a8a4804b705ce8a0441e487
2014-06-12fdo#77979: sw: RTF export: write non-ASCII font names encodedMichael Stahl1-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. Change-Id: Ie6a42294c501d014dd9f0df82638519412ca19bb
2014-05-16sw: fix indentation in rtf{export,import} testMiklos Vajna1-4/+6
Change-Id: Ie777de47dc70da136b145028a08ea17a0de7a87d
2014-04-22fdo#77600 RTF export: always close URL's before the end of runMiklos Vajna2-0/+31
In case the URL text has multiple portions, then MSWordExportBase generates multiple URL's anyway, and this helps to avoid loosing some direct formatting of the remaining portions of the paragraph. Change-Id: Ifd72741de610ce69b9ae0978aa8f9a532a3aeed2
2014-04-11Introduce twip/mm100 conversion functions instead of duplicated macrosTor Lillqvist1-2/+2
Change-Id: Ib689e35b417e0e9016cd6a239c986e0603a99d62 Reviewed-on: https://gerrit.libreoffice.org/8837 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-04-06Testcase for RtfAttributeOutput::SectionLineNumbering()Miklos Vajna2-0/+16
lcov pointed out this method wasn't ever invoked in any of the tests. Change-Id: I6cccf4fc1d870938a2f218bedc0b8d195a299cd1
2014-03-31MSWordExportBase::OutputItemSet: handle fill attributes as frame onesMiklos Vajna1-3/+0
Fill attributes with their original WhichId are only used for frames at the moment, replacing RES_BACKGROUND. To keep export filters working, handle those fill attributes as frame ones as well. Change-Id: I1e59b483b706d9fd3f9b947e83244740e3293f9e
2014-03-31sw: fix DOC/DOCX/RTF export of TextFrame background colorMiklos Vajna1-3/+0
Change-Id: I8b7c23af7548a0eb073e046eedfbabfb9f78fafe
2014-03-28Merge back branch alg_writerframes to trunkArmin Le Grand1-0/+6
(cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62) Conflicts: comphelper/inc/comphelper/TypeGeneration.hxx comphelper/source/property/TypeGeneration.cxx cui/source/factory/dlgfact.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/tabarea.cxx cui/source/tabpages/tabarea.hrc cui/source/tabpages/tabarea.src cui/source/tabpages/tparea.cxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/texture/texture.cxx editeng/inc/editeng/unotext.hxx editeng/source/items/frmitems.cxx include/drawinglayer/texture/texture.hxx include/editeng/brushitem.hxx include/svx/sdr/primitive2d/sdrdecompositiontools.hxx include/svx/svxids.hrc include/xmloff/xmltypes.hxx reportdesign/source/ui/misc/UITools.cxx sc/source/ui/drawfunc/drawsh.cxx sfx2/source/dialog/tabdlg.cxx svl/source/undo/undo.cxx svx/inc/svx/unoshprp.hxx sw/Library_sw.mk sw/inc/doc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/swatrset.hxx sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/access/accpara.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/app/docst.cxx sw/source/core/uibase/app/docstyle.cxx sw/source/core/uibase/shells/drawdlg.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmpage.src sw/source/ui/inc/frmsh.hxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann1-1/+1
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27RTF export: handle Relative{Height,Width}{,Relation}Miklos Vajna2-0/+51
Change-Id: I16bef12840f45b269de18fdac4c3718ed904e1be
2014-03-12CppunitTest_sw_rtfexport: enable on MACOSXMiklos Vajna1-1/+1
Change-Id: Id125f7b2293f7813391ca583f60bcbf53f455afc Reviewed-on: https://gerrit.libreoffice.org/8562 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-10fdo#74709 RTF import: implement RTF_CLPAD*Miklos Vajna2-0/+39
Change-Id: I482735e3fc4091be983b2c7484e086f5d0dd283a
2014-01-15RTF export: fix nested commentsMiklos Vajna2-0/+9
Change-Id: I9986855f3160ed6f5856aec9f7d33fc416962e77
2014-01-09RTF export of annotation marksMiklos Vajna1-5/+2
Change-Id: I079516ad0f30886d175748fdee19fbd71c2704f8
2014-01-08123792: complete annotations on text ranges featureOliver-Rainer Wittmann1-0/+3
- rely annotations on text ranges on new annotation marks - support arbitrary text ranges for annotations - fix undo/redo regarding annotations an text ranges - support annotations on overlapping text ranges - fix *.docx import for annotations on overlapping text ranges - fix ODF import of annotations on text ranges cherry-picked from branch ooxml-osba (cherry picked from commit ebd2922ebd3cf2d3899fb80780d38f367197aadf) Conflicts: sw/Library_sw.mk sw/inc/IDocumentMarkAccess.hxx sw/inc/SidebarWin.hxx sw/inc/doc.hxx sw/inc/docufld.hxx sw/inc/hintids.hxx sw/inc/ndhints.hxx sw/inc/txatbase.hxx sw/inc/unobookmark.hxx sw/inc/unofield.hxx sw/inc/unoport.hxx sw/source/core/access/accpara.cxx sw/source/core/bastyp/init.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/doc/dbgoutsw.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccorr.cxx sw/source/core/doc/docdde.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/edit/edfld.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/postithelper.cxx sw/source/core/fields/reffld.cxx sw/source/core/inc/MarkManager.hxx sw/source/core/inc/crossrefbookmark.hxx sw/source/core/text/inftxt.cxx sw/source/core/text/itratr.cxx sw/source/core/text/txtfrm.cxx sw/source/core/txtnode/atrfld.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoport.cxx sw/source/core/unocore/unoportenum.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/wrthtml.cxx sw/source/filter/writer/writer.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/ww8par.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/inc/fldmgr.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/shells/textfld.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/utlui/navipi.cxx sw/source/ui/wrtsh/wrtsh2.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/dmapper/PropertyMap.cxx xmloff/inc/txtfldi.hxx xmloff/source/text/txtfldi.cxx xmloff/source/text/txtparae.cxx Change-Id: Ie4cc467dbb837054c73742262ee20f35c151ff3f
2014-01-05RTF export: write RTF_FTNSEP and RTF_CHFTNSEP if necessaryMiklos Vajna2-0/+16
Change-Id: Ie680436df68ea6287437f792d97259ee0a840ee1
2013-12-18SwFiltersTest::filter: detect import filter on export testMiklos Vajna2-5/+0
This allows e.g. crash-testing the RTF export, even if the input source is not RTF but ODT. Change-Id: I3cf6afd1bc44bb475f1bd8da622d10dac0d3baa6
2013-12-17test::FiltersTest: add support for export testsMiklos Vajna2-8/+0
For now, this is only implemented for the Writer RTF filter. Change-Id: I0c7ae5b0e544bd4738652a38474f4d262ce65661
2013-12-10i#23357 RTF export: fix crash on groupshapesMiklos Vajna2-0/+5
Change-Id: I3329663060aeb06ac552bd5d1615d19efe160091
2013-12-09abi#10201 RTF export: fix crash when handling table::BorderLineStyle::NONEMiklos Vajna2-0/+8
Change-Id: I811820c0d550ce24ad2180a8917ef0087968c30b
2013-11-18cp#1000018 RTF export: avoid additional paragraph at footnote endMiklos Vajna1-1/+2
Change-Id: I430a7d705208f197050a7d521c9c20b267c33f26
2013-11-15cp#1000018 RTF import: empty para at the end of footnote text got lostMiklos Vajna1-1/+1
Updated 3 testcases, in all cases first checked that the new behavior matches what Word does. Also added a new test, to check that empty para at footnote end is now kept. Change-Id: I96b8788feb4d730b5a64ba3a743311a0180ab41f
2013-11-01Make CppunitTest_sw_rtfexport use DECLARE_SW_ROUNDTRIP_TEST()Miklos Vajna1-174/+69
Change-Id: I50babe172d3c9a46256ac3dc95a3b7591cd3c777
2013-09-23fdo#66743 fix import of some RTF_CLSHDNG valuesMiklos Vajna2-0/+15
This should be in sync with model.xml, got broken when the somewhat random values got fixed to be the same as the ones which are in the ww8 spec. (Regression from 26d40686128e70916a636e20f5ccc5763bbb6cc8.) Change-Id: Id62047e0b2d5d8402a7c8bce95de487afe627e32
2013-09-10Improve border equal check in filter tests 2.Zolnai Tamás1-4/+4
Change the order of words BORDER and EQUAL in the macro name to become consistent with other macro names. e.g. CPPUNIT_ASSERT_DOUBLES_EQUAL Use a function inside the macro to make it type safe. Add additional message to make clear why the test failed. Change-Id: I9fc7a5813adf2cac36ae831d438cec498232b06c Reviewed-on: https://gerrit.libreoffice.org/5885 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-09Use hex color code in character border filter testsZolnai Tamás1-3/+3
Change-Id: I19bd1cbedd42101186fd4afbcd7af9afb630f857
2013-09-08CharBrd 9.3: RTF filtersZolnai Tamás2-0/+40
-Use sprm:CBrc attribute for all MS filter (for ooxml too). -Extract general code to FormatCharBorder() method, it selects the border side and decides whether add shadow to the border. -RTF export has a color table, which must be filled with border colors before the actual export.temp Change-Id: Ic3ceae6e19ddc2ed5aaa8de85617f9a592289b4f
2013-08-27Reduce copy&paste by adding SwModelTestBase::getShape()Miklos Vajna1-10/+4
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
2013-08-15RTF import/export of paragraph drop shadowMiklos Vajna2-0/+32
Change-Id: I8d2485962947eac8acc9ada384a9c1bd4cb22503
2013-07-31Convert utf-8 bytes to \xNN hex representationTor Lillqvist1-12/+12
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-10fdo#66682 RTF export: fix level text of SVX_NUM_ARABICMiklos Vajna2-0/+46
Even if level text is not ASCII, we should just write the placeholder values (0x00, 0x01, etc.) in a hex encoded form, without Unicode. Regression from 07d01742c69f1c0335bc7e1b57abd8341ce255e7. Also, fix the import side, so the previous bad output now looks bad in Writer as well. Change-Id: I2f93892006c07eec243ec7dfcb23372d243a2db4
2013-06-16sw: move the textframe-table testcase from rtfimport to rtfexportMiklos Vajna2-0/+56
Change-Id: I7e9d26ec1f47d16e35e24fc4bd9482f5d899e79c
2013-06-16Import/export RTF_REVISIONSMiklos Vajna2-0/+11
File -> Properties -> Security -> Record Changes on the UI. Change-Id: I96d321f407abd33e15a4a133e6723d48efa5bc53
2013-04-22Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks1-23/+4
2013-04-15sw: add textframe gradient RTF roundtrip testcaseMiklos Vajna2-0/+186
Change-Id: I8e4f6b926123c79ad1a62ddd4c5feebf5fe06cf0
2013-04-15sw: RTF export of TextFrame border/shadow testcaseMiklos Vajna2-0/+70
Change-Id: I85b85afb6d1b170d71633f93d56f7ce4fffdf0a3
2013-04-08test RtfAttributeOutput::StartURL()Miklos Vajna2-0/+18
Change-Id: I66f527ff7463852f65e1a3f02ddcea60d329147a
2013-04-08test RTF_BKMKSTART and RTF_BKMKENDMiklos Vajna2-0/+16
Change-Id: I00b258ef3ed89db3b9b8c97bea5ad6673b006398
2013-04-07RTF_LISTPICTURE and RTF_LEVELPICTURE testcaseMiklos Vajna2-0/+71
Change-Id: Ia6838d205ce25a22e2e5e8763f7bf4323c40879a
2013-04-02implement import/export of RTF_MNORMiklos Vajna2-0/+96
Change-Id: I9caea7fbea4643e57d81ad3b7812d0cc10f54c11
2013-03-29implement RtfAttributeOutput::PlaceholderFieldMiklos Vajna2-0/+11
Change-Id: Ib6fd380736c5567a98317ec117969d8c76a31f02
2013-03-27fdo#30983 RTF filter: fix handling of RTF_PVPG and RTF_PHPGMiklos Vajna2-0/+56
There were two issues here: 1) The export filter never exported these keywords. 2) The "flymaincnt" RTF extension we inherited from OOo actually never worked (i.e. it's like this since 7b0b5cdf, the initial import...), as RTFVertOrient / RTFHoriOrient's second parameter was stored in 1 bit, so text::RelOrientation::PAGE_FRAME (7) was read back as 1 instead. Note that I want to get rid of this flymaincnt extension in the exporter anyway soon, so killing the RTFVertOrient / RTFHoriOrient duplication is pointless: the sw version will go away. Change-Id: I5335567833ecf87e6b0ba7c73150a7b95c57f237
2013-02-26fdo#61507 export of RTF_TITLE may need RTF_UPR and RTF_UDMiklos Vajna2-0/+31
Change-Id: I3b8fe209a96e5119541e09cb5dbda8a2c6926b40
2013-01-17fdo#52286 fix RTF export of sub/super script font heightMiklos Vajna2-0/+9
Change-Id: If71cb6a20842f2fbe8eae94955da2d53842999a4