summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2020-07-20tdf#134685 DOCX table import: fix gridBefore + cell widthLászló Németh
Improve workaround to handle nested tables started at cell start in a row with gridBefore. Omitted gridBefore cells from commit 5483d4e10aad27889b961b9cb94d7ba6c86aed0b (tdf#134606 DOCX table import: fix gridBefore + nesting) resulted less cells in the row than defined by the grid, and the different code path could lead to narrow cell width with partially invisible nested table. Fix this by adding gridBefore cell count to the cell span in the first cell. Regression from commit 70274f86cdc1c023ffdd0130c262c1479262d76b (tdf#116194 DOCX import: fix missing tables with w:gridBefore) Change-Id: If332305d54ff2b34b258270a607fb31ff7380149 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98973 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-19compact namespace: swNoel Grandin
Change-Id: Ib1303380e6b55b3b3f8a3d513956f9e77ae5961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99006 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-18tdf#120026 sw: keep table centered when resizingJustin Luth
The table was throwing away the centered value, and setting orientation LEFT_AND_WIDTH during a resize. No UI testing examples found of setting table properties, and test_resize_table_with_keyboard_tdf53460 hardly seemed like it was testing resizing AFAICS. Change-Id: I23340d7908cdf17ae3ff9dac60079f59c609f567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98991 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-18Use NS_sprm::v6 constants in GetWW6SprmSearcherMike Kaganski
Change-Id: I93292b820b145dd2f1c007b829e1dc91106f474b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-18Drop macros in sprm definitionMike Kaganski
Change-Id: I8f65a39d72bb06ed20bea352f5ce1d8ae43d305e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-17sw: silence 'not all control paths return a value'Miklos Vajna
Fixes: C:\lo\master\sw\source\filter\ww8\sprmids.hxx(290) : warning C4715: 'NS_sprm::sprm<109,0,1,1>::len': not all control paths return a value Change-Id: I28d2af3eef3bc3efb31d29eeb920a0d5398139d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98986 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-07-17tdf#104596 sw COMPAT layout: wrap in header for in-table fliesJustin Luth
You might have noticed that text in header/footers will not wrap around fly frames, but just run underneath, regardless of the wrap settings. Strange, eh? [This is also true in footnotes.] In an ancient effort to be compatible with MS strangeness, OOo decided to do this as well for interoperability reasons. http://openoffice.org/specs/writer/compatibility/adjust-text-wrapping.sxw Apparently, flies in tables are exempt from that rule in MSO, so this patch adds that exemption. TABLE EXEMPTION IS AN EXPERIMENTAL ASSUMPTION BASED ON VISUAL OBSERVATION FROM THIS BUG REPORT. IT IS NOT BASED ON DOCUMENTATION. I did look in DOC and DOCX manuals, and did a google search, but found nothing. A compat variable keeps older ODT files no-wrap, so that we don't break layout of existing documents. This variable is only read in the ODT import filter. If it doesn't exist for ODT, it is set to false. By default it is true, so it automatically is enabled for anything that doesn't modify it in its import filter, including all DOC/DOCX/RTF etc, and newly created ODT documents. In other words, allowing wrapping in the header for table-anchors is the new default behaviour unless an import filter turns it off. Headers/footers are the most common example. I also tested with footnotes, and found that Word 2016 does wrap in that case as well, even though the UI only allows AS_CHAR anchoring. FYI: Allowing wrapping at ALL times can be set with the Writer compatibility option "Use OpenOffice.org 1.1 text wrapping around objects". Change-Id: I9ad0c82df4af794079cce86fad9e401ea4575e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92378 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-17sw: fix crash when using anchor of at-paragraph fly ...Michael Stahl
... to insert fieldmark; the problem is that the anchor doesn't have SwIndex so the resulting sw::mark::Fieldmark's positions won't have SwIndex either, so they aren't updated when its dummy chars are inserted in lcl_SetFieldMarks(). Change-Id: Id6281f45aa1f1337f1ae599877f155b129389d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98852 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-17sw: layout: fix missing invalidation of text frames in tablesMichael Stahl
... when the position of the SwTabFrame changes. The table is initially formatted on page 1, where one of its cells overlaps flys anchored in the footer, so the SwTextFrame in it contains SwFlyPortions. As the table doesn't fit on page 1, the SwTabFrame moves forward to page 2; lcl_RecalcTable() is called a bit later to invalidate pos and size of everything in the table. However, it turns out that that's not enough, when SwTextFrame::Format() is called it doesn't do anything because no part of the text has actually been invalidated via InvalidateRange_(). If the SwTextFrame were moved on its own (not via table), then SwContentFrame::MakeAll() would call Prepare(PrepareHint::FramePositionChanged) which calls ClearPara(). The SwTabFrame is moved via SwFlowFrame::PasteTree(), which calls SwTextFrame::Init() if it moves a text frame directly but does nothing for tables. So let's try to fix this similar to commit 068c133ac41c97652909b88c432e3b73010efc3e by calling Prepare(PrepareHint::FramePositionChanged) on every moved text frame if the position actually changes, like SwContentFrame::MakeAll() does; not sure what performance impact this has. (apparently regression from cc5916cd314a27b0cc99560ab887480026630a95 - whatever that means in this case, no idea how it worked before) Note: the problem only reproduces on libreoffice-6-3 branch because libreoffice-6-4 and later have another layout change from commit 3cccdabf19a99fd3f657985c1822436d7679df2b that needs reverting Change-Id: I65d3e367d56b8799e1ed32172fbbc0249c2852eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98925 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-17tdf#134299 DOCX shape export: fix relative size of shapesRegényi Balázs
relative to left/right/inside/outside/top/bottom page margins. This fixes bugs: tdf#134300, tdf#134828, tdf#134830, tdf#134834 and tdf#134835. Follow-up of commits: d9bee5677edc857d7d119197a85c22b9410ed876 (tdf#133670 DOCX import: fix shape width relative to right margin) abc818e5f2fb2884f1041e9626115e69cde766d5 (tdf#132976 DOCX import: fix shape width relative to left margin) 1a391f6ed056c95b9d7b5f18988ab8650723ffc5 (tdf#123324 DOCX import: fix shape height relative to top page margin) d94ebb64e18839b430760dba525a885b10ae8093 (tdf#133863 tdf#133864 DOCX shape import: width relative to inside) 9693e9aac005b1406e0cdb1655efe45554a90f86 (tdf#133070 DOCX import: fix shape height relative to bottom page margin) Co-authored-by: Szabolcs Tóth Change-Id: I42cd7693c80cc62f71560e9ab0f226b51aff6bb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98850 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-17tdf#134783 sw: fix contextual spacing position of shapeRegényi Balázs
anchored to paragraph, i.e. when paragraph spacing removed between same style paragraphs with option "Don't add space between paragraphs of the same style". Follow-up of commit 11059331718fb8faab483c75633b4e80d8028b7d (SwFlowFrm: implement contextual spacing) Co-authored-by: Szabolcs Tóth Change-Id: Id128ad7cab3c7dde4333de3b11a5a3693d039243 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98584 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-17Add comment about relation of NS_sprm::Foo to sprmFoo in [MS-DOC]Mike Kaganski
Change-Id: I910dacba0a3be42406c72e5356913a2e6dcaadfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98939 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-17Use information about sprm structure from [MS-DOC] in GetWW8SprmSearcherMike Kaganski
That information is already used in sw/source/filter/ww8/sprmids.hxx. Just make it available for use by converting the sprms into templated structs with relevant members. Inspired by commit 56b04e40ab72b6333ce278ba2980650f5272025f. This commit changes values for the following sprms: sprmCPlain (0x2A33): len 0 => len 1 sprmTMerge (0x5624): len variable => len 2 sprmTSplit (0x5625): len variable => len 2 Change-Id: Icd65fc1ef488e7b2db60f13246c76f89176467ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-16tdf#134709 writerfilter: consider gridBefore for table bordersJustin Luth
When the table itself defines borders, those borders should apply to the first cell in each row - even if some grids are skipped with gridBefore. (i.e. it won't be a straight line on the left side). Most of the changes here are just simplifications, since the original code import was overly complex. This commit depends on some refactoring done for bug 129452 in LO 7.1. A followup commit is needed do the same thing for gridAfter, but currently gridAfter is not yet populated, so some foundational work needs to be done first. Change-Id: Ic7dd17fa80422520f3ccf1b121a2abb288b88ccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98534 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-16tdf#132898 writerfilter: use last merged cell's bottom borderJustin Luth
Previously, this was just using the border set on the first cell. Obviously, the bottom merged cell should contain the definitive setting for the bottom border. This depends on all of the commits for tdf#129452. P.S. The top border is obviously fine defined by the top merged cell. P.S. The left/right borders are a bit more interesting. In MSO, each row's value applies to that section of the merged cell. I.E., it isn't treated as a cell border at all. Only noted as a comment here, since how to deal with it is probably best left as is - defined by the top cell. Change-Id: Ibe8d31cba5122078ce73020f7816bff0b2ae36c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95528 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-16tdf#77962 ww8import: 0x4xxx sprms are always 2 byteJustin Luth
SPRA(bytes) | SGC (property type) | A | ISPMD XXX X XX X X XXXX XXXX Focusing on the SPRA meaning: 0 is Operand is a ToggleOperand (which is 1 byte in size). 1 is Operand is 1 byte. 2 is Operand is 2 bytes. 3 is Operand is 4 bytes. 4 is Operand is 2 bytes. 5 is Operand is 2 bytes. 6 is Operand is of variable length. 7 is Operand is 3 bytes. Thus every 0x4xxx and 0x5xxx are 2 bytes sprmCIcoBi = SPRM_CHR(0x60, 1, spra::operand_2b_2); // 0x4A60 and thus it must be defined everywhere as 2 bytes. Wrongly "fixed" from 0 to 1 by commit bf24cca78e3c95d7a07e2073802c1540faec6920 Author: Caolán McNamara on Wed Dec 4 08:56:32 2002 +0000 #105926# some bidi properties with incorrect cached len Change-Id: Ic30df735ed325a508ef3c7220d9b06878af248a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98911 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-16tdf#127652: move UItest to CppunitTestIlmari Lauhakangas
Change-Id: Id04414d00f92a0c32c38a9dd706d6656ba280746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98597 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-07-16Cleanup: Fix variable names for InspectorShivam Kumar Singh
Fixing of variable names following LO naming conventions and some other minor fixes. Change-Id: Iad58584ecc07a02287193a615c428819363ed0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97810 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-07-16tdf#134618: sw_ooxmlexport12: Add unittestXisco Fauli
Change-Id: I0b4559e19758475143175d571687884403e6f09b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98867 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-07-16sw handle ClippedPictures when replacing compat optionsMiklos Vajna
This was added in commit e598ab04476a32a08f18e8f0662fafa5f78f1a4a (n#775270: clip pictures instead of scaling they don't fit, 2012-08-30), it's off by default and on for Word documents. Change-Id: I0d121b43cab760224e3528b7ab445ff2498db0bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98859 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-16Support for disabling Asian/Complex fonts for InspectorShivam Kumar Singh
Hide/Show Asian and Complex properties from the Inspector when disabled/enabled from Tools->Options->Language Settings Change-Id: I6447d4406b9371d63e757b332c3393f3496e0a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97530 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-15tdf129452 writerfilter: only affect vertical Merge_restartJustin Luth
If multiple merged cells are stacked on top of each other, then don't follow the whole stack down to the bottom as if it is one cell. In other words, merged-vertically is not true or false, but start or continuing. This stand-alone patch covers a corner case missed by this bug's earlier LO 6.4 commit. Change-Id: Ibaec6d609ff5b8a993be8dce0741fa2ca905da26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98242 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-15Show Navigator Headings context menu outline items in ro modeJim Raykowski
This patch makes available Expand/Collapse All, Outline Tracking, and Outline Level context menu items fo all entries of Navigator Heading in the content tree when in read-only mode. Currently these items are only available for Headings root entry when in read-only mode. Change-Id: I6a683f4f0d5fb7f3c79d542bdecc6d3023aca1b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98793 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-07-15sw: fix names of SwFrameAreaDefinition flags in layout dumpMichael Stahl
These were renamed quite a while ago. Change-Id: If0b70bdff0a18d324a10eee7f1f8758dd9ee3cbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98853 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-15tdf#134659 chart2: use centered label alignment at text breakBalazs Varga
instead of left for axis labels broken into several lines. Change-Id: Iaf516055748189fa50165f0e954dfe0db15bbfb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98413 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-15tdf#123621 sw: fix textbox position according to DOCXTibor Nagy
i.e. when spAutoFit is present in DOCX, and size of the textbox is relative. See also commit cab956c480eb4f619580285c7b9a15b9e6d9b780 (tdf#112312 DOCX legacy shape export: keep fixed size). Co-authored-by: Attila Szűcs (NISZ) Change-Id: I29af97001954ad353a386164b68cd22f6230e3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98401 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-15ofz#24130 check level before accessing arrayCaolán McNamara
Change-Id: Ic583ac6d8904332ae744d8e7c6639570e74a6338 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98804 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-15tdf#134816 Crash when using a parentless style other than DPSShivam Kumar Singh
Change-Id: I2da764a50c7018eb28a63dd47c2c4e2c2975bdb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98816 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-07-15tdf#120760 DOCX shape import: fix Z-order with behindDocSzabolcs Toth
DrawingML attribute relativeHeight contains z-indices for shape Z-order, but this depends on behindDoc, too. We can use z-index = relativeHeight - MAX_INT32 on shapes with behindDoc=true, as a simple workaround to get correct Z-order, because unsigned relativeHeight values stored in sal_Int32, and MIN_INT32 <= -MAX_INT32, and the temporary negative z-indices will converted by GraphicZOrderHelper. Note: this commit doesn't fix the old writerfilter implementation problem, that DOCX relativeHeight is an unsignedInt value according to W3C XML Schema, i.e. its maximal value is 4294967295 (MAX_UINT32), not 2147483647 (MAX_INT32). Co-authored-by: Balázs Regényi Change-Id: I54a72a95bc69b307b2835636fff376b0aa9bc45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96614 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-15tdf#124423 sw: fix AutoSize width frames of DOCXAttila Szűcs
Add layout compatibility option FRAME_AUTOWIDTH_WITH_MORE_PARA to keep paragraph area width of AutoSize width frames with more than one paragraph. Co-authored-by: Tibor Nagy (NISZ) Change-Id: Iab8926b6219ac92ef1ab7488bdef1d3f2b47c396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97425 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-15tdf#134555 Show direct formatting at the Styles InspectorShivam Kumar Singh
Change-Id: I9141019f8ef66600614a4fdcc74fca8d75c80d05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98561 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-14jsdialog: enable watermark dialogSzymon Kłos
Change-Id: I4badd0d2f6c9c0d2828152685aa14c2e1d358fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97623 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98230 Tested-by: Jenkins
2020-07-14tdf#134654 sw: Alt-X - end keyboard selection tooJustin Luth
The selection itself was cancelled, but not the fact that a keyboard selection was "in progress". EndSelect is slightly heavy, so wrap it in a very lightweight if statement. ClearMark also checks HasMark, so real purpose in first checking it. Change-Id: I969a694c46d92201f3c3f2121e3fa3a2af27253c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98719 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-14uitest : Add demo for "bottom find bar" using ToolBox supportAhmed ElShreif
Change-Id: Ie586851be1e9131394ac0103837b26f408026dca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98596 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-07-14tdf#134793 DOCX import: fix numbering with inline imagesLászló Németh
before page break. Previous fix for tdf#118701 didn't keep numbering of the paragraph marked for deletion. This reverts commit b216fc5b583050cfb1cdf9bd82ec3c1bd2e09d70 (tdf#118701 DOCX import: fix image position on page break). Change-Id: I5bde927f15b4b1f682d81482734fadff7690f6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98541 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-14tdf#133437: sw: set generated shape name if it is missingVasily Melenchuk
Shape names are required for seting format name and undo/redo and correct displaying of objects in Navigator pane Change-Id: I43caf6a4d5f054283d48c46b081d43b743bd4433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98312 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-14Fix widget placement problem on mailmerge result dialog.Gülşah Köse
Change-Id: Iff7bae3f1e30d106ed54f3a67bf5c6fefe67e2d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98650 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-07-14tdf#134431 sw: fix crash on setting anchor of textbox while splitting a paraMiklos Vajna
Regression from commit 682e0488df819c191c13a03758fad0690706e508 (tdf#134099 sw: fix textbox anchors on copy-paste and undo, 2020-06-29), the problem was that setting the anchor of a frame format triggers "modify" notifications, but the handlers of those notifications expect a consistent layout. This invariant is not held while we're still in SwTextNode::SplitContentNode(). Fix the problem by updating the textbox's anchor the same way "normal" fly frames are handled, i.e. add/remove the frame format to the new/old text node manually and block notifications. Change-Id: If1f07d4230540796a81d9ed46a932b67d5995462 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98690 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-14tdf#131561 writerfilter: pre-emptive unit testJustin Luth
Someone might be tempted to just delete any border on a merged cell, hoping/expecting that the adjoining cell would have a corresponding border. Granted, this test was hand-crafted and is not necessarily something that Word would ever create. At least be aware that any fix that breaks this example is not a complete solution. Change-Id: I438c835b54ec8b33eb48de55f09a7cf2965f6440 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95533 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-13Don't rely on Python's treatment of unrecognized escape sequencesMike Kaganski
According to [1]: > Changed in version 3.6: Unrecognized escape sequences produce a DeprecationWarning. > In a future Python version they will be a SyntaxWarning and eventually a SyntaxError. [1] https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals Change-Id: Ia4f79f17ccb121f423f35b1e1306d5ae285e8762 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-13tdf#129452 writerfilter: use column, not cell when comparing rowsJustin Luth
A natural mistake - especially when there are no existing functions - is to assume that cell number defines column number, and so it is valid to compare between rows. This patch provides the functions, and switches this bug's earlier patch to properly use columns instead of cells. This commit depends on two prior patches in bug 129452: Change-Id: Ie305477f0e3468a4a923095d76f520d97fe99ffe Change-Id: Ibfdac336bbb1f7303c7e585a85c94be37ad6f916 I hope that this implementation covers all the bases. This code is dreadful to understand, as witnessed by comments from those much smarter than I. P.S. I also cancelled a vertical merge if the cell is not there (in a gridAfter situation). If a row is shorter than the previous ones, then a vertically merged cell should not be considered to be able to span that gap. If the cells below are still merged, it would be considered a new merged cell. Change-Id: I63158ac73b1bf86d9f75dd3c1299d1b1a3f08064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97434 Tested-by: Justin Luth <justin_luth@sil.org> Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13tdf#132483: DOCX import: fix OLE anchoring positionBakos Attila
The relative orientation of OLE objects was not copied from the replacement object to OLE, resulting bad position. Co-authored-by: Attila Bánhegyi (NISZ) Change-Id: If62124e5a40218a224e047efbe86a09606b44af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98493 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13tdf#134676 Chart OOXML import: fix X axis title widthTünde Tóth
Set length of the horizontal axis title box is about to 80% of the length of the chart area, to avoid of collision of axis titles, like MSO does. Change-Id: Ie01308e2ddc8c1c4d19f812231ede21ff939cb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98484 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13tdf#134618 sw: DOCX export: fix order of as-char and at-char fly...Michael Stahl
...at same position. The problem is that in this case the as-char fly was written before the at-char fly but the positioning of the at-char fly can be relative to its character position, i.e. before the as-char fly. Apparently as-char flys are written in DocxAttributeOutput::EndRunProperties() via WritePostponedDMLDrawing(), wheras at-char flys are written earlier, in SwWW8AttrIter::OutFlys() via DocxAttributeOutput::OutputFlyFrame_Impl(). So this undoes the swap that these undergo via the magic of the mark stack. Change-Id: I83a72bb2affbf321fc4dea4e7fb37bdb43cea2e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98543 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-13tdf#134618 sw: WW8 import: don't insert fieldmark for SHAPE fieldMichael Stahl
Follow DomainMapper_Impl::CloseFieldCommand() and just don't waste effort creating a fieldmark that doesn't provide any benefit. This should avoid any fieldmark related problems introduced in e511a0ca5dde6d731bb126bbfe21768867890102..d9030ad6298e2f49ee63489d6158ea6ad23c0111 Change-Id: I6688dcda1e3b41ac648f3d69740f05d34bb46191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98542 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-13tdf#134661 Issue in Inspector updateShivam Kumar Singh
This patch now uses AttrChangedNotify instead of NotifyItemUpdate to check for cursor change Change-Id: Ibdbd1565d72097d2f78ecb8194a201585951ce9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98490 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-07-13tdf#122014 Chart OOXML import: set chart title alignment to centerTünde Tóth
Regression from commit: d4190685ac208677bc77f66976287dda0360c42d (tdf#114836, only set changed SfxItemSet properties) Change-Id: If33fa39019bbd36632d15eb3cc0606727e58b111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98241 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13sw: prefix members of SwUndoField, SwUndoFieldFromAPI, ...Miklos Vajna
... SwUndoFieldFromDoc and SwXFrame See tdf#94879 for motivation. Change-Id: Iedf3b8d71f787036b29d0ed269e4d4d614128db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98616 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-07-12tdf#134570: doc import: list level format string fixedVasily Melenchuk
List level placeholder is defined from char at defined position, not only from position array. Change-Id: I008e6711312435571f0d04544f6bfa42c1309f31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98500 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2020-07-12weld CheckBoxControlCaolán McNamara
Change-Id: Iea057189ab17c1fdaf6663f1c328b9d288d97a18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98532 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>