summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2019-11-06loplugin:indentation find broken if statementsNoel Grandin
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-04tdf#120315 DOCX import: fix cells merged verticallyBakos Attila
Due to rounding mistake cells weren't merged vertically, when their horizontal positions are different a little bit. Change-Id: I10623719a3759b35fcd04b154590b8ac6ec3ac45 Reviewed-on: https://gerrit.libreoffice.org/81604 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02New loplugin:conditionalstringStephan Bergmann
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31tdf#125038 DOCX import: better support for linebreaks in IF fieldsMiklos Vajna
IF fields can't contain linebreaks, so instead of just calling finishParagraph() and hoping it does something sane, explicitly handle them: remember the properties and perform the call only once the field is closed. Change-Id: I676aa2c83f12cb600829177a0eb25558822b1d94 Reviewed-on: https://gerrit.libreoffice.org/81847 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-10-31Fix typosAndrea Gelmini
Change-Id: I917e4cdac3690dd5134e4994a0ee4106ae88ae36 Reviewed-on: https://gerrit.libreoffice.org/81860 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-31Resolves: rhbz#1766990 starmath might not be availableCaolán McNamara
Change-Id: If2e02d8da85a2af576d9563c455487ac3463c935 Reviewed-on: https://gerrit.libreoffice.org/81837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-31tdf#125038 DOCX import: fix lost MERGEFIELD result inside an IF fieldMiklos Vajna
The problem here was that the IF field result didn't have a plain text string, rather it had a MERGEFIELD in it. Writer's conditional text field expects a plain text string, so just use the result of the MERGEFIELD for an IF parent. Do this in a generic way, it's likely that other parent-child field combinations want to do the same in the future. With this, all lost strings are fixed from the original bugdoc + all unexpected content is hidden in Writer as well. Change-Id: Ic5c03b1df2f08a2cd851647b625e0c303cc5d6c5 Reviewed-on: https://gerrit.libreoffice.org/81825 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-10-31Fix StringAdd::isCompileTimeConstantStephan Bergmann
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-30Related: tdf#125038 DOCX import: fix unexpected linebreak inside IF conditionMiklos Vajna
Writer body text is expected to only contain the result of the field. So in case both the field command and the field result contains a linebreak, we need to make sure that linebreaks are ignored in the field command for field types where the Writer field implementation expects a single string. With this, the number of paragraphs in the bugdoc is now correct. Change-Id: I42f208d6943750ba2e8f88b52c373f6ca9cb2b71 Reviewed-on: https://gerrit.libreoffice.org/81786 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-10-30writerfilter: rtftok: filter control charactersMichael Stahl
... in RTFDocumentImpl::checkUnicode(); see ooo86460-1.xls [sic] for an example. There is another caller of text() in rtfdispatchdestination.cxx:311 but it turns out that buffered text was created by text() in the first place. This shouldn't be a problem for DOCX because XML 1.0 doesn't allow the bad control characters anyway so the sax parser should report an error in that case. Change-Id: Ice45e1c3c8c7db668a4cfb8364e42addea1777ce Reviewed-on: https://gerrit.libreoffice.org/81697 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Michael Stahl <michael.stahl@cib.de>
2019-10-29writerfilter: assert that start position is before end positionMichael Stahl
As seen in fdo34663-1.docx; should find more bugs hopefully. Change-Id: Id38fdebe3ab4f48af298e2ef76ad66051cee5bcf Reviewed-on: https://gerrit.libreoffice.org/81671 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-29writerfilter: need to always import form-fields with their ffDataMichael Stahl
The generic field import path ignores ffData, becuase it's a separate element and not part of the field command. Change-Id: Ie7c622aff01e4f1a63269b46aa7b06f4f18db8c4 Reviewed-on: https://gerrit.libreoffice.org/81670 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-29writerfilter: fix handling of checkbox/dropdown fieldmarksMichael Stahl
The InsertFieldmark()/PopFieldmark() isn't necessary for these because they can only be a point/single CH_TXT_ATR_FORMELEMENT anyway. For example fdo34663-1.docx goes quite wrong with InsertFieldmark() doing stuff but then PopFieldmark() isn't called because it doesn't have a ffData, and then the TextAppendStack is messed up. Change-Id: I0af7c2577070e903b6f87d2fe47a40a1365198fa Reviewed-on: https://gerrit.libreoffice.org/81669 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-29writerfilter: use insert position in PushFieldContext()Michael Stahl
Don't hardcode end of text; see mangled nested fields in e.g. sw/qa/core/data/ooxml/pass/fdo79838.docx Change-Id: I1b77e7a0c0d2a7d52b5facbb43a0ed0747d74cea Reviewed-on: https://gerrit.libreoffice.org/81668 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Michael Stahl <michael.stahl@cib.de>
2019-10-28Related: tdf#125038 DOCX import: fix unexpected MERGEFIELD result inside IFMiklos Vajna
The problem is that DOCX supports nesting MERGEFIELD fields inside IF fields, while SwHiddenTextField only supports a single string as a condition. This means in case there are MERGEFIELD fields inside the IF field, those fields will be inserted to the doc model before the IF field, exposing their value, while Word only uses their value during the evaluation of the IF expression. Fix the problem by inspecting the parent field command before setting the MERGEFIELD result. Change-Id: Ieca098f16f756bab5d23f219fa4ca30d077d4bb7 Reviewed-on: https://gerrit.libreoffice.org/81615 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-10-28related tdf#99602 writerfilter TODO: subscript - use CharStyle fontsizeJustin Luth
GetAnyProperty was missing a check for character style properties. This patch depends on commit 875793d841165aaaaefa2c34b855e8f0f8a8c214 related tdf#99602 writerfilter TODO: subscript - use ParaStyle fontsize and on commit 5e97d1a57717f8dbf69b987d2bda8616972eec52 NFC writerfilter: preparation for adding CharProps to GetAnyProperty Change-Id: I4e28589917e41fa545d5aab05f97a67502486136 Reviewed-on: https://gerrit.libreoffice.org/80216 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-28tdf#121441 improve DOCX footnote importJan-Marek Glogowski
ODF represents footnotes by using a fixed string for the label (text:note-citation) and a flexible body (text:note-body) for the representation in the footnote area. The only formatting of the footnote reference is done by changing the character class assigned to the anchor (which is the text range of the label in the text). For most of the setting, the footnote area label just follows the footnote body character formatting. OTOH MS Word has no such "restrictions". It handles the label just as concated, formated text runs with the same style. On top of it, DOCX completely splits the reference from the footnote area part, including its own label, which can easily result in completely different labels for the footnote and the reference, as I happened to repoduce for my test documents. At this point it's quite obvious that for any complex footnotes, LibreOffice won't be able to represent them. IMHO ODF should offer the same flexibility for the label and the body and allow all the normal formatting in the label. I'm not sure that getting footnote area and reference label out of sync is a good idea. So this patch tries to improve the situation in the current constraints set by ODF. 1. It imports all runs of the whole custom DOCX footnote label. 2. If any run contains a symbol, switches the font of the whole label to the referenced symbol font. 3. Completely ignores the label of the footnote area and overrides the font of the footnote area label with the font of the reference. Other problems I found while testing this code: 1. LO edit field correctly gets the font and character set, but displays empty glyphs. So no real way to edit the label. 2. Normally the font of the footnote area label would follow the footnote font. This doesn't work anymore when the font is overridden for the label. Setting the whole font of the label to Symbol doesn't seem like a good solution either. 3. You can't mix multiple fonts, or even symbols and letters, as you can just select one font for the label. 4. You can't change the footnote are label font at all and since it doesn't follow the footnote area anymore, there is basically no way to change it. Change-Id: Iafa16936be81e1866c610ebf0f71ab15e74dd059 Reviewed-on: https://gerrit.libreoffice.org/81370 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-10-28loplugin:stringadd improve detectionNoel Grandin
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-26size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23sw: add test for RTF/DOCX roundtrip of nested fieldsMichael Stahl
This reveals some funny code that was added in commit 24b04db5a63b57a74e58a7616091437ad68548ac which happens to break the RTF test; let's just disable that inside field commands, doesn't make much sense there probably. Change-Id: I77fd13d7c4b7d370dda8a342b72cbc2bbab604e1
2019-10-23writerfilter: add config to import all fields as generic, incl. commandsMichael Stahl
Change-Id: I02d178de3672200b69e60ba5841c993fa0d797f9 Reviewed-on: https://gerrit.libreoffice.org/80076 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23writerfilter: adapt the "real" fieldmark path in CloseFieldCommand()Michael Stahl
... and PopFieldContext() to work the same as the generic fallback path, so that the CH_TXT_FIELDSEP is in the proper position, before the imported field result. Change-Id: Ic9b24dce43e7809a183b91cdc97c037f410cbaa8 Reviewed-on: https://gerrit.libreoffice.org/80918 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23writerfilter: StartOrEndBookmark(): don't hardcode end of documentMichael Stahl
... use xInsertPosition if available. Change-Id: Id9a0ba2842ed88c7a83ffcd5ce9d12334deae755 Reviewed-on: https://gerrit.libreoffice.org/80916 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23tdf#120224 writerfilter: don't suppress all bookmarks inside fieldsMichael Stahl
MSWordExportBase used to erroneously export all sorts of marks as bookmarks, but we fixed that. Apparently this code in DomainMapper_Impl::SetBookmarkName() should prevent import of the bookmarks that were exported as duplicates for fieldmarks; suppress only the marks with the same name as the fieldmark, but not unrelated marks that happen to start inside the field, like the "_GoBack" one in tdf120224_textControlCrossRef.docx. The reason why this was necessary previously is some dubious nonsense in model.xml that caused the ffData stuff to be delayed until the next run, hence the bookmark start is sent to domain mapper before the ffData; this was already helpfully marked with a TODO comment, so just implement the suggestion. (regression from 579c0749bef8c980507229439715e72060c1b077) Change-Id: I15a1865ac34b0b9b3f11849d612e95115582b90b Reviewed-on: https://gerrit.libreoffice.org/80917 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23writerfilter: import nested generic fields from RTFMichael Stahl
* for m_bStartGenericField, push new insert position onto the stack in DomainMapper_Impl::CloseFieldCommand(), not in DomainMapper_Impl::appendTextPortion() * how is the field result inserted into the field, instead of after it? - it doesn't seem possible to move the insertion of the field mark to PopFieldContext(), as there's no way to pass 3 positions to attach(), and exposing a writable property for the position(s) is a bad idea - finishParagraph() calls AppendTextNode(), which happily ignores a content index on the given XTextRange - so temporarily insert a paragraph break, override the insert position, and join the paragraphs in PopFieldContext() Change-Id: Ie49084f6ea6451e7d7f9b613cedce326de9a54f1 Reviewed-on: https://gerrit.libreoffice.org/80075 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-22sw: what is that exception aboutMichael Stahl
Change-Id: I00bce4bead3d593b2c2ceb06da49fd90d6fd213f Reviewed-on: https://gerrit.libreoffice.org/81080 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17loplugin:virtualdead unused param in BinaryObj::dataNoel Grandin
Change-Id: I726745b82747f24cc93662bfb0dd381a114fde78 Reviewed-on: https://gerrit.libreoffice.org/80955 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead unused param in OOXMLDocument::setXNoteTypeNoel Grandin
which means the whole method is dead Change-Id: Ib3349f5beb8b9bb9fe223bc33aca84a20e581445 Reviewed-on: https://gerrit.libreoffice.org/80954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17writerfilter: fix commentJustin Luth
The comment was introduced in commit 28a3156943 which was dealing with things being inside or outside of a paragraph. Change-Id: I1985776c4d2c0f86395e415c9943f9d6004a2fc4 Reviewed-on: https://gerrit.libreoffice.org/80929 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-10-17loplugin:virtualdead unused param in LoggedStream::lcl_infoNoel Grandin
which means the whole method is actually unused Change-Id: I72d33ab6e260012b82002ceae7ff9e54e2ea6349 Reviewed-on: https://gerrit.libreoffice.org/80953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead unusedparam in LoggedTable::lcl_entryNoel Grandin
Change-Id: I45c7330b3803f21165714c6140fac46a6592db9b Reviewed-on: https://gerrit.libreoffice.org/80952 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17writerfilter: clean up now redundant PROP_LAYOUT_IN_CELLMiklos Vajna
Which is now exactly the same as PROP_FOLLOW_TEXT_FLOW, so no need to set it separately. Change-Id: I32e1e2bdfb8ac46eb6a07f5187f780275d334b2f Reviewed-on: https://gerrit.libreoffice.org/80926 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17tdf#108350 writerfilter: restore TimesNewRoman as default fontJustin Luth
Followup for LO 5.4 commit 6f2ad89b33d972f9642bb53eeb91f41df3b6b0e6 which set Calibri/11pt as default. That is true if there is no style.xml file, or more specifically if there is no DocDefaults rPrDefault node. But if that node exists, then the age-old defaults are still valid. Earlier in LO 4.3, the default templates changed to use Liberation fonts by default. But in the same vein as using Calibri (and depending on LO to fallback to Carlito), set Word's default Times New Roman font and depend on LO to fallback to Liberation. That will make it better for MSWord users who share the document and who have less likelihood of knowing about Liberation/Carlito. Note that 10pt fontsize was already added to m_pDefaultCharProps earlier, so that part was already reset long ago. Change-Id: I3ba8a529fe95b05fbe2889cf1ebdbabb25963e8b Reviewed-on: https://gerrit.libreoffice.org/80854 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-10-16tdf#106843 DOCX: export/import change tracking protectionLászló Németh
Now change tracking protection from Writer or from ODT files is exported to DOCX. In Writer it's always possible to disable change tracking protection without password in File->Properties->Security page-> Record Changes after confirmation. Now Writer uses the same confirmation to remove change tracking protection imported from DOCX, for example clicking on Record Track Changes. Disabled protection removes the export of the grab-bagged change tracking protection, too, to avoid of creating bad DOCX with enabled change tracking protection and disabled Record change tracking. See also commit d416250f4f1766e2d596ea3feef6a94b7adf29f4 "tdf#106843 DOCX: forbid disabling protected Record Changes" Change-Id: Ida4d72c57dbe5450ea22028bbed69d413f5a786d Reviewed-on: https://gerrit.libreoffice.org/80784 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16tdf#128156 DOCX import: fix losing redline at page breakLászló Németh
w:framePr of page header doesn't mean real frame conversion, so don't store and lose redlines after it. Regression from commit e8bae67b3dbcc90ace8264b6b1aefaf0ce459aba "tdf#125894: DOCX: import tracked changes in frames". Change-Id: I46cd153cccef4824deca1f64341f2ea6672cdc42 Reviewed-on: https://gerrit.libreoffice.org/80871 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-16writerfilter: sync layout-in-cell vs wrap-though behavior with ww8 importMiklos Vajna
I removed the same check in the WW8 import in commit d630f69d90f15bc652a62648b05ea515de78d16a (Related: tdf#124601 DOC import: improve fLayoutInCell handling, 2019-09-26). There is no reason the DOCX import shouldn't do the same, just for consistency. Change-Id: I9e56a3fcd0b13ba08e347fbc06b0960ac21b372c Reviewed-on: https://gerrit.libreoffice.org/80856 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-12tdf#127741 DOCX import: format hyperlink with Default character styleTünde Tóth
according to correct hyperlink handling, avoiding various editing and layout problems; "sticky" and not easily removable character style around the hyperlink and multiple blue hyperlink colors. Set also Visited/Unvisited link character styles when the style of the hyperlink is not the requested "Internet Link". Change-Id: I3d7ba8dd225c693cc9f521b37767cf1e1e09d7c0 Reviewed-on: https://gerrit.libreoffice.org/80449 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-12tdf#106843 DOCX: forbid disabling protected Record ChangesLászló Németh
Password protection of enabled record changes has been grab- bagged, yet, but it was possible to disable the protection without password verification, eg. by a simple click on Record Track Changes. Now it's forbidden to disable the protected Record Changes, using a dummy password temporarily. Change-Id: Ibc1c9016ea164ebb588265579fb9fa589ddee114 Reviewed-on: https://gerrit.libreoffice.org/80643 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10writerfilter: remove pointless if in appendTextPortion()Michael Stahl
Change-Id: Iff8171b48a2687bbadb4e2638675a73de96a7545 Reviewed-on: https://gerrit.libreoffice.org/80074 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-10tdf#127814 DOCX: fix default paragraph margin in table cellsLászló Németh
when the table is started on a new page. Undefined w:before in w:docDefaults/w:pPrDefault resulted 0.5 cm paragraph top margin instead of 0 cm. Change-Id: I94a2aa9e9c5fcee6443b74bb261c300c6a8e1303 Reviewed-on: https://gerrit.libreoffice.org/80445 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-09tdf#120336 DOCX import: fix page break after tracked deletionLászló Németh
Actual text content lost its page break, when the last paragraph of the section was empty and preceded only with tracked deletion. See also commit b696600821d8aafb63b6a88016d299ef89478f56 "n#766481 dmapper: don't import fake paragraph containing sectpr only, take two" Change-Id: I6b1c47da2b618f10ca4887f050469f94efa2a7cb Reviewed-on: https://gerrit.libreoffice.org/80540 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-09NFC writerfilter: preparation for adding CharProps to GetAnyPropertyJustin Luth
...for tdf#99602 specifically, but I've intended to do this for a long time. Currently GetAnyProperty doesn't look in Character Styles for the requested property. But it should. GetPropertyFromCharStySheet can re-use a lot of the code for GetPropertyFromStyleSheet, so split that up and explicitly identify the existing function as ParaStyle. Change-Id: I9843153a6c09a10d63a575cb1f35a56c21c9cb9c Reviewed-on: https://gerrit.libreoffice.org/80180 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-09loplugin:redundantpointerops check other pointer typesNoel Grandin
as well as unique_ptr Change-Id: I54842bca161ee460fb96c46ca31b6f9c0a7dbbdf Reviewed-on: https://gerrit.libreoffice.org/80455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08tdf#127825 DOCX import: fix handling for tbrl, auto-height and rel size shapesMiklos Vajna
Regression from commit ff17478e069cc82681df62514876c06365dd5cd6 (sw btlr writing mode: implement DOCX shape import for tbrl, 2019-04-25), there were two problems here: 1) Relative size currently only works properly for the lrtb direction, so disable that during import till sw core is improved. 2) When SwFlyFrame::Format() auto-grows a text frame which is the textbox of a shape, it needs to notify the shape about the physical size of the frame, not the logical one. So going via the SwRectFnSet abstraction is not correct in this case. Change-Id: Ie185c7415d90594434eac8f459630d6a3212328a Reviewed-on: https://gerrit.libreoffice.org/80398 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-07cid#1130173 Logically dead codeCaolán McNamara
Change-Id: I3b283a3283d865f5f96d872bad219ce9c3f872df Reviewed-on: https://gerrit.libreoffice.org/80356 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins