summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2016-04-14tdf#98806 RTF import: handle bookmarks in table textMiklos Vajna2-0/+19
Mapper().props() was called directly, so all bookmarks pointed to the start of the A1 cell instead of the correct text range. (cherry picked from commit 3d922d7da4fa11b8c22bbdffd141fa1398b2fcd4) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I40eeb85b61d2ae9138cd666d4a6a3c08eda47da3 Reviewed-on: https://gerrit.libreoffice.org/23913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-04-14tdf#99140 DOCX import: fix table at the bottom of the page to span over ...Miklos Vajna2-0/+15
... multiple pages. In short, one more blacklist entry when conversion should not be performed. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Also (because otherwise the first commit would introduce a regression): tdf#99140 DOCX import: fix table horizontal aligment to be 'from left' ... ... when it was 'manual'. Regression from commit c1e563f6efd09cd3463f1b92a3022ae288c92087 (fdo#76741 [DOCX] Table Alignment and width type, 2014-04-04), DOCX import code had to deal with two kinds of horizontal alignment when it came to floating tables: the alignment of the table itself, and the alignment of the float parameters. The problem is, in general it's wanted that the table is aligned according to the floating parameters, but in Writer the "from left" UI setting is described differently for tables and fly frames: tables use LEFT_AND_WIDTH for that, while fly frames use NONE. Fix the problem by touching the default only in case the floating parameters have something that's different from NONE. With this, the width of tables is no longer lost when they are described to be floating ones in the DOCX markup, but FloatingTableConversion() decides to ignore that. (cherry picked from commits d56deaeb2a1e8007e50fc2334f416fddd4e3cde3, c07f04ab422eadba0f2c3c128a0e3ff78e90cdf2, and fd61dee6457a44687f1142dd55bfee6b64fda2ef) Change-Id: I764f02cc58ae1b7af802b81e570e4feaf73ee2c1 Reviewed-on: https://gerrit.libreoffice.org/23986 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-04-12Fix tdf#97035 - Import: RTF wrong cell widthGuillaume Smaha2-0/+151
Change-Id: Ifd31ab1672261644a00a32f3a8632dd0dcb33825 Reviewed-on: https://gerrit.libreoffice.org/23687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-07tdf#65642 RTF filter: import \pgnrestart and \pgnucltrMiklos Vajna2-0/+31
This implicitly adds support for DOCX import of <w:pgNumType w:fmt="upperLetter"> as well. (cherry picked from commits abaf6bde4ee91c628bd55a7ec2e876a5d0ecff6e and d29b75c402ea635b3865501e43c9f349885913af) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ib19ecb8f7ca0c867ae3be2b41e49ac4cacfd5bb6 Reviewed-on: https://gerrit.libreoffice.org/23730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-04-07tdf#99100 DOC import: handle subset of STYLEREF nativelyMiklos Vajna7-3/+63
Commit 4215bca95511af8e4ee96e3c8f521b35f638aef3 (export 'Chapter' field type as 'StyleRef' into .doc, 2015-08-21) mapped SwChapterField to STYLEREF in the DOC export. This field type was handled as a field mark on import. Instead of always handling it as a field mark, recognize the case when it's the subset we write and we can handle natively, and in that case create an SwChapterField again on import. Leave the complex case unchanged as before and keep using field marks for that. Also (because the header where STYLEREF is used is completely empty otherwise): tdf#99120 DOC import: fix lack of first share after odd section break Commit 848b1a05c5c41b5e7ff19c984f60c297a8143990 (fix for bnc#659631, 2011-02-04) made wwSectionManager::InsertSegments() use SwPageDesc::WriteUseOn() directly, instead of going via SwPageDesc::SetUseOn() that takes care of not throwing away the higher share bits of the bitfield. This way the "is first shared" flag of the bitfield got cleared, even when the input document had no title page declared, so first header/footer must be shared. Fix the problem by using SetUseOn() in the DOC import as well when it comes to handling odd/even page section breaks. (cherry picked from commits d635b351849b8b576c907abf22500d0fa89ab54f and 44a3eb37cd982c59f8350d53db3798b675230b35) Change-Id: Icfa8c4be6538da5e02e2d5071af30a46ccfa712b Reviewed-on: https://gerrit.libreoffice.org/23888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-04-07tdf#98647 fix bug in tools->outline-numberingNoel Grandin2-0/+18
fallout from commit e85b2333bce7b1dcae73861df6d90b48b9f4efe5 "convert Link<> to typed" Change-Id: I8f98bcf6d1eff596e139f9f3a2e3d32fcce67d11 (cherry picked from commit c10d56c6c33ad27d9f4fb12e499a8b246d88da9f) Reviewed-on: https://gerrit.libreoffice.org/23837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-04-04tdf#98987 sw: add AddVerticalFrameOffsets compat modeMiklos Vajna14-7/+118
The situation is the following: we have a text frame, with at least two anchored objects: one is wrapped not-wrap-through, the other is. In case the non-wrap-though one shifts the text content of the text frame right or down, then layout may or may not want to re-consider what is the top left corner of the text frame for anchoring purposes. Regarding the x position, sw layout repositioned the anchor point depending on the AddFrameOffsets compat mode: it's enabled for documents imported from Word, disabled otherwise. Regarding the y position, no repositioning was done, however the bugdoc shows that Word does the same repositioning on the vertical axis as well. Add a new AddVerticalFrameOffsets compat mode that enables vertical repositioning as well, and enable that mode for documents imported from DOCX. Also (squashed in, as the second commit partly undoes what the first one did): tdf#99004 SwAnchoredObjectPosition: handle textboxes when determining surround Writer TextBoxes are always wrapped "through", so that they can appear inside their shapes. However, the surround of the shape may influence its position. So when surround is asked for anchor position purposes, take the surround of the TextBox's "parent" shape instead of the one of the TextBox directly. With this, the TextBox in the bugdoc is properly positioned inside its parent shape as expected. (The problem only happens when at least two shapes are anchored to the same paragraph.) (cherry picked from commits 911261a3a581b9f2f4262f1d5403d9be3bbecf63, f5e0236566b913aebb1376d97c7d37a23c69bd84, 50223ea6e212b60b7d33839c2753c5601fb50f95 and cd1b2f923e0b0be89a5d1c8cbc647133aac09ed5) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/core/text/txtfrm.cxx Change-Id: Idc5cad7d86662008a92ff3bf5fbb3806aa2c7b07 Reviewed-on: https://gerrit.libreoffice.org/23733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-03-30tdf#97601 sw: don't mark an already modified chart as modifiedMiklos Vajna3-2/+30
Regression from commit e2b260fc98e833d4e64426b90992094f2da0498c (sw: let layout not mark embedded object as modified, 2014-06-03), an infinite loop was caused by: 1) SwDoc::SetOLEObjModified() triggering the maOLEModifiedIdle Idle 2) which at the end called SwWrtShell::CalcAndSetScale() 3) which at the end called chart::ChartModel::setModified() 4) where chart code called back into SwDoc::SetOLEObjModified() via the modification listener, and this happened again and again. The original fix wanted to avoid marking the document as modified without a user interaction, so fix the bug by only calling setModified() if it prevents a not-modified -> modified transition. This keeps the original bug fixed, but prevents the infinite loop, that is always a modified -> modified transition. (cherry picked from commit 078c00e3a3c971ac83154948d5f08462532b9dc6) Change-Id: I3b56a91afaacd3e0b7cb646a492fd15f1b5168ee Reviewed-on: https://gerrit.libreoffice.org/23495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-29tdf#98882 DOCX import: set default para properties on the Standard para styleMiklos Vajna2-0/+8
That's what the DOC import does, and that's the reason e.g. the strange unwanted crop of the as-char anchored picture doesn't happen there. This also needs the "reset all existing style properties back to default" logic to be adapted: the Standard style has to be reset before the default are set, and later it should be left alone, otherwise the defaults are lost. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx (cherry picked from commit eae2331f83bd58bacccd898d60f6c5f54856c036) Change-Id: Ie422a0b64b80a826fa4f469145a26283fb32d734 Reviewed-on: https://gerrit.libreoffice.org/23597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-03-29fix another involuntary behaviour change from 0c5cbcd7Bjoern Michaelsen1-0/+2
Change-Id: Idd8e48777b2a5e8e91754ec0afa9dd5b50d8bf00 Reviewed-on: https://gerrit.libreoffice.org/23506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-25tdf#88453 sw layout: fix split of nested tables with large amount of rowsMiklos Vajna4-0/+62
This does not fix the original bugdoc, just the case described in comment 2. The bugdoc has an outer table of a single cell, and that cell has a nested table with a single column and many rows. When we split the table, we set the height of the last row frame to zero, then the height of the last but one, and so on, till the reduced table fits the page, then move the 0-height frames to the next page, and so on. All this recursively, to support nested tables. The problem is that 0-height is set only for the contents of the cell frames, but not for the cell or row frames themselves, so in case e.g. the default ~0.10cm inner margin of the cell frames, even a 0-height text frame results in a cell frame height of 111 twips. And this error can accumlate if there are enough rows, e.g. with the default fonts 123 rows are enough to trigger the situation when even a completely reduced table doesn't fit the first page frame, and the layout throws up its hands. Fix the problem by setting the height of the cell and row frames to 0 as well in case their content is 0-sized anyway (so a re-format will later restore their correct height). (cherry picked from commits b4b5dbee1ec7770ed64d7270de46d5cfc06b87b6 and f4eb82cf9fea5c1df49fad6ee2d91fc51854cd29) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Iefbbb7bd6ef97a9a81929eb2599adb961e52fd38 Reviewed-on: https://gerrit.libreoffice.org/23512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-03-24tdf#96326 RTF import: handle checkbox form field undefined resultMiklos Vajna2-0/+42
The RTF spec is quite terse on how the form filed result should be interpreted, but the binary equivalent documents properly that checkboxes have 3 valid states: 0, 1 and 25, the later meaning undefined. Use the default value in that case. (cherry picked from commit 829596eb36de32bd87b426d9ad11901eabeae7be) Change-Id: I672bf8d1f63d7880227b7fa7b5c81f91e1877b2a Reviewed-on: https://gerrit.libreoffice.org/23299 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-22tdf#95977: fix fly positioning regression from 0c5cbcd7Bjoern Michaelsen1-1/+1
Change-Id: I7e11c7072ba0ec82237985da79f8572fdda05778 Reviewed-on: https://gerrit.libreoffice.org/23429 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-17tdf#98458 sw: Fix performance problem when searching in large documents.Jan Holesovsky1-4/+4
Change-Id: I0056a411d7a3bb018401d87bdd4a0112fed31df6 Reviewed-on: https://gerrit.libreoffice.org/23341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-15vcl: move graph.[hx]xx to graphic.[hc]xxChris Sherlock23-23/+23
It's IMO a bit confusing to see a "graph" header that doesn't strictly deal with graphs, but graphics. Backporting to 5.1 series to allow for easier backporting of other potential hotfixes. Change-Id: Ic37c6cd78e23d05939486f98667144c4453bb0a3 Reviewed-on: https://gerrit.libreoffice.org/22949 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-03-15tdf#97429: Fix crash on print selected areaXisco Fauli1-3/+12
Regression from 9eb61489ee03486a7147acdf923eaf5e3f355183 Use DelFlyInRange to iterate over nodes' range Change-Id: I219c7ec83eaa69990340d423dc34546131bb372c Reviewed-on: https://gerrit.libreoffice.org/22129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <anistenis@gmail.com> (cherry picked from commit 3f7a0f7dba759ed3763c900112b5eeb7ccfdd84d) Reviewed-on: https://gerrit.libreoffice.org/22426 Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-03-15tdf#97978: add support for opening mde and accde files in basepasqualm2-6/+6
This patch modifies the base 'open existing database' wizard so accde and mde files can be chosen as targets for access and access 2007 databases. Both file types are the runtime-only equivalents to accdb and mdb files so base can use them in the same way as does with the former Change-Id: I5b6002089a2d3c19498ff6e05bae3facc5a4e2d0 Reviewed-on: https://gerrit.libreoffice.org/22957 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/23178 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-03-11Resolves: tdf#82781 avoid dereferencing invalid iteratorsCaolán McNamara1-4/+9
when using print preview with cursor on 2nd page which consists solely of hidden text with show hiddle text enabled. inner mrParentViewShell.Paint can invalidate iterators, as later detected with the mbNewLayoutDuringPaint flag but we dereference for the purposes of drawing the shadow before we get there. easiest thing seems to be to just grab the bits of info we want before the inner paint occurs. Change-Id: I09c9b06449db440b7beba7de9e71c239ee64f6ca (cherry picked from commit 4eb5f363ed9a3181a817f12d5ec49eede13b9c9c) Reviewed-on: https://gerrit.libreoffice.org/23092 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-09tdf#59699 RTF import: handle INCLUDEPICTURE fieldMiklos Vajna3-0/+19
On one hand, don't handle a fieldmark for it in dmapper. On the other hand, handle the field in the RTF tokenizer as it would be {\pict ...hexdump... }, that will result in an inline picture, as wanted. (cherry picked from commit 6f94cab9c43f88624b58a47ad03ad5f87032595d) Change-Id: I554fdf017920350144300fd86617bf74eed8995b Reviewed-on: https://gerrit.libreoffice.org/23085 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-09tdf#87034 RTF import: fix multiple superscripts after footnote ...Miklos Vajna2-0/+20
... in the same paragraph. The intention was to avoid replaying the supertext buffer and using its contents as a custom footnote mark at the same time. However, it's enough to check if the buffer is empty to do so, and that avoids the mis-import of the bugdoc as well. Change-Id: I1e3b0c7f0c6d8eb8250d8b1d0d7d196039c40e79 (cherry picked from commit 93faf178195ca974747849879266783884ae27c5) Reviewed-on: https://gerrit.libreoffice.org/22815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-09basic: tdf#87530 don't copy storage that doesn't existMichael Stahl1-0/+86
If the Basic library is newly created it may not have been stored to the document storage yet. (regression from 5246fa262450f686674850c53df666422f441c86) (cherry picked from commit aeb43916366b293935314efe9454c66b4877b9d1) tdf#87530 finish the regression test Need to store the document twice to actually reproduce the bug. (cherry picked from commit 7faecc70c286c0e1a3068b77ccde771640928b37) Change-Id: I9c2fc1d7446795b9c1c2224671118b2a671dcad8 Reviewed-on: https://gerrit.libreoffice.org/23040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-07Resolves: tdf#98399 RET_USER_CANCEL is non-zero and returned on cancelCaolán McNamara1-1/+1
Change-Id: Id4231454dfb34cac6ee89d63beb18a83c63a44c1 (cherry picked from commit cd9a5cf4312a2dc0c1ecbf682c67ca08862cdde0) Reviewed-on: https://gerrit.libreoffice.org/22912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-03sw: tdf#91131 when renaming a SwNumRule, also ...Michael Stahl3-1/+13
... update the DocumentListsManager::maLists because without that all list styles created in the UI will have GetDefaultListStyleName() == "Untitled1" and then deleting one of them deletes all these entries from maList, which makes the DocumentListsManager unhappy. Change-Id: Ic40e561fc540881ab29566a3f5ecdc8a180c97ef (cherry picked from commit 69ff012f1a2d10b3284586474f2add4e88eabcfb) Reviewed-on: https://gerrit.libreoffice.org/22834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-03-01tdf#97960 - .doc: preserve font size in empty cellsJustin Luth1-1/+1
fixes regression from commit e1b123896d5b0a96c2959b6b6768c7cffabafd4f. Change-Id: Iccc10cdba89cdae6a5618d29022e0eaf609c9d6f Reviewed-on: https://gerrit.libreoffice.org/22769 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-02-28tdf#97139: prevent loop while formatting small text linesOliver Specht1-1/+5
when text is inserted at the end of a line then text formatting starts some characters (platform and ENABLE_GRAPHITE dependent) before the insert position. In case of small lines this might even be the start of the line. To prevent going back to the previous line the cursor right margin flag needs to be reset. Change-Id: I73a62ce6c7707469fddeeffe0d7eec064c5989ea Reviewed-on: https://gerrit.libreoffice.org/22641 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de> Reviewed-on: https://gerrit.libreoffice.org/22663 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-02-22Work around apprently rounding issue in test with retina mac.Norbert Thiebaud2-3/+12
Change-Id: I5c3a4ab39768393090ca0ddc3cf3efe600184fcc Reviewed-on: https://gerrit.libreoffice.org/22606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> (cherry picked from commit bdad941d7349f330dab2c3d47237bd380d5b7391) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2016-02-19sw: tdf#63022 fix drag-and-drop of text in same paragraphMichael Stahl1-5/+3
SplitNode() inserts new node before the existing one, so pEndTextNd and aRg.aEnd point one node too far. Change-Id: I6cea44fafd9d2b47e77e76892a260c5a8c6849fc (cherry picked from commit fabc45a6a902c8988eff087831f8b2f84ea8ae6c) Reviewed-on: https://gerrit.libreoffice.org/22510 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-19tdf#96175 RTF filter: export \companyMiklos Vajna3-0/+31
(cherry picked from commit abe8ea175ad9fc282a1e702acb74da5d7c967cbe) Change-Id: I590d015aa50350cceef70313498e72474d242789 Reviewed-on: https://gerrit.libreoffice.org/22506 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-02-18tdf#76817: fix missing heading styles assigned to outline levels in ooxmlMark Hung5-19/+44
1. Export pStyle because writerfilter regard a list as an outline only if associated pStyle is set to "Heading N". 2. Export English style name to ensure style names created by LO with non-English UI is always recognized. Cherry-picked from 78284714b73a8307174c596295894e8f3951e09a and b2efa9db15500044cbb2bd2c94e819b9ee8c6f82 Reviewed-on: https://gerrit.libreoffice.org/22086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I88c590e4bae6cf30e78ebc1011023461eac4e883 Reviewed-on: https://gerrit.libreoffice.org/22441 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-18tdf#97371 DOCX import: fix text covered by shapeMiklos Vajna3-0/+16
Regression from commit 358666e4204364ce915ee95372dc6f2fca545253 (tdf#90153 DOCX import: fix default sw TextFrame roundtrip, 2015-09-28), the problem was that at the moment SwTextBoxHelper::syncProperty() doesn't handle an AnchorType at-para -> at-char transition, so the importer shouldn't do that for TextBoxes till sw core gets extended to support the scenario. (cherry picked from commit 8f1a1092d47947847e1d888b0284e8364c663d1f) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I8308bfd306672bc68984fbf019767c174130e18d Reviewed-on: https://gerrit.libreoffice.org/22483 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-18tdf#95376 DOCX import: fix incorrectly indented tab stopsMiklos Vajna2-0/+9
Regression from commit f4badd9a485f32f787d78431ed673e2932973887 (tdf#92454 DOCX import: allow overriding para prop from num style in para style, 2015-09-22), the problem was yet another priority mishandling in the maze of various styles and indentation handling. In the tdf#92454 bugdoc, both a numbering-from-paragraph-style and a paragraph-style defined indentation, and Word preferred the numbering, while Writer preferred the paragraph style, that's why the import-time conversion was added. However, it turns out there is a 3rd source that's still not direct indentation formatting: a direct numbering. So the correct priority is: direct-ind > ind-from-num > ind-from-parastyle > ind-from-num-from-parastyle Which means in this case the indentation should not be set directly: the two conflicting value (ind-from-num and ind-from-parastyle) will be resolved correctly by Writer core. Given that we always first get the para style info, and only then the numbering, we just need to undo the conversion added for the other bug if we see a direct numbering, then both the old bugdoc and this new one will be handled properly. Change-Id: I09cc84605d5df6159da985ad069d46b580a53358 (cherry picked from commit 3915bf2dc877d5f1140798e24933db0f21386a4a) Reviewed-on: https://gerrit.libreoffice.org/22307 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-18tdf#82012 - keep flip settings when compressing imageJustin Luth1-1/+3
Format - flip - Horizontal/Vertical setting was lost when compressing an image. Change-Id: Id39e7ce9a82174ac2248851107e398979fba56aa Reviewed-on: https://gerrit.libreoffice.org/22385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-16sw: fix a STL assertion in lcl_MoveAllLowerObjs()Michael Stahl1-1/+4
For OLE objects MoveObjectIfActive() ends up calling SwSortedObjs::Update() which removes and re-inserts objects, thus invalidating the pSortedObj iterator. (regression from 04783fd91832fa01a5b096f395edd7ad4f9c0f6b) Change-Id: I2628f1b4ecd1c20ebbc4e9dda4e4befc9fad4644 (cherry picked from commit cf91483690291272f48ff95c1aebd165da8ae4f0) Reviewed-on: https://gerrit.libreoffice.org/22338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-16sfx2: related tdf#56270: loss of embedded objects imported from DOCXMichael Stahl3-0/+31
After the import some of these are kept in RUNNING state. For Math objects imported from MathType3 OLEs in particular, first a new Math object is created and stored to the XStorage, only then is the MathType3 stream imported. This means the Math object is modified and contains data that must be stored. The problem is then that SfxObjectShell::ImportFrom() simply calls setModified(false), clearing the flag without storing the object. For Flat ODF export we lose all the objects that are cached in sw's SwOLELRUCache; for the bugdoc something more inexplicable happens for ODT export where we lose "Object 214" (which is the first one in the cache) but no other ones. (The main difference is that for ODF there is an optimization to copy the embedded object's storage without loading the object, but for Flat ODF every object must be loaded and exported.) (regression from 83777cd6e0f3f1a4458af896fd13344c696ecb1e) Change-Id: Id1474fba9f4da2d5247c7ff4dc6819ddb9829fe8 (cherry picked from commit d81d104833f0ee9349ebcd0d79d2de84ba9a7262) Reviewed-on: https://gerrit.libreoffice.org/22334 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-16tdf#56321 - .doc import image flipped statusJustin Luth1-0/+18
Although LO was exporting whether an image was flipped horizontally or vertically, it wasn't reading it in during an import. Reviewed-on: https://gerrit.libreoffice.org/22344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked (minus unit tests) from commit aa03fd09c0e18ace241c9fe151f7f52c6773f403) Change-Id: Ia85e3459d00f40d852bbcd3fcfe15e7b53d518ba Reviewed-on: https://gerrit.libreoffice.org/22384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-02-15sw: ensure that configuration change in odfexporttest.cxx ...Michael Stahl5-37/+71
... is reverted in case the test function throws an exception, so that subsequent^Wfollowing tests don't inherit the changed configuration. Change-Id: I748f9edf15a7f860607ae4cce891450db254c73e (cherry picked from commit e2bfae9006e6adc4de17d0167dac6661b002f126) Reviewed-on: https://gerrit.libreoffice.org/22333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-15sw: don't crash if Office.Common/Cache/Writer/OLE_Objects set to 1Michael Stahl1-15/+20
(possibly regression from b717bda1f6484905aebc571c4538165a1fbfd2bb) Change-Id: I9113fe2e769cd6ba56bdccc629ac63241b238553 (cherry picked from commit 60d4dd0a6c44b45ed424ca6a0ddcf857ec089b24) Reviewed-on: https://gerrit.libreoffice.org/22332 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-12tdf#89505: replace tab character with space in table of contentsOliver Specht1-1/+1
the ToxWhitespaceStripper now replaces also tab characters so that they don't break the formatting Change-Id: If66aaddcbc0f8c65461f53f07ca7031f8f1d11b4 Reviewed-on: https://gerrit.libreoffice.org/22271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de> (cherry picked from commit 5152c43109c9a35f30fc9b0f478c1fbaf01a1143) Reviewed-on: https://gerrit.libreoffice.org/22285 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-11tdf#85523 DOCX import: fix unexpected extra char at comment endMiklos Vajna2-0/+8
(cherry picked from commit 39969defa29948d77565a7cd8a3471baaec8f35d) Change-Id: Ic3eb073d11a395a81b90fd1a9292d6ecf2940c09 Reviewed-on: https://gerrit.libreoffice.org/22157 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-08fix SwClient crash in SwXNumberingRules/SwXTableRows/SwXTableColumnsNoel Grandin4-33/+74
was generated a crash when running 'make check' on my Linux box. These classes need to hold the SolarMutex when destructing their SwClient base class. Reviewed-on: https://gerrit.libreoffice.org/20391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 9e2973dbb90b5d9ce004cbf333f5000e4d50dc18) Signed-off-by: Michael Stahl <mstahl@redhat.com> Change-Id: I448ea00978d003aa37d8663d37b4edf9e54a6a56
2016-02-05sw: fix SolarMutex asserts from SwXCellRange dtorMichael Stahl3-54/+108
Happened when loading a report from the attachment of tdf#97033, but that bug is apparently about a different crash. Deploy the sw::UnoImplPtr, which is clearly the best way to avoid such problems. Also another silly weak pointer this, for tdf#72695. (cherry picked from commit 7e349c0eee15fa0f9d8d71a3c9e311d2da62e670) Change-Id: Ice8db95ca3eecc638bd4a4ef7fa8967d180bd525 Reviewed-on: https://gerrit.libreoffice.org/22159 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-05tdf#97407: Remove duplicate custom entryRishabh1-1/+2
Remove custom entry before updating the spacing listbox Change-Id: I9476e639f4d54e87a2c9049159e6abefb02a9b5e Reviewed-on: https://gerrit.libreoffice.org/21942 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 43799f9e21277e655c7ec940d266f775cada837a) Reviewed-on: https://gerrit.libreoffice.org/22066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-05xmloff: tdf#96147: ODF export: fix duplicate fo:background-colorMichael Stahl1-0/+80
... attributes that happen if both CharHighlight and CharBackColor properties are used, because the CharBackTransparent property wasn't taken into account, and combining the CharBackColor and CharBackTransparent properties happens *after* XMLTextExportPropertySetMapper::ContextFilter() runs. Also, it looks like a transparent highlight wouldn't export properly but apparently DomainMapper::getColorFromId() won't create such. (regression from f880962f5bf26bfaef06bd3f9e67e2d901a2e74c) Change-Id: Ib628ef8bb377482f74fadb97c81afb95fbbf7184 (cherry picked from commit 8dadefc35f8b33648fb6adbdaca75ea52b2705db) Reviewed-on: https://gerrit.libreoffice.org/22042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-05tdf#92077 Improve DrawingML export of rotated/flipped customshapesAndras Timar2-0/+19
When we export the customshape as polypolygon, we need to take into account, that the polypolygon of the shape already has flipped coordinates, but coordinates has to be relative to the rotated bounding rectangle. Reviewed-on: https://gerrit.libreoffice.org/21905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit bd36889b2caa4a74d647e18fc52e455f83529be9) Change-Id: I4f3b015e439d3d6041adc67eddd460f5bd4dfca1 Reviewed-on: https://gerrit.libreoffice.org/22103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-05tdf#96961 sw Hide Whitespace: still show whitespace on the last pageMiklos Vajna6-14/+61
Mainly to match Word's hide whitespace behavior. (cherry picked from commits cd51e0153a25f3950be54dd7fd58a0de6e148ae2, 49b67cdc36b599f865d4a6de214d901861f27196 and 363aa5dbb2c223b6cc3a109bd654f39772e310fa) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ica09bca5004adbfa14d1c9aca04079129f8a1a68 Reviewed-on: https://gerrit.libreoffice.org/22122 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02Re-enable insert endnote in Writer's standard toolbarYousuf Philips1-1/+1
Change-Id: Ied1a1d57b465b436009de3e2c0524c52ba81fd08 Reviewed-on: https://gerrit.libreoffice.org/21845 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit cfb272d1379b202e9c90360a08235c3296b8e84a) Reviewed-on: https://gerrit.libreoffice.org/21847 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02tdf#61511 RTF export: handle page background solid color fillMiklos Vajna8-27/+50
(cherry picked from commit b0058366190b63fcbc112b43d387f7600a7fe55d) Change-Id: I562419b6d4fb791ef5b255effe9a4510d930bdbc Reviewed-on: https://gerrit.libreoffice.org/21884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02writerfilter: tdf#97417: don't insert numbering on end-of-sectionMichael Stahl2-0/+12
... paragraph, it will be copied to every following paragraph. (Before commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 the properties of the end-of-section paragraph would be overwritten by the properties inside the header) Change-Id: Ibe095cf873a09ef9e12f898d09b5fd6f61c914c9 (cherry picked from commit 57def64bec0853de7d6f4243e31e8e9650491914) Reviewed-on: https://gerrit.libreoffice.org/22000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-28Related: rhbz#1289394 always provide the screen area the tip applies toCaolán McNamara2-11/+12
this will make it easier to implement native help tips Change-Id: I984dfadaf02e9b7bf542ba82cf070911c89cb699 (cherry picked from commit 01ef12d173fb2c54a49186c8eb4fa40288b82945)
2016-01-27tdf#96308 RTF import: fix tab stop inheritance inside table cellsMiklos Vajna3-0/+44
The tab stop list is a paragraph property, and RTF requires to repeat it after \s as direct formatting, otherwise the parser should be assumed that the tab stop list is cleared as a direct formatting. Non-buffered text handles that in getDefaultSPRM(), handle it directly in the RTF_PARD code for buffered text. (cherry picked from commits 1f1ddaad5dd401b70ae69fb18f7873d652242154 and 1ec88cdb82a28851c4b97d7f043d8bcec3c675e8) Change-Id: I16b09bc4c177df5a74d16653b829b198aa1a800f Reviewed-on: https://gerrit.libreoffice.org/21688 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>