summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2013-12-10fdo#70198: sw: don't truncate Time values on 32bit platformsMichael Stahl2-3/+5
SwDoc::SetFixFields() uses sal_uLong to store Time.GetTime() which needs 64 bits. Also fix same problem on Time fields in HTML import. (regression from 9830fd36dbdb72c79703b0c61efc027fba793c5a) (cherry picked from commit 17dab5bf8efb3fd676e6854474b199b681d0dc28) Conflicts: sw/source/filter/html/htmlfld.cxx Change-Id: I5d0388cbc364e1f9dfb60ff9e83c7d2f101c69d8 Reviewed-on: https://gerrit.libreoffice.org/7020 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f0d031c19c45d680b3d468c58a912da2a3ce4c78) Reviewed-on: https://gerrit.libreoffice.org/7023 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-12-04fdo#71749: sw: WW8: don't loop on tables in footnotesMichael Stahl1-1/+1
(regression from ee1db992b98378b5e2f5e9aa8af0e36c375e582f) Change-Id: Id10b6fb8e9e3697b10a1df605cb48d94a55ad207 (cherry picked from commit 790896d9a557d34ea91d6e5926471de66503be7a) Reviewed-on: https://gerrit.libreoffice.org/6905 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6dfc6b717b5e625cbc48c856b73573719c511c8a) Reviewed-on: https://gerrit.libreoffice.org/6910 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-12-03Related bnc#837302: Don't introduce a redlined delete and the end of doc.Jan Holesovsky1-0/+11
Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I5c3903a40b69867684707d33acbc92b1f80a93ec Reviewed-on: https://gerrit.libreoffice.org/6898 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Signed-off-by: Andras Timar <andras.timar@collabora.com>
2013-12-03bnc#837302: Allow insertion of redlines with an empty author.Jan Holesovsky3-2/+14
No idea why that was not allowed (since the initial import in 2000), we need it for interoperability. Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx sw/source/core/doc/docredln.cxx Change-Id: I475fa63f9a4a3219a2b898b6f7d81e0603d32c18 Reviewed-on: https://gerrit.libreoffice.org/6897 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Signed-off-by: Andras Timar <andras.timar@collabora.com>
2013-11-25Resolves: fdo#67263 CRASH when deleting applied bulleted paragraph styleJulien Nabet1-1/+1
Change-Id: I70dc18363480e6c07577a93279ddd083631f6cc3 Reviewed-on: https://gerrit.libreoffice.org/6702 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 899c5ea9dc3c34892edfde642510514779132910) Reviewed-on: https://gerrit.libreoffice.org/6755 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-20Writer : Fix fdo#71694 by clearing old anchor frame before setting newArnaud Versini1-1/+2
Needed as otherwise AnchoredObjects can be in more than one SwLayoutFrm. See also 7eae50f9ff5877ef880be9a85d3f7e52b1fec49f ( Access by AnchoredObject of a deleted SwLayoutFrm ). Change-Id: I54582d6f9fb8b6f853352af27706faabe610874b Reviewed-on: https://gerrit.libreoffice.org/6720 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7726339a648ac94bb7c365950f23dabec5aa52e7) Reviewed-on: https://gerrit.libreoffice.org/6732 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-15Access by AnchoredObject of a deleted SwLayoutFrmCaolán McNamara4-5/+36
as demonstrated by abi10075-1.doc just register the AnchoredObjects in the SwLayoutFrm and inform them when the SwLayoutFrm goes away. This crash was triggered by "1e113cb7604e1509e7d598a9be329f1f7b6e9322" import different first page header/footer from doc. But that commit is blameless. Change-Id: Ia079cc635a81dff1ccbf740641f441aa784328a4 (cherry picked from commit b376eacdfae11f5d39eb7011efe67390d9f495e7) Reviewed-on: https://gerrit.libreoffice.org/6622 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-14fdo#46410 fix FindRangeAndras Timar1-2/+1
Change-Id: I7aada76bc2e8e767f36016eee5e57267b3718b13 Reviewed-on: https://gerrit.libreoffice.org/6657 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-11-11fdo#70812 writerfilter: check for nullptr after dynamic_castMiklos Vajna2-0/+8
Happens when we set "no number" in the default para style, which is already the case for Writer anyway. (cherry picked from commit 660d761bfeea81c0b76cf08b4c961a2ad8d09a06) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I3b262e633e52e4aae039c55d6edb744e36f0f354 Reviewed-on: https://gerrit.libreoffice.org/6636 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2013-11-08cp#1000015 DOCX export: fix not-well-formed XML on redline end + hyperlinkMiklos Vajna3-3/+12
(cherry picked from commit 7813bd3113beb2b2860f9eb213c5c67ef54f5bf0) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I3a87a0277952ba0a422df8988151f8b14e166e06 Reviewed-on: https://gerrit.libreoffice.org/6606 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-11-02Resolves: fdo#70358 crash when deleting tablesCaolán McNamara1-2/+9
Change-Id: I87282e363425a1bb6d9ab92e07717f66ee56a6c5 (cherry picked from commit e8e12b32ae23ee9b1613ef7794b83adbde27e9f8) Reviewed-on: https://gerrit.libreoffice.org/6509 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-10-29Resolves: fdo#70571 don't crash when clicking link in tocCaolán McNamara1-1/+1
when link is in a toc, and Cursor in protected areas is disabled, causing the cursor to leap before the toc before trying to see what's under the cursor in order to jump to it Change-Id: Iaf348e3621df02628b4d2ac8c1165df7082237ed (cherry picked from commit e9ce405103036b2fa0ae26d331a6cfc3465de10b) Reviewed-on: https://gerrit.libreoffice.org/6416 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-10-29Resolves: fdo#69510 don't access beyond end of stringCaolán McNamara1-1/+2
Change-Id: Ib5d60159ad75791371a7805ef8e211a4010d7608 (cherry picked from commit 47690627565bec866ea2de74b5504160479cff74) Reviewed-on: https://gerrit.libreoffice.org/6472 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-10-21fdo#70221 fix RTF import of multi-group picturesMiklos Vajna2-0/+10
Pictures typically have a single RTF group, so we imported them at the end of that group. Though multiple inner groups are also allowed, so make sure we only do the import at the very end, instead of at the end of all inner groups as well, resulting in multiple (fake) pictures. Regression from 13c00ce322e78eb4e0f50ab84ded19cd6aae1ded (Enable the writerfilter-based RTF import in non-experimental mode, 2011-08-18). Change-Id: Id895b2c6d3b824d09d89bfa01ce59aba76c55d42 (cherry picked from commit a35fa8d8b127cb23ebff3952291742bf28477c74) Reviewed-on: https://gerrit.libreoffice.org/6361 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-14sw: fix regex search/replace of $ in selectionMichael Stahl1-16/+0
SwView::Replace() nowadays first searches for the to-be-replaced text in the current selection, which does not work in the corner case of "$" when the selection starts at end of a paragraph, as it will when clicking "Find" to look for "$" and then clicking "Replace". The problem is that there is some antique code in SwPaM::Find() to move the cursor forward if it's at the end of a paragraph, which is presumably some pointless micro-optimization; the result is that "Replace" does not replace the selected paragraph break but the one in the following paragraph. (regression from 68a014dbca8bbd25056f75ef551fb81a0dbfb1b7) Conflicts: sw/source/core/crsr/findtxt.cxx (cherry picked from commit b60ce8465c8f01242354abccebe00742d164af60) Change-Id: I5aae9c272d102a48166c63e01775dc6322f9f02d Reviewed-on: https://gerrit.libreoffice.org/6230 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-14fdo#64495: sw: fix regex search for soft hyphen \xADMichael Stahl1-2/+7
The problem is that the soft hyphen apparently needs special handling, and SwPaM::DoSearch() looked for the no longer supported legacy syntax, not for any of the unicode character syntax that ICU regex supports. Change-Id: I754296d2cf9286242e083cc7906ce3b8fda78dd5 (cherry picked from commit dca5163b6ef206ceb1f2d56feb7546c1929afe60) Reviewed-on: https://gerrit.libreoffice.org/6229 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-14fdo#67796: sw: fix table cursor when setting language in status barMichael Stahl1-5/+11
Unfortunately it turns out that the neat hack in commit b227a8e4d65e4bbfe991aed9342fe3e30eca8639 does not work unless something actually _deletes_ the current m_pTblCrsr between Push() and Pop(), e.g. by calling SwCrsrShell::ClearMark() or KillPams(). It would be possible to do some invalidation of m_pTblCrsr in SwCrsrShell::ClearUpCrsrs() or UpdateCrsr(), to set it's bChg flag or perhaps call ParkTblCrsr(); not sure if doing that is an improvement; certainly it shouldn't be tried in a 4.0.6 backport. So work around the problem locally in SwTextShell::Execute(). Conflicts: sw/source/ui/shells/textsh1.cxx (cherry picked from commit 9533e01713c0170bdae030429de38756d9c5ca74) Change-Id: I2981506b3065e824532deda28d21dad4a5734a8c Reviewed-on: https://gerrit.libreoffice.org/6212 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-11fdo#70143: fix SwDoc::ReplaceRangeImpl()Arnaud Versini1-3/+9
Fix fdo#70143 by reporting swaping of positions (regression from 6b08fe833186a04f9aef698a540d3a7493ac4519, which changed SwUndoReplace::Impl::SetEnd to use the wrongly set end position in rPam) Change-Id: I14c6f58bc5c1418c69eb565d42f1829856eed58c (cherry picked from commit 9685d20f2a0526a4c454cea1bd947eccbaeefa84) Fixes regex replace of "$" with nothing (to delete line breaks). Change-Id: If7ec1e5f524f7bb308a2949ace16cb8aa6989106 (cherry picked from commit f011a5c5071ed4a60f0ee7117608b72cecbb958d) Reviewed-on: https://gerrit.libreoffice.org/6175 Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2013-10-09bnc#779620 DOCX import: try harder to convert floating tables to text framesMiklos Vajna2-0/+10
Since 78d1f1c2835b9fae0f91ed771fc1d594c7817502, we convert floating tables to text frames only in case it's possible that there will be wrapping, to give better results for multi-page tables, which are multi-page, and technically floating ones, but that has no effect on the layout. The problem was that we try to do this decision too early, effectively the page width and margins were counted from the default letter size, instead of the actual values, which did not arrive at the time of the decision. Fix this by moving this logic at the section end. (cherry picked from commit bbef85c157169efa958ea1014d91d467cb243e6f) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Ic1fbceb54c8ec223ed01836fafe6220bb3b2410a Reviewed-on: https://gerrit.libreoffice.org/6104 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-09fdo#70201: sw: eliminate no-extent RSID-only AUTOFMT hintsMichael Stahl1-0/+9
These are already filtered out in SwpHints::TryInsertHint(), but they can be produced by a SwTxtNode::Update() following some deletion like in SwTxtNode::ReplaceText() (or maybe CutImpl() and RstAttr() too?). So in order to prevent SwHistorySetTxt being created for these, filter them out in SwpHints::MergePortions(), which has the advantage that it's one location to change; probably filtering in Update() and RstAttr() both would work too. (regression from 6db39dbd7378351f6476f6db25eb7110c9cfb291) Change-Id: I597a9ab290dcc3fb1b624dd2dca241c462acf256 (cherry picked from commit 91159b1c31a7fd474ba0b97828f593604790ce3c) Reviewed-on: https://gerrit.libreoffice.org/6167 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-04fdo#69384 fix impress -> writer copy&pasteMiklos Vajna2-0/+31
Regression from 2ade07126971b79c92f729fae5709f2e2e2b495c (fdo#62044 RTF import: don't overwrite existing styles when pasting, 2013-06-04), during paste, if existing style was found, then the intention was to skip that style, but instead we tried to create one. (cherry picked from commit 5ebe826caf75e8d00656b3333385bf0bbc05cb27) Conflicts: writerfilter/source/dmapper/StyleSheetTable.cxx Change-Id: I83adaf9fe6b8a578fa60c21b9463fabde7707d7e Reviewed-on: https://gerrit.libreoffice.org/6126 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-10-04CID#705749 mem leakCaolán McNamara1-0/+2
Change-Id: I8626e60d802b1c966667867d8c59ececff0a4255 (cherry picked from commit e17c91d1ff5c39b9b541b4d1bfb291c419fc76b5) Reviewed-on: https://gerrit.libreoffice.org/6118 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-09-30fdo#66743 fix import of some RTF_CLSHDNG valuesMiklos Vajna2-0/+15
This should be in sync with model.xml, got broken when the somewhat random values got fixed to be the same as the ones which are in the ww8 spec. (Regression from 26d40686128e70916a636e20f5ccc5763bbb6cc8.) (cherry picked from commit 21e07d473d1ce995ca0f1d0ac0edb03e75a7dfc1) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: Id62047e0b2d5d8402a7c8bce95de487afe627e32 Reviewed-on: https://gerrit.libreoffice.org/6091 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-19Resolves: fdo#69220 crash in doc (ww6)Caolán McNamara1-1/+15
Change-Id: I5a09d121a0b0342f28ba5d2d39027b27e9c9eba2 (cherry picked from commit 2e93541d00f9d4aaa6ad2aeb35ee0c901d216cc0) Reviewed-on: https://gerrit.libreoffice.org/5989 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-19fdo#41833: fix visual cursor position after resizingIvan Timofeev1-1/+1
SetOutputArea updates a cursor position, SetVisArea doesn't => call SetOutputArea after SetVisArea. Change-Id: Ie8f079cb3d567f759c84587a8072b98fab43588b (cherry picked from commit ddbcb6687722314b37cfda3170596ac7a4f69602) Reviewed-on: https://gerrit.libreoffice.org/5977 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-12Resolves: rhbz#1006850 crash in SwCommentRuler::GetCommentControlRegionCaolán McNamara1-0/+7
Change-Id: Ic846da3b22391d724da6f8df94dd771e89d2efb4 (cherry picked from commit b73dec8a06ef762098e642b2c37e4baad780b11a) Reviewed-on: https://gerrit.libreoffice.org/5924 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-09-11CID#736212 clip word 2 pap boundsCaolán McNamara6-1/+13
and add a unit test for the word 2..5 formats Change-Id: I6c7c26be6092acbb81282080de6c393d92ad5dd4 (cherry picked from commit 5d8a9d56de7c1217cfdbe2288c1a3a9128c3dbb5) Reviewed-on: https://gerrit.libreoffice.org/5908 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-09-09fdo#68291 RTF paste: don't set PageDescName during pasteMiklos Vajna4-0/+31
In general, paste should not deal with page styles. In this case, it even caused an additional page break. (cherry picked from commit b226dcb50d6728b62f39c9fa2e016724324944e3) Change-Id: Ia7c5a9ad844821b6622babfbd94469ec3c04cf0a Reviewed-on: https://gerrit.libreoffice.org/5883 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-09bnc#779642 VML import: groupshape-related fixesMiklos Vajna4-0/+36
1) fix TextHorizontalAdjust when layout-flow is vertical The shape had no special properties about hori/vert text adjustment, so it should be hori left / vert top. Then it has vertical layout-flow, so vert should be top and hori should be right (vert was center). 2) import result of sdt fields We can't have e.g. placeholder fields on drawinglayer rectangles, but at least the result of the field is now imported. 3) handle drawinglayer rectangle inset 4) handle drawinglayer rectangle char spacing (cherry picked from commits b10afb26296e33c77e94a6eda3f2c36c4d34c2aa, 3847de4b724f4f435bb68bceef9a5e187c3f363c, 870a2394a87c77740daf41e1aa81b130113f8e00 and 4cbc41bc4eaa822829e68c1ee11eafe834bb7da7) Change-Id: I79fa72c9235682030d23a03fdb0c7c40370c4a8a Reviewed-on: https://gerrit.libreoffice.org/5847 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frameMiklos Vajna2-0/+10
This is a port of commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de "Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame" from the WW8 filter to the DOCX one. (regression from edc4861a68e0269b83b17e0ec57912a1ce4220ad) (cherry picked from commit 78d1f1c2835b9fae0f91ed771fc1d594c7817502) Change-Id: If1bb4a8a3786aacd618585cf859b57ce9be85c51 Reviewed-on: https://gerrit.libreoffice.org/5788 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna2-0/+11
(cherry picked from commit 7d3778e0ef9f54f3c8988f1b84d58e7002d6c625) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf Reviewed-on: https://gerrit.libreoffice.org/5787 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06bnc#816593 DOCX filter: import paragraph spacing from table styleMiklos Vajna2-0/+11
(cherry picked from commit 17e904ed66c3caf87e658b9d3a18d7b13f4a0b52) Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774 Reviewed-on: https://gerrit.libreoffice.org/5786 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna4-0/+44
This is a backport of the fix + 3 other commits from master, which were needed to make the testcase pass on -4-1 as well. (cherry picked from commits 74c5ed19f430327988194cdcd6bdff09591a93fa, 824cc4bf4ae9035d4108e8da8e81eb57284f0b54, 53d27a30ce5f2c9f7d37a4089286116854c16215 and 76d1ca523ddcf89cc269fe51c70e66066943ef5a) Change-Id: I62a1f526cf1d4e4056daa1495d61f1b9f5c0b1b2 Reviewed-on: https://gerrit.libreoffice.org/5785 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-04fix html export of line spacingIvan Timofeev1-1/+1
regression from 84931eb8aeeb55a2570edb24f5c2d3409f9c2398 Change-Id: Ifcedcd34721a1ca162495f57ad36cfc6859ab0c4 (cherry picked from commit 3103306f4753f546f881cfc6bcdb357d4e1857d8) Reviewed-on: https://gerrit.libreoffice.org/5791 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-03bDel is unused uninitializedCaolán McNamara1-0/+1
Change-Id: Idac3a6805700d896b8569d1df79d32ca493c48b3 (cherry picked from commit 91a557561c24c7532c525692f279b1fcfd520f92) Reviewed-on: https://gerrit.libreoffice.org/5764 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-09-03n#816593: docx consecutive tables with different tblpPr needs to be splitCédric Bosdonnat2-0/+11
When importing docx with 2 <w:tbl> following each other, we have 2 possible behaviors: either merge them as one table as we did before or split them into two tables. The tables need to be split if they have different floating position properties. This required the ooxml tokenizer to repeat the table properties for each row of the table: or how would we know we don't need to split the table? The basic idea behind this hack is to temporarily store the table position and table properties before saving them. Thus we can compare them at the end of the row and decide to split the table or not. (cherry picked from commit 173d24a7316fccf0e838f71b92c10a772b19298d) Signed-off-by: Miklos Vajna <vmiklos@suse.cz> Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I2e3e70dfe7386090fe356575ee9d0e81aa031dc4
2013-09-03n#816593: Floating table width import fix: adjust the frame widthCédric Bosdonnat2-0/+4
(cherry picked from commit 9f4c8a8bca06b4c2a916a51909367b453fc41a8b) Change-Id: I8212bc5981418f6cbd514bf5002e6a5dbdf53152 Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-29fdo#66215: sw: fix clicking on text above background flyMichael Stahl2-4/+43
SwPageFrm::GetCrsrOfst() tries to compare the distance to the closest text vs. fly but does not do it right because GetCharRect() returns just a line of width 1 on the left edge of the character; try to figure out the entire area covered by the character via 2 calls to GetCrsrOfst(), which gives much better clickability. (regression from e8fbe97900f13305b17015d9044993bde4adab36) Change-Id: I825e86daf65692dfb962ad576772c5f543d02d19 (cherry picked from commit edd2db1c783bd571ff796a5298385cacc91877b9) Reviewed-on: https://gerrit.libreoffice.org/5660 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-29fdo#67358: sw: "fix" line painting artifacts when resizing columnsMichael Stahl1-1/+3
SwEditWin::MouseButtonDown(): for unknown reasons invalidating the window here causes the column resizing lines to not be removed after the resize is done, so disable it. (regression from 289185fd02d6d9734b6dbde01f15c4e6c5beacbb) Change-Id: If3ba0a72c53c5c2734fb905ae35d62f6a3e8938b (cherry picked from commit a2c67975c03010b90c706523293f180c1f29e229) Reviewed-on: https://gerrit.libreoffice.org/5661 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-27Fix iterator managementJulien Nabet1-2/+6
Change-Id: Ifb230525d3f5462553a3e78bb4ee740f6a7cc5c2 Reviewed-on: https://gerrit.libreoffice.org/5629 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/5638 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-08-27fdo#66145 DOCX export: fix not-well-formed outputAdam Co1-1/+3
Reviewed-on: https://gerrit.libreoffice.org/5002 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (partially cherry picked from commit 2d5978b22b402dea9dee5b468d2044ccc1208a15) Change-Id: Id8cc3829ccd5806295b0f240a570dc1d66ed0c87 Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-26Resolves: fdo#59048 crash on text-to-table undoCaolán McNamara1-0/+1
Delete the SwCellFrms attached to the layout of this SwTableNode early, otherwise the SwCellFrms will dereference the SwTableNode after it is deleted in _DeleteBox during the DelFrms of the DeleteSection in _DeleteBox when invalidating following SwFrms. SwUndoInsTbl::UndoImpl calls SwTableNode::DelFrms so presumably this is the right way to go about it. Change-Id: I6e088a30500d721bd18c57ced5c8ec331bb567eb Reviewed-on: https://gerrit.libreoffice.org/5634 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 34f09dadd99a15aaad7fc8b982e01d6ec764c74c) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2013-08-26bnc#834035 DOCX export: fix hyperlinks of illustration indexMiklos Vajna5-0/+103
We used to export raw Writer bookmarks, but that's not valid in OOXML. Instead, it has normal bookmarks around the sequence fields, so use them if they are available. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx sw/source/filter/ww8/docxattributeoutput.cxx (cherry picked from commits 750f0ebf97d19d1cf305dabe72d52ad6e90adf70, e9275c08acc2f4f1c925f78b56a1089515cd9a37 and 8f146a8042dd8f3c88f39f8317372cd9c02ce4ad) Change-Id: I0ef2ff7967c2802b53752c9505ef6db4cc2b8265 Reviewed-on: https://gerrit.libreoffice.org/5635 Reviewed-by: Jan Holesovsky <kendy@suse.cz> Tested-by: Jan Holesovsky <kendy@suse.cz>
2013-08-26fdo#33960: sw: fix cross reference fields some moreTroy Rollo3-34/+56
Change-Id: I46f9cf4132835c10ad82c9b014e5e8647902ab5e Signed-off-by: Michael Stahl <mstahl@redhat.com>
2013-08-24fdo#68319: sw: fix Chinese ConversionMichael Stahl1-1/+1
... and perhaps other things too: the SwScriptIterator constructor gets passed a temporary String created by implicit conversion from OUString and retains a reference to that; don't convert it to OUString like on master but just cast to String. (regression from 0295c8a34e39326414c1b98cf4da905802f061b0) Change-Id: I30c7309c14ec8f9e41ee5fe89eed513ddad154fe Reviewed-on: https://gerrit.libreoffice.org/5600 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-08-22fdo#66145: revert change to CopyMasterHeaderMichael Stahl1-0/+4
Not copying the nodes for first page is not an option; the real problem with the fdo45183.rtf is that flys in the header are not copied along with the nodes, like it is done in SwDoc::CopyPageDescHeaderFooterImpl. Also, the same problem may occur for footers too (CopyMasterFooter). Conflicts: sw/source/core/doc/docdesc.cxx The comment above is for the master commit, but copyting the flys is actually necessary with e1a9a348a519a69f898c9c1e6d87a5837b8267f9 too, since that copying code is now executed when changing sharing flags in the UI so withtout this commit you lose any flys anchored in the header/footer. (cherry picked from commit bf206549228685a68e1504db05119d8fa1d354b3) Change-Id: I985a6b89f8cde96dc0fa0b489c44d77987f91a8a Reviewed-on: https://gerrit.libreoffice.org/5541 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22fdo#66145: fix copying of header/footer when un-sharingMichael Stahl1-4/+12
SwDoc::CopyMasterHeader/Footer(): this could result in sharing the first-page header/footer with the left-page (!) when un-sharing via the dialog; the reason is that what actually happens here is that the left-page header/footer was never changed but the master one was copied in SwDocStyleSheet::SetItemSet(), so it sort of worked by accident before the first-page header/footer was added... Change-Id: Ia24df6ad59cda484559f2ca48ecaa7563878120b (cherry picked from commit e1a9a348a519a69f898c9c1e6d87a5837b8267f9) Reviewed-on: https://gerrit.libreoffice.org/5532 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()Michael Stahl1-3/+3
SwDoc::ChgPageDesc(): make the invalidation of the Undo stack on change of IsFirstShared work by delaying ChgFirstShare() until after the check. Change-Id: Ifbefe446df8b6d785ed1bb6394ec5beb803fb1fe (cherry picked from commit 0b7a823bb6df79384939dda4de3b7f28e5e52758) Reviewed-on: https://gerrit.libreoffice.org/5531 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt()Michael Stahl1-2/+2
... and GetRightFmt(). If the first format is requested it must be returned; the sharing works by copying the SwFmtHeader/Footer from aMaster to the other members. (regression from 4dc78aee9bcdb6ea5e9dc47ebb4a4b9e590c725a) Change-Id: I1708f01c18b155ae75c14fc407e52ccd2bd798d7 (cherry picked from commit 4df438c9a9d5e698c47c1e85903eb81880a5e6fa) Reviewed-on: https://gerrit.libreoffice.org/5530 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22fdo#68076 RTF import: default font had priority over the specified oneMiklos Vajna2-0/+27
Regression from 60c17b2873506ed8b068b34840aecda0c1d9bd65. (cherry picked from commit f1e5e271f9aadc2c5e5af3ffae410b6c598e5398) Change-Id: Ie16d611622e6a814d5cbea00c3f992cd9ecba027 Reviewed-on: https://gerrit.libreoffice.org/5579 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>