summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2023-04-21MCGR: Reduce diverse GradientStyle enums to single UNO API oneArmin Le Grand (allotropia)
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-21SwXShape no longer needs to extend SvtListenerNoel Grandin
after commit 40babcfa637957bf7b59caa3cd12a630189e3e63 tdf#154827 and tdf#154428 graphics anchored in Writer as character. Change-Id: Iad3ad440690fa9b8530f32e17a113b8365656a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-21sw floattable, crashtesting: fix PDF export of forum-mso-de-117064.docxMiklos Vajna
Converting the bugdoc to PDF crashed Writer layout since commit ce3308a926f036b87515b8cd97d2b197063dc77a (tdf#61594 sw floattable: import floating tables as split flys by default, 2023-04-12). What happened is that we hit a case in the SwTextFrameBreak ctor where the frame had the "is in section" bit set, but the frame wasn't actually in a section, so when looking up that parent section frame, we found nothing, and later code assumed that we always find something. This is fine, the root of the problem was that in the non-legacy case GetFlyAnchorBottom() assumed the upper of the anchor frame is the body frame, so in case you had a protected section in DOCX, we mapped that into a Writer section, resulting in a body -> section -> anchor frame hierarchy. Fix the problem by improving GetFlyAnchorBottom(), so it works with the body frame of the page (of the anchor), not with the anchor's upper, which breaks in the section case. This only happened in the compatibilityMode=15 case, i.e. DOCX files produced by Word >= 2013. Change-Id: I94ed22701d275e7a9048c6154652d40268850c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150741 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-21sw: fix crashtesting assert on fdo44018-2.docMichael Stahl
itrpaint.cxx:435: void SwTextPainter::DrawTextLine(): Assertion `!roTaggedParagraph' failed. The problem is that there are in fact 3 lines with the numbering bullet, which is a problem that existed since LO 4.1, but that only changed the WW8 import so it really exists all the way back to OOo 3.0.1. The SwNumberingPortion is created, then it is cloned for the insertion of the tab, then the 2nd one is deleted (which is expected as it is empty), then due to some ChkFlyUnderflow() SwTextFormatter::FormatLine() resets the m_bNumDone flag and the next line gets another numbering. The m_bNumDone flag must be reset if the numbering portion was deleted, but not otherwise. (regression from commit 9b38beadf9eaf027b201cdf0ecb2bce5611014dd) Change-Id: I575947fdfb8786ad6d0f9e83636c39eb929a1b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150709 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-21tdf#153016 sw DOC: don't export automatic redline commentsLászló Németh
DOC format doesn't support comments of change tracking, so DOC export converts them to annotations. But skip this conversion in case of automatic redline comments of tracked annotations ("Commend added" and "Comment deleted") to avoid of double annotations (the original tracked annotation and the newly added annotation of the comment of the change tracking). Regression from commit 3a14b2040ecd95a23acbc3e8d0f8087505135f11 "tdf#148032 sw: add redline comment for tracked comments" Change-Id: I563859d203886a7f81f6a9e1f164ea5524d80d1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150735 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-21tdf#133363 sw DOCX import: remove extra auto space in mixed listCzeber László Ádám
Remove extra auto space even for mixed list styles. For mixed style lists, it has not removed all the extra space needed. See also commit 9cca15204af9cc44a8a9528ccf2f36616fb70e69 "tdf#133052: DOCX import: fix top auto margin of subitems". Change-Id: I15e58616d5810ea57ac9339bdd8e4b5859f09c81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150313 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-21tdf#153195 sw RTF import: fix negative indent of table in footerCzeber László Ádám
Fix missing processing of TBLIND keyword, which puts the table in the footer in the correct orientation, applying also the following conversion between RTF and OpenDocument/Writer to avoid regression: Left spacing of the table has different meaning in MSO and Writer. In MSO, left spacing means the indent of the text content of the cells, i.e. if table spacing is 0, the text content of the cells is vertically adjusted to the text content of the table, not to the table border. In Writer, if left table spacing is 0, the table border is vertically adjusted to the page text content. So for the correct conversion, left spacing of the table decreased with the left padding of the table text content during the RTF import. (See table padding on the Borders pane of Table Properties.) Reported and created unit test document by Gábor Kelemen. Change-Id: Ia3a781044a11d012f204a8ac3b160ad4c5dc896a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150022 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-21sw floatable: teach the RTF export about SwFormatFlySplitMiklos Vajna
Write \nobrkwrptbl unconditionally till we have a layout mode where floating/wrapped tables don't split/break. Change-Id: I0a19d034651a276dde8df391a5f1ca8ae39ddfed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150739 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-20tdf#154113: do not forget to split the outermost section frameMike Kaganski
... when the inserted section node is not the first one. The very first frame, where InsertCnt_ puts content to, may already have some content after the insertion position. When an inner section ends, the current section needs a new frame, and the rest of content must go to that new frame. Previously, the new empty frame was created without taking the content move into account. This moves the split into the single place inside InsertCnt_, to avoid special processing in MakeFrames. Change-Id: I1335ebbc620af0f2b064141e8267e5bd1af0b195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150675 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-20sw floattable: remove no longer needed DOC import heuristicsMiklos Vajna
Now that IsFlySplitAllowed() is true, bNoFly and related code in can go in sw/source/filter/ww8/. Change-Id: I5c3eb4002151af3436c596ccca72d5de7ec690dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150679 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-20Missing test dependenciesStephan Bergmann
> warn:vcl.gtk:1737406:1737406:vcl/unx/gtk3/gtkinst.cxx:23545: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: Failed to open file “instdir/share/config/soffice.cfg/vcl/ui/screenshotparent.ui”: No such file or directory > cppunittester: vcl/unx/gtk3/gtkinst.cxx:23548: void {anonymous}::load_ui_file(GtkBuilder*, const rtl::OUString&): Assertion `rc && "could not load UI file"' failed. and then > warn:vcl.gtk:1738858:1738858:vcl/unx/gtk3/gtkinst.cxx:23545: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: Failed to open file “instdir/share/config/soffice.cfg/svt/ui/scrollbars.ui”: No such file or directory > cppunittester: vcl/unx/gtk3/gtkinst.cxx:23548: void {anonymous}::load_ui_file(GtkBuilder*, const rtl::OUString&): Assertion `rc && "could not load UI file"' failed. and then > warn:vcl.gtk:1739896:1739896:vcl/unx/gtk3/gtkinst.cxx:23545: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: Failed to open file “instdir/share/config/soffice.cfg/sfx/ui/tabbar.ui”: No such file or directory > cppunittester: vcl/unx/gtk3/gtkinst.cxx:23548: void {anonymous}::load_ui_file(GtkBuilder*, const rtl::OUString&): Assertion `rc && "could not load UI file"' failed. and then > warn:vcl.gtk:1741504:1741504:vcl/unx/gtk3/gtkinst.cxx:23545: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: Failed to open file “instdir/share/config/soffice.cfg/svx/ui/sidebarstylespanel.ui”: No such file or directory > cppunittester: vcl/unx/gtk3/gtkinst.cxx:23548: void {anonymous}::load_ui_file(GtkBuilder*, const rtl::OUString&): Assertion `rc && "could not load UI file"' failed. Change-Id: I0ebdbbaadbf5cec7c86d24b2603537d93db3738b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150690 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-20tdf#154817 sw UI: no hatch/gradient name if not selectedJustin Luth
This fixes a LO 7.2.0 regression caused by commit 3f6797c29e9672eba354400f24a669244fd746c0. A unique name was being created for gradients and hatches every time the paragraph dialog box was OK'd, even if the Area tab was not selected or natigated to. Only create the name if the gradient or hatch is actually selected as the fill type. Change-Id: I088954db07d025570b0f5ecd5785020052c6f1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150669 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-04-20tdf#154827 and tdf#154428 graphics anchored in Writer as character..Noel Grandin
..become anchored at paragraph when reopening the document regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 ref-count SdrObject This used to work by accident, previously, the SwXGroupShape that we need would get created and destroyed and handful of times, and then properly created. Now, however, the first time we create it it sticks around, which means it does not get the m_pFormat field configured correctly. Fix this by removing the caching of m_pFormat from SwXShape, and just fetching it from the model when we need it. Change-Id: I10fe2ad0b877b3d928d5288e73cfed373b27a506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20tdf#142978 Add quick fix action for missing alt textSamuel Mehrbrodt
Change-Id: I09234e50def6b52b9a70081f31bb45b8d7e2cdd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150003 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-04-20sw floattable: import floating tables from DOC as split flys by defaultMiklos Vajna
To get wider testing. Change-Id: Id9d21aeca3bb9c00a5b4adfd45934a242e7559bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150597 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-20add truncate-multiline as our usual propertyCaolán McNamara
and remove input-purpose as we don't use that, esp for auto-conversion to gtk4 Change-Id: Icf2f9127b189b9966aac3fcadb09c2a01bd671f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150657 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-20Allow Copy Hyperlink Location in protected fieldsVojtěch Doležal
This change aims to make it possible to copy hyperlinks from protected fields. That includes showing command and fixing it's broken behaviour, which wasn't detectable because it was hidden. Change-Id: I119e7617fcd7261e437411c86d4c920931e9fe84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150070 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-20introduce sw::FrameFormats<>Bjoern Michaelsen
- a drop-in replacement for SwFrameFormats - ... but strongly typed sw::FrameFormats<SwTableFormat*> returns SwTableFormats - replace in SwDoc for GetTableFormats - also: use tags to name indices, lose the references to them as members - add an explicit Rename() member to allow both SwFrameFormats and sw::FrameFormat<> to be updated if a format is rename. This should be removed once all SwFrameFormats have been moved to sw::FrameFormats<>. - Ultimately it seems like a few linear iterations of the table formats can be replaced with an index-based accesss by name (in a follow-up). Change-Id: I1c49d64621104c964c95c6da0c84e01ee7f97028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150243 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-19tdf#154909: Assertion dont select when frozen in sw/redlndlg.cxxJulien Nabet
relevant part of bt: 6 0x00007f9968f0b3b0 in (anonymous namespace)::GtkInstanceTreeView::make_sorted() (this=0x55a0e2935d20) at /home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:15222 7 0x00007f99438be35e in SwRedlineAcceptDlg::InsertParents(unsigned long, unsigned long) (this=0x55a0e2846f50, nStart=1, nEnd=1) at /home/julien/lo/libreoffice/sw/source/uibase/misc/redlndlg.cxx:932 8 0x00007f99438bf72b in SwRedlineAcceptDlg::CalcDiff(unsigned long, bool) (this=0x55a0e2846f50, nStart=1, bChild=false) at /home/julien/lo/libreoffice/sw/source/uibase/misc/redlndlg.cxx:557 9 0x00007f99438bab7a in SwRedlineAcceptDlg::Activate() (this=0x55a0e2846f50) at /home/julien/lo/libreoffice/sw/source/uibase/misc/redlndlg.cxx:416 Full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=186793 It seems there can be several levels of freeze since the caller of make_sorted() does: 930 rTreeView.thaw(); 931 if (m_pTable->IsSorted()) 932 rTreeView.make_sorted(); so I would have supposed it's not frozen. Change-Id: Ia1ce00aaa09efed05f614ca57cfe11cacf2da4b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150642 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-19loplugin::unusedmethodsNoel Grandin
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19loplugin:finalclasses in swNoel Grandin
Change-Id: I0b68920bb82bb9c096f4ee2e3532e4588302dc8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150605 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19sw floattable: fix CppunitTest_sw_ww8export2's testTdf80635_pageRightRTLMiklos Vajna
Assert that the fly is aligned to the right of the page instead of testing it's not floating (even if sprmPPc is present in the document). Change-Id: Ibf160d02ca6ee997edf6232e5569c90d9b570c48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150603 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-19libxml2: upgrade to release 2.10.4Michael Stahl
Fixes CVE-2023-29469 and CVE-2023-28484. Also: SAX2: Ignore namespaces in HTML documents which is probably the reason why one test fails, so switch it to parsing XML: HTML parser error : Tag reqif-xhtml:div invalid <reqif-xhtml:div> HTML parser error : Tag reqif-xhtml:table invalid <reqif-xhtml:table cellpadding="2" cellspacing="2"> ... reqif-table.xhtml: C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/test/source/xmltesttools.cxx:195:testReqIfTable::Import_Export equality assertion failed - Expected: 1 - Actual : 0 - In <file:///C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/tempdir/lu134607bxu8q.tmp>, XPath '/html/body/div/table/tr/th' number of nodes is incorrect Change-Id: Icc161b39515c996193366bc777a67eca79e4e892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150544 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-19sw floattable: fix CppunitTest_sw_ww8export2's testTdf80635_pageLeftMiklos Vajna
Assert that the left of the floating table is around the page edge, not some larger value from the left of the body frame. Change-Id: Ibb5ddf64706dc2296b0aaf2273d216ee63fae63f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150600 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-19use more concrete UNO type in SwFieldTypeNoel Grandin
Change-Id: Iffb0ffad6daf102299fa7ce072bfc117cdf38b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19sw floattable: fix CppunitTest_sw_ww8export2's testTdf80635_marginRTLMiklos Vajna
The rendering is unchanged, but now the fly is positioned, the inner table doesn't have an own orientation. Also, this way the exported result is correct, so assert that, too. Change-Id: I158a856fd1e3712749867e6882b36974c0dfc3e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150592 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-19use more concrete UNO type in SwTableAutoFormatNoel Grandin
Change-Id: I5c36a268a76afcf7af5829dc7f873f4410f68298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19use more concrete UNO type in SwXTextTableStyleNoel Grandin
Change-Id: I19b556a5fc2ee9f475478b16e228aa3670146551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150587 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19CppunitTest_sw_htmlexport: avoid reqif magic in testReqIfOleDataMiklos Vajna
Set the filter options explicitly, rather than inferring it from the test name. Change-Id: I96ab2055c154ebd464b930fc4c6808ffbc12bda0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150585 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-19use more concrete UNO type in SwBoxAutoFormatNoel Grandin
rather than hiding the relationship behind XInterface Change-Id: Ie5e6e527d39ab2b4a26ae7830a196b354d2a6f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19sw: rearrange ThemeTest - add checks for fill, line stylesTomaž Vajngerl
Change-Id: Ia3fd9b6d608e83dcada03244c7347725046fdbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149362 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-18This is redundantMike Kaganski
Change-Id: Ie01bc8f817022585939338d88f850b24ac4e9091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-18sw: these test should also check the exportXisco Fauli
Change-Id: I4b6a42454c186b17bf35c204dae1e051bb401b84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150580 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-04-18sw: fix divide by 0 in SwFlyFrame::CalcRelXisco Fauli
https: //crashreport.libreoffice.org/stats/signature/SwFlyFrame::CalcRel(SwFormatFrameSize%20const%20&) Change-Id: If7a1919a2829bbec3292b3aa5f7f719c5ba0beef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150579 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-18tdf#150020 pptx import: handle algn for outerShdwSarper Akdemir
Introduces RectangleAlignmentItem that holds a value of the enum model::RectangleAlignment. Introduces SDRATTR_SHADOWALIGNMENT that holds alignment for a shadow. Implements import of algn for outerShdw. Makes the alignment considered while the shadow is being scaled. Also adds a unit test that covers this. Change-Id: I8f4eaed5f0d9428a7f405c65f19237f9e70ca151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148934 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com>
2023-04-18sw: fix divide by 0Xisco Fauli
See https://crashreport.libreoffice.org/stats/signature/operator/(Fraction%20const%20&,Fraction%20const%20&) Change-Id: Ia93e2969d6eb0bde71c8419f2aa90bb7aa231f61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150553 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-04-18bApres -> bAfterMike Kaganski
Change-Id: Iac6965fa7695e9123b7861add6e4425bb31b79ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150574 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-18tdf#154269 - Respect FindReplaceRememberedSearches: add unit testAndreas Heinisch
Change-Id: I72db7964b512a40c4b81b218b2cae60ab34d47c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150522 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-04-18sw floattable: fix CppunitTest_sw_ww8export2's testTdf80635_marginLeftMiklos Vajna
The rendering is unchanged, but now the fly is positioned, the inner table doesn't have an own offset. Change-Id: I6ffaeb2672e04b3b855cbcb63ceba6506b970399 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150545 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-18sw floattable: fix CppunitTest_sw_ww8export's testTdf112346Miklos Vajna
Assert the layout, not the doc model, then this still passes. Change-Id: I5172fbc97547310f26cdf364191f404d875b3ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150540 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-18tdf#147810 DOCX export: fix corrupt file with hyperlink and text boxTünde Tóth
Remove m_startedHyperlink boolean, because the m_nHyperLinkCount is more precise in nested paragraphs, e.g. when exporting hyperlink combined with the export of the paragraph of a text box attached to the paragraph of the hyperlink, which caused corrupt DOCX file with data loss. Regression from commit 9835a5823e0f559aabbc0e15ea126c82229c4bc7 "sw textboxes: reimplement ODF import/export". Change-Id: I94bcb64a756ba2c90360629640f667190fa45f3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149677 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-18sw floattable, layout: don't split inside headers/footersMiklos Vajna
CppunitTest_sw_ww8export2's testTdf128700_relativeTableWidth had a layout loop in the SW_FORCE_FLY_SPLIT=1 case. This seems to happen because the footer had a big floating table, which doesn't fit the anchor's upper, but adding more pages won't help the table to fit. Fix the problem by not trying to split floating tables in headers/footers. An alternative would be to filter this out at import time, but then we would loose the setting on DOCX/DOC roundtrip, which is not ideal. Change-Id: Ice97159563812acee823dbd00b364601db293ed9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150535 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-18sw: document SwFontMiklos Vajna
Explain why it's not like SwFont would just derive from SvxFont directly. Change-Id: I78bd536654831836351029badcaa47e6cc81c7eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150529 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-18Some missing XServiceInfo implementationsStephan Bergmann
Change-Id: I1cf871b40f9f4020147dac0456ebeed3de0438e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150533 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-17tdf#130199 sw Confirm deletion of hidden sectionsBalazs Varga
To enhance the existing discoverability of hidden sections via Navigator by a confirmation box when a hidden section is to be deleted. Also add an option to switch on/off this warning message named "ShowWarningHiddenSection". The default setting is on. Change-Id: I91a1a32524f8d8d8fd0f230c142654df4367e729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150231 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-17-Werror,-Wunused-variableStephan Bergmann
Unused ever since it got introduced in 9a62e50d72bdcc786df4ea6094b349d1b3215b56 "tdf#154771 sw: fix drag & drop moving of table columns". (Found with an experimental Clang build supporting __attribute__((warn_unused)) on individual ctors rather than just whole class types, and the corresponding css::uno::Reference ctor marked accordingly.) Change-Id: Ibd17de455af63211699e493de991f3a01e40f16f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150466 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-17sw: improve naming of WW8_TablePos membersMiklos Vajna
- Sp26 -> TDxaAbs - Sp27 -> TDyaAbs - LeMgn -> LeftMargin - RiMgn -> RightMargin - UpMgn -> UpperMargin - LoMgn -> LowerMargin - Sp29 -> TPc - Sp37 -> PWr Change-Id: Icc92ea3180a05c65a8a41ff04d97a1217c7b51b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150472 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-17tdf#137542 don't crash at leastCaolán McNamara
doesn't address the underlying issue though Change-Id: I7f5a5dba01c399ec78eceaab6ea85fc0b8897927 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-17sw floatable: teach the DOC export about SwFormatFlySplitMiklos Vajna
Floating tables were always written back as a shape, containing a table, which can't split over pages, not even in Word. Now that we have split flys, we know that floating tables are mapped to split flys, so we can map split flys back to floating tables on export. The following SPRMs need writing, which are more or less the equivalent to DOCX's <w:tblpPr> attributes: - sprmTPc: relation orient for positioning the table - sprmTDyaFromText, sprmTDyaFromTextBottom: top/bottom margin - sprmTDxaFromText, sprmTDxaFromTextRight: left/right margin - sprmTDxaAbs: horizontal orientation - sprmTDyaAbs: vertical orientation With this, testTdf107773 passes in the SW_FORCE_FLY_SPLIT=1 case, while previously only the import side worked. Change-Id: Id534c1497eb56f9268bf49d2a19764051397bb18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150464 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins