summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2020-06-15writerfilter: use std::any_of()Miklos Vajna
Change-Id: I21d5059beee737c286d85f559c767f43962a63ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96355 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-15writerfilter: use default member initializerMiklos Vajna
Change-Id: I2efdc3d1f9eeb26b90f3d2f95377baaaa1130738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96325 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-15tdf#128195 Keep spacing below last paragraph in header (docx)Samuel Mehrbrodt
Add a layout compat option to keep the spacing below the last paragraph in the header in doc/docx files Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94577 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-06-12tdf#76817: DOCX import: fix custom chapter numberingLászló Németh
When one of the parents of the default Heading style has got custom paragraph style instead of the default Heading 1 – Heading 10, apply direct numbering again to avoid bad or missing numbering. Change-Id: I7e94600b5ac2cbf593a95eda6c0d6cd9d731dd75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96199 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-12tdf#76817: DOCX import: fix chapter numberingLászló Németh
Imported headings got also redundant custom direct numbering, resulting broken automatic chapter numbering: applying standard Heading styles on paragraphs using the associated toolbar menu, Manage Styles dialog window or Ctrl-1–Ctrl-4 shortcut keys, it didn't result continuous numbering. Co-authored-by: Justin Luth <justin_luth@sil.org> Change-Id: Ic1ba5070fa4c387ad527aec05234a4da90fab751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96198 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-10tdf#133457 DOCX import: fix frame position regressionTibor Nagy
caused by commit f5636817e7677a3081263df9004940a7d5ac54af (tdf#112287 DOCX frame import: fix default vAnchor). Co-authored-by: Attila Bakos (NISZ) Change-Id: I6fe16ff274d6a2fa4a335c7790ecd0f01641a6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95035 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-10tdf#131070 DOCX import: fix indentation of direct numberingLászló Németh
Indentation came from direct numbering has precedence over table style. Also paragraph style based right indentation affects DOCX list items with not paragraph style based numbering, unlike Writer. Keep all indentation values using direct paragraph formatting. Change-Id: Ia66645269a4fcd06f0be4f02c775007c83d22a0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95954 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-08tdf#132596 writerfilter: fix paste of RTF with header/footerMichael Stahl
The problem is that writerfilter inserts the content of header/footer into the body text, but then DomainMapper_Impl::PopPageHeaderFooter() calls RemoveLastParagraph() and deletes a body paragraph containing a fieldmark, and then in Undo some SwHistoryTextFieldmark can't find it, and since ffb26b81e1c7ff1d64959200247bb2edd5a569da this crashes. This is because of the borked error handling in DomainMapper_Impl::PushPageHeaderFooter(); the m_xBodyText->createTextCursorByRange() call throws an exception that is swallowed, so the m_aTextAppendStack doesn't have an entry containing the position in the header. To fix the error handling, set m_bDiscardHeaderFooter = false only when everything was successful. Also fix the call to be xText->createTextCursorByRange instead (this is a regression from 232ad2f2588beff50cb5c1f3b689c581ba317583). Then it turns out that Undo still crashes, because sw can't Undo changes of header/footer content, so just return early unless it's a new document. Change-Id: Ie5aeb45447c5fbd4b3ae15c4cffb9800583a6d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95797 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-05Upcoming loplugin:elidestringvar: writerfilterStephan Bergmann
Change-Id: Ibd1152d909b3c50b7e2a6c7b70910925210c8b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95605 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05tdf#83309: docx import: allow for lists tabstop at zero positionVasily Melenchuk
Zero position is valid value for tabstop, but previously it was treated as "no tab stop defined". Right now writer distinguishes tab stop at zero postion and no tab stop. Change-Id: Ie32da3d36a263644ba85a882029a8b29ae0501c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95132 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-04tdf#133455 DOCX import: fix table border regressionLászló Németh
caused by commit 8ffc1299ebf83450e67cf2a89304859e2558cd27 (tdf#95033 DOCX import: apply tblPrEx table border). Change-Id: Ief4da3bce3282b5dab1ce4dabb4e075efcc1abaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95504 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-04loplugin:simplifypointertobool improve (2)Noel Grandin
to look for the x.get() == null pattern, which can be simplified to !x Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03writerfilter: mark these as const to make it explicit they return a copyMiklos Vajna
I.e. move / scale doesn't modify the wrap polygon, it returns a modified copy. Change-Id: Ic0b23a1c9de0ce90032656351d9744dace2ef4e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95384 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-01tdf#120394: DOCX list import: simplify zero width space hackVasily Melenchuk
Since introducion of list format string hack with creation of zero-width-space can be much more simple. It was being used to indicate existing, but empty list label suffix to avoid stripping down numbering. Change-Id: I9a0c6047f806b2c656ef5dbab0c6b38200818bd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94383 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-30loplugin:simplifybool extend to expression like !(a < b || c > d)Noel Grandin
mostly to catch stuff from the flatten work, but I think this looks good in general Change-Id: I7be5b7bcf1f3d9f980c748ba20793965cef957e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-27tdf#78352: docx import: allow tab at left indent for listVasily Melenchuk
Looks like first tab stop for list bullets is at left paragraph boundry. Luckely there is a compatibility option for this. Change-Id: Iea4bd2b51912746dbd4722ff61eeb2e9293cab31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94559 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-27Remove some unused includesMiklos Vajna
Change-Id: Id5a31185faf2a3a13b6ea266e058a7df41d44423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94890 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-26tdf#133030: DOCX export: fix formula alignment - part 3Attila Bakos
Follow-up of commit 1237acf9851f8b12d1ccd929e2aa8b184c06d552 (tdf#132811 DOCX: fix formula alignment – part 2) Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5466649a2aa6b7ffdb0def723f79dfbecdf1495f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93665 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-25NFC writerfilter: reorganize and re-use variablesJustin Luth
My previous patch for tdf#133000 modified the code flow a bit. I kept these "formatting" changes separate so that they wouldn't interfere in understanding the functional code changes (which is very important for this extremely fragile numbering code). In this patch, I relocate two lines to group them with their logically similar counterpart and the variables that control it. I also got really confused by one of my earlier code comments which seems to be completely wrong or at best misleading, so I modified it to be what I think is much more accurate. Change-Id: I3ab0bbfab436f70f81adc4af6db4c5b6c9eca8b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94367 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-05-25tdf#107119 DOCX import: fix parallel text wrap around framesTibor Nagy
It was imported as "optimal page wrap" instead of parallel one, resulting different page layout depending on the distance of the frame object from the page margins. Co-authored-by: Attila Bakos (NISZ) Change-Id: I0db65c224f537bfd4f95ee073743a3d17d9e0e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94576 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-25tdf#133000 writerfilter: apply non-contradictory num-styleJustin Luth
This fixes 7.0 regression exposed by tdf#131321's commit 35fc5ef0a759884b24ed8b83cd05702a0fab64cc This patch version heavily depends on recent changes, but could easily be adapted to older ways. (See previous versions in gerrit.) Because LO can now find the numbering rule through the para-style definition, it doesn't bother creating it as a direct paragraph property anymore. So that "directness" has to be specified during the import. This problem manifested itself in two ways. 1.) In SW, the direct numbering was lost and it simply inherits from the para-style. If numbering is now turned off in the para-style, then the paragraph loses it too. 2.) Because the numbering was considered to be defined by the paragraph style, the para-style-indents had higher priority than the numbering-indents. When numbering is defined directly on the paragraph, it has higher priority than the para-style-indents. Change-Id: I04c3944de8a91d9f253791fbd05d6324a8b7a9da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94365 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-05-24inline some use-once typedefsNoel Grandin
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-22writerfilter: pStyle no longer defines PROP_NUMBERING_STYLE_NAMEJustin Luth
This is legacy code. Previously, this could be added every time pStyle was defined. So a pStyle might have copied its numbering style-name to the paragraph before the numId was processed. But now the copying only runs at ::finishParagraph, so now nothing writes a PROP_NUMBERING_STYLE_NAME before numId is processed. Obsoleted by commit cc1c9c7484d97167021301f32c3397124c4d79f5 Introduced by commit e7ab4bb6b0e83f01148ffff41e8c5eaa0c5ba0a4 Change-Id: I6220106d16a531e61eadc8205f1d6b30db3af907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94594 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-05-21use for-range on Sequence in testtools..xmloffNoel Grandin
Change-Id: I05b02a2f8b4b9091c7de0f7e98409d5b608ed250 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21tdf#133052: DOCX import: fix top auto margin of subitemsLászló Németh
(nested lists) and other items of lists, when auto margin is defined by paragraph style, and list items have got w:numPr. Follow-up of commit 162d74ae7a53eb1cde738f0a7558f297b8162f7a (tdf#132807 DOCX import: fix top auto margin in lists). Change-Id: I4cf470173fa367ac07e15dc901b0e202178c9fc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94588 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-20writerfilter: clang-format these filesMiklos Vajna
I added these files more or less recently and they have long lines. Use clang-format to break at a sane column limit. (And I now promise I won't remove more files from the clang-format blacklist for a while.) Change-Id: I7eae945defe67fa19c4bd9f4789d7918bb45bf9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94585 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-18tdf#131963: regression from fix for tdf#92472Julien Nabet
tdf#92472 DOCX import: fix checkbox size set by direct formatting at beginning of paragraphs. Follow-up of the commit 22ad4d69d771708f28a2d9e137cfd43ac846cf3a (tdf#121045 DOCX import: fix checkbox size in table). See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=160936 Change-Id: I9868679a46de54519250ab6f9d501a04a414b88e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94385 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-17Fix typosAndrea Gelmini
Change-Id: I3ecb671165ba65baaf304e7afec097209c8c88d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94384 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-17tdf#120394: docx import: support for w:styleLinkVasily Melenchuk
Previous implementation for w:numStyleLink was referring just ordinal styles, but there can be another abstract list marked with w:styleLink which should be used in given context. Change-Id: Ic5d4fe8bfd41b19e2f65d74defb6961e38ec9a9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94332 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-14DOCX export: fix interaction between the crop and the wrap polygon of imageMiklos Vajna
If the wrap polygon is influenced by crop at import time, we need to do the opposite at export time. Do this for RTF and DOCX, where there is matching import code in writerfilter/, leave DOC alone for now. Test this by changing testFdo76803 into an export test, then seeing how the first point's Y position fails and fixing up the exporter, so we get back the old good value. Change-Id: Ieef18aad3c76f7945c7348201b07bcb27a4cd48d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94246 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-14Fix typosAndrea Gelmini
Change-Id: I244b5d92f945d504027a54f52e110d6dc99d7b3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93964 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-13DOCX import: fix interaction between the crop and the wrap polygon of imagesMiklos Vajna
Word first applies the crop, then applies the wrap polygon on the remaining visible part of the image. Writer applies the crop on the original bitmap, and even has explicit code to make sure the uncropped bitmap is used for the wrap polygon, see how SwFlyFrame::GetContour() calls SwNoTextFrame::GetGrfArea(), which will extend the resulting size based on cropping. Fix the problem by moving and scaling the wrap polygon, so it ends up where it would in Word. Also adapt testFdo76803, which had a similar crop+wrap polygon case, but the different there is quite small. Change-Id: Iab2adaa81a33eb04e1806b17ed129ac50f5d2aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94149 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-13tdf#132807 DOCX import: fix top auto margin in listsLászló Németh
at paragraph style based numbering. See also commit 99b2d53346d4b01b491cd1f7fae3304ac0572e12 (tdf#132802 DOCX import: fix list bottom auto margins). Change-Id: I6bfea3ace5c94f9d45267e309a21ac8a97c20a37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94111 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-12tdf#132811 DOCX: fix formula alignment – part 2Attila Bakos
Formula are aligned inline again, but in the right position, fixing both import and export. This partially reverts commit 8b613c4603047dc24aa9b03fb49f4fe1b65af2a3 (tdf#121525 OOXML import: fix formula alignment). Co-author: Tibor Nagy (NISZ) Change-Id: If5c13db749fe5c3b1aee754b47dabc9fabd7ebb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93631 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-12tdf#132802 DOCX import: fix list bottom auto marginsLászló Németh
of the last list item, when its numbering based on the paragraph style. Before tables, table rows and before paragraphs without numbering or with different numbering list items got a regression from commit 9a132c8fab7d4d70b91e5ed92429c70a0466afcb (tdf#122342 DOCX import: fix bottom auto margin in lists) Change-Id: I23c73d94569e785ec780d708d983764534e356c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93973 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-12tdf#112287 DOCX frame import: fix default vAnchorTibor Nagy
Vertical frame alignment was calculated from above margin instead of the bottom one, resulting bad positions, when vAnchor wasn't defined. Co-author: Attila Bakos (NISZ) Change-Id: I81bcf53ec826d5dcc9790c661d784b507d9ababc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93556 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-12fix "NFC writerfilter numbering: remove redundant code"Justin Luth
Earlier, in LO 7.0, I made an error in commit dbd98ebe9f90cedb41a90375688b200c35dd8928, where I failed to notice the difference between setLineId and setNumId, and removed setNumId as what I thought was duplicate code. (Thanks for pointing that out Mike Kaganski!) Reviewing the relevant code, setNumId seems to effectively be redundant after all. Removing it and just using the LineId value. There is a slight difference in the code flow, since numId was only set if the list didn't exist, but that appears to be irrelevant. Lists are not parsed/created until after styles are finished, so !pList.get() is implied by IsStyleSheetImport(). Change-Id: I2575966c8f1781bb278c787a2928d2b459867940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92125 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-12tdf#127778 DOCX import: fix unexpected heading on non-first page ...Miklos Vajna
... when the first page has a heading Regression from commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page header should always set default headers as well, 2014-11-21), the problem is around how to split a first + follow page style on import, and then do the opposite on export. This is described using a single section in OOXML, but Writer has 2 page styles for this (unlike in case of the DOC filter). This means the header margin has to be taken from one of these page styles. The above commit tweaked the import, so the follow page style has the wanted header margin, but this leads to incorrect layout. Fix the problem by tweaking the export instead: it has random access to the doc model, so it can take the header margin from the first page style if needed, and then the import side can be reverted, leading to correct layout. Also remove some leftover debug code in test/, which was added in commit 5352d45dd4a04f8f02cf7f6ad4169126d3b3586a (convert AnimationImport to fast-parser APIs, 2020-02-18). Change-Id: I4bbf7271f3a437e8432399bd1e32e9d24190a501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94013 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-11tdf#95189: docx import: apply list ovverride only onceVasily Melenchuk
List overrides should be applied only once on first list with override appearance in document. Next reference to this list should not override again and reset list numbering. Change-Id: I7a24398d5980ca97a74fa8ad09d91ac9adff15ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93894 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-11tdf#132754: DOCX import: changed default list start nubmerVasily Melenchuk
Default value for list numbering startAt is zero. If it is not proveded numbering starts from this value. Change-Id: I2cf7be9063e7bfb8b72d6ba77fcd9507e33bb848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93899 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-10use compact namespace syntaxNoel Grandin
mostly done using git grep -wl namespace | xargs -P 8 perl -i -pe 's/namespace\s*([\w:]+)\s*\{\s*namespace\s*/namespace \1::/g' Change-Id: Ic53dbaf443cf81fb8940155f2582a7128d829e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93406 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09tdf#94628: sw: allow setting for bullet for outline paragraphsVasily Melenchuk
Paragraphs in outline (having style "Header XXX") can also be a part of list and have custom bullets. Simplified code of SwXNumberingRules::SetPropertiesToNumFormat(): do not check for properties special for outline/chapters and removed redundant data shuffle with local maps. Change-Id: I1fa7f8f5359acee1d5aa62d9700641490bb91b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93672 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-07writerfilter: remove unused xCrsrJustin Luth
This looks like copy/paste code. xCrsr isn't really used, and I hardly doubt that it needs to verify that a Crsr can exist in order to ensure that the dummy paragraph is really created. In fact, even checking for xTextAppend.is() shouldn't be necessary because before this it was being used without checking. But since I myself am a copy/paste programmer, and I see lots of examples where this is tested in similar situations, I leave it as it is just to be safe. Change-Id: Ie45d4bc9d0e1cf0a0d7602b83962805165c3b85d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93413 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-06tdf#122342 DOCX import: fix bottom auto margin in listsLászló Németh
at paragraph style based numbering. See also commit 1bf7f6a1a50ee9f24a3687240fe6ae390b905a6b (tdf#106690 DOCX import: fix automatic spacing before/after numbered para block). Change-Id: I532181019ca97a86475c9bb0a1eea1c836705bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93581 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-06tdf#108493 DOCX import: fix hanging indent of listsLászló Németh
when its value comes from the numbering style, but the left indentation is overwritten by paragraph settings. The problem caused by that these settings are not independent in Writer core. Change-Id: I5d6759bb215b82dfcaa5cbd3e191ac7ea8a8bb00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93478 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-05writerfilter: cleanup out-of-order xText <-> xCrsrJustin Luth
This looks mostly like copy/paste proliferation of a pointless test for xText after it has already been used. Since this has already been working for years, there is no point in testing if xText.is(), since it would have crashed if it wasn't during the xCrsr definition. Change-Id: I6a032c0bdc7bb587f223f191623a2e3885d444bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93412 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>