summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfattributeoutput.hxx
AgeCommit message (Collapse)Author
2020-05-19sw chicago numbering: add RTF footnote exportMiklos Vajna
Chicago numbering is not supported for paragraph numbering (same as DOC), so focus on footnote/endnote export only. There is markup in RTF to store doc-global footnote/endnote numbering type and the same for per-section. DOC writes both, then Writer only reads the global setting and Word only reads the per-section setting. This means only export is needed here, import already handled the doc-global markup, and that's enough. (cherry picked from commit 4ba09be7e260ce2a79a23465db7b2837422cde30) Change-Id: I3590560ca913e04078988fe4784e50fa5cbf17bf
2019-11-20tdf#128889: don't write "page break after" into w:pPrMike Kaganski
This produced invalid OOXML, which Word considers as "page before", and LibreOffice ignores when re-importing. Make sure to write it as *trailing* w:r with w:br, as Word also does when imports ODT with this atribute, and saves as DOCX. Change-Id: Ifc4f45d65d4455ecb5cd62aed1ef6a03375c8aa4 Reviewed-on: https://gerrit.libreoffice.org/83232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit b0e7e494b6bc69d3833c0a6c256ff8106a4a24cb) Reviewed-on: https://gerrit.libreoffice.org/83334 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-19sw: RTF export: fix invalid RTF for shapes and text frames againMichael Stahl
It turns out that commit 4652b911c4376048a452709c953197e1a879a921 wasn't quite right: writing out the m_aRunText doesn't necessarily put it in the right place, it just happened to work on that bugdoc but in other cases the shape may be written before the paragraph properties of the paragraph it's in... So instead change the text frame case to save and restore the run related buffers and members, so that the text frame itself can do whatever it wants, and the result is appended to m_aRunText. The members saved are a superset of those saved in WriteHeaderFooter_Impl(), writeTextFrame(), TextFootnote_Impl(). Also another thing was missing is that OLE objects would trigger the assert because they are also buffered into m_aRunText, e.g. ooo46760-1.odt. Change-Id: Icc6988f8ed19724c593760df46e0254792cd1735 Reviewed-on: https://gerrit.libreoffice.org/83105 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit da967d5f8f450fbcbe1f595dbfc357eb7c8b3c50) Reviewed-on: https://gerrit.libreoffice.org/83180
2019-06-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7ccd6af737c21a50fe7df25266198ee6989c4c69 Reviewed-on: https://gerrit.libreoffice.org/74110 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-08loplugin:unusedmethodsNoel Grandin
Change-Id: I52efd8d843d0e4cc7a6adefb0eb95aa50469af38 Reviewed-on: https://gerrit.libreoffice.org/73693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-06tdf#125719 sw: rtf: refactor associated character propertiesSerge Krot
1. \rtlch, \ltrch should be placed before their properties. 2. Do not mix associated and normal character properties in output. 3. Do not output empty "\rtlch \ltrch", "\ltrch \rtlch" pairs. 4. Handle associated character properties runs instead of handling separately their parts without order of them. Change-Id: Ibbf7365d04708682a5f1eb664a579c60a47465d2 Reviewed-on: https://gerrit.libreoffice.org/72578 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-01-11tdf#122589 rtfexport: no duplicate section at document startJustin Luth
If the document starts with a real section, then RTF export should not write out \sect before the first paragraph, because there already is an implicit section. Otherwise on import it is treated as an empty paragraph. The reason this problem doesn't multiply on each round-trip is that the import process puts a PageBreak on the first paragraph, and so it follows a different code path. The ODT file does not contain a PageBreak on the first paragraph. Change-Id: I8f2d48c932587aaf162e8f7352adf12ec15645f0 Reviewed-on: https://gerrit.libreoffice.org/66017 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-12-19sw RtfAttributeOutput: make members privateMiklos Vajna
Change-Id: I417dd9352ad0b076b5c0c554b9d7dd3fe3c08fb7 Reviewed-on: https://gerrit.libreoffice.org/65374 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-03-27msfilter: extract duplicated WriteHex() from HTML/RTF filterMiklos Vajna
The RtfAttributeOutput one is a superset of the HTML one, so use that. Change-Id: I3e342113a7ba26946320f43a164e457d6cbb6946 Reviewed-on: https://gerrit.libreoffice.org/51937 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-22RTF filter: drop now redundant astyle.optionsMiklos Vajna
I (tried to) keep the RTF filter style consistent locally with astyle in the past, but now that's redundant when we have an enforcing clang-format mechanism in place. So drop the astyle config and switch to clang-format in the RTF filter case. To minimize backport pain, do this shortly before the libreoffice-6-0 branch-off. Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
2017-11-10sw: remove temporary debug code in txttab that no longer builds anywayMiklos Vajna
Change-Id: I40dfa40dd157046aa5c1285b1855fb8c100fc315 Reviewed-on: https://gerrit.libreoffice.org/44577 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-09tdf#42346: DOC export of cross-references to objectsTamás Zolnai
Same solution which was used for DOCX export: 98bc7215935f1eb2e0dc6f1db826d8e729430c13 Change-Id: I8af46db003a6192c6adaae1a35dff58744919eee Reviewed-on: https://gerrit.libreoffice.org/44502 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-11-04tdf#42346: DOCX export of cross-references to objectsTamás Zolnai
* Objects means tables, images, text frames and shapes * Implementation ** MSO uses simple bookmark references as cross-references to objects ** So generate bookmarks in export time if a caption is referenced ** In some cases we also need to split some of the runs ** Implemented all types of cross-references, except the chapter reference Change-Id: I3b17753123d94a04e4f28783ad5663831e7c6c84 Reviewed-on: https://gerrit.libreoffice.org/44294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-10-23tdf#38778 fix missing run properties export for fields in docxSerge Krot
Not all runs got their text properties written during field export - previously only the first run had them. Adds SwTextNode param to EndRun and EndRuby methods, implementation empty for rtf and doc though. Change-Id: I77f39b40689feb9664044e61824ad3bb97776638 Reviewed-on: https://gerrit.libreoffice.org/43465 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
2017-09-28RTF export: various minor cleanupsMiklos Vajna
Change-Id: I6bdbe246bf65dcfa193289210f7c464769d5e2ad Reviewed-on: https://gerrit.libreoffice.org/42887 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-11sw: fix inconsistent param naming in interface/implementationMiklos Vajna
SvxPostureItem& rWeight is confusing at best. Change-Id: I70a7e94151f49bf3539af77160cd4a68b8753464 Reviewed-on: https://gerrit.libreoffice.org/41006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-02loplugin:checkunusedparams in swNoel Grandin
Change-Id: I8a6b2647375a54720cd9fd765cc51c9ff43c8190 Reviewed-on: https://gerrit.libreoffice.org/40682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01sw RTF export: remove redundant virtual keywordsMiklos Vajna
Change-Id: Iabc62f8166cb4f2013fc6c2908c8172f9acb0336 Reviewed-on: https://gerrit.libreoffice.org/38294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-09tdf#107620 RTF export: handle DocumentSettingId::PARA_SPACE_MAX compat settingMiklos Vajna
As it turns out it has a dedicated RTF control word. With this, the bugdoc is again kept as a one-page document during DOCX -> RTF conversion. If we are at it, also write the automatic before/after paragraph spacing markup. Change-Id: I78de644f0631e59ef507dfaa07c5a812d4ef10cd
2017-05-09loplugin:checkunusedparams in sw(part5)Noel Grandin
Change-Id: Iee48e6c77f1eb57cd8a3a245e5415051b85f4cc1 Reviewed-on: https://gerrit.libreoffice.org/37387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-11-30convert WRITEFIELD constants to o3tl::typed_flagsNoel Grandin
Change-Id: I6412faee844e19195d57415874022bcf8547f4d7 Reviewed-on: https://gerrit.libreoffice.org/31360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-19loplugin:countusersofdefaultparams in swNoel Grandin
Change-Id: I668bfe93d77b06385544651583bcf71f6b5df2fc
2016-06-27loplugin:singlevalfields in sw(part2)Noel Grandin
Change-Id: Ic1b186c82a6b37ae0cd8028a60e2ad09233d8e5d Reviewed-on: https://gerrit.libreoffice.org/26665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06sw: simplify identical branches in WW8AttributeOutput::DefaultStyleMichael Stahl
Change-Id: I0d500ecbcd0bc0d6b9f772304345acd4ddb5df11
2016-05-06sw: no need to copy these in rtfattributeoutputMiklos Vajna
Change-Id: I6afbde0943cc5a0a760b873c17a08bb0f5a8c1c5 Reviewed-on: https://gerrit.libreoffice.org/24687 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-12-09tdf#94377 RTF export: support comment formattingMiklos Vajna
The core of this change is that RtfAttributeOutput::PostitField() now uses WriteOutliner() to handle comment text, instead of trying to output the plain text as-is. To have working roundtrip of the comment text, a few more changes are needed: 1) When emptying the Styles buffer, also empty the StylesEnd one. 2) Annotations don't want a trailing \par, so don't write one for the last paragraph. 3) Inform the MSWord_SdrAttrIter about where the editeng content will end up, and make WriteOutliner() accessible outside RtfSdrExport. Change-Id: I9cbcf4ce5dc3a099d310c6f321ea8e52f8644f9b
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-10sw: rename sw::Frame in the WW8 filter to ww8::FrameMiklos Vajna
This way it's more clear that sw::FrameClient has nothing to do with sw::Frame, also later renaming SwFrm to SwFrame won't cause confusion about why do we have both sw::Frame and SwFrame. Change-Id: I87c4d199d418c77fdbb600fc388c8b9f026cb0fa
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-21tdf#92521 DOCX export: handle section break right after a tableMiklos Vajna
DocxAttributeOutput::SectionBreaks() previously only handled the text-text and text-table node transitions; implement support for table-text to avoid loosing a page break on export for the bugdoc. (View this commit with whitespace ignored to filter out the noise about SectionBreaks() now accepting non-text nodes, too.) Change-Id: Ie8a1575374a207399351635bda8c0c076ce7268d
2015-07-22loplugin:unusedmethods sw(part2)Noel Grandin
Change-Id: Ib95638267c5a7df73ccdd179dd62ac7c9a53a5e4 Reviewed-on: https://gerrit.libreoffice.org/17262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-09Better support more than 65k annotationsMatteo Casalin
There isn't really a limit for the annotation count in the RTF/DOCX spec. Thanks Miklos for hints on this. Change-Id: Ib4493b518acb3cabe04312c37b5c6a9c6072cb7e
2015-06-20sw: WW8 export: remove newly unused parametersMichael Stahl
Change-Id: I76da4422008c9dad8cf48dd089d644e432007d79
2015-06-20sw: WW8 export: RawText parameter bForceUnicode is obsoleteMichael Stahl
Change-Id: I7b9543ebb56f99bb1d28c2e7b92818ca37418382
2015-05-26cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I955b04396d27e88ce228f180275955071da83ec6
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-04-29RtfAttributeOutput::m_pTableWrt: use std::unique_ptr<>Miklos Vajna
Change-Id: I188d00a3962205d958d5efe1d387e009372ec281
2015-04-21tdf#90421 RTF export: ignore hyperlinks without an URLMiklos Vajna
Commit fe444d1f74abe417962be0bcd3340f40f2446b58 (fdo#62536: sw: fix AutoCorrect bold/underline on existing AUTOFMT, 2013-06-20) adds an empty inet format hint on the text node during autocorrection, on export we can safely ignore that to provide well-formed output. Change-Id: Iafae941a13e29dcc7d8b4bade5ce94a486b59638
2015-03-21Char highlight: RTF filtersZolnai Tamás
Handle \highlightN and \chcbpatN separately. Change-Id: I20546bd4c26154e8b1168f87dcb4ab44a192ad83
2015-03-12TyposJulien Nabet
Change-Id: I55d7440ba5bee16bbce5930c81c604858131b5c7
2015-03-02V813: Decreased performanceCaolán McNamara
Change-Id: I6a988077a3a2e2adf33a2c00a84b929e8133133f
2014-10-17pParagraphMarkerProperties can easily be a referenceMiklos Vajna
Change-Id: Ida4309aeb69bde43f70415211490db657c7c7567
2014-10-15fdo#82860 RTF export: if shape has textbox, export its contents as shape textMiklos Vajna
See 8c677716c4707ccd86b152ae504841affb393cc0 (DOCX drawingML export: if shape has textbox, export its contents as shape text, 2014-06-06). Change-Id: I5b1afae4d1b80c9b225096677f7d7ae77ff90f5b
2014-07-19XFillStyle -> css::drawing::FillStyleMiklos Vajna
Change-Id: I6b2fabd72fd34f4ac1b3a18f386c90794bc39ce4
2014-06-27fdo#78758: sw: RTF export: don't export multiple \fldrst for one hyperlinkMichael Stahl
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) Change-Id: I209ea7a384fb1cb5d1505a70ecc4a4536bbf26a2
2014-06-19indentation fixesMiklos Vajna
Change-Id: Ia391ccc9889a135730f0fead11eb0b6c2f748ec4