summaryrefslogtreecommitdiff
path: root/sw/qa/extras
AgeCommit message (Collapse)AuthorFilesLines
2017-03-27tdf#106799 WW8: Accept TTP Mark without Cell MarkMike Kaganski2-0/+15
Paragraph mark of inner table (0x0D) sometimes has sprmPFInnerTtp, but no sprmPFInnerTableCell. This still counts as cell end (at least, MS Word treats it that way). Unit test included. Reviewed-on: https://gerrit.libreoffice.org/35763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 59af9cbbccee600408c89e872d548d153523ab1f) Change-Id: I5589cdd486c03ca4567d61882826cc7c245a40c9
2017-03-07tdf#106291: WW8 import: Properly treat column spansMike Kaganski2-0/+9
Previous code unconditionally treated all cells in merge groups as rows span, thus in some conditions it merged incorrectly when there were cells from same row. The fix is inspired by SwTable::PrepareMerge(). Also, fixed improper adjustment of too narrow cells in WW8TabDesc::CalcDefaults(), which also happens in files where column spans are represented by spanned 1-twip-wide cells. Unit test included. Change-Id: If043cfc466879d45141c655f7be1588792f898d3 Reviewed-on: https://gerrit.libreoffice.org/34820 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/34884 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-13fix unit testMike Kaganski1-12/+5
Change-Id: Id7ed11ae03da5e28a4c40fb4fa3019dd6fae89bf Reviewed-on: https://gerrit.libreoffice.org/34224 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-02-12Tdf#105625: backport commitsMike Kaganski3-8/+54
f72b866c9cf4f07fce6744fbf482c4c6488106e2 c34fc4520dfee4ca068f249ee0756dacaa7a60cf af42aab836626fdf7b29921dff5d344a8b0e47c6 c484c5532a9508606d65dfbb805163cd00178f4c d4036d3a89b65a4912f62e3930eb1a31cd90a16b Change-Id: I2d27a12dcc51e4213d6cf1332749d32fe1cc630f Reviewed-on: https://gerrit.libreoffice.org/34124 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-02-10tdf#103567 xmloff: ODF import: fix more lossage on Writer framesMichael Stahl2-0/+37
There's another context that reads draw:frame, and it has the same problem as the one used for Impress shapes. This causes SVG images in Writer to lose contour polygons and image maps. Fix this the same way as the other context. (likely regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70) Change-Id: I16cf55e68829b4e1b0841f2015d0729be0ce3725 (cherry picked from commit ae00898f12b9087e1d9b59d9a7820d64b5501775) Reviewed-on: https://gerrit.libreoffice.org/34088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 38c82af5368c7dfb134305cb402b1ce9e1a7cc7f)
2017-02-08tdf#99074 sw: remove duplicate property "IsBrowseMode" againMichael Stahl1-3/+7
Commit e0f9bb795251d950b5dd960fcd030170c8eb67aa added the property "IsBrowseMode" to SwXDocumentSettings, but it is already available in the API as SwXViewSettings property "ShowOnlineLayout". The problem is that both of these properties get exported in ODF into settings.xml, so it contains "IsBrowseMode" twice. Unfortunately the SwXViewSettings are not available in writerfilter, because the XModel::getCurrentController() is null, the view is created after the import. But there is already a way to store ViewData in the SfxBaseModel, which is then used by SfxBaseController::ConnectSfxFrame_Impl() when creating the view. This applies the property at just the right time. (cherry picked from commit 2dce8dd41c208ecda40c054635f3736147ec8914) Change-Id: I842845d09a7b3fe81e27a1ed8ac8a8594da7f4e8 Reviewed-on: https://gerrit.libreoffice.org/33285 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 8c940adc98ed9e5844506d5b66a0cdf57f9e1e7c)
2017-02-08tdf#104814 Writer: accepting change tracking changes get stuckNoel Grandin2-0/+14
Reviewed-on: https://gerrit.libreoffice.org/32273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b7b5c23e6979205a662d857bc1c83270fb4a43ec) Reviewed-on: https://gerrit.libreoffice.org/32276 Reviewed-on: https://gerrit.libreoffice.org/32887 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 5b5f351785670e7310e0c074d8b96f2538cf0f2f) Change-Id: Ie8e0919b53c0b21f480b62eec7c394554757a061
2017-02-08tdf#103982 DOCX export: make sure SdrObject margin is non-negativeMiklos Vajna2-0/+10
Regression from commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (DOCX filter: effect extent should be part of the margin, 2014-12-04), the effect extent is added to the nominal margin in DOCX, so we exclude that from the margin in our document model. But it shouldn't be ever negative, ST_WrapDistance is a restriction of the W3C XML Schema unsignedInt datatype. (cherry picked from commit f9f7a4ddaed85427522834597271967ee494b436) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: I82b3c1ba0e3a14f7c585b0d389264a2c12e454e7 Reviewed-on: https://gerrit.libreoffice.org/31115 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 3cf2b5e0e8edc9d6044f8bc29ca9374f75b498a5)
2017-02-08tdf#82824 DOCX import: fix at-char embedded object handlingMiklos Vajna2-0/+6
The anchor type of embedded object was simply not handled, we always assumed that it's as-char. When it's at-char set the anchor type accordingly, and also set the usual 6 properties determining the position of the anchored object. (cherry picked from commit 10efab2b9a3cf7fc49655c90ba29db4512680c38) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed-on: https://gerrit.libreoffice.org/30965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit d36587570890d3366222fc9cca8482275db85b3b) Change-Id: I3f8bede33c6f1a0bdc4f4d4ea59c4fc805802291
2017-02-08tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para.Tamás Zolnai2-0/+14
Regression from: 83d51e5e52688c4c9bc0ad70a511458bb06a242d Partly revert the commit causes this regression. I checked the related bugs (tdf#78590,tdf#80748) intended to be fixed by this commit and reverting this part does not bring back the corruption. I guess something changed in frames' and text boxes' import in the meantime, because this MergeMarks::IGNORE is useless now. Reviewed-on: https://gerrit.libreoffice.org/30351 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: If17776e8628561961c7ce2a2994e3fc609f75639 Reviewed-on: https://gerrit.libreoffice.org/30358 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d3d714f7a16df13b97a06ec68234d08d57a09479)
2017-02-08tdf#103753: DOCX: Handle relative positions to left or right marginTamás Zolnai2-0/+19
Positioning relative to left or right margin in MS Word works the same as the positioning relative to left or right page border in LO Writer. Reviewed-on: https://gerrit.libreoffice.org/30376 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: I476a5e9e76f766b7fb7f1c7f4a068af8bb3c8813 Reviewed-on: https://gerrit.libreoffice.org/30377 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 18ef4766a97340fb9e0adc4ac7ee4feb90213a64)
2017-02-08tdf#95031 DOCX import: auto spacing inside numbering means no spacingMiklos Vajna2-0/+7
The WW8 import has code for this in SwWW8ImplReader::AppendTextNode(), with lots of corner-cases. Not all of that is implemented here yet, but the bullet list in the bugdoc already looks correct now. (cherry picked from commit c486e875de7c8e845594f5043a37ee8800865782) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Reviewed-on: https://gerrit.libreoffice.org/30291 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 806e323271982c8975ec2904219c6f136aa20eea) Change-Id: I9499bfa4d8d7fcc425d7b95e64987258c099f7f2
2017-02-08tdf#103001 DOCX export: fix RelId cache when switching streamsMiklos Vajna2-0/+13
RelIds are used to refer to external streams, e.g. images. A RelId cache tries to avoid storing the same image more than once in the export result. RelIds are relative to an XML stream, so caching them across stream switches is problematic. There was code already to notify the cache after a header or footer was written, but: 1) It was only done after a switch, not before and 2) It cleared the whole cache, instead of stashing it away, and restoring it when the write of the special stream is done. Regression from commit b484e9814c66d8d51cea974390963a6944bc9d73 (tdf#83227 oox: reuse RelId in DML/VML export for the same graphic, 2015-09-07), this existing problem became more visible when caching started to include draw images, not just writer ones. Fix both problems by turning the cache into a stack that is pushed/popped around stream changes. (cherry picked from commit 3906d25a2e12123aee54654ad26699a2832389d4) Change-Id: If9ec168823eea5e272197e28f6125ba626605550 Reviewed-on: https://gerrit.libreoffice.org/29832 Reviewed-by: Tamás Zolnai <zolnaitamas2000@gmail.com> Tested-by: Tamás Zolnai <zolnaitamas2000@gmail.com> (cherry picked from commit 3f373500282c926031eed4f995ca8d51402ed187)
2017-01-26bnc#1014896 tdf#105417 sw hyphenation: avoid infinite loop on ...Miklos Vajna2-0/+27
... zero-length last line This hang happened when the user executed Tools -> Language -> Hyphenation -> Hyphenate All. This problem is visible only if all of these conditions are met: - a line in a paragraph has a word that already contains a soft-hyphen, but not at the position where the automatic hyphenation would insert it - the last line ends with a word that can be hyphenated - there is a fly frame in the document In this case it happens during hyphenation that the layout has an additional empty line at the end (which is removed by the time the layout finishes), so we hit the case when SwTextFormatter::Hyphenate() skips the "if( m_pCurr->PrtWidth() && m_pCurr->GetLen() )" block. Normally hyphenation terminates when it iterates over the portions of the line and no overrun nor any existing hyphen portion are seen, but in this case that never happened. Fix the problem by terminating not only when we reach the end of the portion iteration, but also when the portion list is non-existing (has zero length). (cherry picked from commit 1b6fa616087e7415be9dc7113bbd8bf381aadd70) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/uibase/lingu/hyp.cxx Change-Id: I71d4b040a2d4692ae6eb92807dbbbb42b077a0f8 Reviewed-on: https://gerrit.libreoffice.org/33310 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-01-06tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat optionMiklos Vajna2-0/+8
Because that's what Word does to show only part of the shape in the bugdoc. Conflicts: writerfilter/source/filter/WriterFilter.cxx Change-Id: Ic5cb84cace9237671d71eda0c64e9dadfe244cb9 Reviewed-on: https://gerrit.libreoffice.org/32782 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-06tdf#105127 VML import: handle <v:shape style="flip:..." path="...">Miklos Vajna2-0/+7
I don't see an easy way to implement this via UNO, so use the internal API. As to the internal API usage, SdrEditView::MirrorMarkedObjVertical() (for UI) and SvxMSDffManager::ImportShape() (for WW8 import) are example client code. Change-Id: I9bf27788db32fd35d6b56e0f1a240c4b7abc5604 (cherry picked from commit ac03883cd66a2d58c17c8dac555a053586e46625) Reviewed-on: https://gerrit.libreoffice.org/32781 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-21tdf#96218: MSO DOCX image incorrectly placed when using Alignment PositionTamás Zolnai2-0/+5
layoutInCell attribute should be ignored when we are not in a table. Reviewed-on: https://gerrit.libreoffice.org/32253 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 36750bc977b3210b23b7822abd395b30a78af6f5) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ieed29c690f8516f63d0956a4f0495500908a0d27
2016-12-20tdf#104805 DOC import: fix non-0-starting LVL.xst with none-type prev levelMiklos Vajna2-0/+17
Interesting parts of the bugdoc: - it has a numbering definition with two levels - first level's type is none - second level has a numbering string: "\x01." Usually these placeholder bytes in the numbering string start from 0x00, but there it starts at 0x01, which means the layout has to replace it with the numbering from the second level. Mapping from the spec to the code: - nLevelB is an index into rgbxchNums - aOfsNumsXCH is rgbxchNums - sNumString is xst So when the rNotReallyThere added in commit 251ba90d863c2695c9f46ef922e49d72a65da9ea (INTEGRATION: CWS soberfilterteam06 (1.44.26); FILE MERGED, 2003-05-19) wants to clear out indexes from aOfsNumsXCH, it talks about numbering levels. The old code assumed that nLevelB is the same as nPosValue, which is true in many cases (when the levels are like 1, 1.1, 1.1.1), but not in this particular case, where nLevelB is 0, but nPosValue is 1. (cherry picked from commit 19d08bbf704332d727cfbe8e101e7d14c62326a0) Conflicts: sw/qa/extras/ww8export/ww8export2.cxx Change-Id: I590d9b2725a3330c26a04a526ce22d95970a974f Reviewed-on: https://gerrit.libreoffice.org/32233 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-12tdf#104425 sw: split rows w/large min height (fix layout loop)Mike Kaganski2-0/+17
This solves the problem of rows with too big minimal height causing layout failure (the table just goes out of page, does not flow to next page). It does so with three steps: 1. Currently, a row with a minimum height that flows to next page repeats whole min height on that (and possibly following) pages. If this behaviour continued, then that would cause layout loop: the row min height would be too high for the page, so it would keep flowing to next pages (actually just go beyond the botom because of layout failure). To mitigate this, the patch changes the behaviour to measure total height of all frames of the row: the function lcl_calcHeightOfRowBeforeThisFrame calculates the total height of previous row frames for the same row, then in places where we need to get min height, this value is subtracted from row min total height. On following pages the min height of frames will get less each time. 2. When the row is split, the possibility to split depends on if the minimum height of the row fits into the vertical space left. The minimum height is found as maxinum of two values: minimal contents of the row (e.g., height of first line of text, or an object, or lower table cell), and the minimum height setting. As the minimum height setting should not prevent the cell to flow, (it only should ensure that total height is no less), we should not consider the setting when the split is performed (we should be able to keep on first page as little as required). To allow this, a new bool member introduced in SwRowFrame: m_bIsInSplit, with its setter and getter. When it is true, the routines that calculate min height ignore the min height setting. It is set in lcl_RecalcSplitLine around lcl_RecalcRow and SwRowFrame::Calc that decide if it's possible to keep part of row's content on first page, and update table's height to fit the rest of space. 3. It turns out, that if contents of the splitted cell has less height than the min height setting, then following happens. In SwTabFrame::Split, all rows below splitted one are moved to follow flow table; then table frame's Shrink method used to shrink the freed height. At this moment, still, the height of splitted row is too high, and total height of table is too high. Then, lcl_RecalcSplitLine is called, where row is first shrunk, and then lcl_RecalcRow and SwRowFrame::Calc try to move contents and resize the splitted row. They get the minimum height of content (we already don't consider the min height setting), but then "last row will fill the space in its upper" (see SwRowFrame::Format). Row returns its previous size, table does not resize, it doesn't fit to page, and split fails. To try to fix that, I call SwTabFrame::Shrink in lcl_RecalcSplitLine after lcl_ShrinkCellsAndAllContent before lcl_RecalcRow. Unit test included. Change-Id: I37a6b3589abf287dd5efc991a6336fc378410df9 Reviewed-on: https://gerrit.libreoffice.org/31774 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/31915 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-08tdf#104440 sw: fix layout inconsistency with dynamic wrapping and undoMiklos Vajna2-0/+15
The problem was that the second fly frame was placed on the first page initially, but after typing a character (which moved it to the second page) and then undoing, it wasn't moved back. Fix the inconsistency by handling the "fly frame takes all horizontal space" case as parallel wrapping (which will result in no wrapping at the end), this way the second fly frame appears on the second page both initially and after editing. As an additional data point, the DOC export of the bugdoc is now rendered in Word the same way as in Writer. (cherry picked from commit 862c12396585661606d4e6ae583d1d024a19d222) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ifc9f17458ad0501b8ab6077e5a4998d48fd6f1d8 Reviewed-on: https://gerrit.libreoffice.org/31725 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-11-30tdf#89315 writerfilter add missing parents to out-of-order stylesJustin Luth1-0/+5
Styles that inherit from a parent style, but were defined in style.xml before the parent, were losing their base style. Change-Id: Ic12876dddb1aa961cd8ef7579061cca30c320c71 Reviewed-on: https://gerrit.libreoffice.org/28785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-30tdf#97090 writerfilter - don't fill_SOLID with auto colorJustin Luth2-0/+18
fixes a regression from 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e <w:shd w:val="clear" w:color="auto" w:fill="auto"> seems to be the default "fill disabled" state, so don't force a solid white fill in that case. Change-Id: Ia421e52e228bbf0d3a2cd9af72e0a580042e5dcd Reviewed-on: https://gerrit.libreoffice.org/27915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-27sw lok: notify repair when exist a conflict of multiple users undo/redoHenry Castro1-0/+99
Change-Id: I026f4df6239fa87ee191f92127f9fa98ac2993eb Reviewed-on: https://gerrit.libreoffice.org/31161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-25Lok: invalidate Writer comments correctlyAshod Nakashian1-0/+8
Because notifications to all views were disabled (to avoid moving the cursors of everyone when someone adds a comment) invalidation was also broken. The issue was observed when a comment crossed tile boundaries, the other tile was not redrawn. This forces invalidation so tiles are rendered correctly, fixing this regression. One small issue remains in that invalidating a comment only invalidates the text-area and not the complete PostIt (specifically, the author and date are not invalidated). This means that they can still get trimmed when crossing tile boundaries. That will be addressed separately, as it was an existing issue before the regression this patch fixes. Change-Id: Ic8173e4873d58836883b897f735fc627bb0572ee Reviewed-on: https://gerrit.libreoffice.org/31091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 9d2f30911de2f9d87cebb1a360fabe0bf9c05294) Reviewed-on: https://gerrit.libreoffice.org/31203
2016-11-21tdf#95699: allow copy FORMCHECKBOX and FORMDROPDOWN ...Mike Kaganski2-0/+20
... when they are selected alone (no adjacent text selected). Unit test included. Change-Id: Ia278ae2ea86a3e6d83e1a628880f770f1eb11cd7 Reviewed-on: https://gerrit.libreoffice.org/30954 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit de524d2051abd700f93da4e0e9f273504b12515a)
2016-11-05tdf#103664: FILEOPEN: DOCX: Wingdings symbols are imported as rectanglesTamás Zolnai2-0/+20
Reviewed-on: https://gerrit.libreoffice.org/30575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5ef66db91e87ef84724be22977acf4c9c472ad6b) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ifd9ff26f2460e5570ec1b736308d48acdb3e56a8
2016-11-03svx: add missing ~CONVERT_TWIPS mask in SvxPageItem::PutValue()Miklos Vajna1-0/+22
With this, it's possible to use AttributePage.* keys in macros. (cherry picked from commit a30f969432a451ade87b93e3077836a849b8f11b) Change-Id: I3f0b1ea8fb6274e7c18511c2e80774205206a2ba
2016-10-31tdf#103544: This unit test update was missed to cherry-pickTamás Zolnai1-2/+2
Change-Id: I4127e6dc2aa89ed6df07d0908340840f36b8fc43
2016-10-27tdf#87914 sw: add an initial .uno:SmallCaps commandMiklos Vajna1-0/+20
- handle it in SwTextShell (for normal Writer text) - simple icon in the galaxy theme (cherry picked from commit d378cd2f766eeb1fd1c98f62c9ae6b5b59fd00f1) Change-Id: Ib8f11dbca28b19a2fc0411c92d9f0b4b052277bb
2016-10-10tdf#99090 docx export page-break only inside a paragraphJustin Luth2-0/+7
If a paragraph hadn't been started yet, a w:r was being written directly in the /document/body which caused MSWord to complain about a corrupt document. Change-Id: Ie7f629869aab0f3d2405660a033c3f23bbd6baca Reviewed-on: https://gerrit.libreoffice.org/26771 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 07fb94655f4745eb4e80bf6e8d4cdd95371f23bb)
2016-10-10tdf75573 docx - complete frames before starting alternate streamsJustin Luth2-0/+7
An unused odd header was set to be discarded. The handling of unregistered frames occurred at the same time, and thus ended up being discarded as well. Since a frame shouldn't encompass both the alternate stream and the current stream, finalize any unfinished frames first. Change-Id: Ie9123769724da461dd265936aa6b97de7f4dfbbc Reviewed-on: https://gerrit.libreoffice.org/26972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit ecea3431ca761369d8180a74eba2877533050516)
2016-10-10tdf#99434: import/export documentProtection-forms from .docx incl. testOliver Specht2-0/+10
the setting <w:documentProtection w:edit="forms"> disables editing of content outside of form controls. Change-Id: I0d11373d9010778ed5798598020e453cde06fa0f Reviewed-on: https://gerrit.libreoffice.org/24365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de> (cherry picked from commit 523a3d18e98cd51aa8bf76cf76314a22ddc2b2cf)
2016-10-10tdf#64372 docx import: don't ignore continuous section breakJustin Luth4-0/+17
If the previous break was also a continuous section break, this break was simply ignored ever since commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131. Thus, the default handler took over and assigned PROP_PAGE_DESC if there was some kind of page style known (either the first page/Standard defaults or any "converted" styles that had been created) which effectively became a new page break. Reviewed-on: https://gerrit.libreoffice.org/26567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit a60b2f7c227709d27d6294558fd396557a9ffd20) Change-Id: I839570b0330ba274552cc671014e997c42765f4b
2016-10-10tdf#62847 import image hyperlink in docxdrazil2-0/+6
The image hyperlink is a resource id in the document and needs to be translated into real URL. First I define a new type CT_Hyperlink_URL in the model and associate it with an action handleHyperlinkURL. In OOXMLFastContextHandlerProperties::handleHyperlinkURL I dispatch it to OOXMLHyperlinkURLHandler to translate resource id to real URL then set the PropertySet with real URL. Then the correct URL will be captured while resolving GraphicImport, which will be stored in GraphicImport_Impl::sHyperlinkURL as an OUString. Finally the property will be set in the GraphicImport::applyName if the length of the sHyperlinkURL is not 0. Also adds a test file image-hyperlink.docx and a test in ooxmlimport.cxx. Reviewed-on: https://gerrit.libreoffice.org/28432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 8e375369206606c541cff5f46ea6a87db2c808b4) Change-Id: I6194b9cc6bcc1bfaa033ab05e94836fe96e33f14
2016-10-10tdf#81345 docx import fix default page break regressionJustin Luth2-0/+12
"regression" from 4e653d15eff26aa5283d8ba20611893f4c573f57 If there are new style elements, then don't treat a default break in columns as a continuous break. This fixes both round-tripping, and initial import of columns and headers on this particular document. Since MS and LO treat sections so differently, it is a balancing act of what to change. Reviewed-on: https://gerrit.libreoffice.org/28728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 3870c0555aa461268a6d056543f4545d562769ce) Change-Id: I9c79bc1246108da6a5ebbf744acbcfcbb9d33d48
2016-10-10tdf#53856 writerfilter set parentless style based on defaultJustin Luth2-0/+9
docx import of base-less style "Text" was conflicting with LibreOffice's builtin "Caption"->"Text" paragraph style. This only worked when the parent .isEmpty(). Style names can use localization, so forcing the imported parent-name will not match between different language versions. Reviewed-on: https://gerrit.libreoffice.org/28894 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit b79b5e0df6dc5a0ba18054b0503d6fa804b69f02) Change-Id: I86d9965abb4ee90b04c713371529a679d045660c
2016-10-10tdf#103025 sw: don't format header/footer in SwPageFrame::PreparePage()Michael Stahl2-0/+9
This has always been dead code because it used wrong constants FRMTYPE_HEADER|FRMTYPE_FOOTER which is actually Page|Column and SwPageFrame and SwColumnFrame are not direct children of SwPageFrame. Then commit 901e5c3a21a1299d10c44bc844246fe8c329bb82 fixed the constants but somehow the early formatting of header/footer results in wrong expansion of variable text fields, so just remove this code. (cherry picked from commit f933da55797566cf725e35ab0df17e91c7d5598f) Reviewed-on: https://gerrit.libreoffice.org/29558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 63ba0dc9e12169e9a929231a01172c85fab2f628) Change-Id: I0af13168970f26355a1b247e071235166d08b7a4
2016-10-04comphelper: move setTiledPainting() from SfxViewShellMiklos Vajna1-1/+43
And make it a static one. The primary point of that member function is to prevent invalidations during paint, and since multiple views are allowed, it wasn't extended to filter out invalidations from all views, not just from the current one. (Same goes for other callback types.) (cherry picked from commit 59e38e946f19ab59370f8e52370b7a7b861cc558) Conflicts: include/sfx2/viewsh.hxx sfx2/source/view/viewsh.cxx Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
2016-09-30sw lok: disable pixel alignment of cursor logic valuesMiklos Vajna1-0/+26
It just makes harder for a client to find out if the cursor of one view is at the same position as the cursor of an other view. Change-Id: Ifaebd1c93c45918c87f3c2c3d12bbb3af949184e Reviewed-on: https://gerrit.libreoffice.org/29393 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit b32b6c09d190effbe29389a87a80df36007d2e99)
2016-09-28sw: avoid emitting invalid cursor pos during end text edit of commentMiklos Vajna1-2/+45
A comment text edit (provided by editeng) works with relative twip coordinates, conversion of the cursor position to absolute twips happens in ImpEditView::ShowCursor(), provided that the pOutWin member has a map mode origin that respresents the offset correctly. This is not true during SwSidebarWin::DeactivatePostIt(), the map mode origin is already reset back to 0, so just don't emit callbacks during shutdown, the sw body text cursor will be shown later anyway. (cherry picked from commit 45fa73f87258f51bf37c92052723c4b99c49dc2d) Conflicts: include/sfx2/viewsh.hxx Change-Id: I02c15bb9fad99db8e43fd2f37df770dd165be788
2016-09-27CppunitTest_sw_uiwriter: avoid SfxLokHelperMiklos Vajna1-2/+3
It assumes that the process has only a single document opened (createView() creates a new window on the frame returned by SfxViewFrame::First()), while it's possible that in this test an other testcase forgot to dispose its component. This way testCursorWindows() depends less on other testcases, and ideally all testcases should be entirely independent of each other. Reviewed-on: https://gerrit.libreoffice.org/29300 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c8968b12f9ae88f592d8a8d17cdecfae8aa8722e) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I35decb0b69aeebd3984f4da4386c696a63fe3e04
2016-09-27tdf#102384 sw: avoid moving cursors of other windows in SwTextNode::Update()Miklos Vajna1-0/+24
There is a list of exceptional SwIndex containers in that member function, like bookmarks, at-char anchored fly frames, etc. If we're growing (so basically in the safe case), don't touch the cursors of other windows, either. This helps to avoid the surprising "I didn't do anything and my cursor moved" behavior. (cherry picked from commit ecdec24c035513dbf2ee1814eb437e2a9d9a3d6c) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/core/txtnode/ndtxt.cxx Change-Id: I9941fdcb6b7ad4b6e18a321cecc72fdf73d917fd
2016-09-23sw: move LOK_CALLBACK_VIEW_CURSOR_VISIBLE to SwCursorShellMiklos Vajna1-1/+7
That's where the non-view variant is emitted, and SwVisibleCursor said visibility=false even if the cursor was expected to be visible. Also fix the test callback that checked if the payload is equal to the "true" literal, but actually the payload was a JSON. (cherry picked from commit e387193eab0e4729d02b6ffd2c972c3d71942947) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: Ifa0e23eb274925e8ab8ef5e7c21370ad2cd22282
2016-09-22lok::Document::getCommandValues: expose sw redline author colorsMiklos Vajna1-0/+25
These colors are used in the tiles, so it's a good idea if the client can use matching colors for cursors and selections. But to be able to do that, we need an API to expose these colors. Change-Id: Ia688c07e6c300fecdf8dc428d5a3f000d1857387 (cherry picked from commit d7788287456cb633226203f259e212c143b83050)
2016-09-22Related: tdf#102308 sw: ignore seconds when combining redlinesMiklos Vajna1-1/+10
The purpose of storing seconds was to get a better timestamp, not to make combining impossible. Also fix two issues with the existing testcase: - read both timestamps, so test doesn't fail if the second is 0 in the first redline - don't fail if minute changes while waiting for a second Change-Id: Ib6c8ecdcf2f0da9191f0b48e6aaefc0b2449583e (cherry picked from commit f240f073d228e62afd3f60563c23626efad0df7f)
2016-09-21tdf#102308 sw: improve redline timestamp precisionMiklos Vajna1-0/+31
It's not clear why it was like this since the initial import, but at least not clearing seconds is already an improvement. (cherry picked from commit d9dca1eef91faa710112ffd20a2b2d36b48a9287) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic452256d4ab47e6779ec71fe6576eacb5b74fb43
2016-09-20sw: emit LOK_CALLBACK_STATE_CHANGED when cursor enters/leaves a redlineMiklos Vajna1-1/+27
For now only care about the start of the cursor, which can be only at a single redline. Add matching testcase + expose it in the gtktiledviewer status bar for interactive manual testing. Change-Id: Ib61757412d6b54bef64361d4a8563795ca0bab6c (cherry picked from commit 288013f25d2e52a76f7ce5368c505a6ccb3b64a2)
2016-09-16lok::Document: rename getViews() to getViewsCount()Miklos Vajna1-1/+1
As this only returns the number of views, not the actual views. Since it's a rename, it's just an API (but not an ABI) change. Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7 (cherry picked from commit dc00592b4e48a111efc6ff78bdbf7af998e58e22)
2016-09-16sw: allow select of redline by indexMiklos Vajna1-3/+27
Previously .uno:NextTrackedChange always worked by cursor position, but redlines are stored in the redline table, so they have a unique index. Allow specifying that index when invoking the command, and in that case ignore the cursor position. (cherry picked from commit 84e91157c674b0b78b792fc1d4f841fe50b1dd9b) Change-Id: I7dbe8044feca8fcc48635482a22317b024f40ffa
2016-09-14sw draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback()Miklos Vajna1-0/+4
With this, in case the first view has an active text edit and a new view is created, then the shape text lock is instantly visible in the second view, even if the first view does not end + begin the text edit again later. Change-Id: I82d98ab1431a54a1a8897d16ce7fa0856baa2a10 (cherry picked from commit 7b784e4e3927d91a96cd0b54fc43c9b488822e47)